vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Add-On Releases - v3 Arcade Winners Podium (https://vborg.vbsupport.ru/showthread.php?t=262860)

Gemma 04-28-2011 10:00 PM

v3 Arcade Winners Podium
 
1 Attachment(s)
I've reworked the Arcade Winners Podium, the original file edits didn't work properly - due to some database queries that weren't needed and some Italian language in the code.

I've also cleaned up the template and added new images.

Import the product

Go to: Admin CP > Plugin System > Manage Products > [Add/Import Product]
Import the "product-v3ArcadePodium.xml" file.

Upload images

Upload the images to your arcade/images folder

Edit Files

Open arcade.php in a text editor

Find:

Code:

($hook = vBulletinHook::fetch_hook('arcade_main_complete')) ? eval($hook) : false;
Above it, add:
Code:

    // Start Arcade Podium
    if ($vbulletin->options['dispawards'] == '1')
    {
        $champs = $db->query_read("SELECT user.username, user.userid, count(games.highscorerid) as total, user.userid FROM " . TABLE_PREFIX . "v3arcade_games AS games LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = games.highscorerid)
            WHERE user.userid IS NOT NULL
            GROUP BY user.username, user.userid
        ORDER BY total DESC, user.userid ASC
        LIMIT 3");
        $champ1 = array(); $champ2 = array(); $champ3 = array(); $champ4 = array(); $userids = array();
        While ($champ = $db->fetch_array($champs))
        {
            array_push($champ1, $champ['username']);
            array_push($champ2, fetch_seo_url('member', fetch_userinfo($champ['userid']), array('tab' => 'v3arcade_stats')));
              array_push($champ3, $champ['total']);
            array_push($userids, $champ[userid]);
        };
        for($counter=0;$counter<3;){
                if ($champ2[$counter] != ''){
                    $supposta = fetch_avatar_url($userids[$counter]);
                    if ($supposta == '')
                        $champ4[$counter] = '/images/arcade/noavatar.gif';
                    else
                        $champ4[$counter] = $supposta[0];
                }
                $counter++;
        }
}
    // Finish Arcade Podium

Find:

Code:

$templater->register('waittournaments', $waittournaments);
Below it, add:

Code:

// Start Arcade Podium Mod
    $templater->register('champ1', $champ1);
    $templater->register('champ2', $champ2);
    $templater->register('champ3', $champ3);
    $templater->register('champ4', $champ4);
    // Start Arcade Podium Mod

Edit Templates

Open template: v3ARCADE_MAIN

Find:
Code:

<!-- category tabs -->
Above it, Add:

Code:

<!-- Start Arcade Podium Modded -->
<vb:if condition="$vboptions['dispawards'] == '1'">
<div>
            <h3 class="blockhead">               
<center><img src="{vb:raw vboptions.arcadeimages}/crown_podium.gif" /><b> Arcade Kings and Queens of {vb:raw vboptions.bbtitle}! </b><img src="{vb:raw vboptions.arcadeimages}/crown_podium.gif" /></center>
</h3>
<table class="tborder" cellpadding="3" cellspacing="3" border="1" width="100%">
<tr>
    <td class="alt1" nowrap="nowrap" width="33%" valign="middle" align="center"><div style="padding: 5px 5px 5px 5px;"><img src="{vb:raw vboptions.arcadeimages}/no1.gif" /></div></td>
    <td class="alt1" nowrap="nowrap" width="33%" valign="middle" align="center"><div style="padding: 5px 5px 5px 5px;"><img src="{vb:raw vboptions.arcadeimages}/no2.gif" /></div></td>
    <td class="alt1" nowrap="nowrap" width="33%" valign="middle" align="center"><div style="padding: 5px 5px 5px 5px;"><img src="{vb:raw vboptions.arcadeimages}/no3.gif" /></div></td>
</tr>
<tr>
    <td class="alt1" nowrap="nowrap" width="33%" valign="middle" align="center"><vb:if condition="$champ4[0] != ''"><div style="padding: 20px 20px 20px 20px;"><img src="{vb:raw champ4.0}" height="75"><vb:else /><div class="smallfont"><b><div style="padding: 20px 20px 20px 20px;">Can You Become The Champion?<br><img src="{vb:raw vboptions.arcadeimages}/trophy.gif"> Claim Now! <img src="{vb:raw vboptions.arcadeimages}/trophy.gif"></b></div></div></vb:if></td>
    <td class="alt1" nowrap="nowrap" width="33%" valign="middle" align="center"><vb:if condition="$champ4[1] != ''"><div style="padding: 20px 20px 20px 20px;"><img src="{vb:raw champ4.1}" height="75"><vb:else /><div class="smallfont"><b><div style="padding: 20px 20px 20px 20px;">Make Your Challenge For Top Spot<br><img src="{vb:raw vboptions.arcadeimages}/trophy.gif"> Claim Now! <img src="{vb:raw vboptions.arcadeimages}/trophy.gif"></b></div></div></vb:if></td>
    <td class="alt1" nowrap="nowrap" width="33%" valign="middle" align="center"><vb:if condition="$champ4[2] != ''"><div style="padding: 20px 20px 20px 20px;"><img src="{vb:raw champ4.2}" height="75"><vb:else /><div class="smallfont"><b><div style="padding: 20px 20px 20px 20px;">Prove You Are The Best<br><img src="{vb:raw vboptions.arcadeimages}/trophy.gif"> Claim Now! <img src="{vb:raw vboptions.arcadeimages}/trophy.gif"></b></div></div></vb:if></td>
</tr>
<tr>
    <td class="alt1" nowrap="nowrap" width="33%" valign="middle" align="center"><div class="smallfont"><vb:if condition="$champ1[0] != ''"><a href="{vb:raw champ2.0}"><b>{vb:raw champ1.0}</b></a><br><b>with {vb:raw champ3.0} highscores</b> <vb:else /> - Empty - </vb:if></div></td>
    <td class="alt1" nowrap="nowrap" width="33%" valign="middle" align="center"><div class="smallfont"><vb:if condition="$champ1[1] != ''"><a href="{vb:raw champ2.1}"><b>{vb:raw champ1.1}</b></a><br><b>with {vb:raw champ3.1} highscores</b> <vb:else /> - Empty - </vb:if></div></td>
    <td class="alt1" nowrap="nowrap" width="33%" valign="middle" align="center"><div class="smallfont"><vb:if condition="$champ1[2] != ''"><a href="{vb:raw champ2.2}"><b>{vb:raw champ1.2}</b></a><br><b>with {vb:raw champ3.2} highscores</b> <vb:else /> - Empty - </vb:if></div></td>
</tr>
</table>
<div style="padding: 10px 0px 0px 0px;"></div>
<vb:else />
</vb:if>
<!-- Finish Arcade Podium Modded-->
<div style="padding: 5px 0px 0px 0px;"></div>

The podium is enabled upon install but can be disabled by going to Admin CP > v3 Arcade > v3Arcade Settings > v3Arcade General Settings and setting Display Arcade Awards Podium to No

To upgrade from version 1.01 to 1.0.2 replace the arcade.php file edit.

Mod History
1.0.2 - Cleaned up code a little, fixed error with avatars not showing
1.01 - Initial Release

If anyone wants to further develop any of my addons, you are free to do so.

Rckcrwlr 04-30-2011 09:08 AM

Tagged for future

doctorsexy 04-30-2011 10:23 AM

Installed working on 4.1.3 ..thanks Gemma

Claudi 05-01-2011 05:36 AM

Thanks Gemma :)

snow2000 06-17-2011 04:50 AM

Works fine! Thank you Gemma

Gemma 06-17-2011 06:25 AM

Your welcome :)

dmm2020 06-19-2011 06:01 PM

Good job, I like it. Using the v3Arcade system as a way of making downloadable games available for testing where our members can review them before downloading.

GamersChallenge 08-20-2011 06:28 PM

not working for me. when I make the changes to arcade.php I get a white page. when I restore the old arcade.php page works fine again.

you cann see it here http://www.gamerschallenge.net/arcade.php

Gemma 08-20-2011 06:49 PM

Just done a fresh install on my site and it works fine. Please double check your arcade.php file edits.

Also which version of the arcade are you running?

GamersChallenge 08-20-2011 06:58 PM

got it working. just re-done everything, I have no idea what happend. thanx for the fast reaply and for the good work.

Gemma 08-21-2011 08:48 PM

Released V1.0.1

Made a small change in the template code to fix an error where clicking on the member's name was taking them to their profile instead of directly to the arcade tab in their profile. To fix replace the v3ARCADE_MAIN template edit with the updated one in the OP.

dmm2020 08-21-2011 10:36 PM

Quote:

Originally Posted by Gemma (Post 2236329)
Released V1.0.1

Made a small change in the template code to fix an error where clicking on the member's name was taking them to their profile instead of directly to the arcade tab in their profile. To fix replace the v3ARCADE_MAIN template edit with the updated one in the OP.

Posted code and double checked it but found one small issue:

When member has no avatar, and you click on the links from the winner's podium, it takes them to a page in the profile, but ALL of the tabs are blank. It does open the proper tab, but problem is every tab is empty even when you go to the main page and back to the profile then manually open the tab. Could be unrelated to this mod but I am unable to tell for sure.

When member HAS as avatar, everything works fine.

It's crashing on the avatar query I bet. I haven't received a database error message, but if I do get it, I will post it. Otherwise, I think it's a minor bug in the code that occurs when no avatar exists.

Gemma 08-21-2011 11:04 PM

Deleted my avatar on my site, everything works as it should and wasn't able to reproduce your error. I'll check again in the morning. Off to bed now.

Gemma 10-24-2011 07:42 PM

Updated:
1.0.2 - Small code change to fix error with avatars.

To upgrade, replace the arcade.php file edit with the new code in the OP.

ProFifaLeagues 10-24-2011 08:26 PM

Gemma would you ever think about making this as a stand alone mod we could use for other Winners of comps etc

Maybe so we could choose the winners and then other members can click and challenge them???
Would be great if that's at all possible

mIQe 01-08-2012 08:23 AM

An other great Mod Gemma, thanks. I was just wondering two things, where do I put this if I want it above the Tournament table? And where can I find where the Podium draws it's template from as the table border isn't the same as the rest of my forums?

Gemma 01-08-2012 02:21 PM

Quote:

I want it above the Tournament table?
In v3ARCADE_MAIN find:

Code:

<vb:if condition="$show['tournaments']">
Place the template code above that and it will display above the tournament table.

Quote:

And where can I find where the Podium draws it's template from as the table border
The template uses the classes alt1 and blockbody v3_block you may need to change those to match the classes for your forum border.

blockbody v3_block is the outer table border and alt1 is used within each smaller table.

ShawneyJ 02-01-2012 11:59 PM

hi,

this works great in the arcade its self.

but when returning back to the forum, i have this error at the top of me forums:
Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: v3_top_three in [path]/includes/functions.php on line 4316

i uploaded a new arcade.php thinking that was the problem, but it seems the problem lies in the product xml.

would be really nice to use this, thanks.

EDIT: working fine, it was the "v4 Arcade Champs on Forum Home" creating the forumhome error.

Your mod is working great thank you.

ellinofatsa 03-18-2012 08:11 AM

<font color="Red">work perfect!!!!!!!!!!!!!!!!!!!!</font>

invitezone 09-02-2012 01:57 PM

Hi
I am having a style isuue with this modification.
There seems to be no background to the box that this adds.
Is there a way you can advise me how to fix this.
Thanks very much.

https://vborg.vbsupport.ru/

Gemma 09-02-2012 03:12 PM

Quote:

Originally Posted by invitezone (Post 2361971)
Hi
I am having a style isuue with this modification.
There seems to be no background to the box that this adds.
Is there a way you can advise me how to fix this.
Thanks very much.

http://img33.imageshack.us/img33/6650/podiumjn.jpg

Replace the v3ARCADE_MAIN template edit with this:
Code:

<!-- Start Arcade Podium Modded -->
<vb:if condition="$vboptions['dispawards'] == '1'">
<div>
            <h3 class="blockhead">               
<center><img src="{vb:raw vboptions.arcadeimages}/crown_podium.gif" /><b> Arcade Kings and Queens of {vb:raw vboptions.bbtitle}! </b><img src="{vb:raw vboptions.arcadeimages}/crown_podium.gif" /></center>
</h3>
<table class="tborder" cellpadding="3" cellspacing="3" border="1" width="100%">
<tr>
    <td class="blockbody" nowrap="nowrap" width="33%" valign="middle" align="center"><div style="padding: 5px 5px 5px 5px;"><img src="{vb:raw vboptions.arcadeimages}/no1.gif" /></div></td>
    <td class="blockbody" nowrap="nowrap" width="33%" valign="middle" align="center"><div style="padding: 5px 5px 5px 5px;"><img src="{vb:raw vboptions.arcadeimages}/no2.gif" /></div></td>
    <td class="blockbody" nowrap="nowrap" width="33%" valign="middle" align="center"><div style="padding: 5px 5px 5px 5px;"><img src="{vb:raw vboptions.arcadeimages}/no3.gif" /></div></td>
</tr>
<tr>
    <td class="blockbody" nowrap="nowrap" width="33%" valign="middle" align="center"><vb:if condition="$champ4[0] != ''"><div style="padding: 20px 20px 20px 20px;"><img src="{vb:raw champ4.0}" height="75"><vb:else /><div class="smallfont"><b><div style="padding: 20px 20px 20px 20px;">Can You Become The Champion?<br><img src="{vb:raw vboptions.arcadeimages}/trophy.gif"> Claim Now! <img src="{vb:raw vboptions.arcadeimages}/trophy.gif"></b></div></div></vb:if></td>
    <td class="blockbody" nowrap="nowrap" width="33%" valign="middle" align="center"><vb:if condition="$champ4[1] != ''"><div style="padding: 20px 20px 20px 20px;"><img src="{vb:raw champ4.1}" height="75"><vb:else /><div class="smallfont"><b><div style="padding: 20px 20px 20px 20px;">Make Your Challenge For Top Spot<br><img src="{vb:raw vboptions.arcadeimages}/trophy.gif"> Claim Now! <img src="{vb:raw vboptions.arcadeimages}/trophy.gif"></b></div></div></vb:if></td>
    <td class="blockbody" nowrap="nowrap" width="33%" valign="middle" align="center"><vb:if condition="$champ4[2] != ''"><div style="padding: 20px 20px 20px 20px;"><img src="{vb:raw champ4.2}" height="75"><vb:else /><div class="smallfont"><b><div style="padding: 20px 20px 20px 20px;">Prove You Are The Best<br><img src="{vb:raw vboptions.arcadeimages}/trophy.gif"> Claim Now! <img src="{vb:raw vboptions.arcadeimages}/trophy.gif"></b></div></div></vb:if></td>
</tr>
<tr>
    <td class="blockbody" nowrap="nowrap" width="33%" valign="middle" align="center"><div class="smallfont"><vb:if condition="$champ1[0] != ''"><a href="{vb:raw champ2.0}"><b>{vb:raw champ1.0}</b></a><br><b>with {vb:raw champ3.0} highscores</b> <vb:else /> - Empty - </vb:if></div></td>
    <td class="blockbody" nowrap="nowrap" width="33%" valign="middle" align="center"><div class="smallfont"><vb:if condition="$champ1[1] != ''"><a href="{vb:raw champ2.1}"><b>{vb:raw champ1.1}</b></a><br><b>with {vb:raw champ3.1} highscores</b> <vb:else /> - Empty - </vb:if></div></td>
    <td class="blockbody" nowrap="nowrap" width="33%" valign="middle" align="center"><div class="smallfont"><vb:if condition="$champ1[2] != ''"><a href="{vb:raw champ2.2}"><b>{vb:raw champ1.2}</b></a><br><b>with {vb:raw champ3.2} highscores</b> <vb:else /> - Empty - </vb:if></div></td>
</tr>
</table>
<div style="padding: 10px 0px 0px 0px;"></div>
<vb:else />
</vb:if>
<!-- Finish Arcade Podium Modded-->
<div style="padding: 5px 0px 0px 0px;"></div>


invitezone 09-06-2012 06:44 PM

sorry late reply.
That worked perfectly, I think I made an error with the template edits anyway.
Thanks for the solution, Great Mod.

tele955848 09-20-2012 07:30 PM

Thx Gemma

ckgb 12-31-2013 09:13 AM

Hello Gemma,

Is there a way to make those black table lines to look like the rest of the style?

Thank You

http://www.inwasource.com/images/arcade/arc1.gif


All times are GMT. The time now is 03:13 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.02239 seconds
  • Memory Usage 1,826KB
  • 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
  • (8)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)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