Jul 05, 2009, 01:22 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: [1] 2 3 ... 9   Go Down
  Print  
Author Topic: Support/Comments for CSS Star Rating  (Read 32031 times)
0 Members and 2 Guests are viewing this topic.
garryn
Coding Team
*
Posts: 1,252



WWW
« on: Jun 29, 2006, 07:49 PM »

This is an auto-generated support/comment thread for CSS Star Rating.

Use this forum to post any comments about this addition or any questions you have regarding its use.

Brief Description:
This snippet lets visitors to your site vote on your web articles using a completely CSS based star rating.
« Last Edit: Jul 03, 2006, 06:08 PM by garryn » Logged

Marschant
Full Member
***
Posts: 133


« Reply #1 on: Jul 06, 2006, 07:03 PM »

I seem to be getting a url error when using this with friendly urls and friendly paths enabled:

an example of the url being generated by the makeurl function:
Code:
http://localhost/development/swellguys.co.za/new.html?starvote=2&pid=263

which should be:
Code:
http://localhost/development/swellguys.co.za/dev/new.html?starvote=2&pid=263
Logged
garryn
Coding Team
*
Posts: 1,252



WWW
« Reply #2 on: Jul 06, 2006, 08:07 PM »

Hi Marschant,

If you substitute any occurrences of $modx->documentObject['alias'] in the makeUrl calls with an empty string ('') then that should solve the issue.

Thanks for the bug report ... any problems then let me know. I will get the main package updated tomorrow with this fix.
Logged

Marschant
Full Member
***
Posts: 133


« Reply #3 on: Jul 07, 2006, 03:21 AM »

Confirmed, did this last night and it worked, might I suggest checking the "use friendly alias path" settings and outputing different url strings based on that?
Logged
garryn
Coding Team
*
Posts: 1,252



WWW
« Reply #4 on: Jul 07, 2006, 03:49 AM »

No need ... removing the alias value will allow it to be used for all combinations of friendly url settings. Smiley
Logged

Deep
Jr. Member
*
Posts: 40



WWW
« Reply #5 on: Aug 16, 2006, 05:31 PM »

Hi,
First of all, thanks for developing such a cool snippet.

I have facing one strange problem with it, I added the star_rating with onevote parameter but it still allows me to vote more than one time i.e. it counts the 2nd vote...

I have used following parameters:

[!star_rating? &onevote &docID!]

I also tried using: [!star_rating? &useSession &docID!]

but none of them helped me.

Please suggest the solution.

Thanks
Deep
Logged

Deep Ganatra
Web1 Solutions
davidm
MODx evangelist
Marketing & Design Team
*
Posts: 7,026


Software is like sex, it's better when it's free !


WWW
« Reply #6 on: Aug 16, 2006, 06:11 PM »

I never used Start Rating, but usually snippet calls need a value assigned to the parameter... I guess you're still learning MODx there. Check out the doc, it helps getting through the basics Smiley

If you look at the snippet page, you'll see that the &onevote parameter seems to be a boolean : i.e can only be either set to true or false &onevote=`1` or &onevote=`true` I guess. When the parameter is set to true, it seems the snippet uses cookies to remember the vote (thus, not allow multiple votes).

The &docID parameter is optionnal, only if you need to retrieve the star rating from another document. Then you should use it like this &docID=`5` if the document you want to use has the ID : 5 (see in the document tree the number in parentheses).

I'll let those who actually used the snippet get into more detail.
Hope it helps Smiley

« Last Edit: Aug 16, 2006, 06:14 PM by davidm » Logged

.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez ŕ l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accčs pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net
Deep
Jr. Member
*
Posts: 40



WWW
« Reply #7 on: Aug 16, 2006, 06:15 PM »

oh my bad, you were right. I missed the ='1'

Thanks
Deep
Logged

Deep Ganatra
Web1 Solutions
davidm
MODx evangelist
Marketing & Design Team
*
Posts: 7,026


Software is like sex, it's better when it's free !


WWW
« Reply #8 on: Aug 16, 2006, 06:16 PM »

Glad I could help Smiley
Logged

.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez ŕ l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accčs pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net
garryn
Coding Team
*
Posts: 1,252



WWW
« Reply #9 on: Aug 16, 2006, 06:29 PM »

lol, I just typed out almost to the word what David said in his post - beat me to the posting though Cheesy

It doesn't matter what value the &useSession and &onevote parameters are given, the fact they are specified in the snippet call will trigger the relevant functionality.

The &docID parameter is, as David mentioned, for remote page voting and was something that was used in the designing of the MODx Repository. I know that somebody did once mention a Ditto/Star Rating combo but I'm not sure if they ever got anywhere with it ...

Glad you got it working Deep! Smiley

 
Logged

heliotrope
Coding Team
*
Posts: 2,517


WWW
« Reply #10 on: Sep 03, 2006, 10:29 AM »

Hi,

First of all, thx for this great addition.

Is there anyway to allow votes from List view build with ditto (star_rating is called from the ditto tpl chunk).
For now, if you vote for an item in the list, it will be counted several times (equal to &summarize parameter in ditto call)

Any clue ?

thx :-)
Logged

garryn
Coding Team
*
Posts: 1,252



WWW
« Reply #11 on: Sep 03, 2006, 01:46 PM »

Hi heliotrope, it should work okay with Ditto listings as it should unset all the vote values on the first pass of the update routine. I'm not really sure why that isn't the case.

Could you post your Ditto tpl chunk that you're using and I'll try and run a few tests on the snippet.

Cheers, Garry
Logged

heliotrope
Coding Team
*
Posts: 2,517


WWW
« Reply #12 on: Sep 03, 2006, 01:54 PM »

Hi garryn,

thx for replying.

Here are my elements

ditto tpl:(starRating call inside)

Code:
<div class="photoVig">
<h4><a href="[~[+id+]~]">[+title+]</a></h4>
<a href="[~[+id+]~]">[+tvthumbImg+]</a>
<p>
[+date+]
[[StarRating? &docID=[+id+] &useSession=1 &onevote=1 ]]
[+starRating+]
[+totalVotes+]
</p>
</div>

ditto snippet call:

Code:
[!Ditto? &startID=`[*id*]` &summarize=9 &paginate=1 &tpl=`photolist` &debug=0 &datetype=createdon &dateFormat=`%a-%e-%b` &multiLevel=1 &mode=`production` &filter=`parent,[*id*],=|isfolder,0,=` &hiddenTVs=`thumbImg` !]

Thx for your help

:-)
Logged

garryn
Coding Team
*
Posts: 1,252



WWW
« Reply #13 on: Sep 03, 2006, 04:21 PM »

Well, I tried the Ditto call above, and apart having to remove the Ditto filter settings (couldn't get them to work for some reason) the CSS Star Rating worked as it should.

I will try on a different setup but won't be able to do it until tomorrow evening now. If anybody else wants to give it a blast as well to see if it works then it would be appreciated.
Logged

heliotrope
Coding Team
*
Posts: 2,517


WWW
« Reply #14 on: Sep 03, 2006, 05:07 PM »

I was trying on local environment (OSX/Apache).
Everything works fine on a remote server.

:-)


EDIT:
The snippet has to be called cached from the ditto chunk to work. But you have to disallow vote from the list view or else it will be added as many times as you &summarize param in ditto call.
« Last Edit: Sep 04, 2006, 07:09 PM by heliotrope » Logged

Pages: [1] 2 3 ... 9   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!