vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   V3Arcade - Game Rating addon (https://vborg.vbsupport.ru/showthread.php?t=71460)

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.

[high]* Intex clicks INSTALL.[/high]

GenSec 11-13-2004 07:00 PM

Quote:

Originally Posted by Wachtmeister
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

Quote:

Originally Posted by Lionel
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 {

Find:
Code:

                $gamecount = $DB_site->num_rows($result_allgames);
Add before:
Code:

}
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


All times are GMT. The time now is 09:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01103 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete