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>";
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>";