Status
Not open for further replies.

Madhatterr

Customer
Hello, we'd like to move the template hook on the navbar that shows the currency dropdown up to our header along with the notifications, etc.. so that it is global and members have a place to view their currency amount on every page and not just the forum page.

Is there a way to get the hook to work on the header template? I can manually edit templates and files if I know what code to plug in where.
 
That thread is locked so I can't ask there, but it says it only works on vb 3.8 and not any version of vb 4. Does anyone have updated instructions for the lastest version of vbulletin?
 
The Navbar display will only work for the navbar template. For the header, a new display is needed.
Unfortunately, displays require a lot of supporting code, which is why they aren't user-creatable from the admincp.
But for you, I've put this together - vB4 only:

1) Add the template "credits_display_header":
HTML:
<li class="popupmenu notifications">
    <a class="popupctrl" href="credits.php$session[sessionurl_q]">$vbphrase[currency]</a>
    <ul class="popupbody popuphover">$currencies</ul>
</li>

2) Add the template "credits_display_header_row":
HTML:
<li><a style="padding-left: 40px;" href="credits.php$session[sessionurl_q]" rel="credits-$currency[currencyid]-$user[userid];$user[username]"><span>$useramt</span> $currency[title]</a></li>

3) Edit your "header" template, find:
HTML:
<li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>

add this ABOVE it:
HTML:
{vb:raw template_hook.header_credits}

4) Run this query (include your table prefix on credits_display as applicable):
Code:
INSERT INTO `credits_display` (`displayid`, `title`, `description`, `currencies`, `combine`, `combined`, `main_template`, `row_template`, `hookname`, `customhook`, `showpages`) VALUES ('header', 'Header', 'Persistent at the top of everything, for the currently logged in user.', 'a:0:{}', '', 'a:0:{}', 'credits_display_header', 'credits_display_header_row', 'header_credits', 'header', '');

5) Visit the Automatic Template Edits link in the vBCredits menu in the admincp and click the Save Active Status button. The new Header display should appear in the list if it wasn't already.

6) Add the active plugin "vBCredits II - Header Display" on the parse_templates hook with this code:
PHP:
VBCREDITS::display('header', $vbulletin->userinfo, $template_hook);

Now, you should notice a dropdown for currencies in the forum header, next to the notification dropdown.
Feel free to move the header_credits template hook around within the header template, as well as modify the credits_display_header/_row templates, the display's settings, etc.
 
Last edited:
Status
Not open for further replies.

Similar threads

Legacy vBCredits II Deluxe

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
845
Customer rating
0.00 star(s) 0 ratings
Top