Phoca Download Plugin - Bugfix multivids in multiarticles
Posted: 02 Mar 2010, 14:29
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:
and add a new var below that line:
and then replace the ocurrances of $i with count in js and div code about lines 289,296,319
find:
and replace with:
Greets,
ndee
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++) {
Code: Select all
//generate unique id by concatenating the run variable $i with the article id
$count = $article->id . "-" . $i;
find:
Code: Select all
pdplayer'.$i.'
Code: Select all
pdplayer'.$count.'
ndee