Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
v3 Arcade Most Played and Most Popular Games Details »»
v3 Arcade Most Played and Most Popular Games
Version: 1.00, by Gemma Gemma is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.x.x Rating:
Released: 10-23-2011 Last Update: Never Installs: 14
Re-useable Code Code Changes  
No support by the author.

What does this do?

Creates two tabs in your v3 Arcade which is auto-populated with X Most Played Games and X Most Popular Games (by Votes), where X is equivalent to the number of games set to be shown on each page (set via AdminCP > v3 Arcade > v3 Arcade Settings > v3 Arcade Homepage Settings)

Firstly, create two new games categories (v3 Arcade > Games Categories) and take note of each of the Category IDs

Open arcade.php

Find:
Code:
// Favorites
    else if ($vbulletin->GPC['categoryid'] == 2)
Above that added:
Code:
// Most Popular
else if ($vbulletin->GPC['categoryid'] == X)
{
$games = $db->query_read("
SELECT arcade_games.*, user.username, arcade_categories.catname 
FROM " . TABLE_PREFIX . "v3arcade_games AS arcade_games
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (arcade_games.highscorerid=user.userid)
LEFT JOIN " . TABLE_PREFIX . "v3arcade_categories AS arcade_categories ON (arcade_games.categoryid=arcade_categories.categoryid)
" . iif($bitfieldcheck, "WHERE $bitfieldcheck") . "
ORDER BY arcade_games.votepoints DESC 
LIMIT $start " . $vbulletin->options['gamesperpage']
);
$categorygamecnt = $db->num_rows($games);
} 
// Most Played
else if ($vbulletin->GPC['categoryid'] == XX)
{
$games = $db->query_read("
SELECT arcade_games.*, user.username, arcade_categories.catname 
FROM " . TABLE_PREFIX . "v3arcade_games AS arcade_games
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (arcade_games.highscorerid=user.userid)
LEFT JOIN " . TABLE_PREFIX . "v3arcade_categories AS arcade_categories ON (arcade_games.categoryid=arcade_categories.categoryid)
" . iif($bitfieldcheck, "WHERE $bitfieldcheck") . "
ORDER BY arcade_games.sessioncount DESC
LIMIT $start " . $vbulletin->options['gamesperpage']
);
$categorygamecnt = $db->num_rows($games);
}
Replace the X and XX with the corresponding Category ID that you noted when creating the categories.

Save and re-up your arcade.php

If anyone wants to further develop any of my addons, you are free to do so.

Screenshots

File Type: jpg tabs.jpg (33.0 KB, 0 views)
File Type: jpg popular.jpg (306.2 KB, 0 views)
File Type: jpg played.jpg (296.8 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 05-09-2012, 02:22 PM
datoneer datoneer is offline
 
Join Date: Jul 2011
Posts: 453
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome. Works like a charm!
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 04:45 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.13152 seconds
  • Memory Usage 2,226KB
  • Queries Executed 18 (?)
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
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (3)postbit_attachment
  • (2)postbit_onlinestatus
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete