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)
-   -   Arcade - Leader Board (v1.4) (https://vborg.vbsupport.ru/showthread.php?t=76897)

DRJ 03-13-2005 06:52 PM

Great hack. Easy to install, only a few minutes.

I did make two changes for myself

in Arcade.php I ordered by username ASC instead of userid ASC since that makes more sense to me.

In template arcade_kings_bit

I wanted to fix the plural Titles for when there was only 1 title

Find

$kings[count] Arcade Titles

Replace With

<if condition="$kings['count']==1">
$kings[count] Arcade Title
<else />
$kings[count] Arcade Titles
</if>

Thanks for the hack.

DRJ 03-13-2005 08:03 PM

I also made this mod. What I wanted was if there was a tie for a certain place then everyone should get that trophy. So if there is a tie for first then both users should have a gold, there would then be no silver and the next prize would be bronze.

If there is a three way (or more tie) then they would all get gold and there would be no silver or bronze. I believe I have this working properly, but it is hard to tell for sure. So maybe some other users that have a tie for first, second, or third could test this.

Here is the whole mod for arcade.php

PHP Code:

// ######################### ARCADE LEADER BOARD ###########################
if ($_GET['do'] == "lboard") {

    
$globaltemplates = array(
        
'ARCADE',
        
'arcade_header',
        
'arcade_kings',
        
'arcade_kings_bit'
    
);

    require_once(
'./global.php');
    require_once(
'./includes/functions_user.php');
    require_once(
'./includes/functions_arcade.php');

    
$navbits = array("arcade.php?$session[sessionurl]=> "Arcade");
    
$navbits[""] = "Leader Board";
    
$highscorers $DB_site->query("
        SELECT COUNT(games.highscorerid) AS count, user.username, user.userid FROM " 
TABLE_PREFIX "games AS games
        LEFT JOIN " 
TABLE_PREFIX "user AS user ON user.userid = games.highscorerid
        WHERE user.userid IS NOT NULL
        GROUP BY user.username, user.userid ORDER BY count DESC, user.username ASC LIMIT 10
    "
);
    
$row '0';
                
$awards '0';
                
$leaders '0';

    while (
$kings $DB_site->fetch_array($highscorers)) {
$leaders++;
if (
$awards<>$kings[count]){
                                
$row=$leaders
                                }
                                
$awards=$kings[count];
                                eval(
'$listkings .= "' fetch_template('arcade_kings_bit') . '";');
                }

    
$DB_site->free_result($highscorers);
    eval(
'$arcadebody = "' fetch_template('arcade_kings') . '";'); 



Oblivion Knight 03-14-2005 06:53 AM

Quote:

Originally Posted by DRJ
in Arcade.php I ordered by username ASC instead of userid ASC since that makes more sense to me.

It was done as userid because I felt that there should be some advantages to being an older member.. :) - It's all down to personal perference with that one.

The other 2 changes you've made may be integrated into 1.4 once tested and confirmed as working, you'll be given credit for this of course.

Sleepyk 03-25-2005 12:07 AM

Real nice add-on worked easy

frankenberrie 04-18-2005 03:34 PM

Very nice addition. Added to my Arcade!

BlackxRam 04-24-2005 08:21 AM

Any way this will get adapted to work for the other arcade system and not V3acade?

Oblivion Knight 04-24-2005 08:55 AM

Quote:

Originally Posted by BlackxRam
Any way this will get adapted to work for the other arcade system and not V3acade?

Not by me.. I have no plans to make the switch from v3arcade.

MauriceReed 04-24-2005 12:52 PM

it would be an excellent addition to IBPRO tho...anyone up for having a bash at the conversion??

msimplay 04-24-2005 01:38 PM

Quote:

Originally Posted by Oblivion Knight
Not by me.. I have no plans to make the switch from v3arcade.

i second that i have no plans to move from v3arcade just yet :D

Lionel 04-24-2005 01:41 PM

Quote:

Originally Posted by msimplay
i second that i have no plans to move from v3arcade just yet :D

me third


All times are GMT. The time now is 08:06 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.00995 seconds
  • Memory Usage 1,752KB
  • 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
  • (1)bbcode_php_printable
  • (4)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