star rating bbcode

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

star rating bbcode

Post by CJ1985 » Thu May 14, 2009 8:08 am

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. :)

User avatar
onehundredandtwo
Registered User
Posts: 1228
Joined: Fri Nov 14, 2008 8:07 am

Re: star rating bbcode

Post by onehundredandtwo » Thu May 14, 2009 8:34 am

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. ;)
Need help preventing spam? Read Preventing spam in phpBB 3.0.6 and above

CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

Re: star rating bbcode

Post by CJ1985 » Thu May 14, 2009 9:21 am

I tried what you suggested, however it just shows [rating]4.5[/rating] and not actual image.

Hm, any suggestions?

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: star rating bbcode

Post by ric323 » Thu May 14, 2009 9:24 am

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.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

Re: star rating bbcode

Post by CJ1985 » Thu May 14, 2009 9:32 am

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

User avatar
onehundredandtwo
Registered User
Posts: 1228
Joined: Fri Nov 14, 2008 8:07 am

Re: star rating bbcode

Post by onehundredandtwo » Thu May 14, 2009 9:39 am

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.
Need help preventing spam? Read Preventing spam in phpBB 3.0.6 and above

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: star rating bbcode

Post by ric323 » Thu May 14, 2009 9:43 am

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" ...
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

Re: star rating bbcode

Post by CJ1985 » Thu May 14, 2009 9:46 am

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} ?

CJ1985
Registered User
Posts: 225
Joined: Sun Apr 05, 2009 8:48 am

Re: star rating bbcode

Post by CJ1985 » Thu May 14, 2009 10:07 am

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!

User avatar
Stitch625
Registered User
Posts: 683
Joined: Wed Jun 20, 2007 3:38 pm
Location: Michigan
Contact:

Re: star rating bbcode

Post by Stitch625 » Sun Mar 14, 2010 5:44 pm

This is a cool BBcode but the only problem with it is that it does not prevent a user from voting multiple times.

jeevan123
Registered User
Posts: 16
Joined: Wed Sep 26, 2012 5:19 am

Re: star rating bbcode

Post by jeevan123 » Fri Oct 05, 2012 12:30 pm

Can you pls share the link to download the mod...

Thanks

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21600
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: star rating bbcode

Post by Mick » Fri Oct 05, 2012 12:38 pm

What MOD and why are you replying to two year old topics?
"The more connected we get the more alone we become" - Kyle Broflovski

jeevan123
Registered User
Posts: 16
Joined: Wed Sep 26, 2012 5:19 am

Re: star rating bbcode

Post by jeevan123 » Fri Oct 05, 2012 12:47 pm

Cause i needed the star rating system.i have sent so many requests for rating each post mod but there is no response.... :(

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: star rating bbcode

Post by ric323 » Fri Oct 05, 2012 12:52 pm

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
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

jeevan123
Registered User
Posts: 16
Joined: Wed Sep 26, 2012 5:19 am

Re: star rating bbcode

Post by jeevan123 » Fri Oct 05, 2012 1:00 pm

Thanks ric.can you help me out in this "Evaluate each post"...

Locked

Return to “[3.0.x] Support Forum”