Here's a patch that movies the uc_file_user_downloads table creation to a theme_user_downloads function. This allows people who wish to customize the look of their file downloads area to do so by overriding the theme function in their template.php.
| Comment | File | Size | Author |
|---|---|---|---|
| uc_file_downloads_theme-d5.patch.txt | 2.33 KB | torgospizza |
Comments
Comment #1
rszrama commentedDefinitely a good direction, but one thing I've learned (that we'd been doing wrong) was that you should really be passing any data you need for the theme function as an argument. Themers shouldn't have to make API calls and database queries in their theme functions. So, ideally we'd pass in more than just a $uid. Also, something like setting the page title should be done in the page callback itself instead of in the theme function.
I'm happy to brainstorm about how to pass in the right data to the theme function if you have any suggestions.
By the way, excellent to hang out in DC. Gotta do it again. : )
Comment #2
rszrama commentedComment #3
torgospizzaThanks Ryan, agreed. After I submitted the patch cha0s looked at it and said basically the same thing. My suggestion is to make it so that the theme function receives an array that contains all the information contained about the user's products -and that way it's up to the theme function to, well, decide how to make it look as rendered html.
It'll take a bit of restructuring but I'm confident we can bang it out.
Comment #4
tr commentedReviving this, since I had to deal with this same thing recently. I plan to roll a new patch to address this.
Comment #5
tr commentedTagging
Comment #6
longwaveChanging component.
Comment #7
longwaveThis was already done in #508430: Create theme function for uc_file user download page