View Full Version : V3Arcade - Game Rating addon
GenSec
11-06-2004, 10:00 PM
These hack adds rating system for your arcade games.
Files to edit: 1
Templates to edit: 2
Files to add: 1
Add 1 new db table + 2 changes for games table
Very easy to install...
################################################## ##############################################
Before the installation!
Please make a Backup of your database and the changed files!
################################################## ##############################################
1. ADD this to MySQL DB using phpmyadmin or admincp :
ALTER TABLE `games` ADD `votetotal` smallint(5) UNSIGNED DEFAULT '0' NOT NULL ;
ALTER TABLE `games` ADD `votenum` smallint(5) UNSIGNED DEFAULT '0' NOT NULL ;
CREATE TABLE `game_rate` (
`gamerateid` int(11) NOT NULL auto_increment,
`gameid` int(11) NOT NULL default '0',
`userid` int(10) NOT NULL default '0',
`vote` smallint(5) default NULL,
`ipaddress` char(15) NOT NULL default '',
PRIMARY KEY (`gamerateid`)
) TYPE=MyISAM AUTO_INCREMENT=8 ;
2. Upload gamerate.php to your forumroot directory.
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
There are somу redirects phrases like "redirect_threadrate_add", "error_threadratevoted" etc.
You саn change them to similar with the word "game" instead of "thread".
I didn't. And it works fine on my board.
3. Edit arcade.php
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Find:
$phrasegroups = array();
Change to:
$phrasegroups = array('arcade','showthread');
* in case you decide to use the above "thread" phrases
Find:
// While loop constructs the $gamebits variable, with games where scores have been recorded
while ($game = $DB_site->fetch_array($result_topscore2)) {
Add right after:
// display ratings if enabled
if ($game['votenum'] > 0)
{
$game['voteavg'] = vb_number_format($game['votetotal'] / $game['votenum'], 2);
$game['rating'] = round($game['voteavg']);
} else {
$game['rating']=0;
}
//
Find:
$thisGame = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "games WHERE gameid=$gameid");
Add right after:
// display ratings if enabled
$show['rating'] = false;
if ($thisGame['votenum'] > 0)
{
$thisGame['voteavg'] = vb_number_format($thisGame['votetotal'] / $thisGame['votenum'], 2);
$game['rating'] = round($thisGame['voteavg']);
$show['rating'] = true;
}
if ($rating = $DB_site->query_first("
SELECT vote, gamerateid FROM " . TABLE_PREFIX . "game_rate
WHERE userid = $bbuserinfo[userid] AND gameid = $gameid
")) {
if ($$rating['vote'])
{
$voteselected["$rating[vote]"] = HTML_SELECTED;
$votechecked["$rating[vote]"] = HTML_CHECKED;
} else {
$voteselected[0] = HTML_SELECTED;
$votechecked[0] = HTML_CHECKED;
}
}
//
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Save arcade.php
4. Edit arcade templates
to place the voting form in play control panel
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
In arcade_play template find:
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="thead" colspan="2"><span class="smallfont">$thisGame[title]</span></td>
</tr>
Add right after:
<tr>
<td class="alt2" align="center" id="gamerating" nowrap="nowrap"><span class="smallfont">
<a href="#goto_gamerating">
<if condition="$show['rating']">$vbphrase[rating]</a>: <img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$game[rating].gif" alt="<phrase 1="$thisGame[votenum]" 2="$thisGame[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" border="0" />
<else />$vbphrase[rate_thread]</a></if>
<if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("gamerating"); </script></if>
</span></td></tr>
Find:
<tr><td class="alt1" align="center"><img src="$stylevar[imgdir_arcade]/backtip.gif" border=0></td>
</table>
</td>
</tr></table>
Add right after:
<div class="vbmenu_popup" id="gamerating_menu" style="display:none">
<form action="gamerate.php" method="post">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">Зацени игру<a name="goto_gamerating"></a></td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_5.gif" alt="$vbphrase[excellent]" /><label for="vote5"><input type="radio" name="vote" id="vote5" value="5" $votechecked[5] />$vbphrase[excellent]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_4.gif" alt="$vbphrase[good]" /><label for="vote4"><input type="radio" name="vote" id="vote4" value="4" $votechecked[4] />$vbphrase[good]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_3.gif" alt="$vbphrase[average]" /><label for="vote3"><input type="radio" name="vote" id="vote3" value="3" $votechecked[3] />$vbphrase[average]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_2.gif" alt="$vbphrase[bad]" /><label for="vote2"><input type="radio" name="vote" id="vote2" value="2" $votechecked[2] />$vbphrase[bad]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_1.gif" alt="$vbphrase[terrible]" /><label for="vote1"><input type="radio" name="vote" id="vote1" value="1" $votechecked[1] />$vbphrase[terrible]</label></div>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite" align="center">
<input type="hidden" name="s" value="$session[dbsessionhash]" />
<input type="hidden" name="gameid" value="$gameid" />
<input type="submit" class="button" value="$vbphrase[vote_now]" />
</td>
</tr>
</table>
</form>
</div>
Save arcade_play
5. At last find the right place to show the game rating
I placed in arcade_main_games_bit temlate :
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<if condition="$game['rating'] > 0"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$game[rating].gif" alt="<phrase 1="$game[votenum]" 2="$game[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" border="0" />
</if>
#############################
Thats all!
I hope it works :classic:
Oblivion Knight
11-07-2004, 06:34 PM
Awesome! I'll certainly have a look at this one later tonight..
Thanks for sharing your work. :)
GenSec
11-07-2004, 06:55 PM
It looks much more organized! I'm curiouse though, I went to your site: http://www.2x2ru.net/forum/arcade.php in each one of those game boxes, what does it say?
As usuall :) :
game size, champion, record, played games, personal record...
Rick Sample
11-07-2004, 06:55 PM
cool, when you say game rating, does this include your arcade home layout, too? That looks very organized!
let us know :)
GenSec
11-07-2004, 07:06 PM
Rick Sample.
No. The rest was made before. And it's mush more hard for me to make clear instructions than to make the code :)
Generally it's templates modification.
Because my board in russian it needs to translate back :ermm:
moley
11-07-2004, 09:03 PM
thanks for sharing looks like a very nice addon.
Lionel
11-07-2004, 09:45 PM
you beat frankenberrie at that one!
Lionel
11-07-2004, 10:03 PM
Where are the phrases?
Lionel
11-07-2004, 11:24 PM
you've got one extra space in your alter table games query for votetotal and votenum on this page that gives a database column not found error. Removing the space fixes that.
glorify
11-08-2004, 01:20 AM
where are the spaces to be removed?
Lionel
11-08-2004, 01:40 AM
ALTER TABLE `games` ADD `votetotal ` smallint(5) UNSIGNED DEFAULT '0' NOT NULL ;
ALTER TABLE `games` ADD `votenum `
votetotal ' should be votetotal'
same for votenum
GenSec
11-08-2004, 07:25 AM
Where are the phrases?
Thanks for "spaces" :)
The phrases are using by standart redirects in gamerate.php ( it's based on threadrate.php ;) )
like
eval(print_standard_redirect('redirect_threadrate_ add'))
It uses
$vbphrase[threadrate_add] ="Your vote on this thread has been added."
You can change it to something like
eval(print_standard_redirect('redirect_game_add'))
and add the new phrase
$vbphrase[game_add] ="Your vote on this game has been added."
BUT you also can edit the original phrase to
$vbphrase[threadrate_add] ="Your vote has been added." :) :) :)
Up to you.
I desabled redirects at all.
Lionel
11-08-2004, 07:33 AM
I removed the arcade phrases and used the showthread. Arcade was giving a myaql error since they were non existant.
HarryBO
11-10-2004, 12:35 PM
Hi!
Thats a very nice Hack, but it seems I have a problem!
See my Screenshot!
How can I format the stars correctly?
Lionel
11-10-2004, 01:14 PM
align="left"
Great mod, however I had a problem with the phrases.
It gave this error;
mysql error: Unknown column 'language.phrasegroup_arcade' in 'field list'
So I changed the arcade.php to this $phrasegroups = array('showthread');
Removed the arcade bit
HarryBO
11-10-2004, 04:22 PM
Where must I put this Code?
Lionel
11-10-2004, 04:33 PM
Where must I put this Code?
In the <td where you have the stars :squareeyed:
HarryBO
11-10-2004, 05:36 PM
Sorry can you post the complete piece of Code? I´am an absolutely php-Noob!
Lionel
11-10-2004, 05:56 PM
This is basic html in your template
HarryBO
11-10-2004, 07:28 PM
Nice that works!
Big THX!
Lionel
11-10-2004, 08:33 PM
never mind :o
Lionel
11-12-2004, 01:00 PM
Now that we have the games rated, what would be nice is a top rated list and a most popular (most played)
Wachtmeister
11-12-2004, 10:05 PM
Will this sql query work if i use table prefix for my forum? My forum uses vb3_ as prefix and i think, that this will not work for me. ??
Intex
11-13-2004, 05:27 PM
Thx. GenSec.
* Intex clicks INSTALL.
GenSec
11-13-2004, 07:00 PM
Will this sql query work if i use table prefix for my forum? My forum uses vb3_ as prefix and i think, that this will not work for me. ??It will :)
It creates only one new table without prefix: "game_rate".
If you want to add prefix to "game_rate" it's very simple. Just rename this table ;)
GenSec
11-13-2004, 07:11 PM
Now that we have the games rated, what would be nice is a top rated list and a most popular (most played)No problem:)
Find in arcade.php
// Selects all games from the database
Add below:
if ($_GET['show'] == "best")
{
define('BESTRATED', 'true');
// Selects rating
$result_allgames = $DB_site->query("
SELECT * FROM " . TABLE_PREFIX . "games AS g
WHERE g.votetotal>3 ORDER BY votetotal DESC
");
} else {
Find:
$gamecount = $DB_site->num_rows($result_allgames);
Add before:
}
Now link to the page http://www.yourdomain/forum/arcade.php?show=best and you have list of games wiht rating >3
GenSec
11-13-2004, 07:12 PM
Most popular is another hack :)
Lionel
11-13-2004, 08:11 PM
Thanks... but that returned no items (perhaps because of the category hack?). I have two instances of // select all games
the first one returns a parse error and the second no results...
NightWalk8r
11-14-2004, 02:23 AM
I keep getting this error when i try to run the query in Admincp =(
Query
ALTER TABLE `vb3_games` ADD `votetotal` smallint(5) UNSIGNED DEFAULT '0' NOT NULL ;
ALTER TABLE `vb3_games` ADD `votenum` smallint(5) UNSIGNED DEFAULT '0' NOT NULL ;
CREATE TABLE `vb3_game_rate` (
`gamerateid` int(11) NOT NULL auto_increment,
`gameid` int(11) NOT NULL default '0',
`userid` int(10) NOT NULL default '0',
`vote` smallint(5) default NULL,
`ipaddress` char(15) NOT NULL default '',
PRIMARY KEY (`gamerateid`)
) TYPE=MyISAM AUTO_INCREMENT=8
vBulletin Message
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ';
ALTER TABLE `vb3_games` ADD `votenum` smallint(5) UNSIGNED
Lionel
11-14-2004, 04:23 AM
No problem:)
Now link to the page http://www.yourdomain/forum/arcade.php?show=best and you have list of games wiht rating >3
OK, cool. I got it by using that link because of the category mode.
arcade.php?do=category&categoryid=1&show=best
Thank you!
and I changed pagenav to
if ($_GET['show'] == "best")
{
define('BESTRATED', 'true');
$pagenav = construct_page_nav($g,"arcade.php?$session[sessionurl]do=category&categoryid=$categoryid&show=best$searchstring");
} else {
$pagenav = construct_page_nav($g, "arcade.php?$session[sessionurl]do=category&categoryid=$categoryid$searchstring");
}
and made the ORDER BY ASC so higher rated display first
GenSec
11-14-2004, 07:38 AM
I keep getting this error
The best way to open phpmyadmin and check the current state of games and game_rate tables. Then to edit them corr.
Lionel
11-14-2004, 11:00 AM
I also added:
$navbits = array("arcade.php?$session[sessionurl]" => "Arcade");
$navbits[""] = "Top Rated Games";
before the } else {
:)
Lionel
11-14-2004, 11:24 AM
Based on your code, here is my "Newest Additions" :)
if ($_GET['latest'] == "true")
{
define('LATEST', 'true');
// Selects latest
$result_allgames = $DB_site->query("
SELECT * FROM " . TABLE_PREFIX . "games AS l
ORDER BY gameid DESC LIMIT 5
");
$navbits = array("arcade.php?$session[sessionurl]" => "Arcade");
$navbits[""] = "Last 5 Games Added";
} else {
// and of course the closing
}
// before
$gamecount = $DB_site->num_rows($result_allgames);
Intex
11-14-2004, 01:18 PM
Most popular is another hack :)GenSec - I've installed this most popular hack and it seems to work, but it doesn't seem to show the rating in the correct numerical order if there is a decimal point in the equation. For example if one user rates a game '1' and another rates it '4', the average is '2.5'.
Any games that have a decimal place appear at the top of the list. Do you know a workaround? Also, would it be difficult to have the titles of the games appear alphabetically from A>Z. Currently they appear as highest ranked in DESC order which shows the game titles from Z>A.
NightWalk8r
11-14-2004, 01:50 PM
The best way to open phpmyadmin and check the current state of games and game_rest tables. Then to edit them corr.
What do i need to check for in games and game_rest??
GenSec
11-14-2004, 10:36 PM
What do i need to check for in games and game_rest??Sorry I mean vb3_game_rate table. Did you create it?
Also you should have fields votetotal and votenum at the end of "vb3_games"
table.
GenSec
11-14-2004, 10:50 PM
GenSec - I've installed this most popular hack and it seems to work, but it doesn't seem to show the rating in the correct numerical order if there is a decimal point in the equation. For example if one user rates a game '1' and another rates it '4', the average is '2.5'.
Any games that have a decimal place appear at the top of the list. Do you know a workaround? Also, would it be difficult to have the titles of the games appear alphabetically from A>Z. Currently they appear as highest ranked in DESC order which shows the game titles from Z>A.
Code is "WHERE g.votetotal>3 ORDER BY votetotal DESC" thus show games with sum of votes >3 in sum of votes order from highest.
Your ex. has votetotal=5. You саn change it to alphabetically from A>Z
just using instead of above "ORDER BY title".
GenSec
11-14-2004, 11:17 PM
Based on your code, here is my "Newest Additions" :)
* GenSec clicks install :)
Lionel
11-15-2004, 07:52 AM
I found some code by Natch over there (https://vborg.vbsupport.ru/showpost.php?p=475024&postcount=17) and adjusted a bit. ;)
if ($_GET['popular'] == "true")
{
define('POPULAR', 'true');
// Select most played
$result_allgames = $DB_site->query("
SELECT *, " . TABLE_PREFIX . "games.gameid AS gameid, " . TABLE_PREFIX . "games.title AS title, " .
TABLE_PREFIX . "games.gamesettings as gamesettings, COUNT(" . TABLE_PREFIX . "gamesessions.gamename) AS popularity
FROM " . TABLE_PREFIX . "games
INNER JOIN " . TABLE_PREFIX . "gamesessions
ON " . TABLE_PREFIX . "games.shortname = " . TABLE_PREFIX . "gamesessions.gamename
WHERE gamesessions.valid = 1
GROUP BY title
ORDER BY popularity DESC
LIMIT 10
");
$navbits = array("arcade.php?$session[sessionurl]" => "Arcade");
$navbits[""] = "Most Popular Games";
} else {
//and of course not to for get the closing
}
//before
$gamecount = $DB_site->num_rows($result_allgames);
Lionel
11-15-2004, 08:45 AM
never mind
GenSec
11-15-2004, 10:32 AM
Frankly I'm using very complicated ;) hack to show top pop.
In arcade.php after
while ($game = $DB_site->fetch_array($result_allgames)) {
add one line ;) below
if ($_GET['show'] == "pop" AND $gamecache["$game[shortname]"]['played'] < 300) continue;
and the arcade.php?show=pop shows games played more than 300 times:)
Lionel
11-15-2004, 10:58 AM
Hey, I don't have your skills. I am scratching for solutions haha... I wish I knew a little bit more, saving me hours of trial and error. :speechless: :ermm:
Zachariah
11-16-2004, 11:25 AM
@GenSec - kissing your feed (saying: not worthy, I not worthy) for great code add-on
@Lionel - hardy handshake for few more snippits
@Oblivion Knight - beer and a blunt for pointing me here.
/me installs
ChuanSE
11-17-2004, 11:48 PM
So, does this thingy works or not? :D
ChuanSE
11-18-2004, 01:35 AM
strange strange strange
the code is there, but the rating area doesn't appear in the arcade_play bit, or nowhere else on that page?
any suggestions :)
Lethal
11-18-2004, 11:06 PM
I have the category and game resolution hacks installed and i installed this hack and I get a database error. I double checked all the file and template edits and I am not sure what is wrong.
"There seems to have been a slight problem with the One Foot In The Grave database.
Please try again by pressing the refresh button in your browser.
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
We apologise for any inconvenience."
Thats all it says.
Neal-UK
11-18-2004, 11:08 PM
strange strange strange
the code is there, but the rating area doesn't appear in the arcade_play bit, or nowhere else on that page?
any suggestions :)
didn't work for me, came up with DB error (No number, just standard error) so had to remove it.
Deska
11-22-2004, 09:03 AM
Edited: It's work for me.
Thank's for this hack :)
DS MrSinister
11-30-2004, 07:15 PM
5. At last find the right place to show the game rating
<if condition="$game['rating'] > 0"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$game[rating].gif" alt="<phrase 1="$game[votenum]" 2="$game[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" border="0" /></if>
where do i place this part of code in arcade_main_games_bit temlate :
strange strange strange
the code is there, but the rating area doesn't appear in the arcade_play bit, or nowhere else on that page?
any suggestions :)
I have the same problem.. Any ideas?
Lionel
12-01-2004, 02:59 PM
$phrasegroups = array('arcade','showthread');
remove 'arcade',
sirstone
12-18-2004, 10:57 AM
I´ve installed this mod, but when i click the rating i don´t see the reults.. Why? Under the Games.gif
dtsrules
12-21-2004, 05:28 PM
same problem as others, I can't get the rating to appear. :(
rjordan
12-29-2004, 04:09 AM
I am also unable to see anything regarding ratings after installing this. What I have played around with was the addition in arcade_play:
<div class="vbmenu_popup" id="gamerating_menu" style="display:none">
If I remove the style="display:none", I can see the rating hack in the game screen, but it does not display anything beside the radio buttons other than terrible.
I have gone back and rechecked and rechecked again what I have done with no success. Any ideas?
rjordan
12-29-2004, 01:43 PM
I found one of my issues... it seems that there are two cases of the following in admin_play:
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="thead" colspan="2"><span class="smallfont">$thisGame[title]</span></td>
</tr>
You want the second instance. The first is in the challenge system and the second in regular play. Now to try to find some phrases as I am missing some of those...
Hey, just wanted to let you know that I've installed this hack on my boards at www.swanseasucks.com/vforum/arcade.php and it's really great.
I did have some trouble installing it because I am a complete novice at this sort of thing, but from a few of the posts I've read here other people had the same problem I did with sql errors after editing arcade.php - this was for two reasons.
1 - as already pointed out, removing 'arcade' from the line
$phrasegroups = array('arcade','showthread');
when changing arcade.php
2 - the code for creating a table assumes that there is no prefix on the database and so creates a table called 'game_rate' - however, if your vbulletin database is prefixed then you need to change the following code to reflect that:
CREATE TABLE `game_rate` (
`gamerateid` int(11) NOT NULL auto_increment,
`gameid` int(11) NOT NULL default '0',
`userid` int(10) NOT NULL default '0',
`vote` smallint(5) default NULL,
`ipaddress` char(15) NOT NULL default '',
PRIMARY KEY (`gamerateid`)
) TYPE=MyISAM AUTO_INCREMENT=8 ;
example: should your database be prefixed vbx_ then the first line of that code should read
CREATE TABLE `vbx_game_rate` (
Obviously you need to replace 'vbx_' with whatever your database prefix is (you can find that through phpmyadmin or whatever.
I hope that helps someone as I nearly had a heart attack when it all went pear shaped :)
*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
Now, can some one explain to me what files to change so that it says "rate game" rather than "rate thread"?
Thanks all, and thanks for a great hack.
bubba1977
01-06-2005, 01:51 AM
strange strange strange
the code is there, but the rating area doesn't appear in the arcade_play bit, or nowhere else on that page?
any suggestions :)
I have been through this thread and the install file three times and done all the suggested fixes and double and triple checked everything and I have the same issue.
it simply shows nothing at all as tho hack was never even installed.
it also states in the code "if ratings are enabled" where do we enbable them as there do not appear to be any admin panel changes to turn ratings on or off
Slapp3r
01-09-2005, 04:48 PM
I have installed this hack but i can still see nothing in the arcade any ideas
Slapp3r
01-09-2005, 04:59 PM
cheers
MorrisMcD
01-17-2005, 02:36 AM
didn't work for me, came up with DB error (No number, just standard error) so had to remove it.
Same here.. Checked and double checked
sim tech
02-28-2005, 06:44 PM
I keep getting this error when i try to run the query in Admincp =(
Query
ALTER TABLE `vb3_games` ADD `votetotal` smallint(5) UNSIGNED DEFAULT '0' NOT NULL ;
ALTER TABLE `vb3_games` ADD `votenum` smallint(5) UNSIGNED DEFAULT '0' NOT NULL ;
CREATE TABLE `vb3_game_rate` (
`gamerateid` int(11) NOT NULL auto_increment,
`gameid` int(11) NOT NULL default '0',
`userid` int(10) NOT NULL default '0',
`vote` smallint(5) default NULL,
`ipaddress` char(15) NOT NULL default '',
PRIMARY KEY (`gamerateid`)
) TYPE=MyISAM AUTO_INCREMENT=8
vBulletin Message
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ';
ALTER TABLE `vb3_games` ADD `votenum` smallint(5) UNSIGNED
I ran into the same problems, and being a php-noob it took a while to see the problems.
First of all, you can't run all of the queries at once (there's actually 3 there) and 2nd: if you are running version 3 or higher there is no table just called "games" (someone else pointed this out here - thanks!)
Here's the 3 that I ran separate:
ALTER TABLE `vb3_games` ADD `votetotal` smallint(5) UNSIGNED DEFAULT '0' NOT NULL ;
ALTER TABLE `vb3_games` ADD `votenum` smallint(5) UNSIGNED DEFAULT '0' NOT NULL ;
CREATE TABLE `vb3_game_rate` (
`gamerateid` int(11) NOT NULL auto_increment,
`gameid` int(11) NOT NULL default '0',
`userid` int(10) NOT NULL default '0',
`vote` smallint(5) default NULL,
`ipaddress` char(15) NOT NULL default '',
PRIMARY KEY (`gamerateid`)
) TYPE=MyISAM AUTO_INCREMENT=8 ;
That part helped with my pucker-factor which was caused when the arcade would not run.
MicroLinux?
02-28-2005, 07:33 PM
Does this work for vBulliten 3.0.7 with the categories mod installed?
sim tech
02-28-2005, 08:21 PM
I don't know about the catagories mod, but the kind of works on mine and I'm running 3.0.7.
I say "kind of" because of several issues that I am pulling my hair out on (and I'm already going bald, so this is a bad thing):
I'd like the rating option to be available on the main arcade.php page, but the rate drop down screen only appears when someone selects a specific game.... at at that point it's labeled Rate Thread. I saw where someone else asked about this but did not see where to fix it.
I have the standard v3arcade layout - can the star ratings be placed on the main arcade page rather than the individual game page?
Is this an option that I screwed up on? :ermm: Other screenshots make it look like it's on the arcade.php page.
Thanks
Oblivion Knight
03-01-2005, 07:57 AM
at that point it's labeled Rate Thread. I saw where someone else asked about this but did not see where to fix it.The mod was made that way for the "ease" factor. It's fairly easy to create your own phrases for it and update the code and templates to display this.. :)
I have the standard v3arcade layout - can the star ratings be placed on the main arcade page rather than the individual game page?
Is this an option that I screwed up on? :ermm: Other screenshots make it look like it's on the arcade.php page.By default, you can only rate games on an individual game's play page. If you've seen different elsewhere, it's likely to be a custom job that they've done themselves.
after playing around with it for a while, I finally got it working they way I wanted :) Thank you for sharing this with the community ;)
sim tech
03-24-2005, 05:32 AM
Ditto here - thanks!
One (more) question though... is there a query to reset all of the existing game ratings? I had some bogus rates and I'd rather just wipe them all out.
mcoco1
03-30-2005, 08:53 PM
Is there a way to change the display order on the arcade.php page? I would like to display the most played first so you don't have to dig through several pages for the games which are most fun.
Thanks! :)
Allan
04-14-2005, 09:44 PM
thanks :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am sorry, but I made all the changes explain and I do not have any rating which appears has to games, nor in the principal main, an idea of the problem??
I've got it installed. Had the same sql errors and removed the arcade from the phrasegroup.
But i'm not seeing the ratings selectin in the games nor am I seeing anything about ratings.
owner
05-20-2005, 11:33 AM
There is some problem with this coding .... $phrasegroups = array('arcade','showthread');
I tried adding just the showthread and it works but the arcade dosent work for it..... Strange.. Also i didnt quite get this step ..
2. Upload gamerate.php to your forumroot directory.
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
There are somу redirects phrases like "redirect_threadrate_add", "error_threadratevoted" etc.
You саn change them to similar with the word "game" instead of "thread".
I didn't. And it works fine on my board.
--
Change what to what ? huh !
There are somу redirects phrases like "redirect_threadrate_add", "error_threadratevoted" etc.
You саn change them to similar with the word "game" instead of "thread".
I didn't. And it works fine on my board.
--
Change what to what ? huh !
I agree with you, this is confusing... I couldnt do it either cuz I didnt understand what he was trying to say.....
CampusCrawler
06-10-2005, 05:35 AM
so how could i use this with calendar mod?
nymyth
08-17-2005, 03:17 PM
So do we have answers on why its not showing up on the arcade, ive followed the instructions to the 't' and still cant get it to show. Has anyone that had this problem fixed it??
Peace
nymyth
08-17-2005, 04:18 PM
OK I FINALLY FIGURED IT OUT: I'm running 3.0.6 and with tweaking, I have it looking perfect. (mind you im using the standard board style)
TEMPLATE: arcade_play (this is to get it to show correct)
RIGHT AFTER:
<span class="smallfont"><a href="$vboptions[bburl]/arcade.php">Back to the Arcade</a><br><a href="$vboptions[bburl]/arcade.php?do=scores&name=$thisGame[shortname]">View High Scores</a></span></td></tr>
PASTE THE FOLLOWING:
<div class="vbmenu_popup" id="gamerating_menu" align="left" style="display:none">
<form action="gamerate.php" method="post">
<tr>
<td class="thead"><span class="smallfont">Rate this game<a name="goto_gamerating"></a></span></td>
</tr>
<tr>
<td class="alt1" title="choose" align="left">
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_5.gif" alt="$vbphrase[excellent]" /><label for="vote5"><input type="radio" name="vote" id="vote5" value="5" $votechecked[5] />$vbphrase[excellent]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_4.gif" alt="$vbphrase[good]" /><label for="vote4"><input type="radio" name="vote" id="vote4" value="4" $votechecked[4] />$vbphrase[good]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_3.gif" alt="$vbphrase[average]" /><label for="vote3"><input type="radio" name="vote" id="vote3" value="3" $votechecked[3] />$vbphrase[average]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_2.gif" alt="$vbphrase[bad]" /><label for="vote2"><input type="radio" name="vote" id="vote2" value="2" $votechecked[2] />$vbphrase[bad]</label></div>
<div><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_1.gif" alt="$vbphrase[terrible]" /><label for="vote1"><input type="radio" name="vote" id="vote1" value="1" $votechecked[1] />$vbphrase[terrible]</label></div>
</td>
</tr>
<tr>
<td class="alt2" title="VOTE" align="center">
<input type="hidden" name="s" value="$session[dbsessionhash]" />
<input type="hidden" name="gameid" value="$gameid" />
<input type="submit" class="button" value="$vbphrase[vote_now]" />
</td>
</tr>
</form>
</div>
TEMPLATE: arcade_main (this is to get the tables to look correct)
RIGHT IN BETWEEN: (overwrite anything in there)
<!-- games --> & <!-- games -->
PASTE THE FOLLOWING:
<!-- games -->
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center">
<tr>
<td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr align="center">
<td colspan="4" class="thead">Total Games: $gamecount </td>
</tr>
$gamebits
</table>
</tr>
</td>
</table>
<!-- /games -->
With these 2 fixes, I got the whole thing to align correctly, and work flawlessly.....
ENJOY
Peace
Gutspiller
08-18-2005, 08:39 PM
How do I get it so that when you mouse over the rating it doesn't say: "Thread Rating"?
nymyth
08-18-2005, 08:53 PM
<td class="alt1" title="choose" align="left">
Where mines says choose, I belive yours read thread rating....I changed it to choose, you can replace it with whatever.
Was that what you were looking for?
Peace
Gutspiller
08-19-2005, 08:46 PM
No I still want it to say the stats on the frontpage of the arcade when the rating image is rolled over.
Battle_Ring
08-26-2005, 06:13 PM
does thsi work with 3.0.7
heavenz_destiny
10-19-2005, 05:46 PM
Nice hack, except it doesn't show up for me. When i used
$phrasegroups = array('arcade','showthread');
The arcade wouldn't work. So i changed to
$phrasegroups = array('showthread');
But now the table to vote doesn't appear anywhere. Any ideas?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.