vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Mini Mods - North American Sports Team Icons (https://vborg.vbsupport.ru/showthread.php?t=224345)

Tune 09-30-2009 10:00 PM

North American Sports Team Icons
 
1 Attachment(s)
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.

7) In your code find:

Code:

<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>

Below Add:

Code:

<div align="center">
<if condition="$post[fieldX] != ''"><img src="images/teams/$post[fieldX].gif" title="$post[fieldX]" align="center" border="0"/></if>
<if condition="$post[fieldX] != ''"><img src="images/teams/$post[fieldX].gif" title="$post[fieldX]" align="center" border="0"/></if>
<if condition="$post[fieldX] != ''"><img src="images/teams/$post[fieldX].gif" title="$post[fieldX]" align="center" border="0"/></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.

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

Tune 10-01-2009 02:20 PM

BTW, this mod does not require any additional modification to work.

Just follow the instructions and install the required changes to make it work.

As I said, you can change the images to whatever you want.

saadessa 10-01-2009 06:03 PM

ok its very nice any demo for that please

JTS2005 10-01-2009 10:30 PM

any demo?

johnrizz 10-01-2009 11:05 PM

tunes link says what it is! http://www.my247forums.com/showthread.php?t=49224

kalisekj 10-02-2009 06:45 PM

Nice Mod, I made 3 custom Fields so The User can choose their 3 favorite teams and have them displayed, Minor Error Pheonix Suns has Phoenix Sunss and therefore the image wont display, easily fixable but you may wanna change it in the download. Interested if any one creates a Soccer or NHL list :D

Greek Wizard 10-08-2009 06:47 AM

You should rename this to North American Sports team Icons

There are at least 7 Canadian teams in there.

ddaybofb 10-09-2009 07:25 PM

Very Nice, But there is no more Seattle Supersonics for the NBA, they moved to and are known as the Oklahoma City Thunder

iMageREAL 10-10-2009 03:21 PM

great mod,but im having a problem maybe someone could help me solve...

seems i can only chose 1 team from the dropdown menu and it is displaying in postbit same team x 3 ... how do you pick multiple teams from single choice menu as shown on this url >> http://www.my247forums.com/showthread.php?t=49224

EDIT: my bad im just a little slow,got it sorted,great mod

Tune 10-12-2009 03:13 PM

Sorry, guys... I made this about a year ago and have been using it faithfully. I figured it was time to share. That is why some of the teams need fixed.

I'll fix those issues and re-upload download.

iMageREAL:
Glad you figured it out. I'm guessing that you had all the same code in the edit of the postbit. You needed to change the X to whatever the field is.

PS: changing the name to North American Sports Team Icons as suggested by Greek Wizard. Thanks for the tip.

Tune 10-12-2009 03:45 PM

Quote:

Originally Posted by kalisekj (Post 1893892)
Nice Mod, I made 3 custom Fields so The User can choose their 3 favorite teams and have them displayed, Minor Error Pheonix Suns has Phoenix Sunss and therefore the image wont display, easily fixable but you may wanna change it in the download. Interested if any one creates a Soccer or NHL list :D

This does have the NHL listed already, complete with logos.

I can work on a Soccer list in the coming days. That is easy.

ShadMan 10-13-2009 12:00 AM

Working great! I had to update some of the team names that were misspelled, keeping the icons from appearing, but other than that, it is a great addition to my forum. Thanks!

DynaMow 10-16-2009 02:35 AM

where is the list for the options box? Never mind I found it.

DynaMow 10-16-2009 03:11 AM

awesome mod. Very cool idea and a great addition to my site.

DaninMS 10-16-2009 02:54 PM

Nice mod ! adding to my site now.

DaninMS 10-16-2009 04:59 PM

Just noticed that you missspelled Nebraska Cornhuskerss in the instruction help file.

stickskills 10-16-2009 11:28 PM

I don't believe Wake Forest is in there. Any chance that you have the image for that? Or if you could just share the PSD, that make things more simple. Starting to see a trend of a lot of the smaller schools not being represented. :P

DynaMow 10-17-2009 11:16 PM

I like it, my members like it.

But The members that do not use it, it is displaying other info under their name.

https://vborg.vbsupport.ru/external/2009/10/36.jpg

ddaybofb 10-19-2009 07:52 PM

Just a few tips:
Washington Nationals logo is outdated
San Jose Sharks is outdated
Its the Tampa Bay Rays not Devil Rays, they took out the Devil part, plus their logo changed
Arizona Diamondbacks logo is outdated

Just trying to help out, i love the mod though made my sports forum look awesome.

DynaMow 10-19-2009 11:17 PM

why is it listing the members biography and interests?

I will have to uninstall, the members are wanting that extra stuff gone, I do to.

Gav-n-Tn 10-23-2009 04:12 AM

Everything went just fine with the install but it only gives one choice and then displays it 3 times. Do I need to create 3 separate user fields? One for each team choice? Wouldn't a multple check box work better?

Nevermind. I answered my own question. Multiple check box only allows 31 items. I just created 3 of the "My Favorite Sports Teams" user fields.

stickskills 10-28-2009 03:13 AM

Any heads up on updating new schools or a PSD?

oddmud 10-28-2009 11:20 PM

I've installed it, and you can choose your favourite team. But... it's now showing the image of the favourite team in the profile.

http://www.goaliecrease.net/forums/m...outme&simple=1

Code:

<div align="center">
<if condition="$post[field5] != ''"><img src="http://www.goaliecrease.net/forums/images/teams/$post[field5].gif" title="$post[field5]" align="center" border="0"/></if>
</div>


oddmud 11-01-2009 10:44 PM

still no answers?

stickskills 11-02-2009 03:01 PM

Looks like DA U (Miami University) isn't in there as well.

Onyx513 11-02-2009 09:08 PM

Quote:

Originally Posted by iMageREAL (Post 1897623)
great mod,but im having a problem maybe someone could help me solve...

seems i can only chose 1 team from the dropdown menu and it is displaying in postbit same team x 3 ... how do you pick multiple teams from single choice menu as shown on this url >> http://www.my247forums.com/showthread.php?t=49224

EDIT: my bad im just a little slow,got it sorted,great mod

How did you resolve this problem?

soulnothing 11-06-2009 07:18 AM

either take out these 2 to show one
Code:

<if condition="$post[fieldX] != ''"><img src="images/teams/$post[fieldX].gif" title="$post[fieldX]" align="center" border="0"/></if>
<if condition="$post[fieldX] != ''"><img src="images/teams/$post[fieldX].gif" title="$post[fieldX]" align="center" border="0"/></if>

or make new profile fields so that you have 3 differ choice (follow steps 2 - 4)

example:
Code:

<div align="center">
<if condition="$post[field1] != ''"><img src="images/teams/$post[field1].gif" title="$post[field1]" align="center" border="0"/></if>
<if condition="$post[field2] != ''"><img src="images/teams/$post[field2].gif" title="$post[field2]" align="center" border="0"/></if>
<if condition="$post[field3] != ''"><img src="images/teams/$post[field3].gif" title="$post[field3]" align="center" border="0"/></if>
</div>

this is a very similair mod that me and my friend came up with for games
you can also add this to the top of the code:
Code:

<if condition="$post[fieldXX] != ''"><center><b>My Favorite Sports team(s):</b></center></if>

oddmud 11-11-2009 12:46 AM

still not showing any logos.. followed directions exactly.

soulnothing 11-11-2009 02:13 AM

did u make sure u put the images in the right spot on your server??? home.com/images

oddmud 11-15-2009 08:09 PM

yes, i said i followed the directions exactly. ;)

i tried both /images/teams/ and http://www.mydomain.com/forums/images/teams/

steeler7 05-13-2010 08:42 PM

Any chance of the code being updated to 4.0? Looks like all that needs updating is the Postbit Legacy code.

PSC001 07-01-2010 08:53 PM

Quote:

Originally Posted by steeler7 (Post 2036598)
Any chance of the code being updated to 4.0? Looks like all that needs updating is the Postbit Legacy code.

Yes, looking for this for 4.0 please.

bacemail 07-11-2010 04:26 AM

Any reason why the icons sometimes don't show up for some users? They'll show, then not show - leaving a red X in Explorer. Firefox of course does not show the broken link.

Fixed. I overlooked the "set to private" setting. It was set to "yes" which was causing some chaos.

Nice mod. I had to make a logo for Virginia Tech and take an extra "s" off the end of Nebraska Cornhuskers.

steeler7 07-26-2010 07:15 PM

To get this to work on vB4 I used everything here except I used the following code in my postbit legacy...

Code:

<vb:if condition="$post['fieldX']"><img src="images/teams/{vb:raw post.fieldX}.gif" alt="Sports Logo" border="" /></vb:if>
I actually put the above directly under
Code:

{vb:rawphrase 'posts'} : {vb:raw post.posts}

BirdOPrey5 08-07-2010 06:29 PM

This is cool but the postbit area can get very 'busy' for some peoples tastes. I added another option to let users disable seeing these at all if they choose:

Make yet another custom user profile field, this time a Single Selection Radio Button...
Options:
Yes
No
Filed Required: Yes at registration...
The rest of the settings same as mentioned for the other fields.


Code:

<if condition="($vbulletin->userinfo['fieldY'] != 'No')">
<div align="center">
<if condition="$post[fieldX] != ''"><img src="images/teams/$post[fieldX].gif" title="$post[fieldX]" align="center" border="0"/></if>
<if condition="$post[fieldX] != ''"><img src="images/teams/$post[fieldX].gif" title="$post[fieldX]" align="center" border="0"/></if>
<if condition="$post[fieldX] != ''"><img src="images/teams/$post[fieldX].gif" title="$post[fieldX]" align="center" border="0"/></if>
</div>
</if>

Replace "fieldY" with the field number of this new option, example: field15

BirdOPrey5 08-09-2010 09:15 AM

There's a typo in the file name for the: Missouri Tigers.gif image. (That's the corrected name.)

BirdOPrey5 08-09-2010 04:26 PM

1 Attachment(s)
There was also no image at all for the Clemson Tigers...very anti-cat I see? :p

Anyway I made this image quickly to fit in (50x40 pix) but would be interested if there's a 'real' logo out there.

Edit: Added better one.

Also no image for: Virginia Tech Hokies (also added here).

BirdOPrey5 08-09-2010 08:40 PM

1 Attachment(s)
OK so I've made 50x40 logos for all major (and some minor) Car Makers common in North America...

Download the ZIP, upload the files to your /images/teams/ folder and then edit your custom profile field(s) and copy and paste the following lines below your last sports team:

Code:

<<Automobiles>>
Acura
Alfa Romeo
AMC
Aston Martin
Audi
Bentley
BMW
Buick
Cadillac
Chevolet
Chrysler
Daewoo
Daimler
Datsun
DMC
Dodge
Eagle
Ferrari
Ford
Geo
GM
GMC
Honda
Hummer
Hyundai
Infiniti
Isuzu
Jaguar
Jeep
Kia
Land Rover
Lexus
Lincoln
Maybach
Mazda
Mercedes-Benz
Mercury
MG
Mini
Mistubishi
Nissan
Oldsmobile
Overland
Plymouth
Pontiac
Porsche
Rolls Royce
Saab
Saturn
Scion
Studebaker
Subaru
Suzuki
Tesla Motors
Toyota
Troller
Volkswagon
Volvo
Willys

I'm working on a collection of miscellaneous logos now...

BirdOPrey5 08-14-2010 05:32 PM

1 Attachment(s)
Logos for common (in North America) Beers and Fast Food/Restaurants

Code:

<<Restaurants & Fast Food>>
Applebees
Burger King
Carls Jr
Cheesecake Factory
Chilis
Dairy Queen
Del Taco
Dominos Pizza
Dunkin Donuts
IHOP
In-N-Out Burger
Jack in the Box
KFC
Krispy Kreme
Longhorn
McDonalds
Olive Garden
Outback
Papa Johns
Pizza Hut
Popeyes
Quiznos
Red Lobster
Roy Rogers
Rubios
Ruby Tuesday
Sbarro
Sonic
Starbucks
Subway
Taco Bell
TGI Fridays
Wendys
White Castle

Code:

<<Beers, Lagers & Ales>>
Amstel
Amstel Light
Anheuser Busch
Becks
Blue Moon
Boulevad Brewing
Bud Light
Budweiser
Busch
Coors
Coors Light
Corona
Guinness
Heineken
Heineken Light
Kalik
Keystone
Keystone Light
Michelob
Michelob Dry
Mike's Hard
Miller
Miller Lite
New Belgium
O'Douls
Red Stripe
Rolling Rock
Samuel Adams
Shiner Bock
Stella Artois


Wreck713 08-16-2010 04:02 AM

Great work Bird.


All times are GMT. The time now is 04:54 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.01356 seconds
  • Memory Usage 1,844KB
  • 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
  • (12)bbcode_code_printable
  • (3)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
  • (40)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