Status
Not open for further replies.

Replicators

Customer
VBCredits II Addon = Persistant Navbar Credits Display with Background Image for VB 3.8

This was made from the pro version so i can't guarantee it will work for the LITE version or not, and WILL NOT work in vb4!

You can get vbcredits II from:

[DBTech] vBCredits II Deluxe LITE = http://www.vbulletin.org/forum/showthread.php?t=245952

[DBTech] vBCredits II Deluxe PRO = http://www.dragonbyte-tech.com/vbecommerce.php?do=purchase&act=product&id=40

What this will do is add a permanent display of your credits inside your navbar so it is alway's viewable instead of having to click or hover over anything to see how much you have.

Example:
vbcreditsdisplay.jpg



STEP ONE:
First go into Vbcredits dropdown in admincp, and into "Automatic Template Edits" and click onto "Navbar" and replace in the following information.

Click on "Show Advanced Options" at the bottom and put in.

Combination Rounding: Optional
Wrap Currencies with Main Template: Yes
Main Template: Blank
Currency Template: credits_display_navbar_row
Hook Name: Vbcredits_Display
Leave the rest blank!

Now save.


STEP TWO:
Now go into "Styles & Templates" and visit the "navbar" template and find:

HTML:
<if condition="$show['pmwarning']"><div><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></div></if>

Add Underneath:

HTML:
<if condition="$bbuserinfo['userid']">
                  $template_hook[Vbcredits_Display]</if>

Now Save


STEP THREE:
Go into the "credits_display_navbar_row" and replace all text with:

HTML:
<if condition="$vb4"><li><else /><td class="vbmenu_option" id="vbcredits_background"></if><a href="credits.php$session[sessionurl_q]"  rel="credits-$currency[currencyid]-$user[userid];$user[username]"><span style="color: white;"><center>$currency[title]<br /><b>$useramt</b></center></span></a><if condition="$vb4"></li><else /></td></tr></if></td>


STEP FOUR:

Now save and then go back into "Style Manager" and dropdown to your "Main CSS" option. Go the the very last box named "Additional CSS Definitions" and enter the following in the second box at the end.

PHP:
#vbcredits_background {
background: url(./images/vbcredits_navbg.gif) repeat;
}

I have also attached a image you may use, just upload it to your /images/ directory.
 

Attachments

  • vbcredits_navbg.gif
    vbcredits_navbg.gif
    5.6 KB · Views: 118
Last edited:
STEP TWO:
Now go into "Styles & Templates" and visit the "navbar" template and find:

HTML:
<if condition="$show['pmwarning']"><div><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></div></if>

Add Underneath:

HTML:
<if condition="$bbuserinfo['userid']">
                  $template_hook[Vbcredits_Display]</if>

Now Save.

Hmm. When I add that in, I get a message saying there's a missing conditional. If I choose to continue anyway, the navbar section completely disappears.

Weird. Your addition has a completely self contained conditional.
 
Well that's meant that a user must be a member to see it. You can try it without that conditional, but it would probably show for everybody, even guests.

You are using 3.8 right? I don't get why it's saying missing a conditional when this worked perfectly for me. Only thing i can think of is there's other mod's conflicting though i don't see how there would be.
 
Last edited:
OK, got it. Works perfectly. I must've done something wrong because it worked the second time round.

Only issue on the vBAdvanced front page, it shows as zero credits. Don't suppose you're familair with vBAdvanced?
 
Yeah, i had the same problem, even got it to show, but forgot what i did to get it to show since i moved up to v4. I am sorry, but i don't remember how to fix that. Look through the vbadvanced menu, i think you just need to globalize it, or add a page to something. Another soloution is to take the navbar off the portal, since tbh it ain't much use on the cover page anyway's.
 
I've found an entry on the page which says:

If you have other hacks installed (especially to hacks located within the vBulletin navbar), it may be necessary to globalize some of the variables used in those hacks for the CMPS. You may enter a list of variables to globalize here. It is NOT necessary to add the $ mark before the variable name. Separate each variable with a carriage return (new line).

I guess that must be it. What would the variable be in this case?
 
Try the hook name, or the template, other than that, i really don;t know and i have nothing to use to try and help you either.
 
Status
Not open for further replies.
Back
Top