vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vB Timeslip Database -for Automotive websites (https://vborg.vbsupport.ru/showthread.php?t=58076)

glo 10-25-2003 12:57 AM

Hey EvilLS1, good work!

"Clicks Install"

Do you know how i can add an extra field for a drop down menu for "Vehicle Make"

EvilLS1 10-25-2003 01:29 AM

Thanks glo.

Yes its easy to add an extra field for a drop down menu. I have one myself.

If you haven't already done so, install this hack (adds ability to make drop down menus in custom profile fields). Look in the last couple of pages of that thread to find updated instructions for later versions of vbulletin.

Anyway, once you've added that hack, go into your admin panel and add the new profile field w/ drop down menu.

Then hold your mouse over the "edit" link for the new field and make a note of the field ID # (at the end of the URL).

Then open timeslips.php and find:
Code:

} else if ($action=="username") {
  $cond.=" WHERE userfield.field55>'".intval($number)."'";
  $condition.=" AND userfield.field55>'".intval($number)."'";
  $orderby="user.username";
  $direction=ASC;

Below it add:
Code:

} else if ($action=="make") {
  $cond.=" WHERE userfield.field55>'".intval($number)."'";
  $condition.=" AND userfield.field55>'".intval($number)."'";
  $orderby="userfield.fieldXX";
  $direction=ASC;

In the code above, replace the red Xs with the ID# of the new field you added.

Still in timeslips.php find:
Code:

$ride= $userinfo[field50];
Below it add:
Code:

$make= $userinfo[fieldXX];
Again, replace the red Xs with the ID# of the new field you added.

Now in your "timeslips" template find:
Code:

<option value="$bburl/timeslips.php?s=$session[sessionhash]&action=username">Username</option>
Below it add:
Code:

<option value="$bburl/timeslips.php?s=$session[sessionhash]&action=make">Vehicle Make</option>
Find:
Code:

        <td bgcolor="{categorybackcolor}" colspan="8"><normalfont color="{categoryfontcolor}"><CENTER><b> Timeslip Database</b></CENTER></normalfont></td>
Replace it with:
Code:

        <td bgcolor="{categorybackcolor}" colspan="9"><normalfont color="{categoryfontcolor}"><CENTER><b> Timeslip Database</b></CENTER></normalfont></td>
Find:
Code:

<td bgcolor="{tableheadbgcolor}" align="center"><smallfont color="{tableheadtextcolor}"><b>Username</b></smallfont></td>
Below it add:
Code:

<td bgcolor="{tableheadbgcolor}" align="center"><smallfont color="{tableheadtextcolor}"><b>Vehicle Make</b></smallfont></td>
Find:
Code:

<td bgcolor="{categorybackcolor}" colspan="8">
Replace it with:
Code:

<td bgcolor="{categorybackcolor}" colspan="9">

In your "timeslipsbit" template find:
Code:

<td bgcolor="{secondaltcolor}"><normalfont><a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userinfo[userid]">$username</a></normalfont></td>
Below it add:
Code:

<td bgcolor="{firstaltcolor}">$make</td>
That will add the extra vehicle make info to the timeslips page and allow you to sort by it (alphabetically). You can experiment with the code a little and make it sort differently or whatever you want.

Dewayne

corsacrazy 10-25-2003 03:29 PM

im good at ideas and you are a great hacker, thank you my friend :)

EvilLS1 10-25-2003 04:26 PM

Thanks corsa. That was a nice idea. :)


BTW, I made a small addition to the hack. Now the timeslips page will put brackets around the catagory that is currently being sorted by.
Example (sorting by 1/4):
Username - Ride - RWHP - 60' - 1/8 mile ET - [1/4 Mile ET] - Slip

I updated the zip in the first post.. To upgrade just replace your timeslips template with the new one, then upload the new timeslips.php.

NickCat 10-25-2003 05:02 PM

*clicks install*

Thanks EvilLS1... Great Hack.

I just installed it on my board this morning. I had to make a few small modifications though. I changed RWHP to WHP (Subaru website... AWD cars) and I already had car info in the user profiles to I pulled that info instead or the new 'Ride' field.

Teriffic hack though, I hope my members like using it.

The only request I might make would be if it were possible to allow the timeslips to be uploaded like an attachment. Since you know users tend to change image hosts all the time, and or delete stuff.

-Nick
http://www.nasioc.com/

MaxScript 10-25-2003 05:09 PM

***vb3***? :)

EvilLS1 10-25-2003 09:47 PM

NickCat,
Thanks. :) And sorry about the RWHP thing.. I just copied the template from my own site (about 99% of my members have rwd cars).

Anyway, I will probably add the upload feature to v2.0. But for now, you could do what I do.. Next to the timeslip link field I posted a link to a thread in my drag racing forum that says "upload your images here". They can upload the images in that thread and then just put a link to the attachment in the field.

MaxScript,
I'll probably update this hack and a couple of others for VB3 once it goes final. Should be fairly easy to do.

MaxScript 10-25-2003 09:48 PM

Quote:

Originally Posted by EvilLS1
NickCat,
Thanks. :) And sorry about the RWHP thing.. I just copied the template from my own site (about 99% of my members have rwd cars).

Anyway, I will probably add the upload feature to v2.0. But for now, you could do what I do.. Next to the timeslip link field I posted a link to a thread in my drag racing forum that says "upload your images here". They can upload the images in that thread and then just put a link to the attachment in the field.

MaxScript,
I'll probably update this hack and a couple of others for VB3 once it goes final. Should be fairly easy to do.


great thanks

NickCat 10-25-2003 11:04 PM

Quote:

Originally Posted by EvilLS1
NickCat,
Thanks. :) And sorry about the RWHP thing.. I just copied the template from my own site (about 99% of my members have rwd cars).

Anyway, I will probably add the upload feature to v2.0. But for now, you could do what I do.. Next to the timeslip link field I posted a link to a thread in my drag racing forum that says "upload your images here". They can upload the images in that thread and then just put a link to the attachment in the field.

Thanks for the update. I added a few more tweaks of my own today. I used the custom dropdown to add a list of tracks and type of induction. My users were concerned about elevation effects on the 1/4 times in the registry so I figure as an alternative to trying to add elevation, temp, and humidity (which most users would leave blank anyway) I just added the track name field with a drop down of the most popular tracks.

And good idea on the image attachment thread.

I'll anxiously be awaiting the release of V2.0 with the built in attachment upload! ;)

-Nick
http://www.nasioc.com/

EvilLS1 10-26-2003 06:58 PM

NOTE: This comes standard with version 1.3!

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.

Instructions and screenshot attached:


All times are GMT. The time now is 01:44 AM.

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.01340 seconds
  • Memory Usage 1,757KB
  • 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
  • (14)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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