Page 1 of 1

plugin with filelist only shows 5 entries

Posted: 21 Aug 2014, 08:47
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

Re: plugin with filelist only shows 5 entries

Posted: 25 Aug 2014, 21:42
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

Re: plugin with filelist only shows 5 entries

Posted: 17 Oct 2014, 17:46
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.

Re: plugin with filelist only shows 5 entries

Posted: 23 Oct 2014, 17:32
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