I have a custom site, I can't get unique comments for each page
I'm having a problem with the javascript solution on my custom written website. The problem is that the same comments show up on every page. I've tried to make each page generate a different ID for the javascript using the following php:
------------------------------------------------
echo "var idcomments_acct = 'account # here';";
echo "var idcomments_post_id ='" . $day . "' ;";
echo "var idcomments_post_url = 'http://thedailykitten.com/?knh=N". kittyhash($day) . "';";
echo "var idcomments_post_title = 'The Daily Kitten - Kitty #". $day . "';";
------------------------------------------------
This code will generate the following (this is an example for a particular page, it will be different depending on the page):
------------------------------------------------
var idcomments_acct = 'my account #';
var idcomments_post_id ='157' ;
var idcomments_post_url = 'http://thedailykitten.com/?knh=N93ld0S';
var idcomments_post_title = 'The Daily Kitten - Kitty #157';
------------------------------------------------
(I've left out the script tags)
Can you tell me why I'm not getting different comment threads for each page?
BTW, my site is http://thedailykitten.com, you can use the left/right arrows above the kitten picture to see other pages
Thanks
------------------------------------------------
echo "var idcomments_acct = 'account # here';";
echo "var idcomments_post_id ='" . $day . "' ;";
echo "var idcomments_post_url = 'http://thedailykitten.com/?knh=N". kittyhash($day) . "';";
echo "var idcomments_post_title = 'The Daily Kitten - Kitty #". $day . "';";
------------------------------------------------
This code will generate the following (this is an example for a particular page, it will be different depending on the page):
------------------------------------------------
var idcomments_acct = 'my account #';
var idcomments_post_id ='157' ;
var idcomments_post_url = 'http://thedailykitten.com/?knh=N93ld0S';
var idcomments_post_title = 'The Daily Kitten - Kitty #157';
------------------------------------------------
(I've left out the script tags)
Can you tell me why I'm not getting different comment threads for each page?
BTW, my site is http://thedailykitten.com, you can use the left/right arrows above the kitten picture to see other pages
Thanks
3
people have this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Thanks for contacting us Michael. I apologize for my delayed response. We're on it. Thanks for your patience.
Sincerely,
Michael
I’m confident
-
Inappropriate?Thanks for you patience. Please give this a try. Please change the line:
echo "var idcomments_post_title = 'The Daily Kitten - Kitty #". $day . "';";
To:
echo ‘<span>The Daily Kitten - Kitty #’. $day . ‘</span>’;
Hope that helps!
Michael
I’m confident
-
Inappropriate?Michael,
If I replace the line as you suggest I get a Javascript error (the <span> line is inserted in the middle of the JS code).
I tried moving the line outside of the SCRIPT tags and this caused an error about a missing reference (I think it was idcoments_post_title). It also caused the text in the span to be displayed above the comments.
I tried changing it to sorta combine the two concepts. Something like this:
echo "var idcomments_post_title = '<span>The Daily Kitten - Kitty #" . $day . "</span>';";
I'm not sure all the quotes are correct here but I did it correctly on my site and ended up with no JS errors but it did not help the problem with non-unique comments.
Did I mis-interpret your suggestion?
Thanks</span> -
Inappropriate?I'm doing some digging with Firefox and Safari consoles. I don't really know what I'm doing but Firefox is spitting out some warnings that say:
Warning: Expected declaration but found '#fff-space'. Skipped to next declaration.
Source File: http://thedailykitten.com/?knh=Na0l31S
Line: 1
I found something like that in "idcCSS.php":
#idc-container .idc-message {#fff-space:nowrap;
}
I'm not familiar with that CSS syntax and was wondering if it's an error.
I don't expect that this is the problem but I thought I'd report it before I dug in some more.
Also, incase this is relevant, Safari is giving me 3 warnings saying something like: "Resource interpreted as a script but was transferred with MIME type text/html". These warnings refer to URLs at intensedebate.com
Another question: Am I the only person having this problem? (If so, I'll assume it's something on my end and keep digging).
Thanks -
Inappropriate?I am having the same problem. Has anyone found a solution?
Loading Profile...


EMPLOYEE
