Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 06-07-2006, 11:47 AM
se.nsuo.us Offline
pixelpost guru
 
Join Date: Dec 2005
Location: Somewhere in India
Posts: 624
Hack to make comments per page persistent across pages

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
__________________
http://se.nsuo.us - A photoblog of sensual, abstract nudes [may not be work safe for some]
My Pixelpost Addons, Cheesecake-Photoblog Software
Reply With Quote
  #2  
Old 06-07-2006, 03:44 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
added in cvs - you're a star!
Reply With Quote
  #3  
Old 06-07-2006, 03:56 PM
codepoit's Avatar
codepoit Offline
pixelpost guru
 
Join Date: Mar 2006
Location: Danbury, CT
Posts: 186
thank you!!!
Reply With Quote
  #4  
Old 06-07-2006, 07:33 PM
HiImSeth Offline
pp veteran
 
Join Date: Mar 2006
Location: Tulsa, OK
Posts: 62
Send a message via AIM to HiImSeth Send a message via MSN to HiImSeth
excellent hack! i've wanted this for some time but figured it was only bothersome to me. =]
__________________
babyElijah
Reply With Quote
  #5  
Old 06-08-2006, 04:44 AM
se.nsuo.us Offline
pixelpost guru
 
Join Date: Dec 2005
Location: Somewhere in India
Posts: 624
@Joe[y] Have you added the same hack for images? or you want me to do that as well....
__________________
http://se.nsuo.us - A photoblog of sensual, abstract nudes [may not be work safe for some]
My Pixelpost Addons, Cheesecake-Photoblog Software
Reply With Quote
  #6  
Old 06-08-2006, 08:47 AM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
Quote:
Originally Posted by se.nsuo.us
@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.
Reply With Quote
  #7  
Old 06-08-2006, 09:35 AM
se.nsuo.us Offline
pixelpost guru
 
Join Date: Dec 2005
Location: Somewhere in India
Posts: 624
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
__________________
http://se.nsuo.us - A photoblog of sensual, abstract nudes [may not be work safe for some]
My Pixelpost Addons, Cheesecake-Photoblog Software
Reply With Quote
  #8  
Old 06-08-2006, 10:11 AM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
there seemed to be an error on line 165:

Quote:
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:

PHP Code:
                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

PHP Code:
                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.
Reply With Quote
  #9  
Old 06-08-2006, 11:45 AM
se.nsuo.us Offline
pixelpost guru
 
Join Date: Dec 2005
Location: Somewhere in India
Posts: 624
Oops! my bad. have corrected and replaced the file.
__________________
http://se.nsuo.us - A photoblog of sensual, abstract nudes [may not be work safe for some]
My Pixelpost Addons, Cheesecake-Photoblog Software
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 09:54 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs