Quick change to popular posts list items MostPopular plugin
Noticed a small bug. In class.mostpopularmodule.php, if the loop that adds new list items (ie popular posts) runs out of items and returns, then the html outputted will create a list that envelopes whatever module or html is below it on the page. I added a small fix around lines 40-43 (I changed other things in the script so I'm not sure where this is in the original)...look for the line:
if($DiscID < 1) return;
And I changed this to:
if($DiscID < 1) { echo "</ul></div>"; return; }
Looks like this effectively closes that loop with the end ul and div tags in the event of the loop running out of new list items to append.
I made a few other changes to the script (added the original user's photo, and added the ability to not include private category posts), but I won't post the changes unless peregrine wants them. Hope this helps someone.
Comments
@qbauer
Thx. I fixed this already with a different modification in the most recent version I posted a few days ago or so.
Are you using the latest version?
the line you reference doesn't exist in the latest version if($DiscID < 1) return;
I figure its not worth reporting bugs on outdated versions - if what I am thinking is the case.
let me suggest this plugin
http://vanillaforums.org/addon/versioncheck-plugin
If you want to post stuff feel free, I may or may not add them - but it might help somebody.
But I would suggest posting changes or mods to the most recent version of the plugin, not old ones.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yep, I was commenting on version 1.5 and didn't realize that you had updated. Should have looked for an update. You're too fast!
Agreed.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I think this one is better
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Both are!