Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
North American Sports Teams Icons+ Details »»
North American Sports Teams Icons+
Version: 2.0, by Tune Tune is offline
Developer Last Online: Apr 2016 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.2.3 Rating:
Released: 11-18-2011 Last Update: Never Installs: 26
Template Edits
Additional Files  
No support by the author.

Want to show off the pride of your favorite sports team and allow your members to do the same?

This mod creates such a feature on your site.

Your members can select up to 3 teams they root for or support. This will show up in the postbit area on the forum.

Whether it's the NFL, MLB, NBA, NHL, or NCAA, we have it covered. You can add your own custom images as well or add to the list already provided.

It's an easy little add on with big results.

Step By Step Installation:

1) Upload the entire "teams" folder in your forumname.com/images/folder.

2) Go to your admincp->User Profile Fields->Add New User Profile Field.

3) For the Profile Field Type pick the 4th selection from the dropdown list.
The name of it is "Single-Selection Menu". Now press continue.

4) On the new page, fill out this information :
Title: My Favorite Sports Team
Description: Select your favorite team from the NFL, MLB, NBA, NHL, or NCAA.
Options: (Copy and paste in the options box, the list below. Copy it exactly as it is,
and keep in mind that each team must appear on a separate line)

LIST OF TEAMS IN FILE

Set Default: None
Display Order: Don't change this. Only thing you have to do, is to WRITE DOWN the number(ID) given in the "Display Order" field.
You will need it later on during this installation.!!!
Field Required: No
Field Editable by User: Yes
Private Field: No
Field Searchable on Members List: No
Show on Members List: No
Option Input:
Allow user to input their own value for this option: No
Max length: Don't change it
Display Size: Don't change it
Regular Expression: Leave it blank
Display Page: Select "Edit Profile"

Click SAVE button.

If you just want one team listed, continue on, but only use one line of the <if condition> line below in the code you must Add.
If you want to add more teams, then just add more lines between the <div> code. Also if you want more teams listed...
MAKE SURE YOU COMPLETE THE ABOVE STEP FOR AS MANY TEAMS AS YOU WANT YOUR USERS TO SELECT.


5) Now go to Styles & templates->Style Manager. Now you are looking at all the styles you are using for your forum.
Pick the style you want to apply this hack by changing the dropdown selection next to it, to "Edit Templates".

6) On the new page, find the postbit or postbit_legacy template (depends which one you are using for your forum) and double click on it to edit it.
NOTE: If you have no idea which postbit you're using, just use the postbit_legacy and see what happens. More than likely, that is the correct one.

7) In your code find:
Code:
<dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd>
Below Add:
Code:
<div align="center">
<vb:if condition="$post['fieldX']"><img src="images/teams/{vb:raw post.fieldX}.gif" alt="Sports Logo" border="" /></vb:if>
<vb:if condition="$post['fieldX']"><img src="images/teams/{vb:raw post.fieldX}.gif" alt="Sports Logo" border="" /></vb:if>
<vb:if condition="$post['fieldX']"><img src="images/teams/{vb:raw post.fieldX}.gif" alt="Sports Logo" border="" /></vb:if>
</div>
BEFORE clicking Save, change the [fieldX] to the number(ID) given by the system in step 4 Display Order. For example [fieldX] will be changed to [field9].
Change all 3 [fieldX] and now you may click Save.

A completed code would look something like this... [THIS IS AN EXAMPLE OF MINE]
Code:
<div align="center">
<vb:if condition="$post['field5']"><img src="images/teams/{vb:raw post.field5}.gif" alt="Sports Logo" border="" /></vb:if>
<vb:if condition="$post['field6']"><img src="images/teams/{vb:raw post.field6}.gif" alt="Sports Logo" border="" /></vb:if>
<vb:if condition="$post['field7']"><img src="images/teams/{vb:raw post.field7}.gif" alt="Sports Logo" border="" /></vb:if>
</div>
Finally, if you covered all the above steps correctly, you will be able to see a dropdown selection list for American Sports Teams Hack in your UserCP-> Edit Profile

NOTE: The above code is for 3 teams listed in your postbit side-by-side. If you don't care for the team logos I created, simply create your own and name them how you would want them entered on the option drop down. You'll notice that the images names are the same as we have listed.

This mod/hack could be used for almost anything that you wanted your members to be able to select an image in place of text.

Any questions or problems, please let me know.

FYI, I included the college teams in this mod, but if you just want the professional sports, just do not copy those team names in the options area.

Enjoy!

Version 2.0:
Upgraded to work with all vB 4.0 systems (even 4.1.8).
Fixed some team names and updated some logos. (Thanks to all who pointed them out.)
Added Soccer, Beer brands, Liquor brands, Auto Makers, & Fast Food/Restaurants to the drop down list. (If you do not want to add those, don't copy the text over in the profile field.) Would like to give a big THANK YOU to BirdOPrey5 for expanding on this mod and producing the extra icons.

Version 1.2:
Added UFL logos to the system.

Version 1.1:
1. Edited the file to fix a spelling error.
2. Changed the icons for Columbus Blue Jackets, Oklahoma City Thunder, and NFL.

Download Now

File Type: zip North American Sports Teams Mod+ 1.3.zip (1.17 MB, 171 views)

Screenshots

File Type: png Team Mod 1.png (68.4 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 11-20-2011, 08:44 AM
ProFifaLeagues's Avatar
ProFifaLeagues ProFifaLeagues is offline
 
Join Date: Aug 2009
Location: Uk
Posts: 1,191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Superb idea this one thank you.

We run a Soccer Uk based Fifa site and would like to use All the teams from the English Premier league down to the League two division,I have the images i would use can you explain how i can add these please Sir?
Many thanks
Reply With Quote
  #3  
Old 11-20-2011, 06:11 PM
Krusty1231's Avatar
Krusty1231 Krusty1231 is offline
 
Join Date: Jul 2010
Location: Canada
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rammieone View Post
Superb idea this one thank you.

We run a Soccer Uk based Fifa site and would like to use All the teams from the English Premier league down to the League two division,I have the images i would use can you explain how i can add these please Sir?
Many thanks
open up the "list of teams" text file. You will need to either add yours to the list or remove the ones on the list and simply add the ones you would like.

Just put your images in the folder "teams". They MUST have the same name as the ones you added to the text file.

Example - Vbulletin.png (upload to the "teams" folder)
Enter "Vbulletin" in your text file

Good luck.

P.S. = this code can be used for just about anything you like. Sports icons, favorite car manufacturers, favorite food places, whatever you can think of.
Reply With Quote
Благодарность от:
ProFifaLeagues
  #4  
Old 11-20-2011, 06:49 PM
Taev Taev is offline
 
Join Date: Jan 2003
Location: Switzerland
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice feature for the forum, thanks

Would be nice to have the list sorted by NFL, NHL, etc. instead having a mixed-up list
Reply With Quote
  #5  
Old 02-13-2012, 10:23 PM
Fudgyyy Fudgyyy is offline
 
Join Date: Jul 2011
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see the dropdown menu in my usercp, but when i pick my team i don't see any icons underneath my name when i post. what's wrong?
Reply With Quote
  #6  
Old 02-14-2012, 06:11 AM
Krusty1231's Avatar
Krusty1231 Krusty1231 is offline
 
Join Date: Jul 2010
Location: Canada
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1.) Did you upload the folder "teams" to your images folder?

2.) Did you add the field numbers to the code before you added the code to your forumhome?
Reply With Quote
  #7  
Old 07-21-2012, 02:46 AM
Dr Aj642's Avatar
Dr Aj642 Dr Aj642 is offline
 
Join Date: Apr 2009
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this. It's great.

Is it possible to move the logos around? Possible put it above the users avatar?
Reply With Quote
  #8  
Old 08-21-2012, 02:38 AM
Gamelobby's Avatar
Gamelobby Gamelobby is offline
 
Join Date: Jul 2007
Location: Long Beach, CA
Posts: 997
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When i hover over each logo they all say "Sports Logo" instead of what team it is an image of.?
Is that the way it is supposed to work.?

*edit*
Oh, am i supposed to go in & edit each line of text.?


*edit2*
nope that aint it. lol


I see there isn't a place to edit for each line, but i did notice that when i clicked save i got this error.. (guessing it has nothing to do with this mod though.)
HTML Code:
MySQL Error   : Got a packet bigger than 'max_allowed_packet' bytes
Error Number  : 1153
* * * * * * * * * * 
MySQL Version : 5.1.63-cll
It had a bunch of dbtech stuff written in it, which is the chatbox, so im guessing it is a chatbox mod issue.
Reply With Quote
  #9  
Old 12-12-2012, 06:22 AM
Gamelobby's Avatar
Gamelobby Gamelobby is offline
 
Join Date: Jul 2007
Location: Long Beach, CA
Posts: 997
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gamelobby View Post
When i hover over each logo they all say "Sports Logo" instead of what team it is an image of.?
Is that the way it is supposed to work.?
Any word on this.?

I'd really like it to read the name of the team or whatever it is, instead of everything saying "Sports Logo".
Can't it be written to just read the file name.?

Thanks
Reply With Quote
  #10  
Old 12-12-2012, 08:00 PM
Taev Taev is offline
 
Join Date: Jan 2003
Location: Switzerland
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As per my understanding, you can't display the name of the image/team with the current code; I've tried to play around with the code but without any success. I guess you would need to either work with JS or maybe try to write a function and link it to the mouseover action. Anyway, I would be interested as well in a solution


Cheers,
Taev
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 03:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05292 seconds
  • Memory Usage 2,340KB
  • Queries Executed 24 (?)
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
  • (3)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete