vBulletin Modifications

Miscellaneous Hacks - Military System

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > Forum Archives > vBulletin 3.0 Template Releases

Reply
 
Thread Tools Search this Thread
Download Options
You Must Register First
To Download This Modification

Bugs
No bugs found in the system. If you have found a bug, please report a bug here
Submit A Bug | View All Bugs

Advertisement
  
Not Supported
[vB ] Miscellaneous Hacks - Military System (21)
Released: 09-20-2005, 06:57 PM
Modification Information:
Nick King's Avatar Author: Nick King
Last Online: 07-17-2006
Hack Version: 0 Installer Included: 0 Additional queries added to database: 0
New Templates: 0 Template Edits: 0 File Edits: 0
New Files: 0 New Phrases: 0 Installation Time (In Minutes): 0

I don't really have all the specs right now. I'll try and update this later.

my site is www.oxy-moron.net

If you want an awards system like I have, it's quite simple, it just takes time.

First, create profile fields. You want multiple-checkbox options for them (so they can be turned on and off) If you want the mods or admins to be able to give awards instead of users themseleves, make each field private.

Now open the postbit or postbit legacy template. Whichever one you use. Legacy is the VB2 style template.

Look on the template sheet for the area you want the awards to appear. If you want them above the avatar look for:
You must first be a registered member to view any code.
Add the following code above this.
You must first be a registered member to view any code.
You'll want to make sure that the center tags are at the beginning and end of the ENTIRE awards portion.

Where X is, put the ID of the profile field you're doing the award for.

Y is a bit more complicated.
Quote:
Originally Posted by Vbulletin.com
Multiple selection fields present a problem when you try to display their values in the postbit. If you use the method described above then you will get a number displayed instead of the selected values. This is due to the method that is used for storing the selected values for multiple selection fields.

Multiple selection fields use a binary scheme to store the selected values. Each option is given a number value, like this:

option 1 = 2^0 = 1
option 2 = 2^1 = 2
option 3 = 2^2 = 4
option 4 = 2^3 = 8
option 5 = 2^4 = 16
option 6 = 2^5 = 32
option 7 = 2^6 = 64
option 8 = 2^7 = 128
etc...
Here is the link to probobly the most useful page on vbulletin in terms of template modification. http://www.vbulletin.com/forum/showthread.php?t=108785

Once you've put in the values for the ribbons, you can put a break. <br> and start doing the code for the second option. Like if option one was ribbon, you'll want that displayed above, then a break, then the code for option 2 which in my case is medals.

Once you put in the code for all your options, you're done. The hardest part is providing images. I suggest going to www.gruntsmilitary.com and using the images of authentic military ribbons that they provide.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Add a Comment!
Old 09-22-2005, 03:19 AM   #2
Advanced Coder
Niels's Avatar
Join Date: Jun 2004
Real Name: Niels
Location: NL
Niels is on a distinguished road

Default

Nice that you made such a system Looks very clever! Thumbs up m8!




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-25-2005, 02:01 AM   #3
Coder
Nick King's Avatar
Join Date: Aug 2005
Real Name: Nick King
Location: Charging the trenches!
Nick King is on a distinguished road

Default

What's really neat is once you created the code, just copy and paste it to other templates to display user's awards elsewhere.

And if you want to add an award to the system, just add a profile field, note the ID, add the award code (just like all the others) where the award should go (if you have a specific order, like the military does) and it works perfectly.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-15-2005, 09:54 PM   #4
vB Experianced Coder
Join Date: Jun 2005
Kenshin11 is on a distinguished road

Default

can i get it so it just has the ranks (candian)?????


i have the pictuers

Last edited by Kenshin11; 11-15-2005 at 10:09 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-28-2005, 09:34 PM   #5
Coder
Nick King's Avatar
Join Date: Aug 2005
Real Name: Nick King
Location: Charging the trenches!
Nick King is on a distinguished road

Default

Simple. First step, make a usergroup for each rank. An ENTIRE usergroup for Trained Private, Corporal, Master Corporal, etc. What I did to keep it organized is name the usergroups like so:

Paygrade, Rank Name
E-1 Trained Private
E-2 Corporal
E-3 Master Corporal
E-4 Sergeant
Etc. (I may be getting the ranks a little off, I use www.uniforminsignia.net and those are the only for Enlisted ranks they display for the Dominion of Canada.

Once the usergroups are setup, write down each usergroup ID for refference.

Now place the code in the template where you want it. I have my postbit legacy templates setup like so:

Username
User Title [custom user title]
Rank [I made special images for the ranks, so it's not just the insignia, but whatever you have for the image goes here]
Awards
User Info [Location etc]

Here's the code:
You must first be a registered member to view any code.
You'll want a new "IF" line for every single rank. X reperesents the usergroup ID of the rank. Y is the rank insignia image URL. What the line says is "IF the user is in this USERGROUP then display this IMAGE" I may be dumbing it down a bit much but now EVERYONE can understand. I put the <br> at the end because directly below I have the awards. If you don't want to use awards, you may not need the BR. I put it there in case and if your postbit is too spaced out, just delete it.

Sorry if this took a LONG time, I haven't visited in a while.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-28-2005, 09:38 PM   #6
Coder
Nick King's Avatar
Join Date: Aug 2005
Real Name: Nick King
Location: Charging the trenches!
Nick King is on a distinguished road

Default

The advantage of having a usergroup for each rank is not only is it simple to promote someone, but you can give higher ranking members the ability to do certain things. I for one have my Sergeant Majors moderating certain forums. My Brigadier General can edit users profiles via the admincp and give out awards and such. Generals have full administrative access etc. The one thing you have to watch out for is you would be wise to not change the "Registered Users" usergroup like I did. It's good to have each member in that usergroup because you can give "universal" permission to everyone rather than editing each usergroup to do the basic stuff.

Another thing, remember to check off ranks when giving promotions. If you have more than one checked as an additional or primary usergroup, the user will display two ranks.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-28-2005, 09:50 PM   #7
Coder
Nick King's Avatar
Join Date: Aug 2005
Real Name: Nick King
Location: Charging the trenches!
Nick King is on a distinguished road

Default

Sorry to keep posting, I hope nobody minds.

For Awards, the US Army displays 3 ribbons per row If you simply user the code I put in the first post, you'll get a long line of ribbons for the more experienced members. Here's how to stack them. IE doesnt' like this so use Netscape or FireFox.

Put the <table> tags around the entire awards tags. Get the combined width of 3 ribbons in pixesl (or however many you want to display per row). Add a couple pixesl to that number for leniency. Now put the table tags around the awards like so:

You must first be a registered member to view any code.
Every time the combined width of the ribbons exceeds X, it will goto the next row. IE doesn't bnd the table to these limits all the time like it SHOULD, FireFox does. If you goto www.oxy-moron.net you'll see the awesome ribbons thing we have going on. If you WANT, you can put the defined table width tags around the ribbons and then not around the medals. If you WANT to let people display as many medals as they wish you canot stack them like the military does where they dangle over one another. If you stack them like the ribbons it won't look good. So just don't put table tags around the medals and they will stretch the postbit. On my site, I don't allow people to wear more than 4 medals at a time. They can be exchagned upon request for the corresponding ribbon at any time.

GOOD IDEA:
Some people would like to have a "store" where you can buy items and display them in your postbit. Well, we all know we have the usergroup subscription feature. All you have to do is set up a usergroup with the name of the item that is to be purchased. Once the person pays the money, they join the usergroup for that item. Then user the smae way you use to display ranks. If IS_MEMBER_OF. See what I'm saying? Then when they are in the usergroup, they are displaying the image of the item they purchased. You as the admin can put people in these usergroups too as "gifts" or "contests" to up the activity a little bit. That's how I display the "Medals of Generocity", you have to pay via paypal OR give me the money in person and I just add them in the usergroup manually.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-25-2005, 03:20 AM   #8
Junior Member
Join Date: Dec 2005
funarule is on a distinguished road

Default

thxxxxxxxxxxxxxx




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-26-2005, 09:44 PM   #9
vB Experianced Coder
Join Date: Jun 2005
Kenshin11 is on a distinguished road

Default

Still Not Working




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Install system updated Ken Iovino Announcements 7 11-17-2006 03:59 PM
Military Rank System for vb 3.0.7 Kenshin11 vBulletin Modification Requests 5 12-12-2005 07:36 PM
Military System Nick King General vBulletin Support 0 09-20-2005 06:34 PM


All times are GMT -3. The time now is 07:03 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)