PDA

View Full Version : How can I display the points/bank/total points on every page (under navbar)


Greigen
01-10-2007, 03:30 AM
I want to display the members current points/bank/total information right underneath the navbar menu. I can not for the life of me figure out how to do it. Some pages it will work (like the main vbPlaza page, but others like the forum home it won't.

I'm using the variables:

$userinfo[points] $userinfo[bank] and $userinfo[totalpoints]

I'm assuming there is some type of include / coding I need to do above it, in order to activate those variables...

help?

admin0
01-10-2007, 08:14 AM
Why not add in the navbar itsself ?
In NavBar Templete, Find:


<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
<if condition="$show['popups']">


Add Below:

<!-- vbPlaza start -->
<if condition="$show['member']">
<if condition="$vboptions['vbplaza_enabled']"><td id="vbplazamenu" class="vbmenu_control"><a href="$show[nojs_link]#vbplazamenu">$vbphrase[vbplaza_name] $vbphrase[vbplaza_menu]</a> <script type="text/javascript"> vbmenu_register("vbplazamenu"); </script></td></if>
</if>
<!-- vbPlaza end -->


Then Find:

<!-- / NAVBAR POPUP MENUS -->


Add Above:

<!-- vbPlaza start -->
<if condition="$show['member']">
<!-- vbplaza tools menu -->
<div class="vbmenu_popup" id="vbplazamenu_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">

<tr><td class="thead"><a href="vbplaza.php?$session[sessionurl]">$vbphrase[vbplaza_name] $vbphrase[vbplaza_main]</a></td></tr>
<tr><td class="vbmenu_option"><a href="vbplaza.php?$session[sessionurl]do=action&amp;itemid=48">$vbphrase[vbplaza_lottery]</a></td></tr>
<tr><td class="vbmenu_option"><a href="vbplaza.php?$session[sessionurl]do=action&amp;itemid=27">$vbphrase[vbplaza_give_gifts]</a></td></tr>
<tr><td class="vbmenu_option"><a href="vbplaza.php?$session[sessionurl]do=action&amp;itemid=118">$vbphrase[vbplaza_give_ribbons]</a></td></tr>
<tr><td class="vbmenu_option"><a href="vbplaza.php?$session[sessionurl]do=action&amp;itemid=13">$vbphrase[vbbux_bank]</a></td></tr>
<tr><td class="vbmenu_option"><a href="vbplaza.php?$session[sessionurl]do=action&amp;itemid=7">$vbphrase[vbplaza_donate]</a></td></tr>
<tr><td class="vbmenu_option"><a href="vbplaza.php?$session[sessionurl]do=action&amp;itemid=16">$vbphrase[vbplaza_thief]</a></td></tr>

<tr><td class="vbmenu_option"><a href="vbplaza.php?$session[sessionurl]do=richestusers">$vbphrase[vbbux_richest_users]</a></td></tr>
<tr><td class="vbmenu_option"><a href="vbplaza.php?$session[sessionurl]do=userhistory">$vbphrase[vbplaza_history]</a></td></tr>
<tr><td class="vbmenu_option"><a href="vbplaza.php?$session[sessionurl]do=mostsold">$vbphrase[vbplaza_most_sold]</a></td></tr>

<if condition="is_member_of($vbulletin->userinfo, $vboptions['vbplaza_adminusergroups'])">
<tr><td class="thead">$vbphrase[vbplaza_admin_only]</a></td></tr>
<tr><td class="vbmenu_option"><a href="vbplaza.php?$session[sessionurl]do=action&amp;itemid=12">$vbphrase[vbplaza_admin_donate]</a></td></tr>
</if>

</table>
</div>
<!-- / vbplaza tools menu -->
</if>
<!-- vbPlaza end -->

Greigen
01-10-2007, 02:26 PM
I did that already man.. that just adds the vbPlaza menu in the nav bar...

Here's what I'm talking about:
https://vborg.vbsupport.ru/

(The xCash/xBank/Total = Points/Bank/Total).

I want to display it underneath the navbar on every page.

pastapiggy
01-10-2007, 09:46 PM
I did that already man.. that just adds the vbPlaza menu in the nav bar...

Here's what I'm talking about:
http://www.garysimon.net/galaxyheader.gif

(The xCash/xBank/Total = Points/Bank/Total).

I want to display it underneath the navbar on every page.
I would also like to know how to do this.

admin0
01-11-2007, 06:51 AM
what you will need to do is edit the header template, and find where the home, faq etc buttons are.. there enter a <br> to start a new line, then create a table with 1 row and 6 columns .. where your logo, visit and static what is it goes .. in the following 3 <td> , you will need to call the vbux variables.

Greigen
01-11-2007, 02:37 PM
I figured it out to a certain degree...

On my forum, I include a header and a left menu which is a part of my own design. I decided to display the points in the left menu. The left menu is a php file, and here is the coding I used...

<? echo round($vbulletin->userinfo['vbbux']); ?>

<? echo round($vbulletin->userinfo['vbbank']); ?>

<? echo round($vbulletin->userinfo['vbbux']+$vbulletin->userinfo['vbbank']); ?>

You can also use this same coding to display the points on *NON-FORUM* pages. You do this by including the following coding in a php file:

$dir = getcwd();

if ($dir != "/your/server/path/site.com/html/community" && $dir != "/your/server/path/site.com/html/community/admincp" && $dir != "/your/server/path/site.com/html/community/modcp") {

require_once($_SERVER['DOCUMENT_ROOT'] . '/community/global.php');

Then in your .htaccess you include that file by:

php_value auto_prepend_file "/your/server/path/site.com/html/include.php"

This will allow you to show the user's points on any non-community page.