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)

EvilLS1 01-27-2004 09:37 PM

I need one person to beta test vB Timeslip Database v2.0 for VB3. Anyone interested?

corsacrazy 01-27-2004 10:10 PM

Quote:

Originally Posted by EvilLS1
I need one person to beta test vB Timeslip Database v2.0 for VB3. Anyone interested?

yes

EvilLS1 01-27-2004 10:16 PM

Quote:

Originally Posted by corsacrazy
yes

Ok, I now have two beta testers.. Thats enough for now. Corsacrazy email me at EvilLS1TA-NOSPAM-@AOL.com (remove the -NOSPAM-) and I'll send you the hack instructions & files.

alkatraz 01-28-2004 11:23 PM

Quote:

Originally Posted by EvilLS1
For those interested, I've started working on a new version of this for VB3.


Awesome!! Can't wait

EvilLS1 01-29-2004 12:22 AM

Just waiting to hear from my beta testers.. If all is good, I'll release it. :)

bandit022 01-29-2004 05:09 PM

hey Dewayne,

one more thing if you don't mind. what part of the code do i have to change to require ALL 1/4 mile and 1/8 mile submissions to have a timeslip linked?

i tried setting it to require a timeslip for everyone faster than 16sec thinking that would cover just about everyone, but there are some that put 16.0 just to get their name on the list. so i am having to weed them out about once a week.

thanks for your time AGAIN. :D

-jeff

EvilLS1 01-29-2004 08:10 PM

Jeff,
Replace the other code with this (in your modifytimeslip template):

Code:

<script language="javascript">
<!--
function validate(theform) {
        if ((theform.field55.value>0) && (theform.field57.value=="")) {
                alert("A link to your timeslip is required.");
                return false; }
}
//-->
</script>

That will require a timeslip for all ETs.

EvilLS1 01-30-2004 12:57 AM

Version 2.0 for VB3 is here:
https://vborg.vbsupport.ru/showthrea...threadid=60945

bandit022 01-30-2004 01:49 AM

dewayne,

you're the man! *cough*even if you do drive an ellis juan*cough*

<--- runs a mustang board/club :D

thanks again...

-jeff

EvilLS1 01-30-2004 03:23 AM

<--- Ex Mustang owner. ;)

Mobo 02-02-2004 12:55 PM

Great Hack!! Just installed it with the ET&Trap in the postbit with no probs at all!! Well done.

I do have one question. Would it be possible to make it were only users or a certain User group should show up on the main list (timeslip.php)? My site has normal users and paid members, and I'd like for this to be an extra feature that the paid members have.

Thanks for the great Hack!

Mobo 02-02-2004 05:23 PM

Okay, I ran into a problem. When I tried to put a link to the timeslip.php file on my forum, ithe page is not found. I added a button int the Head section (forum styles). This what I added...

<a href="timeslips.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_carinfo.gif" alt="Timeslips, Mods and HP!!" border="0"></a>

EvilLS1 02-02-2004 09:18 PM

Quote:

Originally Posted by Mobo
Great Hack!! Just installed it with the ET&Trap in the postbit with no probs at all!! Well done.

I do have one question. Would it be possible to make it were only users or a certain User group should show up on the main list (timeslip.php)? My site has normal users and paid members, and I'd like for this to be an extra feature that the paid members have.

Thanks for the great Hack!

Just change the queries in timeslips.php so that it only selects from your specified usergroup like this:

Find:
Code:

// Get total number of users
  $userscount=$DB_site->query_first("SELECT COUNT(*) AS users
                                    FROM user,userfield
                                    $cond
                                    AND user.userid = userfield.userid");

Replace it with:
Code:

// Get total number of users
  $userscount=$DB_site->query_first("SELECT COUNT(*) AS users
                                    FROM user,userfield
                                    $cond
                                    AND user.userid = userfield.userid AND user.usergroupid = X");

Change the X to the usergroupid in this bit of code: user.usergroupid = X

Then find:
Code:

// Get users
$users=$DB_site->query("SELECT *
                          FROM user,userfield
                          WHERE user.userid = userfield.userid
                          $condition 
                          ORDER BY $orderby $direction
                          LIMIT $pos,$perpage");

Replace it with:
Code:

// Get users
$users=$DB_site->query("SELECT *
                          FROM user,userfield
                          WHERE user.userid = userfield.userid
                          AND user.usergroupid = X
                          $condition 
                          ORDER BY $orderby $direction
                          LIMIT $pos,$perpage");

Again, change the X in the code above to the usergroupid.

Quote:

Okay, I ran into a problem. When I tried to put a link to the timeslip.php file on my forum, ithe page is not found. I added a button int the Head section (forum styles). This what I added...

<a href="timeslips.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_carinfo.gif" alt="Timeslips, Mods and HP!!" border="0"></a>
Is this in your forum directory? Try adding $bburl/ before timeslips.php. If that doesn't work just add the full url. If you can go to the page manually its gotta be just a typo in the URL or timeslips.php isn't in that directory.

Mobo 02-03-2004 10:58 AM

Quote:

Originally Posted by EvilLS1
Just change the queries in timeslips.php so that it only selects from your specified usergroup like this:

Find:
Code:

// Get total number of users
  $userscount=$DB_site->query_first("SELECT COUNT(*) AS users
                                    FROM user,userfield
                                    $cond
                                    AND user.userid = userfield.userid");

Replace it with:
Code:

// Get total number of users
  $userscount=$DB_site->query_first("SELECT COUNT(*) AS users
                                    FROM user,userfield
                                    $cond
                                    AND user.userid = userfield.userid AND user.usergroupid = X");

Change the X to the usergroupid in this bit of code: user.usergroupid = X

Then find:
Code:

// Get users
$users=$DB_site->query("SELECT *
                          FROM user,userfield
                          WHERE user.userid = userfield.userid
                          $condition 
                          ORDER BY $orderby $direction
                          LIMIT $pos,$perpage");

Replace it with:
Code:

// Get users
$users=$DB_site->query("SELECT *
                          FROM user,userfield
                          WHERE user.userid = userfield.userid
                          AND user.usergroupid = X
                          $condition 
                          ORDER BY $orderby $direction
                          LIMIT $pos,$perpage");

Again, change the X in the code above to the usergroupid.


Is this in your forum directory? Try adding $bburl/ before timeslips.php. If that doesn't work just add the full url. If you can go to the page manually its gotta be just a typo in the URL or timeslips.php isn't in that directory.

EvilLS1 great support for a great hack. Thanks for the quick replies and help. I'll give them a shot.

Mobo 02-03-2004 12:31 PM

Adding $bburl/ in front of it made it work thanks! Also, the paid members only thing worked as well. Is it possible to add more then one usergroupid to it? So that say paid members and club officers could have their stats show up? Or can you assign a user to more then on usergroup?

EvilLS1 02-03-2004 02:26 PM

n/p.
Quote:

Is it possible to add more then one usergroupid to it?
Yes, just use this instead of the other code:
Code:

AND user.usergroupid IN (X,X,X)
Replace the X's with the usergroupids. You can add as many as you'd like.. Just separate each one with a comma.

Mobo 02-03-2004 04:45 PM

Cool, thanks a million!

EvilLS1 02-03-2004 07:36 PM

Anytime. :)

Tungsten 02-14-2004 03:00 PM

This is an excellent add-on, EvilLS1. Check your PM, I'd like to slide a little something into your PayPal account for sharing this with everyone. We've been trying unsuccessfully to code a timeslip db for our site for a while now and you just took a major load off of our non-programming asses. :D

EvilLS1 02-14-2004 08:03 PM

Tungsten,
I'm glad you like it. And thank you very much for offering a donation, but thats not necessary. A simple "thanks" is enough payment for me. :) I use alot of hacks that others have released here, so sharing my own hacks is my way of saying thanks to the vb.org community. Plus, I'm always happy to help out a fellow car enthusiast.

Enjoy the hack, my friend. :)

Sadie Frost 02-16-2004 01:46 AM

Great hack hon :)

Installed and working perfectly - just having a little problem getting the select boxes to show up on the Edit Timeslip page? I installed the hack and followed ES1's directions, but I just get a normal text box. Select fields work fine on my regular edit profile page. Anyone have any suggestions? Thanks :)

EvilLS1 02-16-2004 02:03 AM

Hey Sadia! :)

Version 1.3 doesn't have select boxes by default (v2.0 for VB3 does).. But its really easy to add them. Its all explained here:
https://vborg.vbsupport.ru/showpost....0&postcount=32

Dewayne

Sadie Frost 02-16-2004 02:46 AM

See I did that, but I still don't get select boxes - I'll go through and try again, maybe I missed something :)

EvilLS1 02-16-2004 02:58 AM

Quote:

Originally Posted by Sadie Frost
See I did that, but I still don't get select boxes - I'll go through and try again, maybe I missed something :)

Have you installed this hack?
https://vborg.vbsupport.ru/showthread.php?t=21833

And are you adding a new select box field? If so, you'll need to find all instances of this (in member.php & register.php):
Code:

(50,51,52,53,54,55,56,57,58,59,60,61,62,63)
And add the field ID # for the new field you added. For example, if the new field ID is 64, then you would replace the above code with this:
Code:

(50,51,52,53,54,55,56,57,58,59,60,61,62,63,64)
You'd need to make 2 edits to register.php and 6 edits to member.php. If ya still can't get it to work let me know and I'll help. :)

Sadie Frost 02-16-2004 03:45 AM

I know I'm doing something stupid...just can't figure out what it is... :D

I have the select field hack installed, and it works fine on the regular edit profile page. (I tried it with the same field I am then trying to add to the edit timeslip page). I also tried to just change an existing field to a select box and that's not working either. I added the field number to member and register like you suggested, and I still get a field, but a regular text field. I can't think of any reason it would show up on Edit Profile and not on Edit Timeslip :(

EvilLS1 02-16-2004 04:14 AM

Ah, I know why its not working for you.. There's a couple more steps that I forgot to mention.

###### In member.php find:
Code:

// ############################### start modify Timeslip Data #######################
if ($action=="edittimeslip") {
  $templatesused = 'timeslips_customfields,usercpnav,modifytimeslip';
  include("./global.php");
  // do modify profile form

  if ($bbuserinfo[userid]==0  or $bbuserinfo[vpban]==0 or $permissions['canmodifyprofile']==0) {
    show_nopermission();
  }

  // get extra profile fields
  $customfields = '';
  $profilefields=$DB_site->query("SELECT *
                                  FROM profilefield
                                  WHERE editable = 1
                                  AND profilefieldid IN (50,51,52,53,54,55,56,57,58,59,60,61,62,63)
                                  ORDER BY displayorder");
  while ($profilefield=$DB_site->fetch_array($profilefields)) {
    $profilefieldname="field$profilefield[profilefieldid]";
   
if ($bgcolor=="{firstaltcolor}") {
      $bgcolor="{secondaltcolor}";
    } else {
      $bgcolor="{firstaltcolor}";
    }


    eval("\$customfields .= \"".gettemplate("timeslips_customfields")."\";");
  }

  if ($allowhtml) {
    $htmlonoff=$ontext;
  } else {
    $htmlonoff=$offtext;
  }
  if ($allowbbcode) {
    $bbcodeonoff=$ontext;
  } else {
    $bbcodeonoff=$offtext;
  }
  if ($allowbbimagecode) {
    $imgcodeonoff=$ontext;
  } else {
    $imgcodeonoff=$offtext;
  }
  if ($allowsmilies) {
    $smiliesonoff=$ontext;
  } else {
    $smiliesonoff=$offtext;
  }

  // draw cp nav bar
  $cpnav[1]="{secondaltcolor}";
  $cpnav[2]="{firstaltcolor}";
  $cpmenu[2]="class=\"fjsel\" selected";
  $cpnav[3]="{secondaltcolor}";
  $cpnav[4]="{secondaltcolor}";
  $cpnav[5]="{secondaltcolor}";
  $cpnav[6]="{secondaltcolor}";
  $cpnav[7]="{secondaltcolor}";
  eval("\$cpnav = \"".gettemplate("usercpnav")."\";");

  eval("dooutput(\"".gettemplate("modifytimeslip")."\");");
}




###### Replace it with:
Code:

// ############################### start modify Timeslip Data #######################
if ($action=="edittimeslip") {
  $templatesused = 'timeslips_customfields,usercpnav,modifytimeslip';
  include("./global.php");
  // do modify profile form

  if ($bbuserinfo[userid]==0  or $bbuserinfo[vpban]==0 or $permissions['canmodifyprofile']==0) {
    show_nopermission();
  }

  // get extra profile fields
  $customfields = '';
  $profilefields=$DB_site->query("SELECT *
                                  FROM profilefield
                                  WHERE editable = 1
                                  AND profilefieldid IN (50,51,52,53,54,55,56,57,58,59,60,61,62,63)
                                  ORDER BY displayorder");
  while ($profilefield=$DB_site->fetch_array($profilefields)) {
    $profilefieldname="field$profilefield[profilefieldid]";
   
if ($bgcolor=="{firstaltcolor}") {
      $bgcolor="{secondaltcolor}";
    } else {
      $bgcolor="{firstaltcolor}";
    }
            // new options
        $TheField="";
        $optionlines = explode(',', $profilefield[options]);
        $option_bit=$optionlines[0];
        if ($profilefield[type]==1) {
                // radio
                while ($option_bit) {
                        $option_bit=trim($option_bit);
                        if ($option_bit == $bbuserinfo[$profilefieldname]) { $LocOn = "checked"; } else { $LocOn = ""; }
                        $TheField .= "<input type=\"radio\" name=\"$profilefieldname\" value=\"$option_bit\" $LocOn> $option_bit ";
                    $option_bit=next($optionlines);
                }
        } elseif ($profilefield[type]==2) {
                // select
                $TheField = "<select size=\"$profilefield[size]\" name=\"$profilefieldname\">";
                while ($option_bit) {
                        $option_bit=trim($option_bit);
                        if ($option_bit == $bbuserinfo[$profilefieldname]) { $LocOn = "selected"; } else { $LocOn = ""; }
                        $TheField .= "<option value=\"$option_bit\" $LocOn>$option_bit</option>";
                        $option_bit=next($optionlines);
                }
                $TheField .= "</select>";       
        } elseif ($profilefield[type]==3) {
                // textarea
                $bbuserinfo[$profilefieldname]=htmlspecialchars($bbuserinfo[$profilefieldname] );
                $TheField = "<textarea name=\"$profilefieldname\" rows=\"6\" cols=\"40\" wrap=\"physical\">$bbuserinfo[$profilefieldname]</textarea>";
        } else {
            $TheField="<input type=\"text\" class=\"bginput\" name=\"$profilefieldname\" value=\"$bbuserinfo[$profilefieldname]\" size=\"$profilefield[size]\" maxlength=\"$profilefield[maxlength]\">";
        }
        if ($profilefield[required] == 1) {
          $TheField .= " <b><font size=1>* Required</font></b>";
        }
        // new options

    eval("\$customfields .= \"".gettemplate("timeslips_customfields")."\";");
  }

  if ($allowhtml) {
    $htmlonoff=$ontext;
  } else {
    $htmlonoff=$offtext;
  }
  if ($allowbbcode) {
    $bbcodeonoff=$ontext;
  } else {
    $bbcodeonoff=$offtext;
  }
  if ($allowbbimagecode) {
    $imgcodeonoff=$ontext;
  } else {
    $imgcodeonoff=$offtext;
  }
  if ($allowsmilies) {
    $smiliesonoff=$ontext;
  } else {
    $smiliesonoff=$offtext;
  }

  // draw cp nav bar
  $cpnav[1]="{secondaltcolor}";
  $cpnav[2]="{firstaltcolor}";
  $cpmenu[2]="class=\"fjsel\" selected";
  $cpnav[3]="{secondaltcolor}";
  $cpnav[4]="{secondaltcolor}";
  $cpnav[5]="{secondaltcolor}";
  $cpnav[6]="{secondaltcolor}";
  $cpnav[7]="{secondaltcolor}";
  eval("\$cpnav = \"".gettemplate("usercpnav")."\";");

  eval("dooutput(\"".gettemplate("modifytimeslip")."\");");
}



###### 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>$TheField</normalfont></td>
</tr>

That should do it. ;)

Sadie Frost 02-16-2004 04:32 AM

YES! It works lol :D Thanks for helping me out :D

EvilLS1 02-16-2004 04:41 AM

Anytime. Glad ya got it workin'. :)

Carnage Media 02-24-2004 05:48 AM

hey Evil, what would cause this to happen, you submit your info. but it does not show up? thanks.

EvilLS1 02-24-2004 06:02 AM

Quote:

Originally Posted by Carnage Media
hey Evil, what would cause this to happen, you submit your info. but it does not show up? thanks.

Is it not showing any info at all? If not, make sure that the timeslipsbit template has been added and the spelling of the template name is correct.

If thats not it, what info was submitted and what sort method? Keep in mind that by default it only shows user's that have entered something in the 1/4 mile ET field when sorting by usernames.

Carnage Media 02-24-2004 11:19 AM

I entered my info as a test but it didnt' show, this morning I had a user.php error so its probably in there. I'm having to work around the "miserable users" hack also.

EvilLS1 02-25-2004 03:12 AM

Quote:

Originally Posted by Carnage Media
I entered my info as a test but it didnt' show, this morning I had a user.php error so its probably in there. I'm having to work around the "miserable users" hack also.

Weird. Not sure what could be causing it. I registered at your site (1SLlivE) last night to test it and it worked fine for me.

glo 02-29-2004 02:57 AM

hey EvilLS1,

1.3 great addition to an already great hack! (Now i just have to do the upgrade!) :)

Great work!

glo 02-29-2004 04:52 AM

EvilLS1, is there anyway to add an image of the vehicle in the "vehicle profile"?

Also, is it easy to sort by any of the other fields?

EvilLS1 02-29-2004 10:20 PM

Thanks glo. Zzed has released a hack which allows you to add images to the profile. You can easily apply it to the vehicle profile aswell. Check his profile page for a link to the hack.

Check this post to change the default sort method:
https://vborg.vbsupport.ru/showpost....8&postcount=15

EvilLS1 03-16-2004 04:32 AM

Add on:
This will show the ET club that each user belongs to in the postbit. For example, if a user has a 12 second ET it will display "12 Second Club Member" in the postbit below his username.

##### In admin/functions.php find:

Code:

//highlight words for search engine
Above it add:
Code:


if ($post[field55]>=14 && $post[field55]<15)
{
$poop = "<smallfont><a href=\"timeslips.php?s=$session[sessionhash]&action=14seccars\" STYLE=\"text-decoration: none\">14 Second Club Member</a></smallfont>";
}
else if ($post[field55]>=13 && $post[field55]<14)
{
$poop = "<smallfont><a href=\"timeslips.php?s=$session[sessionhash]&action=13seccars\" STYLE=\"text-decoration: none\">13 Second Club Member</a></smallfont>";
}
else if ($post[field55]>=12 && $post[field55]<13)
{
$poop = "<smallfont><a href=\"timeslips.php?s=$session[sessionhash]&action=12seccars\" STYLE=\"text-decoration: none\">12 Second Club Member</a></smallfont>";
}
else if ($post[field55]>=11 && $post[field55]<12)
{
$poop = "<smallfont><a href=\"timeslips.php?s=$session[sessionhash]&action=11seccars\" STYLE=\"text-decoration: none\">11 Second Club Member</a></smallfont>";
}
else if ($post[field55]>=10 && $post[field55]<11)
{
$poop = "<smallfont><a href=\"timeslips.php?s=$session[sessionhash]&action=10seccars\" STYLE=\"text-decoration: none\">10 Second Club Member</a></smallfont>";
}
else if ($post[field55]>0 && $post[field55]<10)
{
$poop = "<smallfont><a href=\"timeslips.php?s=$session[sessionhash]&action=singledigitcars\" STYLE=\"text-decoration: none\">Single Digit Club Member</a></smallfont>";
}
else
{
$poop = "";
}

Then put $poop in your postbit template where you want it to show up.

ucsigep 06-10-2004 06:03 AM

kind of bringing up a semi-dead thread, but great hack!! I run a DSM board, and I love the hack! Makes my job a lot easier in keeping track and updating best 1/4 mile times for our club. It's even better that my 12.5 is at the top of the list. :)

A couple issues, however...

After installing the hack, I get an error when trying to register on the board. The error reads:

Parse error: parse error in /home/columb7/public_html/forum/register.php on line 402

If I return register.php back to it's previous state, there are no problems.


Second issue: when on the actual list, I click to sort by (anything), and I get "The requested URL /forum/timeslips.php was not found on this server." I get the same error when clicking on "Submit your timeslip data."

Any assistance in these issues is greatly appreciated! The hack is very beneficial even in it's current state, but I'd like to fix these issues and get it working properly. Oh, I'm using vB 2.3.4, only hacks are this one, xx posts to make new thread, xx days to make new thread, and usertrade rating system.

EvilLS1 06-10-2004 07:50 AM

ucsigep,
A parse error usually means that something was not pasted correctly when editing the files (maybe a missing ; ).. Try re-applying the file edits to a fresh (unhacked) register.php and see if it works.
As for the other issue, if you'll provide me with a link to your timeslips page I'll take a look at it for you.

Dewayne

ucsigep 06-10-2004 05:51 PM

it's at http://gs8.inmotionhosting.com/~colu.../timeslips.php (URL hasn't updated to our new host yet).

It may not let you on, we've got it set up to only allow registered users to view. But feel free to register. :)


I'll double check the register.php, but I've tried it about 3 or 4 times and had the same result. I've glanced over the instructions that I'm copying and pasting, I don't see anything that appears to be missing. Thank you for your help, though!!

SVTOA 06-10-2004 07:13 PM

Make sure you are putting your edit in the right place an have not left anything off.
Perhaps you can post the edit file for examination?


All times are GMT. The time now is 07:41 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.01595 seconds
  • Memory Usage 1,882KB
  • 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
  • (17)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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