I have made a modification to my
VbGarage 1/4 Mile Stats Hack that will create a very cool effect for members who have a video clip of their best 1/4 mile pass. What this will do is embed a media player in their Vb Garage that is loaded and ready to play the video, right there in the member's Garage.
The statement is conditional, so the way it works is, if the member has not placed a URL to a video clip in the profile field that asks for it, then nothing will display in the stats hack.
The way I will present this is to edit the instructions for my 1/4 mile stats hack. You can feel free to change the place in your vbgarage_viewgarage template to place this wherever you wish to. Media files must be compatible with WMP.
Code:
ADD A CUSTOM BLOCK TO YOUR VB GARAGE TO DISPLAY MEMBER 1/4 MILE TIMES AND MEDIA PLAYER FOR BEST ET VIDEO.
MAY BE CUSTOMIZED ANY WAY YOU WISH TO USE IT.
This minor template modification to the VB GARAGE by MAGNUS will create a custom block in the text area of the member's
garage that displays 1/4 mile stats and RWHP if the member has filled in these custom fields. It also embeds a media player in the member's VB Garage that will play a video of the member's best 1/4 mile pass!
If the member has not filled them in, rather than display empty data the box displays an alternate message that you
Can also customize.
############################################################################################
###################
Installation is quite easy.
Step 1:
Create 5 custom user profile fields:
"1/4 Mile ET"
"BEST MPH"
"BEST 60 FOOT TIME"
"RWHP"
*"Best ET Video"
* for this field you may wish to provide instructions to the member to place the complete url of their video clip in this field, and that it must be compatible with WMP to work properly.
Step 2:
Note the field ID numbers of the fields you created in step one, and edit the code below with your field #'s in order for this mod to work on your forum. The field ID #'s in the code below are examples from my forum. If you do not match the proper field id's from your forum then the info dispayed in the user's VB Garage will not be correct!
Step three: Open template "vbgarage_viewgarage" and find:
#####################################################
<td class="alt2" width="60%">$data[text]
#####################################################
Add this after:
##################################################
<!-- performance stats block by SVTOA -->
<br>
<table align="center" border="0" cellpadding="$stylevar[cellpadding]"
cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>My $data[year] $data[model] Performance
Stats</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="!$user['userid']">
<else />
<!-- YOU MUST EDIT THE FIELDS BELOW TO MATCH THE NUMBERS OF YOUR FORUM CUSTOM FIELDS -->
<if condition="$user[field6] !=''">
<font color="black"><b>My Best ET: <font color="red">$user[field6]</font>
<else />
<!-- the next line may be changed to say whatever you want it to say -->
This member has not added ET data to their vB Garage.
</if>
</if>
</span>
</td>
</tr>
<!-- best mph field -->
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="$user[field8] !=''">
<font color="black"><b>My Best MPH: <font color="red">$user[field8]</font>
</if>
</span>
</td>
</tr>
<!-- rwhp field -->
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="$user[field11] !=''">
<font color="black"><b>My RWHP: <font color="red">$user[field11]</font>
</if>
</span>
</td>
</tr>
<!-- best 60 foot time -->
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="$user[field9] !=''">
<font color="black"><b>My Best 60 foot time: <font color="red">$user[field9]</font>
</if>
</span>
</td>
</tr>
<!-- media player -->
<!-- YOU MUST PROPERY EDIT THE THREE PROFILE STRINGS IN THE CODE BELOW OR THE MEDIA CLIP WILL NOT PLAY -->
<td class="$getbgrow"><span class="smallfont">
<if condition="$user[field80] !=''">
<b>Click play to watch my best pass!:</b><br>
<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="Player" width="250"
height="200"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,
0,0" standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<param name="URL" value="$user[field80]">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="1">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="0">
<param name="loop" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="100">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="0">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
<param name="_cx" value="7938">
<param name="_cy" value="6482">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeature
d/mediaplayer/default.asp" src="$user[field80]"
rate=1
balance=0
currentPosition=1
playCount=1
autoStart=0
loop=-1
currentMarker=0
invokeURLs=-1
volume=100
mute=0
uiMode=full
stretchToFit=0
windowlessVideo=0
enabled=-1
enableContextMenu=0
fullScreen=0
SAMIStyle
SAMILang
SAMIFilename
captioningID
enableErrorDialogs=0
_cx=7938
_cy=6482
width=250
height=200>
</embed>
</object>
</if>
</span>
</td>
</tr>
<!-- end media player -->
</td>
</tr>
</table>
<br/>
<!-- End PERFORMANCE STATS BLOCK -->
########################################################