Version: 1.00, by GenSec
Developer Last Online: Jun 2010
Version: 3.0.3
Rating:
Released: 11-06-2004
Last Update: Never
Installs: 24
No support by the author.
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 :
Code:
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.
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
Code:
// Selects all games from the database
Add below:
Code:
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 {
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...
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