Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-03-28 12:02:38

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: jmd_rate: A CSS star rater

Works wonderfully in FireFox but not in IE6, but I think it must be something to do with my setup here at work.

Can I suggest a variation on the theme? A very useful one, I think.

The idea is to have the voting option as part of a comment form so that with each rating a user needs to add a comment too. Pretty much like you see on Amazon.

Offline

#14 2008-03-28 19:23:58

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_rate: A CSS star rater

Are you getting styling errors in IE6? I don’t support IE6, but I imagine the fix for whatever error is height: 1% :P.

I haven’t played too much with adding events to the comment form, but I’ll give it a shot.

Offline

#15 2008-03-31 16:49:38

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: jmd_rate: A CSS star rater

jm, i’ve changed php to 5 and are having some problems.

Firstly, I’m not sure where the images should go. The links to the graphics you posted don’t work. I’ve got my own starts but I don’t know what to call them or where to place them.

Withotu stars I get a list of options more or less like this:

* Currently rated * 1/4 * 2/4 * 3/4 * 4/4

The numbers are linked correctly (eg: http://www.domain.com/page?rating=1) but clikcing them will not register a vote – status doesn’t change from “his article hasn’t been rated”.

I haeb a feeling there is something extrenmely simple I am not doing.

Offline

#16 2008-03-31 16:59:24

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_rate: A CSS star rater

Oops, I forgot to fix the link – the star image is here. For the HTML output, you’ll get a raw list if you don’t have any CSS linked to it.

  1. Head to Extensions>jmd_rate and create your CSS. Enter the path to your star image (or hotlink mine)
  2. Place the CSS in a CSS file
  3. Link to it in your head

For the rating, are you redirected to /page?rating=1 (and then to /page)?

Last edited by jm (2008-03-31 16:59:44)

Offline

#17 2008-03-31 23:31:55

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: jmd_rate: A CSS star rater

Got most of it working but the display of the current score doesn’t seem to work.

Also, i think the CSS conflicts with my extensive use of CSS for layout. I can’t place things where I want them to be.

I’ll give it a go when I have more time.

Thanks.

Last edited by lozmatic (2008-03-31 23:33:02)

Offline

#18 2008-04-01 00:17:32

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_rate: A CSS star rater

That is strange – you should have <li class="current_rating" style="width: Xpx;">Currently rated Y</li> immediately after the ul in your source code. I’ll see if I can replicate it – can you post the jmd_rate section from your template?

Off topic: Any reason for using a span to wrap a ul? Might want to close some of those tags too :).

Offline

#19 2008-04-01 01:12:45

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: jmd_rate: A CSS star rater

ah, i got rid of the ‘Currently rated’ bit because i wanted to have the stars fit nicely next to the page’s title.

Yeah, it’s all a bot messy there. I tried wrapping things in nasty nasty ways to try and position the stars.

Offline

#20 2008-04-01 01:28:12

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_rate: A CSS star rater

Tsk, tsk! The li[class=current_rating] is responsible for the current score display (half-filled stars, etc). If the CSS and HTML is correct (and not too invalid), it’ll draw the stars and not display the text (text-indent: -9999px). I suggest grabbing a new copy of the plugin :).

Offline

#21 2008-04-01 01:42:08

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: jmd_rate: A CSS star rater

I seek forgivness…

Offline

#22 2008-04-01 02:30:40

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: jmd_rate: A CSS star rater

Ok, now it works wonderfully and beautifully – i’ve positioned elements exactly where I want them.

Thanks.

Offline

#23 2008-04-01 03:32:44

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_rate: A CSS star rater

Cool – glad you got it working.

I’m planning on adding read-only display (for jmd_rate_article and jmd_article_cf use) next (probably this week), then I’ll work on Ajax (this weekend?).

Offline

#24 2008-04-01 21:15:23

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: jmd_rate: A CSS star rater

Cool, well, as is… it’s very cool.

One thing I’ve noticed, though. When I rate using firefox the new rating only displays when I click shift and the refresh button. Until I do that I can continue voting… is this the case with anyone else?

Offline

Board footer

Powered by FluxBB