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)

SVTCobraLTD 10-14-2008 09:00 PM

Military Branches v1.01
 
Military Branches v1.01
Created by SVTCobraLTD for 3.6.x - 4.1.x


This will add a small Military Banner to your postbit templates. I found this useful for my forums so I hope you do. See the screen shots for more information. Right now it only contains Army, Navy, Marines and Air Force. Currently the images are made with a white background and a dark gray background. I am willing to help make the images match the background on your board for members who donate.

UPLOAD FILES
ADD USER GROUPS
TEMPLATE EDITS
ENJOY!!

Updated: 03-04-09
- Added coding for secondary groups
- Made Airforce and Marines image smaller

vb4 Instructions Included!

Do not forget to Mark as Installed

SVTCobraLTD 10-15-2008 04:37 PM

*Reserved*

SVTCobraLTD 03-04-2009 01:06 PM

Update: If you want to add a the Military Branches as a secondary group for the user, you need to add this coding:
Code:

<if condition="in_array($post[usergroupid], array(X,X,X,X,X)) && is_member_of($post, X)"><img src="images/misc/XXXX.gif" border="0" alt="" /></if>
Change the 'X' to the usergroup you want and change the 'XXXX' to the name of the file. If anyone needs any help, let me know.

militarytuners 04-18-2009 01:54 PM

Will this work for 3.7?

SVTCobraLTD 05-05-2009 10:20 AM

I do not see why it would not. Coding is the same.

SVTCobraLTD 11-02-2009 08:59 PM

Did you test on 3.7.x? Did it work ok?

Lovinmysailor 11-03-2009 11:42 AM

Very nice! The next time I redo our ranks I am going to use these! thanks!! I have 3.7 so I will let you know if it works. I see no problem why it shouldnt.

SVTCobraLTD 11-13-2009 02:08 PM

Same here. I will be testing on 3.8.4 soon as well.

printedgear 12-23-2010 07:02 PM

I tried to find bigusername in v4.XX and couldn't find it as the directions state. Any chance I'm doing something wrong? Is there a difference for this in 4.XX?

SVTCobraLTD 12-30-2010 06:20 PM

I am not using 4.x so I am unsure.

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 07:32 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.02176 seconds
  • Memory Usage 1,759KB
  • 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
  • (10)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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