1
Mods & Plugins (Releases & Support) / Re: [MOD] AJAX Comments / Comments Rating v1.0.4 (2009-12-21)
« on: April 14, 2011, 05:02:50 PM »
i tried it in my localhost and i notice two things
1- if you play video or flash and switch between comments pages it will reload the page and the video return to first part actually not a big problem but if we can change it like youtube you can switch between comments pages while playing the video
2- there is conflict between this mod and SEO in this thread
http://www.4homepages.de/forum/index.php?topic=17598.0
the problem is SEO script replace image_id with blank '' and because of that paging and comments perpage dropdown menu not working
EDIT:
i found solution for comments problem by changing javascript code in ajaxcomments.js
previous code
replace with
because image url after SEO is (image-443.html)
Thank you
1- if you play video or flash and switch between comments pages it will reload the page and the video return to first part actually not a big problem but if we can change it like youtube you can switch between comments pages while playing the video
2- there is conflict between this mod and SEO in this thread
http://www.4homepages.de/forum/index.php?topic=17598.0
the problem is SEO script replace image_id with blank '' and because of that paging and comments perpage dropdown menu not working
EDIT:
i found solution for comments problem by changing javascript code in ajaxcomments.js
previous code
Code: [Select]
function CommentsPage(obj)
{
var href = obj.getAttribute("href");
var Query = href.substr(href.indexOf("?")+1);
var Url = ajaxCommentsUrl + (ajaxCommentsUrl.indexOf("?") != -1 ? '&' : '?') + 'js&action=commentget&' + Query;
return !ajaxSend([ajaxCommentsResponse, Url, "GET", null, obj]);
}
function CommentsPerPage(obj)
{
var Query = ajaxGetFormQuery(obj);
// var Query = ajaxGetFormQuery(obj,['page', Page]); // use this line if you want stay on the same page number
var Url = ajaxCommentsUrl + (ajaxCommentsUrl.indexOf("?") != -1 ? '&' : '?') + 'js&action=commentget&' + (obj.getAttribute('action').indexOf("?") != -1 ? obj.getAttribute('action').substring(obj.getAttribute('action').search("\\?")+1) : '');
return !ajaxSend([ajaxCommentsResponse, Url, "POST", Query, obj]);
}
replace with
Code: [Select]
function CommentsPage(obj)
{
var href = obj.getAttribute("href");
var Query = href.substr(href.indexOf("-")+1);
var Query1 = Query.split(".html?");
var Url = ajaxCommentsUrl + (ajaxCommentsUrl.indexOf("-") != -1 ? '&' : '?') + 'js&action=commentget&' + 'image_id=' + Query1[0] + '&' +Query1[1];
return !ajaxSend([ajaxCommentsResponse, Url, "GET", null, obj]);
}
function CommentsPerPage(obj)
{
var Query = ajaxGetFormQuery(obj);
var Query1 = obj.getAttribute('action').substring(obj.getAttribute('action').search("\\-")+1);
var Query2 = Query1.split(".html");
// var Query = ajaxGetFormQuery(obj,['page', Page]); // use this line if you want stay on the same page number
var Url = ajaxCommentsUrl + (ajaxCommentsUrl.indexOf("?") != -1 ? '&' : '?') + 'js&action=commentget&' + (obj.getAttribute('action').indexOf("-") != -1 ? 'image_id='+Query2[0]+Query2[1] : '');
return !ajaxSend([ajaxCommentsResponse, Url, "POST", Query, obj]);
}
because image url after SEO is (image-443.html)
Thank you