vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Profile Enhancements - Military Branches (https://vborg.vbsupport.ru/showthread.php?t=256558)

SVTCobraLTD 01-04-2011 10:00 PM

Military Branches
 
1 Attachment(s)
Military Branches v1.01
Created by SVTCobraLTD for vb4
Instructions for vb4 by BirdsOPrey5


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!!

Do not forget to Mark as Installed

ThisIrksMe 01-05-2011 09:45 PM

Can you create branch of service with Veteran tags such as Marine Corps Veteran or USMC Veteran, etc? Even Operation Enduring/Iraqi Freedom tags? Don't forget National Guard and Reserves. Did you know that 70% of the US deployed troops are Reserves & National Guard. Just suggestions if you decide to create an update. Ooh-Rah and Hooah, thank you for your support!!

SGT Chris Larson
USMC Veteran 1998-2002
US Army National Guard 2008-Present

Dr.osamA 01-05-2011 10:16 PM

Not every one in the U.S. Army
And not every one is interested in the U.S. Army
You can modify the MOD to work, according to their works, doctor,teacher accountant engineer etc etc.

somthing like this MOD
https://vborg.vbsupport.ru/showthread.php?t=229540

but for jops
This is only my suggestion

thank you

ThisIrksMe 01-06-2011 04:49 PM

I cant get this to work. I used the .GIF file in Welshy's Country Flags Code and the picture wasn't coming up. Got any ideas?

BirdOPrey5 01-06-2011 05:47 PM

Are you getting a broken image placeholder or nothing at all? Are you trying it in both the postbit and profile?

BirdOPrey5 01-18-2011 12:35 AM

I had a mistake in the code... if you followed the instructions posted please change the line:

Code:

<vb:if condition="$vbulletin->userinfo[usergroupid] == 6"><img src="http://www.qapla.com/ju/jump.gif" /><br /></vb:if>
to

Code:

<vb:if condition="$userinfo[usergroupid] == 6"><img src="http://www.qapla.com/ju/jump.gif" /><br /></vb:if>

jimnyc 06-29-2011 02:10 PM

I have added this code to my forum but am having a little trouble. I got it to work fine by "changing" a users usergroup, but ran into too many problems with prior permissions and such. I then went to use the additional usergroup option and cannot get it to work. My new forum ID's are 17,18,19,20 - can someone see what I possibly did wrong here? (I suck with coding!)

Code:

<vb:if condition="in_array($post[usergroupid], array(17,18,19,20) && is_member_of($post, 17)"><img src="images/misc/army_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="in_array($post[usergroupid], array(17,18,19,20) && is_member_of($post, 18)"><img src="images/misc/airforce_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="in_array($post[usergroupid], array(17,18,19,20) && is_member_of($post, 19)"><img src="images/misc/marine_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="in_array($post[usergroupid], array(17,18,19,20) && is_member_of($post, 20)"><img src="images/misc/navy_white.gif" border="0" alt="" /></vb:if>


BirdOPrey5 06-29-2011 02:40 PM

Quote:

Originally Posted by jimnyc (Post 2214534)
I have added this code to my forum but am having a little trouble. I got it to work fine by "changing" a users usergroup, but ran into too many problems with prior permissions and such. I then went to use the additional usergroup option and cannot get it to work. My new forum ID's are 17,18,19,20 - can someone see what I possibly did wrong here? (I suck with coding!)

Code:

<vb:if condition="in_array($post[usergroupid], array(17,18,19,20) && is_member_of($post, 17)"><img src="images/misc/army_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="in_array($post[usergroupid], array(17,18,19,20) && is_member_of($post, 18)"><img src="images/misc/airforce_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="in_array($post[usergroupid], array(17,18,19,20) && is_member_of($post, 19)"><img src="images/misc/marine_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="in_array($post[usergroupid], array(17,18,19,20) && is_member_of($post, 20)"><img src="images/misc/navy_white.gif" border="0" alt="" /></vb:if>


If you want to use secondary usergroups it's a different condition.

Change:

Code:

in_array($post[usergroupid], array(17,18,19,20)
to:

Code:

is_member_of($post, 17,18,19,20)
So a line would be:
Code:

<vb:if condition="is_member_of($post, 17,18,19,20)"><img src="images/misc/airforce_white.gif" border="0" alt="" /></vb:if>

jimnyc 06-29-2011 02:48 PM

Thanks so much!! I added the following code, but all 4 images appear for a member that is only added to the "army" usergroup which is number 17.

Code:

<vb:if condition="is_member_of($post, 17,18,19,20)"><img src="images/misc/airforce_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, 17,18,19,20)"><img src="images/misc/army_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, 17,18,19,20)"><img src="images/misc/marine_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, 17,18,19,20)"><img src="images/misc/navy_white.gif" border="0" alt="" /></vb:if>


BirdOPrey5 06-29-2011 02:51 PM

Quote:

Originally Posted by jimnyc (Post 2214559)
Thanks so much!! I added the following code, but all 4 images appear for a member that is only added to the "army" usergroup which is number 17.

Code:

<vb:if condition="is_member_of($post, 17,18,19,20)"><img src="images/misc/airforce_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, 17,18,19,20)"><img src="images/misc/army_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, 17,18,19,20)"><img src="images/misc/marine_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, 17,18,19,20)"><img src="images/misc/navy_white.gif" border="0" alt="" /></vb:if>



I don'r know which group corresponds to what but it looks like you want:

Code:

<vb:if condition="is_member_of($post, 18)"><img src="images/misc/airforce_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, 17)"><img src="images/misc/army_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, 19)"><img src="images/misc/marine_white.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, 20)"><img src="images/misc/navy_white.gif" border="0" alt="" /></vb:if>

Change the numbers to the corresponding branch. (17 is army, etc...)


All times are GMT. The time now is 05:42 PM.

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.04522 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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