vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vb3 Arcade Profile Hack (https://vborg.vbsupport.ru/showthread.php?t=77146)

EH-Jay 02-26-2005 10:00 PM

vb3 Arcade Profile Hack
 
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') . '";');
                }
        }
}

The above came with the hack, but I was just restating it. Moving on...

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 />

That's all. Nothing big but it looks better.

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>&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.


Quote:

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

Quote:

Originally Posted by Acers
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

Quote:

Originally Posted by Harry72
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

Quote:

Originally Posted by Acers
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 09:35 PM

sweet installed :)

m0nde 05-17-2005 12:39 AM

Nice Work!

Looks very clean!

o0Hubba0o 08-07-2005 05: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 08: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?


All times are GMT. The time now is 07:46 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01731 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete