Page 1 of 1

Adding an upload button

Posted: 19 Aug 2011, 21:46
by brentwilliams2
I found that it was helpful to have an upload button directly in the template to make uploading easier. This can be applied to most category/section/sections files.

(This uses the existing blue button style which I personally don't use anywhere else. I probably need to change the little icon that goes with it though...)

Right under the 5th line in the category default.php file, where it says, "<div class="componentheading'......", insert the following code on the next line:

Code: Select all

echo '<div id="phoca-dl-category-box" style="float:right;color:white;font-weight:bold;"><div class="pd-category"><div class="pdpreview'.$this->tmpl['button_style'].'"><div><a href="apartment-forms/upload-files" rel="nofollow">Upload</a></div></div></div></div>';
For styling purposes, it is also important to add the following to the componentheading div on the line above:

Code: Select all

style="display:inline;"
Enjoy!

Re: Adding an upload button

Posted: 20 Aug 2011, 23:49
by Jan
Hi, thank you for the guide.

Jan

Re: Adding an upload button

Posted: 21 Aug 2011, 04:48
by brentwilliams2
My pleasure!

Re: Adding an upload button

Posted: 18 Dec 2011, 13:06
by icatian
hi brent, could you be pls more specific in this guide?
i really need to add an "upload" button to my template menu, but if i add that script, the only thing returning from hitting the upload button is a 404 error :|