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)

Oblivion Knight 08-30-2004 09:00 PM

Show Latest Arcade Addition on Forum Home
 
This is a very basic hack that will add a line to your "What's Going On?" box which shows the latest addition that you have made to your arcade (ie. the last game that you installed).

It should be noted that installing this WILL add 1 small QUERY to index.php. This should have little - if any - affect on server load or loading times.

[high]If you have DWard's "Show total amount of arcade games on Forum Home" hack installed, you can merge the queries so that it adds only 1 query instead of 2 - and the instructions have now been updated to tell you how.[/high]


With thanks to mavherzog, there is now also an ibProArcade version of this mod in the zip. The v3arcade version is prefixed "V3A" and the ibProArcade version is prefixed "IBPRO".


Please click install if you find this useful.. :)

Intex 08-31-2004 10:03 AM

Nice work Oblivion. Would be nice to have a module for CMPS as well :).

Polo 08-31-2004 11:38 AM

Nice Oblivion ;)

Oblivion Knight 08-31-2004 11:55 AM

Whoops.. Fixed a typo (phrase name to add - removed extra space).

Instructions updated.


Quote:

Originally Posted by Intex
Nice work Oblivion. Would be nice to have a module for CMPS as well :).

I'll look into it later for you..

starfantazy 08-31-2004 10:52 PM

thanks andy!! ill "try" to install it later haha, saying i wont mess up the database again...

DWard 09-01-2004 09:36 AM

Yer I want this :)

[high]* DWard clicks install[/high]

mcncyo 09-02-2004 11:48 AM

I got one problem with your instructions. I don't like beer :devious: ;)

Intex 09-02-2004 12:35 PM

Nice one. Thanks.


Quote:

Originally Posted by Oblivion Knight
Whoops.. Fixed a typo (phrase name to add - removed extra space).

Instructions updated.


I'll look into it later for you..


revenger681 01-06-2005 07:41 PM

I would like somehting like this, only i would like to show the current arcade players and scores... I have about 15 'regular' players who play quite often in my arcade... They've been requesting new games and what-not also... So I was wondering two things:

1) How can I add latest scores and players to the main current activity area?

2) How do I install new games into my arcade, and also keep track of those scores?

Can someone please help, or point me in the right direction?

Oblivion Knight 01-07-2005 05:48 PM

Nice suggestions, but it's not really anything to do with this mod.. ;)

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.. :)

dsboyce8624 06-15-2005 08:00 PM

No, problem, sorry about the confusion.

PCOSLiving.com 09-12-2005 08:20 AM

Parse error: parse error, unexpected $ in /home/pcoslivi/public_html/forums/profile.php on line 2665

I get that msg after installing this. I also have ipinfo and ustore installed.

stan111 09-18-2005 02:34 AM

this is a very koool hack
thanks a lot


All times are GMT. The time now is 01:33 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.03340 seconds
  • Memory Usage 1,770KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete