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...)

jimnyc 06-29-2011 03:00 PM

That did it, it's now working perfectly!!!

Thank you very much, it's VERY appreciated!!!

SVTCobraLTD 02-17-2012 05:47 PM

Anyone try this on 4.0?

GrabMyWrist 02-28-2012 03:01 PM

Works fine on 4.1.10 using secondary groups and the following code in place of the outlined code.

Code:

<vb:if condition="is_member_of($post, xx)"><img src="images/misc/army.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, xx)"><img src="images/misc/navy.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, xx)"><img src="images/misc/airforce.gif" border="0" alt="" /></vb:if>
<vb:if condition="is_member_of($post, xx)"><img src="images/misc/marines.gif" border="0" alt="" /></vb:if>


Replace xx with your secondary usergroup number.

MG Zebra 10-07-2012 01:36 PM

Could you include the psd file you used for these or something so we could edit them ourselves to fit our forum needs?

GhostHunter2010 10-11-2012 05:38 PM

hi can create somethind like admin moderator owner etc :P

afmarko99 02-11-2014 01:57 AM

Does this work in 4.2.2?

ozzy47 02-11-2014 02:00 AM

Sure they are there, it depends on what layout you use, the edits will be done in either the postbit template or the postbit_legacy template.

afmarko99 02-11-2014 02:16 AM

Quote:

Originally Posted by ozzy47 (Post 2480330)
Sure they are there, it depends on what layout you use, the edits will be done in either the postbit template or the postbit_legacy template.

Thanks Ozzy I found them. Everytime I step away from VB for awhile I feel like a noob. Then I make a post and five seconds later I find what I was looking for. LoL

Now I need help trying to get these images to display under the users name in his/her profile as well.

Anyone?

ozzy47 02-11-2014 02:24 AM

Did you try the template edits described in the readme, Find in Member Info Templates > MEMBERINFO:

afmarko99 02-11-2014 02:50 AM

Quote:

Originally Posted by ozzy47 (Post 2480337)
Did you try the template edits described in the readme, Find in Member Info Templates > MEMBERINFO:

Yes, but the coding wasn't exactly like the code in the instructions. His instructions show usertitle then eventually </h1>.

In the actual code for 4.2.2 there are some other entries including reputation. I placed it under the </h1> but I don't see anything in the members profile.

ozzy47 02-11-2014 02:52 AM

Hmmm, not sure then as I have never tried this mod out.

afmarko99 02-11-2014 02:52 AM

I'm also having an issue where the gif is displaying directly next to the avatar rather than above it and under user title.

afmarko99 02-11-2014 02:53 AM

Nevermind, I fixed the display issue with <div> tags


All times are GMT. The time now is 10:29 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.01115 seconds
  • Memory Usage 1,791KB
  • 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
  • (11)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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