kuzmany
Forum Members

Karma: 1
Offline
Posts: 137
|
 |
« on: 11 Jan 2009, 16:29 » |
|
|
|
|
|
« Last Edit: 20 Dec 2009, 16:43 by kuzmany »
|
Logged
|
|
|
|
nervino
Forum Members

Karma: 0
Offline
Posts: 185
|
 |
« Reply #1 on: 16 May 2009, 08:05 » |
|
Hi veduci, I have downloaded the AJAXStarRatingBar module from svn, and I find it very usefull! I'm trying to use it to rate several images, loaded from database, in a single page. The rate system works, but the first occurence of stars, under the first image on the page, is always updated after voting, instead of the actual voted image. If then I reload the page the correct rating is shown.
How can it be fixed?
thank you very much for this module!
|
|
|
|
|
Logged
|
|
|
|
nervino
Forum Members

Karma: 0
Offline
Posts: 185
|
 |
« Reply #2 on: 17 May 2009, 07:14 » |
|
I solved modifying the Vote Template, adding the $vote_id variable to the ID name of the DIV that contains the stars: <div class="ratingblock" id="rating{$vote_id}"> and modifying the two javascript functions, makeAJAXStarRatingBarratingRequest and alertAJAXStarRatingBarrating: function makeAJAXStarRatingBarratingRequest(link) { var myConn = new XHConn(); if (!myConn) alert("XMLHTTP not available. Try a newer/better browser."); var fnWhenDone = function (oXML) { alert(oXML.responseText); }; myConn.connect(link, "GET", "", alertAJAXStarRatingBarrating);
var urlstring=link; searchString = urlstring.substring(1);
var nvPairs = searchString.split("&");
for (i = 0; i < nvPairs.length; i++) { var nvPair = nvPairs[i].split("="); var name = nvPair[0].slice(-1); var value = nvPair[1]; if (name=="q"){ var myQ=name; myQvalue=value; } }
} function alertAJAXStarRatingBarrating(http_request) { element=document.getElementById('rating'+myQvalue); var xmlString = http_request.responseText; element.innerHTML = xmlString; element.innerHTML = document.getElementById("ratingresult").innerHTML; } Ciao
|
|
|
|
|
Logged
|
|
|
|
Radim
Forum Members

Karma: 0
Offline
Posts: 38
|
 |
« Reply #3 on: 16 Aug 2009, 17:36 » |
|
Ahoj, tvůj modul bude dle preview super. Dá se někdy očekávat final verze? Jak můu s vydáním pomoct? S těmi překlady jak píe zde http://forum.cmsmadesimple.org/index.php?topic=23268.0 bych se mohl pokusit pomoct. Kolega, který angličtinu ovládá a dělá překlady komerčně, mi něco dluí, take by se toho dalo vyuít  Radim
|
|
|
|
|
Logged
|
|
|
|
kuzmany
Forum Members

Karma: 1
Offline
Posts: 137
|
 |
« Reply #4 on: 16 Aug 2009, 18:37 » |
|
Ahoj, myslim ze behom mesiaca by to mohlo byt final, nie je tam uz vela prace, dokoncim to pri implementacii do noveho 90bpm.sk Nova verzia bude napojena asi na JQueryTools ( http://dev.cmsmadesimple.org/projects/jquerytools), vyraznejsie zmeny najskor nebudu, asi css pojde priamo cez styly v admine, mozno pridam aj viac grafickych sablon. Mam ale hotovy aj novy modul na napojenie na DivShare.com ulozisko, funkcny mam aj modul na napojenie na youtube profil vratane uploadu z webu, ale tam este to treba trochu ucesat a dokoncit.
|
|
|
|
|
Logged
|
|
|
|
ajprog
Dev Team Member
Power Poster
   
Karma: 14
Online
Posts: 632
|
 |
« Reply #5 on: 16 Aug 2009, 20:09 » |
|
Sorry for the english on the Czech board but I want to make a suggestion about AJAXStarRatingBar
My two suggestion are to switch it to use jquery(JQueryTools) (sorry if that is what you said in the last post, it didn't translate well).
Secondly, change the ID to be alphanumeric instead of just numeric. I am using it to rating content through out my site so just having the a numeric ID doesn't work.
|
|
|
|
|
Logged
|
|
|
|
kuzmany
Forum Members

Karma: 1
Offline
Posts: 137
|
 |
« Reply #6 on: 17 Aug 2009, 13:25 » |
|
THX for your feedback. Bug with alphanumeric ID will be fixed in final version, JQueryTools will be supported too. Final version coming soon (september/october 09). Sorry for the english on the Czech board but I want to make a suggestion about AJAXStarRatingBar
My two suggestion are to switch it to use jquery(JQueryTools) (sorry if that is what you said in the last post, it didn't translate well).
Secondly, change the ID to be alphanumeric instead of just numeric. I am using it to rating content through out my site so just having the a numeric ID doesn't work.
|
|
|
|
|
Logged
|
|
|
|
|
|
kuzmany
Forum Members

Karma: 1
Offline
Posts: 137
|
 |
« Reply #8 on: 14 Oct 2009, 18:10 » |
|
|
|
|
|
|
Logged
|
|
|
|
|
|
|
|
Jubilar
New Member
Karma: 0
Offline
Posts: 2
|
 |
« Reply #11 on: 17 Nov 2009, 22:57 » |
|
Thanks for the great module AJAXStarRatingBar! I was trying to implement this into my template and thought something like this might work: {cms_module module='AJAXStarRatingBar' group='articles' vote_id='{$content_id}'} But I get the following error message: "Missing input parameter '}" Any ideas? P.S. I'm sorry for writing in English, but my Czech sucks 
|
|
|
|
|
Logged
|
|
|
|
kuzmany
Forum Members

Karma: 1
Offline
Posts: 137
|
 |
« Reply #12 on: 18 Nov 2009, 03:22 » |
|
Thanks for the great module AJAXStarRatingBar! I was trying to implement this into my template and thought something like this might work: {cms_module module='AJAXStarRatingBar' group='articles' vote_id='{$content_id}'} But I get the following error message: "Missing input parameter '}" Any ideas? P.S. I'm sorry for writing in English, but my Czech sucks  Try {cms_module module='AJAXStarRatingBar' group='articles' vote_id=$content_id}
|
|
|
|
|
Logged
|
|
|
|
Jubilar
New Member
Karma: 0
Offline
Posts: 2
|
 |
« Reply #13 on: 18 Nov 2009, 03:49 » |
|
Thanks, that did it.
|
|
|
|
|
Logged
|
|
|
|
|
|
|