Page 1 of 1

Phoca Download Plugin - Bugfix multivids in multiarticles

Posted: 02 Mar 2010, 14:29
by ndee
Hi,

the download plugin renders multiple video files correctly with flowplayer in one article. But if you have a category in blog style and you have multilple articles with videos published each div an js gets the same IDs and causes the plugin to not work anymore.

My bugfix proposal is to add the article id to the div and js code so that they are unique for each article.

Bugfix: go to line 70 of plg_phocadownload/phocadownload.php (version 1.3.3) : where it says:

Code: Select all

for($i = 0; $i < $count_matches; $i++) {
and add a new var below that line:

Code: Select all

//generate unique id by concatenating the run variable $i with the article id
$count = $article->id . "-" . $i;
and then replace the ocurrances of $i with count in js and div code about lines 289,296,319
find:

Code: Select all

pdplayer'.$i.'
and replace with:

Code: Select all

pdplayer'.$count.'
Greets,
ndee

Re: Phoca Download Plugin - Bugfix multivids in multiarticles

Posted: 06 Mar 2010, 16:07
by Jan
Hi, thank you for this information.

Jan