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 08-09-2004 10:52 AM

Mark,
Just upload this file to your admincp directory and run it:
https://vborg.vbsupport.ru/attachmen...chmentid=19550

This will set the fields to decimal with the correct parameters for you.

Limey-YMR 08-11-2004 12:48 AM

Quote:

Originally Posted by EvilLS1
Mark,
Just upload this file to your admincp directory and run it:
https://vborg.vbsupport.ru/attachmen...chmentid=19550

This will set the fields to decimal with the correct parameters for you.

Thanks a lot! that worked like a charm.
thankfully I only have two nine second cars on the board, so removing the zeros will be trivial :)

EvilLS1 08-11-2004 11:51 AM

Quote:

Originally Posted by Limey-YMR
Thanks a lot! that worked like a charm.
thankfully I only have two nine second cars on the board, so removing the zeros will be trivial :)

Cool, glad ya got it worked out. At least you have a couple of single digit cars on your site. I think the quickest car @ my forum is 10.70something. Theres a few members who have single digit cars but they haven't bothered to put their times in the database for whatever reason.

coolmody 09-05-2004 10:47 PM

Hey guys,

Not sure if anyone has done this yet, but I modified it to work with vBAdvanced CMPS. Most of the work was done by EvilS1. He was just missing a line at the end which should get it to work.

Code:

Instructions:

1. Upload this NEW toptimes.php file to your modules directory

2. Create a new template named "adv_portal_toptimes" and add the HTML below:

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr id="cat">
        <td colspan="5" class="tcat" width="100%"><span class="smallfont"><b>?Top Five 1/4 Mile ETs</b></span></td>
</tr>
<tr>
<td class="alt2" align="center"><span class="smallfont"><b>#</b></span></td>
<td class="alt2" align="center"><span class="smallfont"><b>Username</b></span></td>
<td class="alt2" align="center"><span class="smallfont"><b>Ride</b></span></td>
<td class="alt2" align="center"><span class="smallfont"><b>60'</b></span></td>
        <td class="alt2" align="center"><span class="smallfont"><b>1/4 Mile ET &MPH </b></span></td>
</tr>
$times
</tr>
        <td class="tcat" colspan="5"><span class="smallfont"><CENTER>[<a href=$vboptions[bburl]/timeslips.php>Click here to view the complete list</a>]</CENTER></span></td>
</tr>
</table>
<br />

3. Create a new template named "adv_portal_times" and add the HTML below:

<tr>
<td class="alt1" align="center"><span class="smallfont">$rank</span></td>
<td class="alt1" align="center"><span class="smallfont"><a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$userinfo[userid]">$TDusername</a></span></td>
<td class="alt1" align="center"><span class="smallfont">$ride</span></td>
<td class="alt1" align="center"><span class="smallfont">$sixty</span></td>
<td class="alt1" align="center"><span class="smallfont">$quarter$atmph2$quartermph</span></td>

4. Goto your vBa CMPS menu and select "add module".

5. Enter 'Timeslips' under Module Title.

6. Leave Module Identifier blank (unless you don't want to).

7. Use toptimes.php as your File to Include.

8. Make Active.

9. Put it in the Center Column.

10. Put whichever order you like.

11. Leave templates used blank.

12. Click save.

Hope this works out for you guys.

I got a working demo at my site:

Albertacars.net

EvilLS1 09-05-2004 11:32 PM

Nice job coolmody! Added a link to your instructions in the first post. :)

SVTBlackLight01 09-05-2004 11:39 PM

I am trying to add this to vBindex. What needs to be changed in toptimes.php so it will work outside the modules directory?

joeychgo 09-05-2004 11:47 PM

Hey evil ---

Ive had a problem since the beginning....... I have adcolumns hack running and for some reason, the Adcolumn on the timeslips page doesnt come up on the side, it comes up below. This is the only page this happens on -- can you help?

http://www.lincolnvscadillac.com/timeslips.php

EvilLS1 09-06-2004 12:24 AM

SVT,
Did you try coolmody's version? He attached a zip file with a new toptimes.php.

Joey,
In your timeslips template find this:
Code:

</table>
</table>
<font size="1"><a href="profile.php?&do=edittimeslip">Submit your timeslip data</a></font>
</td></tr></table>

Replace it with this:
Code:

</table>
<font size="1"><a href="profile.php?&do=edittimeslip">Submit your timeslip data</a></font>
</td></tr></table>


joeychgo 09-06-2004 12:29 AM

You rock dude!

Thanks so much!

SVTBlackLight01 09-06-2004 12:40 AM

Evil,

vBindex is completely different. Basically you have to make it a stand alone file and then include it in the template.

I have it just about worked out, but it's only returning the first time. Here is what my toptimes.php looks like (the part that matters)
PHP Code:

require_once('./global.php');


$pos 0;
$users=$DB_site->query("SELECT *
                          FROM " 
TABLE_PREFIX "user AS user, " TABLE_PREFIX "userfield AS userfield
                          WHERE user.userid = userfield.userid
                          AND userfield.field55>0
                          ORDER BY userfield.field55 ASC
                          LIMIT 5"
);

// Set up vars
while($userinfo=$DB_site->fetch_array($users)) {
    
$pos++;
    
$ranknumber_format($pos);
    
$TDusername$userinfo[username];
    
$year$userinfo[field5];
    
$model$userinfo[field8];
    
$trim$userinfo[field9];

    if(
$userinfo[field52] > 0) {
        
$sixty$userinfo[field52];
        }
    else {
        
$sixty="";
        }

    if(
$userinfo[field55] > 0) {
        
$quarter$userinfo[field55];
        }
    else {
        
$quarter="";
        }

    if(
$userinfo[field56] > 0) {
        
$atmph2="@";
        }
    else {
        
$atmph2="";
        }

    if(
$userinfo[field56] > 0) {
        
$quartermph$userinfo[field56];
        }
    else {
        
$quartermph="";
    }
    eval(
'$times .= "' fetch_template('vbindex_times') . '";');
    eval(
'print_output("' fetch_template('vbindex_toptimes') . '");');
}
?> 

You can see it on my site: http://www.modernengineuity.com


All times are GMT. The time now is 05: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.01461 seconds
  • Memory Usage 1,766KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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