Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Military Branches v1.01 Details »»
Military Branches v1.01
Version: 1.00, by SVTCobraLTD SVTCobraLTD is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.12 Rating:
Released: 10-14-2008 Last Update: 01-04-2011 Installs: 7
Template Edits
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-01-2011, 03:45 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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".
Reply With Quote
  #13  
Old 01-01-2011, 04:55 PM
printedgear printedgear is offline
 
Join Date: Dec 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #14  
Old 01-01-2011, 05:06 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #15  
Old 01-02-2011, 12:20 AM
printedgear printedgear is offline
 
Join Date: Dec 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #16  
Old 01-02-2011, 12:50 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #17  
Old 01-05-2011, 04:42 PM
SVTCobraLTD SVTCobraLTD is offline
 
Join Date: Jul 2007
Location: PA
Posts: 841
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you to BirdsOPrey for updating instructions for vb4!! https://vborg.vbsupport.ru/showthread.php?t=256558
Reply With Quote
  #18  
Old 01-08-2011, 01:43 AM
printedgear printedgear is offline
 
Join Date: Dec 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just figured it out!!!! You're awesome!!!! Thanks!
Reply With Quote
  #19  
Old 01-18-2011, 12:33 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:40 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.06171 seconds
  • Memory Usage 2,289KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (9)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete