PDA

View Full Version : vb3 Arcade Profile Hack


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>&nbsp;</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.

Creed
02-27-2005, 08:12 PM
You're right, it does look better :)

EH-Jay
02-27-2005, 08:17 PM
Yea :) instead of like RIGHT underneath your username. lol simple hack, that's all :)

tehste
02-28-2005, 07:06 PM
since includes/functions_showthread.php is called by the profile page by using that in effect you are doing two sql queries to the database when you want to get arcade awards. ;) Cause of the way Johns install instructions where, though they may have changed ;) It's possible to use the same php to sort the array for both the postbit and the profile, as I do ;)

Acers
03-12-2005, 12:18 AM
using3.07 and followed exactly what you said.

Only i am now getting that profile field:

Arcade Awards - Click to play the arcade!

But below that is coming empty :S
And needless to say the user in question has about 10 games under his belt.

EH-Jay
03-12-2005, 12:32 AM
Did you install the correct template for the $arcadeawards bit?

neocorteqz
03-12-2005, 08:01 AM
Nice work. :)

EH-Jay
03-12-2005, 04:07 PM
Naa I don't credit for the "real" work, leave that to the dev's of the arcade hack. I just spiced it up ;)

Acers
03-14-2005, 04:16 PM
very funny,,,
I have done exactly whats been said above. It doesn't seem to work for some reason. I am getting the text:
"Arcade Awards - Click to play the arcade!"

But below that is empty.... even for users who have won 10 titles.


Did you install the correct template for the $arcadeawards bit?
If you mean the last step of hack then yes i have done that also. But can't see anything even now. I am not using the default VB skin. Could that be a reason? (i am on 3,07 though)

EH-Jay
03-14-2005, 10:36 PM
If you want to message me with an admin account for your forums I'd be happy to help you. I can't think of any reason for it not to work, regardless of the style.

Harry72
03-19-2005, 04:38 PM
using3.07 and followed exactly what you said.

Only i am now getting that profile field:

Arcade Awards - Click to play the arcade!

But below that is coming empty :S
And needless to say the user in question has about 10 games under his belt.

Activate in Arcade-Settings "Show Arcade Awards in Postbit".

I think that`s the solution for your problem. :nervous:

Cheers

EH-Jay
03-20-2005, 11:58 PM
whoops! I forgot about that too LOL.

Acers
03-21-2005, 05:28 AM
Activate in Arcade-Settings "Show Arcade Awards in Postbit".

I think that`s the solution for your problem. :nervous:

Cheers
Oh i am an ass :P
That was exactly what was wrong...
thx man......thx a lot

ps: I think you should mention that at the top in the hack steps.. I guess there will be plenty of asses like me :P

Acers
03-21-2005, 11:32 AM
hey is there a way so that these show up only in the profile of user when its clicked and not in the postbit? Cos for members having many game titles its filling up the screen.

Harry72
03-21-2005, 03:39 PM
hey is there a way so that these show up only in the profile of user when its clicked and not in the postbit? Cos for members having many game titles its filling up the screen.

Yes. That`s no problem. Delete in postbit Template $post[arcadeawards].
Easy ... :nervous:

Polo
03-23-2005, 03:52 PM
how many queries does this hack add to member.php?? does any know?

Vevina
05-16-2005, 10:35 PM
sweet installed :)

m0nde
05-17-2005, 01:39 AM
Nice Work!

Looks very clean!

o0Hubba0o
08-07-2005, 06:22 PM
/me installs

I had to add the member.php bit, for some reason I didn't have it in there lol. Looks good now, thanks for the "enhancement".

Forumi Shqiptar
08-07-2005, 09:02 PM
followed everything and to say the true it didnt change nothing at all in the way it appears in the forum dont know why but im sure i followed everything that was told on this thread can someone help me plz?