Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Arcade - Leader Board (v1.4) Details »»
Arcade - Leader Board (v1.4)
Version: 1.4, by Oblivion Knight Oblivion Knight is offline
Developer Last Online: Nov 2016 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 02-22-2005 Last Update: 03-18-2005 Installs: 106
 
No support by the author.

This addon provides you with a Leader Board for v3arcade. Currently, it cannot be used for ibProArcade - if you adapt it, please share the code so that it can be added to the zip. You'll be credited for the work.

Dechevious has written a similar addon to this, but this code has been written from scratch and is far more optimized.. Currently, it is not fully phrased - but then again neither is v3arcade itself. Thanks to DRJ for his contributions toward v1.4. Enjoy!


Version History:
? [high]1.0[/high] - Original mod released.
? [high]1.1[/high] - Cached 2 previously uncached templates.
? [high]1.2[/high] - Query changed, orders count by DESC and userid by ASC.
? [high]1.3[/high] - *CRITICAL UPDATE* - Optimized query, improved performance.
? [high]1.4[/high] - arcade.php code block and arcade_kings_bit template changed.


Please click install if you find this useful..

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 03-13-2005, 06:52 PM
DRJ DRJ is offline
 
Join Date: Jan 2005
Location: California USA
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #43  
Old 03-13-2005, 08:03 PM
DRJ DRJ is offline
 
Join Date: Jan 2005
Location: California USA
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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') . '";'); 

Reply With Quote
  #44  
Old 03-14-2005, 06:53 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #45  
Old 03-25-2005, 12:07 AM
Sleepyk Sleepyk is offline
 
Join Date: Dec 2004
Location: CT
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Real nice add-on worked easy
Reply With Quote
  #46  
Old 04-18-2005, 03:34 PM
frankenberrie's Avatar
frankenberrie frankenberrie is offline
 
Join Date: Dec 2002
Location: N.Y.
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice addition. Added to my Arcade!
Reply With Quote
  #47  
Old 04-24-2005, 08:21 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way this will get adapted to work for the other arcade system and not V3acade?
Reply With Quote
  #48  
Old 04-24-2005, 08:55 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #49  
Old 04-24-2005, 12:52 PM
MauriceReed MauriceReed is offline
 
Join Date: Dec 2004
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it would be an excellent addition to IBPRO tho...anyone up for having a bash at the conversion??
Reply With Quote
  #50  
Old 04-24-2005, 01:38 PM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #51  
Old 04-24-2005, 01:41 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by msimplay
i second that i have no plans to move from v3arcade just yet
me third
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:54 PM.


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.04534 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete