Adding an upload button

Phoca Download - download manager
brentwilliams2
Phoca Member
Phoca Member
Posts: 26
Joined: 23 Aug 2009, 01:22

Adding an upload button

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48610
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Adding an upload button

Post by Jan »

Hi, thank you for the guide.

Jan
If you find Phoca extensions useful, please support the project
brentwilliams2
Phoca Member
Phoca Member
Posts: 26
Joined: 23 Aug 2009, 01:22

Re: Adding an upload button

Post by brentwilliams2 »

My pleasure!
icatian
Phoca Member
Phoca Member
Posts: 19
Joined: 02 Nov 2011, 16:41

Re: Adding an upload button

Post 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 :|
Post Reply