PDA

View Full Version : Active User Images for Ibproarcade WOL


am-fs
04-26-2006, 10:00 PM
This file edit adds images to the "Users Active in the Arcade" showing what game a member is playing or what they are viewing.

This mod was released on the old vbibroarcade support forum by Gemma, Thanks Again :cool:
I have been useing it since 3.0x - 2.5.1 arcade with out any problems.

Here's what to do.
1 File Edit - mod_arcade.php
Upload 2 images to the arcade/images folder.


In arcade/modules/mod_arcade.php

Find:
$DB->query("SELECT gid, gtitle FROM ibf_games_list WHERE gid IN ($games_list)");
while($g = $DB->fetch_row())
{
$games_names[$g['gid']] = $g['gtitle'];
}
}

$a = 0;
foreach( $active_list as $this_user )
{
$span_pre = "";
$span_suf = "";

$this_user['in_game'] = explode("|",$this_user['in_game']);
$gid = $this_user['in_game'][0];
$do = $this_user['in_game'][1];

if( $do == "play" )
{
$span_pre = "<span title='".$ibforums->lang["playing"].$games_names[$gid]."' style='text-decoration: none; border-bottom: 1px dashed; padding-bottom: 1px;'>";
}
elseif( $do == "stats" )
{
$span_pre = "<span title='".$ibforums->lang["viewing"].$games_names[$gid]."'>";
}
else
{
$span_pre = "<span title='".$ibforums->lang["arcade_home"]."'>";
}
$span_suf = "</span>";


Replace with:
$DB->query("SELECT g.gid, g.gtitle, c.password, g.gname FROM ibf_games_list AS g, ibf_games_cats as c WHERE gid IN ($games_list) AND g.gcat=c.c_id AND trim(password)=''");
while($g = $DB->fetch_row())
{
$games_id[$g['gid']] = $g['gid'];
$games_names[$g['gid']] = $g['gtitle'];
$games_gnames[$g['gid']] = $g['gname'];
}
}

$a = 0;
foreach( $active_list as $this_user )
{
$span_pre = "";
$span_suf = "";

$this_user['in_game'] = explode("|",$this_user['in_game']);
$gid = $this_user['in_game'][0];
$do = $this_user['in_game'][1];

if( ($do == "play") && (isset($games_names[$gid])))
{
$span_pre = "<a href={$ibforums->base_url}act=Arcade&do=play&gameid=".$games_id[$gid]."><IMG SRC='./arcade/images/".$games_gnames[$gid]."2.gif' border='0' alt='Click to Play: ".$games_names[$gid]."' /></a> <span title='".$ibforums->lang["playing"].$games_names[$gid]."' style='text-decoration: none; border-bottom: 1px dashed; padding-bottom: 1px;'>";
}
elseif( $do == "stats" )
{
$span_pre = "<a href={$ibforums->base_url}act=Arcade&do=stats&gameid=".$games_id[$gid]."><IMG SRC='./arcade/images/arcadeleaders.gif' border='0' alt='Click to View Leaders: ".$games_names[$gid]."' /></a> <span title='".$ibforums->lang["viewing"].$games_names[$gid]."'>";
}
else
{
$span_pre = "<a href={$ibforums->base_url}act=Arcade><IMG SRC='./arcade/images/arcadehome.gif' border='0' alt='Click to View: Arcade Home' /></a> <span title='".$ibforums->lang["arcade_home"]."'>";
}
$span_suf = "</span>";

Gemma
04-27-2006, 03:45 PM
Nice work ;) :)

This should be in the standard release of the arcade

*Gemma clicks install even though she's had it installed for 8 months*

Tyegurl
04-27-2006, 05:27 PM
tyvm i love it!

Snake
04-27-2006, 07:21 PM
Man I like it!

alsinda
04-28-2006, 05:06 AM
Works perfect. Very cool.

rinkrat
05-09-2006, 12:08 AM
Nice!

Hippy
08-20-2010, 07:39 PM
great mod for the arcade
It always bothered me I could not click on the image "a member was playing" to bring me right to the game..;)
I know this it's a old mod .. Not 100% sure it needs a little coding but it still works..

thanks