Spinethetic
05-06-2008, 04:00 AM
I have been using this comment widget LINK (http://js-kit.com/comments/) across many pages on my site. However it seems that when it was developed it was only meant to be used on absolute .htm(l) HTML pages. Now since I am converting pertanant sections of my site to a custom flat-file PHP-based CMS, the same comments are displaying on the 'universal display page', regardless of any variables I may pass through the URL.
I hve it set up so that each new article is displayed on the same page, the article displayed simply depending on a URL variable. However the widget only reads up the the file extension and ignores anything afterward.
ie: Same comment is displayed here (http://www.integralbuddha.net/n/v.htm?id=24) as well as here (http://www.integralbuddha.net/n/v.htm?id=25)
The widget itself is just a simply 4 line code:
<div class="js-kit-rating"></div>
<script src="http://js-kit.com/ratings.js"></script>
<div class="js-kit-comments"></div>
<script src="http://js-kit.com/comments.js"></script>
I am a noob PHPer but I think there must be some kind of workaround after reading number 4 of their FAQ (http://js-kit.com/comments/custom.html); something along the lines of:
if $variable = 25; {
print "<div class="js-kit-comments" path="25"></div>";
}
if $variable = 24; {
print "<div class="js-kit-comments" path="24"></div>";
}
I am working on writing my own php script to solve these types of problems once and for all, for as only recently delving into server-side scripting, I have grown accustomed to using various remotely-hosted widgets on my sites. And now I want to gain complete self-sustainability, and server-side solutions fits the bill.
Best Regards
~Ross :)
I hve it set up so that each new article is displayed on the same page, the article displayed simply depending on a URL variable. However the widget only reads up the the file extension and ignores anything afterward.
ie: Same comment is displayed here (http://www.integralbuddha.net/n/v.htm?id=24) as well as here (http://www.integralbuddha.net/n/v.htm?id=25)
The widget itself is just a simply 4 line code:
<div class="js-kit-rating"></div>
<script src="http://js-kit.com/ratings.js"></script>
<div class="js-kit-comments"></div>
<script src="http://js-kit.com/comments.js"></script>
I am a noob PHPer but I think there must be some kind of workaround after reading number 4 of their FAQ (http://js-kit.com/comments/custom.html); something along the lines of:
if $variable = 25; {
print "<div class="js-kit-comments" path="25"></div>";
}
if $variable = 24; {
print "<div class="js-kit-comments" path="24"></div>";
}
I am working on writing my own php script to solve these types of problems once and for all, for as only recently delving into server-side scripting, I have grown accustomed to using various remotely-hosted widgets on my sites. And now I want to gain complete self-sustainability, and server-side solutions fits the bill.
Best Regards
~Ross :)