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)

Lionel 11-14-2004 04:23 AM

Quote:

Originally Posted by GenSec
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.

PHP Code:

arcade.php?do=category&categoryid=1&show=best 

Thank you!

and I changed pagenav to

PHP Code:

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

Quote:

Originally Posted by NightWalk8r
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:

PHP Code:

    $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" :)

PHP Code:

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

Quote:

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

Quote:

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

Quote:

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

Quote:

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

Quote:

Originally Posted by Lionel
Based on your code, here is my "Newest Additions" :)

[high]* GenSec clicks install :)[/high]

Lionel 11-15-2004 07:52 AM

I found some code by Natch over there and adjusted a bit. ;)

PHP Code:

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); 



All times are GMT. The time now is 06:43 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.04042 seconds
  • Memory Usage 1,771KB
  • 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
  • (5)bbcode_php_printable
  • (7)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