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)
-   -   Show Latest Arcade Addition on Forum Home (https://vborg.vbsupport.ru/showthread.php?t=68909)

mavherzog 01-08-2005 04:45 AM

I modified this slightly to work with ibProArcade. Basically, all I had to do was change the DB query in index.php to match up with the right table and field names for ibProArcade. Instead of adding this to index.php:

Quote:

// Latest Addition to Arcade
$result_newgame = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "games ORDER BY gameid DESC LIMIT 1");
$result_newgametitle = $DB_site->fetch_array($result_newgame);
$newgame = $result_newgametitle['title'];
$newgameid = $result_newgametitle['gameid'];
Add this instead:

Quote:

// Latest Addition to Arcade
$result_newgame = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "games_list ORDER BY gid DESC LIMIT 1");
$result_newgametitle = $DB_site->fetch_array($result_newgame);
$newgame = $result_newgametitle['gtitle'];
$newgameid = $result_newgametitle['gid'];
Apologies if this had been addressed before. :)

Oblivion Knight 01-08-2005 08:29 AM

Schweet! With your permission I'd like to include that in the zip as an ibProArcade version of the mod.

You'll be credited, obviously. :)

mavherzog 01-08-2005 05:23 PM

Quote:

Originally Posted by Oblivion Knight
Schweet! With your permission I'd like to include that in the zip as an ibProArcade version of the mod.

You'll be credited, obviously. :)

Go right ahead!!

94DROPTOPZ 01-22-2005 02:10 AM

Very nice!

Thank you... "Clicks Install"

MPM.com 02-24-2005 08:30 AM

My apologies if this has been asked before, but is there a hack similar to this that works with the vbadvanced cmps? www.mobilephonemadness.com

Would like the current top players in a module on thehome page if thats possible?

Mark

Oblivion Knight 02-24-2005 09:01 AM

You could try asking over at http://www.vbadvanced.com - they'll know more than I.

MustangLisa 06-12-2005 05:21 PM

Great hack, thanks!!

dsboyce8624 06-15-2005 11:37 AM

Quote:

Originally Posted by MPM.com
My apologies if this has been asked before, but is there a hack similar to this that works with the vbadvanced cmps? www.mobilephonemadness.com

Would like the current top players in a module on thehome page if thats possible?

Mark

You should search for the leaderboard hack and see about porting it to a CMPS module. Probably not too hard.

dsboyce8624 06-15-2005 07:27 PM

I wanted this in the NAVBAR so it would attract more attention so here is what I did:

Code:


If you DO NOT have my Number of v3 Arcade Games in vBadvanced Stats Block hack installed:

In global.php find:

                $vbphrase['total_x_nav_compiled'] = construct_phrase($vbphrase['total_x_nav'], $bbuserinfo['pmtotal']);


Below it add:

                // Latest Arcade Game
                $result_newgame = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "games ORDER BY gameid DESC LIMIT 1");
                $result_newgametitle = $DB_site->fetch_array($result_newgame);
                $newgame = $result_newgametitle['title'];
                $newgameid = $result_newgametitle['gameid'];


OTHERWISE:


If you DO have my Number of v3 Arcade Games in vBadvanced Stats Block hack installed:

In global.php find:

                      $result_allgames = $DB_site->query("
                SELECT * FROM " . TABLE_PREFIX . "games $searchclause ORDER BY gameid DESC
                        ");
               
                        $gamecount = $DB_site->num_rows($result_allgames);



Replace it with:


                $result_games = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "games $searchclause ORDER BY gameid DESC");
                $result_newgametitle = $DB_site->fetch_array($result_games, 1);
                $gamecount = $DB_site->num_rows($result_games);
                $newgame = $result_newgametitle['title'];
                $newgameid = $result_newgametitle['gameid'];


AND, for BOTH cases:


Template Edit:

In NAVBAR find:

                        <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
                        <if condition="$show['pmstats']"><br />


Replace with:

                        <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase> <br />
                        Newest Arcade Game: <a href="arcade.php?$session[sessionurl]do=play&gameid=$newgameid">$newgame</a>                       
                       
                        <if condition="$show['pmstats']"><br />

If you use vBa CMPS add the following to AdminCP->vBa CMPS->Default Settings->Portal Output Global Variables:

                newgame
                newgameid

Done.

Hopefully this will get more people to notice that you have an arcade. I know that the arcade has attracted and kept users for me.

Dennis

Oblivion Knight 06-15-2005 07:54 PM

Thanks for sharing Dennis, an alternative is always handy.. :)


All times are GMT. The time now is 07:11 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.01757 seconds
  • Memory Usage 1,749KB
  • 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_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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