vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Forum Display Enhancements - Military Branches v1.01 (https://vborg.vbsupport.ru/showthread.php?t=193703)

BirdOPrey5 01-01-2011 03:45 PM

For VB4 look for the following code in postbit_legacy:
Code:

<div class="username_container">
                        <vb:if condition="$post['userid']">
                                {vb:raw memberaction_dropdown}
                                {vb:raw post.onlinestatus}
                        <vb:else />
                                <span class="username guest">{vb:raw post.musername}</span>
                        </vb:if>
                        </div>
                        <span class="usertitle">
                                {vb:raw post.usertitle}
                        </span>

And put the following below it:
Code:

<vb:if condition="$post[usergroupid] == XX"><img src="images/misc/xxxxxxx.gif"></vb:if>
Otherwise follow the original instructions...

In general IF statements remain the same between VB3 and VB4 except add "vb:" in front of the "if".

printedgear 01-01-2011 04:55 PM

Hi BOP5, I was able to do the first part of the instructions, but couldn't find the <div class="bugusername"... in the Templates>memberinfo edit.

to add:
<if condition="$post[usergroupid] == xx"><img src="images/misc/XXXXXX.giof"></if>

Thanks again for your help

BirdOPrey5 01-01-2011 05:06 PM

Hey, sorry I didn't see the second edit in the instructions... for the MEMBERINFO template in VB4 look for:
Code:

<span id="userinfo">
                                                <span class="member_username">{vb:raw prepared.musername}</span>
                                                <span class="member_status">{vb:raw prepared.onlinestatus}</span>
                                                <vb:if condition="$prepared['usertitle']">
                                                        <br />
                                                        <span class="usertitle">{vb:raw prepared.usertitle}</span>
                                                </vb:if>

And put the "IF" beneath it.

However looking at the <IF> code I seriously doubt the code given in the instructions will work in MEMBERINFO...

The code given is:
Code:

<if condition="$post[usergroupid] == XX"><img src="images/misc/xxxxxxx.gif"></if>
And translated to VB4 is:
Code:

<vb:if condition="$post[usergroupid] == XX"><img src="images/misc/xxxxxxx.gif"></vb:if>
HOWEVER... $post is only available in the postbit template, it has no value in MEMBERINFO so I can't see how this would have ever worked...

I believe the correct code should be:
Code:

<vb:if condition="$vbulletin->userinfo[usergroupid] == XX"><img src="images/misc/xxxxxxx.gif"></vb:if>

printedgear 01-02-2011 12:20 AM

Hi BOP, I think I did what you said. I tried both codes and neither worked. The second update is in memberinfo, correct? Any other thoughts? Thanks again for your time!

BirdOPrey5 01-02-2011 12:50 AM

Yeah, looks like I was a little off on where to place it, sorry about that.

I have tested this exact code and it's working for me:

Find:
Code:

<span id="userinfo">
                                                <span class="member_username">{vb:raw prepared.musername}</span>
                                                <span class="member_status">{vb:raw prepared.onlinestatus}</span>
                                                <vb:if condition="$prepared['usertitle']">
                                                        <br />
                                                        <span class="usertitle">{vb:raw prepared.usertitle}</span>
                                                  </vb:if>
                                        </span>
                                </h1>

And right below </h1> add:
Code:

<vb:if condition="$userinfo[usergroupid] == 6"><img src="http://www.qapla.com/ju/jump.gif" /><br /></vb:if>
Change the number 6 to the usergroup id you want, and change the src to your image, but like I said this exact code works for me.

SVTCobraLTD 01-05-2011 04:42 PM

Thank you to BirdsOPrey for updating instructions for vb4!! https://vborg.vbsupport.ru/showthread.php?t=256558

printedgear 01-08-2011 01:43 AM

I just figured it out!!!! You're awesome!!!! Thanks!

BirdOPrey5 01-18-2011 12:33 AM

I had a mistake in my code... The text to add to member info SHOULD BE:

Code:

<vb:if condition="$userinfo[usergroupid] == 6"><img src="http://www.qapla.com/ju/jump.gif" /><br /></vb:if>
The code I previously posted would have displayed the rank of the person viewing the profile, not the rank of the person's profile they were viewing.

Sorry for the confusion. I will edit my original post.


All times are GMT. The time now is 01: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.04741 seconds
  • Memory Usage 1,752KB
  • 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
  • (9)bbcode_code_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
  • (8)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