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.


All times are GMT. The time now is 11:53 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.01611 seconds
  • Memory Usage 1,737KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete