vb.org Archive

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

EvilLS1 04-01-2004 08:30 AM

Quote:

Originally Posted by PranK
Dewayne,

I did this, when I had 2 lots of profile fields, i was able to add/edit etc, but now that i have deleted the lot that i added last (without any entries) the old profile fields cannot be accessed.

Thanks,

Christian

Do this, go to your admincp, click modify custom profile fields, and tell me the field IDs for the timeslip fields.

gibgib 04-01-2004 10:05 AM

This hack is a good idea.

Is there something similar that will allow the user to add say 4 images via an upload button, some custom fields & a 500 character description field?

I run an automotive site. This is our current member gallery:
http://www.aussiefrogs.com/gallery/usergallery.htm
It is cluttered & requires a lot of maintenence. If the members could update their own page within the forum software it would be really good :classic:

PranK 04-01-2004 11:45 AM

Quote:

Originally Posted by EvilLS1
Do this, go to your admincp, click modify custom profile fields, and tell me the field IDs for the timeslip fields.

Fields are 80-95, the ones it created the 2nd time were 50-65 (i think).

Christian

PKRWUD 04-01-2004 11:50 AM

Quote:

Originally Posted by EvilLS1
PKRWUD,
Check and make sure you added the html to the timeslipsbit template. Then go into your admin panel and look under the custom profile fields section and make sure that the timeslip fields are there and that the IDs are 50-65. If thats not it, let me know and we'll figure it out. I'm sure its something simple.

This is what's in my timeslipbit template:

<tr align="center">
<td class="alt1">$rank</td>
<td class="alt2""><a href="member.php?$session[sessionurl]u=$userinfo[userid]">$username</a></td>
<td class="alt1">$ride</td>
<td class="alt2">$induction</td>
<td class="alt1"">$avghp$rwhp</td>
<td class="alt2">$avgsf$sixty</td>
<td class="alt1"">$avge$eighth$atmph1$eighthmph$spacer $avgemph</td>
<td class="alt2">$avgq$quarter$atmph2$quartermph$space r$avgqmph</td>
<td class="alt1"">$details</td>
<td class="alt2">$slip</td>
</tr>



And my user fields include 1-10 and 50-65.

gearshifter47 04-01-2004 05:48 PM

Quote:

Originally Posted by EvilLS1
Nothing is wrong. Thats the way it was designed to work. The Timeslip Database is mostly geared toward 1/4 mile ETs since thats the most popular track length.

By default it sorts by 1/4 mile ETs.. So it only shows times of those who have entered something into the 1/4 mile ET field..

If you select "sort by username" it displays the usernames alphabetically of everyone who has entered something into the 1/4 mile ET field. Same with showing naturally aspirated cars only. If the 1/4 mile ET field is left blank, they will not show on the list. Everything is based on the 1/4 mile ET. Of coarse you can easily change it so that it sorts by other things if you want. But thats the way its meant to work.

It will show the 1/8 mile ETs for everyone who has entered them only when sorting by 1/8 mile ET.

how do i go about fixing the sort by username, NA, and those to not require the 1/4 mile time?

SVTBlackLight01 04-01-2004 09:26 PM

Quote:

Originally Posted by gibgib
This hack is a good idea.

Is there something similar that will allow the user to add say 4 images via an upload button, some custom fields & a 500 character description field?

I run an automotive site. This is our current member gallery:
http://www.aussiefrogs.com/gallery/usergallery.htm
It is cluttered & requires a lot of maintenence. If the members could update their own page within the forum software it would be really good :classic:

I think what your asking for is a vB Garage that every car site owner here has been asking for forever.

If you just need a good gallery, there are a few free ones that are good. Coppermine is good. Or if you want to pay for a gallery, check out PhotoPost.

EvilLS1 04-01-2004 10:56 PM

gibgib,
Yeah what you want is the vbgarage that everyone keeps requesting.. Not sure if anyone is developing it or not.. Theres a thread in the request forum about it.

PranK,
So the fields that are still in your database are 80-95 and fields 50-65 no longer exist correct? If so, in member.php, includes/functions_user.php, and profile.php you'll need to make sure the field ID#s match the field IDs that you have in your database.

In those files, find all instances of this (there will be several):
Code:

(50,51,52,53,54,55,56,58,59,60,61,62,63,64,65)
And replace it with this:
Code:

(80,81,82,83,84,85,86,88,89,90,91,92,93,94,95)
Or if I'm misunderstanding you and you're saying that you still have fields 50-65, then you'll need to do just the opposite. Also, make sure you have the correct field #s in timeslips.php.

PKRWUD,
For some reason your timeslipsbit template isn't being displayed. Make sure the template name is spelled correctly (its timeslipsbit not timeslipbit).. If thats not it send me a copy of your timeslips.php file and I'll take a look.


gearshifter47,
This will make it show everyone who has entered something into the ride field when sorting by username:

In timeslips.php find:
Code:

  else if ($_REQUEST['do'] == 'username')
  {
        $cond.=" WHERE userfield.field55>'".intval($number)."'";
        $condition.=" AND userfield.field55>'".intval($number)."'";
        $orderby="user.username";
        $direction=ASC;
        $bracket11="<b>[</b>";
        $bracket12="<b>]</b>";
  }

Replace it with:
Code:

  else if ($_REQUEST['do'] == 'username')
  {
        $cond.=" WHERE userfield.field50!=''";
        $condition.=" AND userfield.field50!=''";
        $orderby="user.username";
        $direction=ASC;
        $bracket11="<b>[</b>";
        $bracket12="<b>]</b>";
  }


To make it show all N/A cars (when sorting by N/A) regardless if 1/4 mile ET has been entered find:
Code:

    else if ($_REQUEST['do'] == 'na')
  {
        $condition.=" AND userfield.field65='$natasp' AND userfield.field55>'".intval($number)."'";
        $cond.=" WHERE userfield.field55!=''";
        $orderby="userfield.field55";
        $direction=ASC;
        $bracket13="<b>[</b>";
        $bracket14="<b>]</b>";

Replace it with:
Code:

    else if ($_REQUEST['do'] == 'na')
  {
        $condition.=" AND userfield.field65='$natasp' AND userfield.field50!=''";
        $cond.=" WHERE userfield.field50!=''";
        $orderby="userfield.field55";
        $direction=ASC;
        $bracket13="<b>[</b>";
        $bracket14="<b>]</b>";


magnus 04-01-2004 11:26 PM

Heh, my scripts name has surpassed the script itself. vBGarage was short lived, the "powers that be" yanked it, because I used a portion of code from a coder who is no longer around to give consent. /shrug

It was for vB2, anyway. I've been developing a vB3 version, but unfortunately I started a new job and don't have the time to beat on it full time, so I can't really guestimate a release date.

FOCUS: EvilLS1, as always, still diggin' the hack.. the users love it. ;)

gearshifter47 04-02-2004 01:06 AM

this will still keep them in order right?

and how could i make username the default sort when i start up..

EvilLS1 04-02-2004 03:53 AM

Quote:

Originally Posted by magnus
It was for vB2, anyway. I've been developing a vB3 version, but unfortunately I started a new job and don't have the time to beat on it full time, so I can't really guestimate a release date.

I remember your garage for vb2. Looked pretty nice! I'm sure a vb3 version would be very popular with the automotive sites.. I'm in the same boat as you though... Due to work I don't have much spare time to try and make anything like that.

Quote:

Originally Posted by gearshifter47
this will still keep them in order right?

and how could i make username the default sort when i start up..

Yes, they'll still be sorted by username alphabetically.

To make username the default sort method open timeslips.php and find:
Code:

// If no action is set order by quarter
if (empty($_REQUEST['do']))
{
  $_REQUEST['do'] ='quarter';
}

Replace it with:
Code:

// If no action is set order by username
if (empty($_REQUEST['do']))
{
  $_REQUEST['do'] ='username';
}

Find:
Code:

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

Replace it with:
Code:

  }
  else
  {
        $cond.=" WHERE userfield.field50!=''";
        $condition.=" AND userfield.field50!=''";
        $orderby="user.username";
        $direction=ASC;
        $bracket11="<b>[</b>";
        $bracket12="<b>]</b>";


PKRWUD 04-02-2004 12:33 PM

Quote:

Originally Posted by EvilLS1
PKRWUD,
For some reason your timeslipsbit template isn't being displayed. Make sure the template name is spelled correctly (its timeslipsbit not timeslipbit).. If thats not it send me a copy of your timeslips.php file and I'll take a look.

You know what? I think that's the exact same mistake I made when I installed the first version on my old board. I guess it's true what they say about teaching an old dog new tricks.

Evil- You really are a credit to programmers everywhere, especially the way you offer so much assistance. Most people would be sick of it, I'm sure. Thank you again for your patience and your help.

Take care,
~Chris

P.S. It's now available if you want to link to it...

http://www.ricehatersclub.com/vbulletin/timeslips.php?

oly51 04-02-2004 04:01 PM

Quote:

Originally Posted by PKRWUD
...Evil- You really are a credit to programmers everywhere, especially the way you offer so much assistance. Most people would be sick of it, I'm sure. Thank you again for your patience and your help. [/url]

I have been following this hack off and on for a while and am really impressed with the degree of support EvilLS1 has shown for this hack! Everytime I come back, Evil is here helping! Great job :up:

Now if we can only find a way to allow users or Admins/Mods to add multiple car listings or non-members info (maybe something in addition to using the member list??) with a few mods, we could end up with a vBgarage type hack.

EvilLS1 04-02-2004 07:34 PM

Thanks for the kind words guys, and glad to hear its working for you now Chris. :)

Added your link btw.

gibgib 04-03-2004 10:41 AM

Thanks for your responses.

I am pleading my case here now I know the name of the hack I need!

gibgib

SNovotn2 04-03-2004 04:34 PM

I dont know if I missed a step or something is just not right.. but:

The hack is working perfectly, except I want it to show the custom profile fields(ride, mods...) when you click on a member under the "additional information". It did it on one of the installs I did, but this time no luck.

In my admin CP I have them set as able to be seen in the member list. My timeslip profile fields are the standard 50-*.

I can call $post[field50] and it will show the users 'ride', but for some reason inside my memberinfo_customfields template it wants $profilefield[value].


Anyone? :)

Steve

EvilLS1 04-03-2004 11:04 PM

SNovotn2,
In the earlier versions the vehicle info was displayed in the user's regular profile (there was no vehicle profile).. With version 1.3 or later all vehicle details are displayed separately. But if you want to show the vehicle details in the user's regular profile (aswell as the vehicle profile) you can do it like this:

In member.php find:
Code:

// *********************
// CUSTOM PROFILE FIELDS
$profilefields = $DB_site->query("
        SELECT profilefieldid, required, title, type, data, def, height
        FROM " . TABLE_PREFIX . "profilefield
        WHERE profilefieldid NOT IN (50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65) AND form = 0 " . iif(!can_moderate(), "
                AND hidden = 0") . "
        ORDER BY displayorder
");

Replace it with:
Code:

// *********************
// CUSTOM PROFILE FIELDS
$profilefields = $DB_site->query("
        SELECT profilefieldid, required, title, type, data, def, height
        FROM " . TABLE_PREFIX . "profilefield
        WHERE form = 0 " . iif(!can_moderate(), "
                AND hidden = 0") . "
        ORDER BY displayorder
");


PranK 04-05-2004 09:19 AM

Quote:

Originally Posted by EvilLS1
PranK,
So the fields that are still in your database are 80-95 and fields 50-65 no longer exist correct? If so, in member.php, includes/functions_user.php, and profile.php you'll need to make sure the field ID#s match the field IDs that you have in your database.

In those files, find all instances of this (there will be several):
Code:

(50,51,52,53,54,55,56,58,59,60,61,62,63,64,65)
And replace it with this:
Code:

(80,81,82,83,84,85,86,88,89,90,91,92,93,94,95)
Or if I'm misunderstanding you and you're saying that you still have fields 50-65, then you'll need to do just the opposite. Also, make sure you have the correct field #s in timeslips.php.

Champion Effort!

Thanks mate, all fixed!

Christian

Dj22 04-07-2004 05:57 AM

Just installed.. Killer!!

How hard would it for someone to modify it for users to have multiple car listings :speechless:

EvilLS1 04-07-2004 07:38 AM

Quote:

Originally Posted by Dj22
Just installed.. Killer!!

How hard would it for someone to modify it for users to have multiple car listings :speechless:

Adding multiple cars to the vehicle profile page is easy.. But it would only be possible to sort by one car on the timeslips page.

To add a field for another car just go to your admincp, add a new custom profile field for the extra vehicle, make a note of the field ID, then in member.php, includes/functions_user.php, and profile.php find all instances of this:
Code:

(50,51,52,53,54,55,56,58,59,60,61,62,63,64,65)
and add the field ID for your extra vehicle field to it.

Gt-358 04-07-2004 11:52 AM

Quote:

Originally Posted by EvilLS1
Adding multiple cars to the vehicle profile page is easy.. But it would only be possible to sort by one car on the timeslips page.

To add a field for another car just go to your admincp, add a new custom profile field for the extra vehicle, make a note of the field ID, then in member.php, includes/functions_user.php, and profile.php find all instances of this:
Code:

(50,51,52,53,54,55,56,58,59,60,61,62,63,64,65)
and add the field ID for your extra vehicle field to it.

So we can add a second vehicle to the profile, but can not add a second timeslip?

EvilLS1 04-08-2004 04:25 AM

Quote:

Originally Posted by Gt-358
So we can add a second vehicle to the profile, but can not add a second timeslip?

Exactly.

Dsmed 04-11-2004 01:02 AM

would this work with my forum running on php4 extensions?

thanks
-Brian

EvilLS1 04-11-2004 01:46 AM

Quote:

Originally Posted by Dsmed
would this work with my forum running on php4 extensions?

thanks
-Brian

Yep, it should. Just change all of the extensions to php4. Look through the templates too, 'cause theres a couple of places in there that will need to be changed.

Dsmed 04-11-2004 02:55 AM

well its all up and working now (somewhat) but it doesnt seem to save the data you enter

any idea what i could have missed or done wrong?

i tried this already
https://vborg.vbsupport.ru/showpost....&postcount=111

http://www.highertuning.com/forums/timeslips.php4?

Dsmed 04-11-2004 03:01 AM

oh,

in the top 5 hack you posted up, i cant find a couple of things you mentioned..

"In the $templatesused section"

and

"eval("dooutput(\"".gettemplate('index')."\"); ");"

thanks for the help

-Brian

EvilLS1 04-11-2004 03:05 AM

Quote:

Originally Posted by Dsmed
well its all up and working now (somewhat) but it doesnt seem to save the data you enter

any idea what i could have missed or done wrong?

http://www.highertuning.com/forums/timeslips.php4?

I think you either forgot to add or mis-spelled the name of your timeslipsbit template. Make sure its spelled timeslipsbit and not timeslipbit.

As for the top 5 addon, thats for VB2 and will not work with VB3 portals.

EvilLS1 04-11-2004 03:09 AM

Brian,
Its working fine. I just entered my data and its there.

Keep in mind that the default sort method is 1/4 mile ET and will only display users who have entered something into that field.

Dsmed 04-11-2004 03:09 AM

Quote:

Originally Posted by EvilLS1
I think you either forgot to add or mis-spelled the name of your timeslipsbit template. Make sure its spelled timeslipsbit and not timeslipbit..


just checked and it is spelled correctly, it works on my test forum just fine which is just a php extension, so i must of messed something up in the conversion..
Quote:

Originally Posted by EvilLS1
As for the top 5 addon, thats for VB2 and will not work with VB3 portals.

LOL well that explains alot! thanks you tons for your quick reply's

-Brian

Dsmed 04-11-2004 03:10 AM

Quote:

Originally Posted by EvilLS1
Brian,
Its working fine. I just entered my data and its there.

Keep in mind that the default sort method is 1/4 mile ET and will only display users who have entered something into that field.


maybe it just needed your touch? LOL seems to be working fine now

thanks a ton!

EvilLS1 04-11-2004 03:13 AM

Alrgihty, glad its working for ya now. :)

White Knight 04-12-2004 01:13 AM

Nice work. I accually customized it for my Sportbike website. Had to change a few things in the database and code but otherwise the setup is the same.. Mostly the detail information needed to be suited for sportbikes but after i found out where your installed put the entries it was pretty simple. Thanks for sharing!

EvilLS1 04-12-2004 02:13 AM

Quote:

Originally Posted by White Knight
Nice work. I accually customized it for my Sportbike website. Had to change a few things in the database and code but otherwise the setup is the same.. Mostly the detail information needed to be suited for sportbikes but after i found out where your installed put the entries it was pretty simple. Thanks for sharing!

Thanks. Nice to see that its useful for the two wheeled bunch aswell. :)

I guess I should mention (for everyone else who hasn't noticed) that all of the fields can be easily edited or customized in the admincp under custom profile fields once the hack is installed.

VBDev 04-14-2004 11:45 AM

I've installed this for someone but there are small bugs in timeslips.php file

You need to rename tables name in your query coz if there is a prefix, the table's name will not be correct

Replace

PHP Code:

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

with

PHP Code:

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


And

PHP Code:

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


with :

PHP Code:

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

Now corrected and it works fine :)

EvilLS1 04-14-2004 08:35 PM

Good catch VBDev. Thanks. :) I'll change that in the next update. That didn't even cross my mind. I never paid much attention to the table prefix stuff b/c I don't use them.

SVTBlackLight01 04-16-2004 05:29 PM

I searched the thread, but didn't see this question. How hard would it be to display the user's rank by ET in the postbit?

EvilLS1 04-16-2004 09:04 PM

Quote:

Originally Posted by SVTBlackLight01
I searched the thread, but didn't see this question. How hard would it be to display the user's rank by ET in the postbit?

That would be really easy. Take a look at this post:
https://vborg.vbsupport.ru/showpost....4&postcount=76

That shows the user's ET club in the postbit, but it would be really simple to change it so that it displays a rank image based on the ET. All you would need to do is change what the variable displays to an image instead of showing the club. For example:

If the member has a 10 second car,

$poop = "<img src=\"rankimage1.jpg\">";

else if the member has an 11 second car show:

$poop = "<img src=\"rankimage2.jpg\">";

etc, etc.

SVTOA 04-16-2004 09:43 PM

Has anyone installed this with 3.0.1 yet? Any issues?

SVTBlackLight01 04-16-2004 09:59 PM

Thanks for pointing out that post. That gives me a few ideas I might try. What I was thinking of though was having something like this in the postbit.

Join Date: Nov 2002
Location: Houston, TX
Age: XX
Posts: 1247

Best Time: 12.984@104.39
Ranked: #8

using their placement on the the timeslips list sorted by ET.

(I'm liking the rank image thing though :D )

EvilLS1 04-16-2004 10:14 PM

Quote:

Originally Posted by SVTOA
Has anyone installed this with 3.0.1 yet? Any issues?

Yes, I've installed it on 3.0.1 with no problems.

SVT,
That should be fairly easy to do also. If you can't get it I'll look into it after I finish upgrading my site.

SVTBlackLight01 04-17-2004 01:23 AM

You finally decided to take the plunge huh? I can't wait to check it out.

I may be able to figure the rank issue out. I just need to spend a little more time digging through the code. Thanks!


All times are GMT. The time now is 12:49 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.03097 seconds
  • Memory Usage 1,885KB
  • 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
  • (16)bbcode_code_printable
  • (4)bbcode_php_printable
  • (21)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
  • (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