EH-Jay
02-26-2005, 10:00 PM
If your wondering, of course I'm aware of the current Profile hack that comes with vb3 arcade, but I wanted something better so I kinda coded a tiny new hack. It's pretty basic, but I think it looks better. Have a look:
This came with the Profile hack. If you didn't do this already:
Edit: member.php
find:
if (!$userid)
Above it, add:
if ($arcadegeneral['awardson']==1) {
// declares the arcade image directory
$stylevar['imgdir_arcade'] = "images/arcade";
$arcade_result = $DB_site->query("SELECT shortname,title,gamesettings,highscorerid,highscor e,miniimage,gameid FROM " . TABLE_PREFIX . "games ");
while ($arcade = $DB_site->fetch_array($arcade_result)){
if (($arcade[gamesettings] & $_GAMESCHECK['showaward'])){
$awards[$arcade[shortname]]['userid'] = $arcade['highscorerid'];
$awards[$arcade[shortname]]['gametitle'] = $arcade['title'];
$awards[$arcade[shortname]]['icon'] = $arcade['miniimage'];
$awards[$arcade[shortname]]['highscore'] = $arcade['highscore'];
$awards[$arcade[shortname]]['gameid'] = $arcade['gameid'];
}
}
foreach ($awards as $key => $award) {
if ($award['userid']==$userid) {
eval('$arcadeawards .= "' . fetch_template('arcade_awards_bit') . '";');
}
}
}
The above came with the hack, but I was just restating it. Moving on...
Templates to modify: MEMBERINFO
Find:
<if condition="$show['signature']">
Above it, add:
<!-- arcade awards -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">Arcade Awards - <a href="arcade.php?$session[sessionurl]">Click to play the arcade!</a></td>
</tr>
<tr>
<td class="alt1">$arcadeawards</td>
</tr>
</table>
<!-- / arcade awards -->
<br />
That's all. Nothing big but it looks better.
If it doesn't look like the attatched screen shot, then do this:
Go to the template ARCADE_AWARDS_BIT
Find:
<if condition="$award[icon]!=' ' "><a href="arcade.php?do=play&gameid=$award[gameid]"><img src="$stylevar[imgdir_arcade]/$award[icon]" alt="High Score: $award[highscore]" align="absmiddle" border=0></a> </if><span class="smallfont">$award[gametitle] Champion!</span><br>
Replace that with:
<if condition="$award[icon]!=''"><a href="arcade.php?do=play&gameid=$award[gameid]"><img src="$stylevar[imgdir_arcade]/$award[icon]" alt="$award[gametitle] Champ, score: $award[highscore]" align="absmiddle" border=0></a> </if>
Should be working after that. And god I hope no one else posted something like this, I'll feel like such an idiot lol. Look below for the attatched ss.
This came with the Profile hack. If you didn't do this already:
Edit: member.php
find:
if (!$userid)
Above it, add:
if ($arcadegeneral['awardson']==1) {
// declares the arcade image directory
$stylevar['imgdir_arcade'] = "images/arcade";
$arcade_result = $DB_site->query("SELECT shortname,title,gamesettings,highscorerid,highscor e,miniimage,gameid FROM " . TABLE_PREFIX . "games ");
while ($arcade = $DB_site->fetch_array($arcade_result)){
if (($arcade[gamesettings] & $_GAMESCHECK['showaward'])){
$awards[$arcade[shortname]]['userid'] = $arcade['highscorerid'];
$awards[$arcade[shortname]]['gametitle'] = $arcade['title'];
$awards[$arcade[shortname]]['icon'] = $arcade['miniimage'];
$awards[$arcade[shortname]]['highscore'] = $arcade['highscore'];
$awards[$arcade[shortname]]['gameid'] = $arcade['gameid'];
}
}
foreach ($awards as $key => $award) {
if ($award['userid']==$userid) {
eval('$arcadeawards .= "' . fetch_template('arcade_awards_bit') . '";');
}
}
}
The above came with the hack, but I was just restating it. Moving on...
Templates to modify: MEMBERINFO
Find:
<if condition="$show['signature']">
Above it, add:
<!-- arcade awards -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead">Arcade Awards - <a href="arcade.php?$session[sessionurl]">Click to play the arcade!</a></td>
</tr>
<tr>
<td class="alt1">$arcadeawards</td>
</tr>
</table>
<!-- / arcade awards -->
<br />
That's all. Nothing big but it looks better.
If it doesn't look like the attatched screen shot, then do this:
Go to the template ARCADE_AWARDS_BIT
Find:
<if condition="$award[icon]!=' ' "><a href="arcade.php?do=play&gameid=$award[gameid]"><img src="$stylevar[imgdir_arcade]/$award[icon]" alt="High Score: $award[highscore]" align="absmiddle" border=0></a> </if><span class="smallfont">$award[gametitle] Champion!</span><br>
Replace that with:
<if condition="$award[icon]!=''"><a href="arcade.php?do=play&gameid=$award[gameid]"><img src="$stylevar[imgdir_arcade]/$award[icon]" alt="$award[gametitle] Champ, score: $award[highscore]" align="absmiddle" border=0></a> </if>
Should be working after that. And god I hope no one else posted something like this, I'll feel like such an idiot lol. Look below for the attatched ss.