plugin with filelist only shows 5 entries

Phoca Download - download manager
ReneT
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 21 Aug 2014, 08:23

plugin with filelist only shows 5 entries

Post by ReneT »

Joomla 3.3.3, Phoca Download Component 3.0.5, Phoca Download Plugin 3.0.2, Phoca Download Button Plugin 3.0.1

There is a hardcoded limit "$limit=5" in plugin code phocadownload.php.
Is there any particular reason for that?


Thx in advance for your support
Rene
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: plugin with filelist only shows 5 entries

Post by Jan »

Hi, it is default value. Variables always should have a default value.

This value is overwritten by parameter if set:

Code: Select all

else if($values[0]=='limit')			{$limit				= (int)$values[1];}
Jan
If you find Phoca extensions useful, please support the project
favo_carv
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 17 Oct 2014, 17:00

Re: plugin with filelist only shows 5 entries

Post by favo_carv »

Thanks to this post by ReneT I managed to fix the "limit = 5" in the plugin code, as my website has more than 5 files to display in a few of the lists and it worked fine.

I did by increasing the default value. Is there another way to do this? Or what I did (increasing the default value) was the correct thing to do?

I'm not super good in PHP that's why I ask.

Thanks for any reply.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: plugin with filelist only shows 5 entries

Post by Jan »

Hi, this is not about PHP. In Joomla! paremeters are used and you need to define a default value (mostly in php script) but if you set some new value in Options of component, such will be used (there is no need to change php code) :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply