The Arcive of vBulletin Modifications Site. |
|
vb3 Arcade Profile Hack Details »»
|
|||||||||||||||||||||||||
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:
Code:
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,highscore,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') . '";');
}
}
}
Code:
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 /> If it doesn't look like the attatched screen shot, then do this: Code:
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> Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
You're right, it does look better
|
|
#3
|
||||
|
||||
|
Yea
instead of like RIGHT underneath your username. lol simple hack, that's all
|
|
#4
|
|||
|
|||
|
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
|
|
#5
|
||||
|
||||
|
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. |
|
#6
|
||||
|
||||
|
Did you install the correct template for the $arcadeawards bit?
|
|
#7
|
||||
|
||||
|
Nice work.
|
|
#8
|
||||
|
||||
|
Naa I don't credit for the "real" work, leave that to the dev's of the arcade hack. I just spiced it up
|
|
#9
|
||||
|
||||
|
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. Quote:
|
|
#10
|
||||
|
||||
|
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.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|