The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
I need some help on a project.
I'm developing an event script for my site. I want to let the users rate each event. I need to first make sure the users is logged in, then let them rate it, and make sure they only rate it once. Also how do people display the ratings in stars? Does anybody have some samples of rating scripts that I can use to get me started? thanks |
#2
|
||||
|
||||
$bbuserinfo is the key.
if ($bbuserinfo[userid]==0) { // not logged in message goes here } else { // they are logged in, check to see if they've voted } You would use $DB_Site->query_first("SELECT * FROM eventratings WHERE userid='$bbuserinfo[userid]'"); If that returns an empty array, they haven't voted. When they do vote, be sure to note down their userid as a check that they have voted. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|