AJAX comments pagination

Download plugins, language packs and stuff.

AJAX comments pagination

Postby FI-DD » Fri Mar 16, 2007 11:53 am

This plugin loads the next comments page by using AJAX.



Example: http://english.cutenews.ru/cuteru/examp ... -news.html



Installation:



1. Make sure you have the latest version of inc/show.comments.php and inc/lang/en/templates.ini. If you downloaded CuteNews.RU after 16 March 2007 you are safe. If you downloaded it before you have to redownload it and replace those two files with the ones from the download.



2. Upload the plugin and the folder to the plugins/ folder and activate the plugin.



3. Put this at the very end of your full story template:

Code: Select all
<div id="ajaxcomments">




4. Put this at the very beginning of your comment form template:

Code: Select all
</div>




5. Put something like this in your comments pagination template:

Code: Select all
[prev-link]< [/prev-link]{cpages}[next-link] >[/next-link]




6. Put this between the <head> tags of your news page:

Code: Select all
<script type="text/javascript" src="<?=$config_http_script_dir; ?>/plugins/ajaxcommentspagination/ajaxcommentspagination.js"></script>
Attachments
ajax_comments_pagination.zip
Ajax comments pagination
(4.04 KiB) Downloaded 368 times
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Heya Im Me » Fri Mar 16, 2007 4:02 pm

Weird problem...



I followed the instructions exactly but I keep receiving these errors in Manage Templates when I click Pagination, Comment Pagination, and Dateheader:







Pagination


Code: Select all
Warning: ksort() expects parameter 1 to be array, null given in cutenews/inc/mod/templates.mdu on line 291



Warning: reset() [function.reset]: Passed variable is not an array or object in cutenews/inc/mod/templates.mdu on line 292



Warning: Invalid argument supplied for foreach() in cutenews/inc/mod/templates.mdu on line 298




Comments Pagination

Code: Select all
Warning: ksort() expects parameter 1 to be array, null given in cutenews/inc/mod/templates.mdu on line 320



Warning: reset() [function.reset]: Passed variable is not an array or object in cutenews/inc/mod/templates.mdu on line 321



Warning: Invalid argument supplied for foreach() in cutenews/inc/mod/templates.mdu on line 327






Code: Select all
Warning: ksort() expects parameter 1 to be array, null given in cutenews/inc/mod/templates.mdu on line 350



Warning: reset() [function.reset]: Passed variable is not an array or object in cutenews/inc/mod/templates.mdu on line 351



Warning: Invalid argument supplied for foreach() in cutenews/inc/mod/templates.mdu on line 357




Because of these errors, I can't save any template changes for those sections.



Any ideas?
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby FI-DD » Fri Mar 16, 2007 4:08 pm

It's a php5 problem.



Read this thread:

http://english.cutenews.ru/forum/errors ... -t231.html
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Heya Im Me » Fri Mar 16, 2007 4:17 pm

Also...I'm not sure what the heck happened with this one but there was an activate link right above the Ajax activate link in plugins. I clicked it thinking maybe it had to be activated to show the Ajax one but now when I go to my cutenews panel, it directs me to test.php in the plugins directory and everything is giving me errors and not showing anything (even in my posts).



Any ideas?
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby Heya Im Me » Fri Mar 16, 2007 4:24 pm

Answer is: Delete test.php...haha :oops:





And yep, that fix did it, thanks FI-DD :)



-HIM
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby Heya Im Me » Fri Mar 16, 2007 4:28 pm

FI-DD, I have a question about a different setup and making this work with it.



Right now, I move around show.comments.php and show.commentform.php includes inside of show.inc.php making it so the Comment Form is always on top and the comments are displayed below it.



Would I still use the same setup of
Code: Select all
<div id="ajaxcomments">
in Full Story and
Code: Select all
</div>
in Comment Form?





-HIM
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby FI-DD » Fri Mar 16, 2007 4:48 pm

The closing <div> can't be in the comment form template then. Try putting it at the end of the comments template.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Heya Im Me » Fri Mar 16, 2007 4:54 pm

Hm, I'll try and move some divs around somewhere and see what happens but for now, I uploaded the original show.inc so its back to normal.



Something strange is happening now though, when I click the page 2 link, the loading gif comes up and the first 10 comments disappear but the loading.gif never disappears and the next 10 comments dont show up either. Any ideas?
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby scottdallas » Fri Mar 16, 2007 6:13 pm

Will I need the original comment pagination installed or does this work completely independent from that? If this works on my server cutenews.ru will be the most amazing script ever now. I can't wait to see more of your AJAX brilliance into this script.
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby Heya Im Me » Fri Mar 16, 2007 6:49 pm

Scott, if yours works right off the bat, let me know please (I'm having weird loading issues where the next 10 comments won't display)





-HIM
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby Heya Im Me » Fri Mar 16, 2007 8:18 pm

So after hours of trying to figure this out, I opened up Firefox's error console and when I click the next arrow on my Ajax setup, it displays this error:




Error: uncaught exception: Permission denied to call method XMLHttpRequest.open






Any ideas? Is this server related? If so, is there anyway around it?



------UPDATE ------



I think this is just script related for some reason and I can't figure out why. In Safari and Opera, this comment pagination system works perfectly on my site but when I check it on Firefox and IE, both will not display the comments when I click next.



The strange this is that FI-DD's example works in all of these browsers... Does anyone have any suggestions? I've tried all I could but I'm not fluent in AJAX



Thanks for any help always,



-HIM
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby Heya Im Me » Sat Mar 17, 2007 9:09 pm

Hm, spent an entire night trying to figure this out but I'm at a dead end... Does anyone have any advice as to how I can correct this problem? :(



I checked Google and it seems like a common issue but the thing that boggles my mind is why doesn't it happen to FI-DD's example...



If anyone can help out, I'd really appreciate it but for now I'll continue to go through trial and error.





As always, thanks for the help :)
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby FI-DD » Mon Mar 19, 2007 4:25 pm

I found this:

http://www.mozilla.org/projects/securit ... rigin.html



Do you use it on a subdomain or something mentioned in the link above?
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Heya Im Me » Mon Mar 19, 2007 6:30 pm

Hm, I'm not too sure.. but if I were to try the solution they suggest, where would I put the code below into the javascript you wrote?



Code: Select all
document.domain = "mysite.com"






Thanks for the link, FI-DD,



-HIM
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Postby Heya Im Me » Mon Apr 02, 2007 7:17 am

Felt like putting some closure on this post. Everything is now working 100% correctly. I couldn't' tell you why or how...but all I did was about 2 weeks later (today), I switched back on AJAX Comment Pagination plugin in the Plugins section and...magically it now works in every browser with no error.



So I just want to say again, thank you so much FI-DD for this script, it was an integral part of my site that I desperately needed.



-HIM :D
Heya Im Me
 
Posts: 189
Joined: Wed Feb 01, 2006 4:06 am

Next

Return to Additional Downloads



Who is online

Users browsing this forum: No registered users and 1 guest