Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Timeslip Database -for Automotive websites Details »»
vB Timeslip Database -for Automotive websites
Version: 1.00, by EvilLS1 EvilLS1 is offline
Developer Last Online: May 2021 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 10-20-2003 Last Update: 11-12-2003 Installs: 28
 
No support by the author.

I doubt this will be used by many people since its designed specifically for automotive websites.. But it has been requested here several times, so here ya go.

What does it do? This hack does a few things. First, it will add a separate Vehicle Profile page to your forum where your users can enter their type of vehicle, horsepower, best 60' time, 1/8 mile time, 1/4 mile time, a link to their timeslip and more. Once the data is entered the timeslips.php page will display the info sorted by the best times, highest trap speeds, highest horsepower #s, proof of ET, or ET brackets (user selectable).

You can also ban users from editing their Vehicle Profile. This comes in handy if you have some users who insist on entering false data into the Timeslip Database just to be funny. To use this feature, just click on the user's profile, then click "user options" and set "Can edit vehicle profile" to no. The user will still be able to edit his regular profile, but not his vehicle profile.


Demo: http://modernmusclecars.net/forums/timeslips.php

(Note: I just added this to my board a couple of days ago so there's only a few entries right now.. It does have pagination and will display 25 per page by default once more ETs are entered.)

Screenshot1: Vehcile Profile page
Screenshot2: Edit Vehcile Profile page


Features include:
*The ability to sort by:
-1/4 Mile ET
-1/4 Mile MPH
-1/8 Mile ET
-1/8 Mile MPH
-60' Time
-Horsepower
-Cars with proof of ET (actual timeslip)
-Username
-ET brackets (New!)
*Show the average ET, MPH, and HP for your site. (New!)
*Vehcile Profile (separate from user profile) (New!)
*Ability to ban users from editing their vehicle profile (New!)
*Installer


Installation is easy:
1. Upload TDinstaller.php to your admin directory & run the installer.
2. Follow the hack instructions to edit the 4 php files.
3. Edit two templates.
4. Add five new templates.
5. Upload timeslips.php to your forum directory and slipicon.gif to your image directory.

This has been tested on 2.2.8 - 2.3.2 and should work fine with any 2.X.X version.

Note: I don't use vb 2.X anymore so this hack is no longer supported

Download vB Timeslip Database v1.3

(Version 2.0 is availible for VB3 users here.)

Add-ons:
*Add-on: Display the Top Five 1/4 mile ETs on your front page portal
*Add-on: Require a link to the actual timeslip for all ETs that are 11.99 or quicker.
*Add-on: A "timeslips" button for your header (PSD and GIF). -by Optima
*Add-on: Show the ET club that users belong to in the postbit.
*How to: Add a "select" field & sort by it in the timeslip database.
*How to: Change the default sort method



Updated 10-29-03 to add new features: - Added the ability to sort by ET brackets. (ie. show 10 second cars only. 11 second cars only, 13 sec cars, etc). Requested by BrendonM
Check the demo page to see it in action.

Updated 10-31-03 (new feature): -Added a new action that will show the average ET, trap speed, and horsepower for your site.
Go to the demo page and select "Site Averages" from the drop down menu to see what I mean.

Updated 11-10-03: -Added the vehicle profile addon to the hack instructions. Added a few new fields to the vehicle profile page (race weight, track, D/A, mods, tranny type, etc). Added a "details" column to the Timeslip Database page which lets you view all vehicle profile fields when the details link is clicked (see demo).

Instructions for upgrading all previous versions to v1.3.

If you find this script useful please click install.

Show Your Support

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

Comments
  #52  
Old 10-29-2003, 02:40 PM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EvilLS1
Add-on: Separate "Vehicle Profile" page for submitting Timeslip Data.

Description: This add-on will remove the timeslip fields from your edit profle & registration pages and put them in thier own separate catagory called "Vehicle Profile".

This should help cut down the number of users who submit false data when registering or editing their profile since the vehicle info is edited on a completely separate page.
What's up with this code?
PHP Code:
   $profilefields=$DB_site->query("SELECT profilefieldid,required,title,size,maxlength
                                  FROM profilefield
                                  WHERE editable = 1
                                  AND profilefieldid IN (5,6,11,12,13,14,15,18,19)"
); 
Are the profile id's wrong?
Reply With Quote
  #53  
Old 10-29-2003, 03:03 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oly51,
Yes you can add any new fields to the Vehicle Profile page.. Just add the new field IDs into the queries where it says "AND profilefieldid IN (50,51,52,53,54,55,56,57)" and they will show up on the new vehicle profile page. You'll need to add the new field ID in 5 places (in the hack instructions for the addon).

As for the info on the other 150 cars that don't belong to registered users, I'm not sure how you could include those.

7thgenCivic.Com,
Sorry about that.. Those profile fields are from my own board and I forgot to change them in the hack instructions. Just replace that section of code with this:
Code:
  $profilefields=$DB_site->query("SELECT profilefieldid,required,title,size,maxlength
                                  FROM profilefield
                                  WHERE editable = 1
                                  AND profilefieldid IN (50,51,52,53,54,55,56,57)");
I updated the instructions for the vehicle profile addon.. Thanks for pointing it out.
Reply With Quote
  #54  
Old 10-29-2003, 04:01 PM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm....I am not getting the actual form fields output with your new addition. It shows the field names, but not the form fields.
Reply With Quote
  #55  
Old 10-29-2003, 08:58 PM
brendonm brendonm is offline
 
Join Date: Feb 2003
Location: New Zealand
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice, I have got the phpBB version working on two boards out there already. I have just installed this one on my Nissan Skyline related website which uses vBulletin. The install was very very simple, I will probably tweak it up later but for now is pretty standard.
Thanks EvilLS1 -*clicks install*
Reply With Quote
  #56  
Old 10-29-2003, 10:50 PM
ImportPassion ImportPassion is offline
 
Join Date: Mar 2002
Location: Gilbert, AZ
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when I made the separate page for the timeslips, i made HP required field, but when ppl tried to join, they got an error saying HP was a required field and there was no HP field being presented, which is what I want, but it should be coming up as not entered.
Reply With Quote
  #57  
Old 10-29-2003, 11:40 PM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

7thgenCivic.Com,
I appologise. It looks like I posted the wrong contents for the "timeslips_customfields" template. I also left out a step and forgot to put a "); at the end of one of the queries. I was very tired when I wrote the instructions for the addon.. Thats my excuse.

Anyway, I updated the instructions once again for the vehicle profile page addon, and this time its right.

But to save you from having to look through the whole thing to find what I changed, I'll post it here:

Replace the entire contents of your "timeslips_customfields" template with this:
Code:
<tr>
	<td bgcolor="$bgcolor"><normalfont><b>$profilefield[title]:</b></normalfont><br>
	<smallfont>$profilefield[description]</smallfont></td>
	<td bgcolor="$bgcolor"><normalfont><input type="text" class="bginput" name="$profilefieldname" value="$bbuserinfo[$profilefieldname]" size="$profilefield[size]" maxlength="$profilefield[maxlength]"></normalfont></td>
</tr>
In your usercpnav template find:
Code:
	<td bgcolor="$cpnav[2]"><smallfont><b><a href="member.php?s=$session[sessionhash]&action=editprofile">Edit Profile</a></b></smallfont></td>
Below it add:
Code:
	<td bgcolor="$cpnav[2]"><smallfont><b><a href="member.php?s=$session[sessionhash]&action=edittimeslip">Edit Vehicle Profile</a></b></smallfont></td>
This will fix the problem you're having with the required HP field:

In register.php find:
Code:
  $profilefields=$DB_site->query("SELECT maxlength,profilefieldid,required,title
                                  FROM profilefield
                                  WHERE editable = 1
                                  ORDER BY displayorder");
Replace it with:
Code:
  $profilefields=$DB_site->query("SELECT maxlength,profilefieldid,required,title
                                  FROM profilefield
                                  WHERE editable = 1
                                  AND profilefieldid NOT IN (50,51,52,53,54,55,56,57) 
                                  ORDER BY displayorder");
That should do it.

@ brendonm.. Thanks.
Reply With Quote
  #58  
Old 10-29-2003, 11:58 PM
brendonm brendonm is offline
 
Join Date: Feb 2003
Location: New Zealand
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hiya,
I like SVTOA's approach - nice work dude In particular I like the sorting into time brackts.

Using the timeslip mod, how hard would it be to structure a search function to present only vehicles within a given bracket? e.g. 8sec, 9sec, 10sec and then include these searches into the sort box? (actually I think the search box inclusion may have been discussed, but not the time brackets).

If I take a look at the existing if/else statement, I can see a condition statement thing. Is this where I'd put in some sort of less than/greater than condition?

} else if ($action=="10SecondBracket") {
$cond.=" WHERE userfield.field55>'".intval($number)."'";
$condition.=" AND userfield.field55>'".intval($number)."'";
$orderby="userfield.field55";
$direction=ASC;
$bracket3="<b>[</b>";
$bracket4="<b>]</b>";

This would actually be a very nice enhancement for this mod in the instance that I am using it for aswell as might be a nice addition for others too. Even if someone can help me with the syntax for the first one I can write the rest (I don't expect everything to be done for me, I just don't know where to start with developing such a query). I am only interested in sorting by time bracket for 1/4 mile, not for 60 foot and 1/8 mile aswell. Any help or guidance in this matter would be much appreciated - if I manage to make anything useful I'll be sure to post it up here.

regards

BrendonM
Reply With Quote
  #59  
Old 10-30-2003, 12:23 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BrendonM,
Yes, you have the right idea.

You would just add some variables above "// Do sorting methods" something like this:

Code:
$a=11;
$b=10;
$number=0;
// Do sorting methods
And then add a new action with the $conditions like this:
Code:
} else if ($action=="TenSecCars") {
  $cond.=" WHERE userfield.field55<'".intval($a)."' AND userfield.field55>='".intval($b)."'";
  $condition.=" AND userfield.field55<'".intval($a)."' AND userfield.field55>='".intval($b)."'";
  $orderby="userfield.field55";
  $direction=ASC;
You get the idea. Good luck with it.
Reply With Quote
  #60  
Old 10-30-2003, 01:25 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BrendonM,
I'm adding this feature for you. Give me a few more minutes and I'll have it done.
Reply With Quote
  #61  
Old 10-30-2003, 01:29 AM
brendonm brendonm is offline
 
Join Date: Feb 2003
Location: New Zealand
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hiya,

that is perfect, works very well thank you. I was'nt sure how to approach that syntactically now I can code as many brackets as I like. I have just asked my community for the brackets they want to sort by and will code them up tommorrow. If anyone wants the code let me know, although it is pretty easy.... ...now
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 02:12 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.08515 seconds
  • Memory Usage 2,333KB
  • Queries Executed 25 (?)
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
  • (8)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete