Page 1 of 2

star rating bbcode

Posted: Thu May 14, 2009 8:08 am
by CJ1985
Hello, I came across a board that had a star rating system. It was a bbcode, and it seemed to work very well.

All I want is be able to allow those who have seen a movie (the person who started the post) to be able to rate the movie. I am not talking about a star rating where others are able to click on the star to rate it as well.

Anyways, here's a screen shot of what I'm talking about:

Image

As you can see, you type 3.5 between the bbcode tags and it brings up the image as you can see in the image above. I have tried to think of how to go about doing this, however the only thing I can think of is the fact that what is typed between the tags is what determines what image it puts. If that makes sense?

Any ideas of how to go about doing this bbcode??? I would highly appreciate any suggestions for this. :)

Re: star rating bbcode

Posted: Thu May 14, 2009 8:34 am
by onehundredandtwo
Something like this might work:

BBCode Usage

Code: Select all

[rating]{NUMBER}[/rating]
HTML Replacement

Code: Select all

<img src="./images/{NUMBER}.png" width="50" height="10" alt="rating" title="This thread was rated {NUMBER} out of 5" />
You would ahve to have the appropriate images in the folder, you can change it to suit. ;)

Re: star rating bbcode

Posted: Thu May 14, 2009 9:21 am
by CJ1985
I tried what you suggested, however it just shows [rating]4.5[/rating] and not actual image.

Hm, any suggestions?

Re: star rating bbcode

Posted: Thu May 14, 2009 9:24 am
by ric323
CJ1985 wrote:I tried what you suggested, however it just shows [rating]4.5[/rating] and not actual image.

Hm, any suggestions?
Please show us a screen capture of the custom bbcode setting page where you created the new bbcode.

Re: star rating bbcode

Posted: Thu May 14, 2009 9:32 am
by CJ1985
Not exactly sure what you want me to show you? I mean when you try to do the rating with the bbcode tags, it just shows exactly [rating][/rating] and your cursor gets put between the bbcode tags, and you type in 4.5 which looks like this [rating]4.5[/rating] and then you either submit or preview it and the same which is: [rating]4.5[/rating] no picture or anything. Just bbcode and the number you entered is all you see.... I think I may know what you mean by screen shot.... so here's one:

Image

Image

Re: star rating bbcode

Posted: Thu May 14, 2009 9:39 am
by onehundredandtwo
The BBCode may not treat 4.5 as a number. Try using 4, see if that works.

Unfortunately this may be a limitation, otherwise you will need a MOD.

Re: star rating bbcode

Posted: Thu May 14, 2009 9:43 am
by ric323
was just about to post the same comment.
The {number} must be an integer. Note the description of that field: "Any series of digits"
(i.e. no mention of a point symbol).
How about multiplying all the numbers by 10, e.g. "10", "15", "20" ...

Re: star rating bbcode

Posted: Thu May 14, 2009 9:46 am
by CJ1985
Hm, that's weird. I just tried what you suggested.

In the text box you see [rating]4[/rating]

And in the preview section, to preview the post before submitting you see: rating

So we must be getting somewhere, right??

Could you go {NUMBER}.{NUMBER} ?

Re: star rating bbcode

Posted: Thu May 14, 2009 10:07 am
by CJ1985
onehundredandtwo wrote:Something like this might work:

BBCode Usage

Code: Select all

[rating]{NUMBER}[/rating]
HTML Replacement

Code: Select all

<img src="./images/{NUMBER}.png" width="50" height="10" alt="rating" title="This thread was rated {NUMBER} out of 5" />
You would ahve to have the appropriate images in the folder, you can change it to suit. ;)
Your way was correct, the only thing difference you are going to want to do is instead of using {NUMBER} you are going to use {SIMPLETEXT} which allows: Characters from the latin alphabet (A-Z), numbers, spaces, commas, dots, minus, plus, hyphen and underscore

So that solves my problem! :) Thaaaaaaaaaaank you!

Re: star rating bbcode

Posted: Sun Mar 14, 2010 5:44 pm
by Stitch625
This is a cool BBcode but the only problem with it is that it does not prevent a user from voting multiple times.

Re: star rating bbcode

Posted: Fri Oct 05, 2012 12:30 pm
by jeevan123
Can you pls share the link to download the mod...

Thanks

Re: star rating bbcode

Posted: Fri Oct 05, 2012 12:38 pm
by Mick
What MOD and why are you replying to two year old topics?

Re: star rating bbcode

Posted: Fri Oct 05, 2012 12:47 pm
by jeevan123
Cause i needed the star rating system.i have sent so many requests for rating each post mod but there is no response.... :(

Re: star rating bbcode

Posted: Fri Oct 05, 2012 12:52 pm
by ric323
It is a custom bbcode, not a Mod.
Have a look around in this topic if you do not know what they are. viewtopic.php?f=46&t=579376

Re: star rating bbcode

Posted: Fri Oct 05, 2012 1:00 pm
by jeevan123
Thanks ric.can you help me out in this "Evaluate each post"...