View Full Version : Hack to make comments per page persistent across pages
se.nsuo.us
06-07-2006, 11:47 AM
One of the things which bugged me on the admin side was that the number of comments selected from the bottom did not persist across the pages for the session.
So I hacked support for the same into comments.php - What the hack baiscally does is puts the value into $_SESSION and uses it in subsequent calls.
See the code http://se.nsuo.us/contrib/comments.phps
OR if you just want to use it download the file below change .txt to .php and put it in your admin folder (remember to take backup of your original comments.php file)
http://se.nsuo.us/contrib/comments.txt
Joe[y]
06-07-2006, 03:44 PM
added in cvs - you're a star!
codepoit
06-07-2006, 03:56 PM
thank you!!!
HiImSeth
06-07-2006, 07:33 PM
excellent hack! i've wanted this for some time but figured it was only bothersome to me. =]
se.nsuo.us
06-08-2006, 04:44 AM
@Joe[y] Have you added the same hack for images? or you want me to do that as well....
Joe[y]
06-08-2006, 08:47 AM
@Joe[y] Have you added the same hack for images? or you want me to do that as well....
me and connie actually had some trouble with comments.php after merging your version. i posted the newest cvs version (without your changes) in 'pumpgatan' so could you look at that version please? there might be some differences affecting it that i don't understand.
se.nsuo.us
06-08-2006, 09:35 AM
OK! I just downloaded the zip and modified the comments.php from that zip grab it from http://se.nsuo.us/contrib/comments_1_5.txt - Let me know if that works
Hint: Use Winmerge to see the changes that I have made :)
Joe[y]
06-08-2006, 10:11 AM
there seemed to be an error on line 165:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jspurlin/public_html/dev/pixelpost/1.5/admin/comments.php on line 165
the code being:
echo "<div class=\"jcaption\">$admin_lang_cmnt_commentlist $_SESSION['numimg_pp'] $admin_lang_cmnt_comments, $admin_lang_page $currntpg $admin_lang_of $num_cmt_pages<br />
which i replaced with
echo "<div class=\"jcaption\">$admin_lang_cmnt_commentlist $admin_lang_cmnt_comments, $admin_lang_page $currntpg $admin_lang_of $num_cmt_pages<br />
this fixed the problem but I can't be sure if the hack is now functioning as it should as i only have 3 comments on my development blog.
se.nsuo.us
06-08-2006, 11:45 AM
Oops! my bad. have corrected and replaced the file.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.