Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
AJAX comments pagination
Goto page 1, 2  Next
 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
AJAX comments pagination
Author Message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post AJAX comments pagination Reply with quote
This plugin loads the next comments page by using AJAX.



Example: http://english.cutenews.ru/cuteru/example/index.php/2005/12/15/first-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:
<div id="ajaxcomments">




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

Code:
</div>




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

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




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

Code:
<script type="text/javascript" src="<?=$config_http_script_dir; ?>/plugins/ajaxcommentspagination/ajaxcommentspagination.js"></script>




ajax_comments_pagination.zip
 Description:
Ajax comments pagination

Download
 Filename:  ajax_comments_pagination.zip
 Filesize:  4.04 KB
 Downloaded:  216 Time(s)

Fri Mar 16, 2007 11:53 am View user's profile Send private message
Guest








Please login to hide the ads.

Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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:
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:
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:
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?
Fri Mar 16, 2007 4:02 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
It's a php5 problem.



Read this thread:

http://english.cutenews.ru/forum/errors-manage-templates-t231.html
Fri Mar 16, 2007 4:08 pm View user's profile Send private message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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?
Fri Mar 16, 2007 4:17 pm View user's profile Send private message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
Answer is: Delete test.php...haha Embarassed





And yep, that fix did it, thanks FI-DD Smile



-HIM
Fri Mar 16, 2007 4:24 pm View user's profile Send private message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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:
<div id="ajaxcomments">
in Full Story and
Code:
 </div>
in Comment Form?





-HIM
Fri Mar 16, 2007 4:28 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
The closing <div> can't be in the comment form template then. Try putting it at the end of the comments template.
Fri Mar 16, 2007 4:48 pm View user's profile Send private message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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?
Fri Mar 16, 2007 4:54 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
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.

_________________
www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me Wink
Fri Mar 16, 2007 6:13 pm View user's profile Send private message Visit poster's website AIM Address
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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
Fri Mar 16, 2007 6:49 pm View user's profile Send private message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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:



Quote:


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
Fri Mar 16, 2007 8:18 pm View user's profile Send private message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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? Sad



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 Smile
Sat Mar 17, 2007 9:09 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2857
Location: Germany

Post Reply with quote
I found this:

http://www.mozilla.org/projects/security/components/same-origin.html



Do you use it on a subdomain or something mentioned in the link above?
Mon Mar 19, 2007 4:25 pm View user's profile Send private message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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:
document.domain = "mysite.com"






Thanks for the link, FI-DD,



-HIM
Mon Mar 19, 2007 6:30 pm View user's profile Send private message
Heya Im Me



Joined: 01 Feb 2006
Posts: 189

Post Reply with quote
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 Very Happy
Mon Apr 02, 2007 7:17 am View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.