View Single Post
  #61  
Old 07-24-2007, 10:23 AM
liquidrage liquidrage is offline
 
Join Date: Aug 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This uses the instructions found with this product except I changed the 3 templates that are modified to give it a look and functionality that better suited my site. It also makes use of a custom profile field to give users the ability to turn this on/off.


OK, for the way I did it: No support offered, use at own risk, yadda yadda yadda

In User Profile Fields from the Admin CP add a new field of type "Single-Selection Radio Button". First line value of Yes second line value of No
This doesn't need to be seen in the member list, nor searchable. So you probably want to turn those options off when creating it.
This is to let people turn this feature on and off. I display it on edit profile but wherever if you want is fine. Once it's saved look at the manager page for profile fields and you'll see it's named fieldX where X is a number. Remember this for later.


In the USERCP template find:
Code:
<!-- ############## END SUBSCRIBED FORUMS ##############  -->
</if>
After that add:

Code:
<!-- YOUR TEAMS -->

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
	<tr>
		<td class="tcat" colspan="2">
		Team Manager
		</td>
	</tr>
</thead>
<tbody id="collapseobj_usercp_forums" style="$vbcollapse[collapseobj_usercp_forums]">
	<tr align="center" valign="bottom">
		<td class="alt1">

<div width="100%"><span class="navbar"> $usernflteams&nbsp$usernhlteams&nbsp$usermlbteams
<br />
$usernbateams&nbsp$userncaateams&nbsp$usernascardrivers&nbsp$userfifateams&nbsp$userpremierteams </span></div>

</td>
	</tr>
</tbody>
</table>
<br />

<!-- END OF YOUR TEAMS -->
In your PostBit template (postbit_legacy for me since I use the classic posbit look) find:

Code:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
After that add:

Code:
<if condition="$bbuserinfo['field21'] != 'No'">
<br />
					<div class="smallfont">
<if condition="!empty($post[nhlteam])">
							<img src="$vboptions[bburl]/images/nhl/$post[nhlteam].gif" border="0" alt="$post[nhlteam]" /></if>
						<if condition="!empty($post[nflteam])">
							<img src="$vboptions[bburl]/images/nfl/$post[nflteam].gif" border="0" alt="$post[nflteam]" /></if>
						<if condition="!empty($post[nbateam])">
							<img src="$vboptions[bburl]/images/nba/$post[nbateam].gif" border="0" alt="$post[nbateam]" /></if>
						<if condition="!empty($post[mlbteam])">
							<img src="$vboptions[bburl]/images/mlb/$post[mlbteam].gif" border="0" alt="$post[mlbteam]" /></if>
<if condition="!empty($post[ncaateam])">
							<img src="$vboptions[bburl]/images/ncaa/$post[ncaateam].gif" border="0" alt="$post[ncaateam]" /></if>
						<if condition="!empty($post[nascardriver])">
							<img src="$vboptions[bburl]/images/nascar/$post[nascardriver].gif" border="0" / alt="$post[nascardriver]" ></if>
						<if condition="!empty($post[fifateam])">
							<img src="$vboptions[bburl]/images/fifa/$post[fifateam].gif" border="0" alt="$post[fifateam]"/></if>
						<if condition="!empty($post[premierteam])">
							<img src="$vboptions[bburl]/images/premier/$post[premierteam].gif" border="0" alt="$post[premierteam]" /></if>
					</div>
				</if>

Now, look at the 1st line of that code. See where it says field21? That needs to match up to the fieldX you created earlier.


In MEMBERINFO find:

Code:
$customfields
After that add:

Code:
<if condition="!empty($userinfo[nhlteam])">
<br >
<strong>$vbphrase[my_nhlteam]:</strong> <img src="$vboptions[bburl]/images/nhl/$userinfo[nhlteam].gif" border="0" />
</if>
<if condition="!empty($userinfo[nflteam])">
<br />
<strong>$vbphrase[my_nflteam]:</strong> <img src="$vboptions[bburl]/images/nfl/$userinfo[nflteam].gif" border="0" />
</if>
<if condition="!empty($userinfo[ncaateam])">
<br />
<strong>$vbphrase[my_ncaateam]:</strong> <img src="$vboptions[bburl]/images/ncaa/$userinfo[ncaateam].gif" border="0" />
</if>
<if condition="!empty($userinfo[mlbteam])">
<br />
<strong>$vbphrase[my_mlbteam]:</strong> <img src="$vboptions[bburl]/images/mlb/$userinfo[mlbteam].gif" border="0" />
</if>
<if condition="!empty($userinfo[premierteam])">
<br />
<strong>$vbphrase[my_premierteam]:</strong> <img src="$vboptions[bburl]/images/premier/$userinfo[premierteam].gif" border="0" />
</if>
<if condition="!empty($userinfo[fifateam])">
<strong>$vbphrase[my_fifateam]:</strong> <img src="$vboptions[bburl]/images/premier/$userinfo[fifateam].gif" border="0" />
<br />
</if>
<if condition="!empty($userinfo[nascardriver])">
<strong>$vbphrase[my_nascardriver]:</strong> <img src="$vboptions[bburl]/images/premier/$userinfo[nascardriver].gif" border="0" />
<br />
</if>

And that's all I had to do . Really it's just the way it was done via the product just with different formatting in different places.

I don't use the NASCAR or the FIFA so but my site using this can be found here:
http://www.flyersphans.com/forums/index.php
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01054 seconds
  • Memory Usage 1,795KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete