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-05-2004 11:59 AM

Quote:

Originally Posted by Limey-YMR
Great Hack, Thanks

Can you add our link?

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

Thank you. :) Link added.

Limey-YMR 08-05-2004 11:28 PM

I found that people with 9 second 1/4 mile ETs were last, so I added a 0 making it two digits, all good now, same with people that have under 100 WHP (eek!) had to add a 0 there too.

a previous admin added V1 of this mod to our board and it looked like he never finished, though we had profile fields up to 57, I stripped out some of the Table Inserts from the install script and it took all of the old data fine, will this cause any problems down the road?

I still have the "post a link to the timeslip" instead of the upload function with radio buttons too as pictured, do you have a tip for what I should check to bring it up to date as a full upload function a la V2.1 ?
If you want to say fahgedddaboutit for hacking the installer on your hack, and making a frankenstein, no worries ;) - just wanted to retain the old submit data.
cheers

EvilLS1 08-05-2004 11:50 PM

Limey,
The reason your fields aren't sorting correctly is b/c somehow your timeslip fields got set to text or varchar instead of decimal. Probably happened when you upgraded your vB. Use phpmyadmin to edit all of the number fields so that they're set to DECIMAL again and they'll sort correctly without having to add the zero in front of single digit car's ET.

As for updating and still using the old VB2 timeslip fields I tried that on my own site and got frustrated with it. I just had my members re-enter their times. Since you only have a couple of pages listed I'd just remove the old fields and re-install it if I were you. Removing the old fields and reinstalling will also set your timeslip & hp fields back to decimal and it'll sort like its supposed to.

Dewayne

SVTBlackLight01 08-07-2004 10:44 PM

Dewayne,

I finally got around to upgrading from vB2 and added the timeslip database last night. I even managed to preserve all the info (It took a few tries).

http://www.modernengineuity.com/forums/timeslips.php

Good job on a great hack! :up:

EvilLS1 08-07-2004 10:53 PM

Thanks SVT. Looks great! :)

0ptima 08-08-2004 06:21 PM

Dewayne,

When Im in the admin CP and edit a users profile, I get duplicate user profile fields. The "Can edit Vehicle Profile?" is a custom profile field(ID 6) which I added in 2002. Im running vb 303 and the latest timeslip hack. Thanks.

EvilLS1 08-08-2004 07:29 PM

Optima,
That is very strange. In the admincp under custom profile fields does it also show duplicate fields for this hack? If so, can you tell me which field IDs it has? You should only have fields 50-65. Also, in admincp/user.php make sure that this code was added in the correct place and also make sure its only in there once:
Code:

print_yes_no_row($vbphrase['can_edit_vehicle_profile'], 'tdban',$user[tdban]);
print_yes_no_row('Delete Uploaded Timeslip?', 'deleteslip',0);


0ptima 08-08-2004 07:51 PM

Dewayne.

Thanks for the quick response, I found the problem

I had this:
Code:

while ($profilefield = $DB_site->fetch_array($profilefields))
{
                print_profilefield_row($profilefield, $userfield);
                print_yes_no_row($vbphrase['can_edit_vehicle_profile'], 'tdban',$user[tdban]);
                print_yes_no_row('Delete Uploaded Timeslip?', 'deleteslip',0);
}


EvilLS1 08-08-2004 07:59 PM

N/P Optima. Glad its working correctly for you now.

Limey-YMR 08-09-2004 04:16 AM

Quote:

Originally Posted by EvilLS1
Limey,
The reason your fields aren't sorting correctly is b/c somehow your timeslip fields got set to text or varchar instead of decimal. Probably happened when you upgraded your vB. Use phpmyadmin to edit all of the number fields so that they're set to DECIMAL again and they'll sort correctly without having to add the zero in front of single digit car's ET.

Dewayne

It was MediumText - I tried Decimal and it rounded everything up before the decimal point (and scrapped the decimal point), do you know what the parameters would be for decimal to retain a decimal point, the two chars after it, and to suggest a 0.00 default value in phpmyadmin?
cheers.
Mark

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

joeychgo 09-06-2004 12:42 AM

SVT - have you looked at vbAdvanced CMPS system?

You might want to consider it

SVTBlackLight01 09-06-2004 12:46 AM

I have been considering it, but I have hacked up vbindex quite a bit. I'll probably still switch over before too long.

joeychgo 09-06-2004 12:48 AM

I can tell you its VERY easy to use - and real sweet for adding extra pages with all custom content.

Im still a newbie, and ive done alot with it.

SVTBlackLight01 09-06-2004 12:53 AM

I'm actually using it on another part of my site. :) I could just use more of the features on my front page.

http://www.modernengineuity.com/articles.mod

EvilLS1 09-06-2004 01:16 AM

Y/W Joey. :)

SVT,

Ah, I see.. I thought you were talking about CMPS.

Anyway, at the bottom of your file: shouldn't this:...
Code:

    eval('$times .= "' . fetch_template('vbindex_times') . '";');
    eval('print_output("' . fetch_template('vbindex_toptimes') . '");');
}
?>

..be changed to this?
Code:

    eval('$times .= "' . fetch_template('vbindex_times') . '";');
}
    eval('print_output("' . fetch_template('vbindex_toptimes') . '");');
?>

Later,
Dewayne

SVTBlackLight01 09-06-2004 01:42 AM

Yep. That fixed it. :D Thanks!

EvilLS1 09-06-2004 01:50 AM

N/P.

Are ya gonna post your add-on for others who use vbindex? I'm sure it'll be requested sooner or later. :)

SVTBlackLight01 09-06-2004 02:41 AM

OK. Here are the instructions and an updated file for displaying the top 5 timeslips in vBindex.

EvilLS1 09-06-2004 02:59 AM

Thanks for sharing. :)

Added a link to your instructions in the first post.

Limey-YMR 09-07-2004 04:07 AM

I have a quick question, I have the 1/4 Mile ET in the postbit_legacy, but I'd like to have it show an 1/8 Mile E/T for users that haven't yet run the 1320

I spent several hours trying to figure it out figuring it would be some kind of else variable before the /if statement.

here's what I've got
PHP Code:

<div><if condition="$post[field55]>0">
<
span class="smallfont"><strong>1/4 Mile ET:</strong$post[field55]</span>
<elseif 
condition="$post[field53]>0"><span class="smallfont"><strong>1/8 Mile ET:</strong$post[field53]</span>
</if></
div

Can someone be as kind as to tell me the correct syntax to display field 53 if field 55 is nul, right now it displays both when 1/4 mile is present and none if 1/4 mile is not.
cheers.
Mark

EvilLS1 09-07-2004 05:30 AM

Limey,
This should do it:
Code:

<if condition="$post[field55]>0">
<div><span class="smallfont"><strong>1/4 Mile ET:</strong> $post[field55]</span></div>
</if>
<if condition="$post[field53]>0 AND $post[field55]==0">
<div><span class="smallfont"><strong>1/8 Mile ET:</strong> $post[field53]</span>  </div>
</if>


Limey-YMR 09-08-2004 04:10 AM

Quote:

Originally Posted by EvilLS1
Limey,
This should do it:

You are the man!
Cheers - worked like a charm, the sad thing is it makes sense now I see it! I wanted an AND and an absolute, not else if, darn logic gates!

integra99 09-08-2004 04:18 AM

Quote:

Originally Posted by Limey-YMR
You are the man!
Cheers - worked like a charm, the sad thing is it makes sense now I see it! I wanted an AND and an absolute, not else if, darn logic gates!

I think it would be nice to have customizable fields, as well as turn off some fields. Instead, I just added and removed fields as I chose. I added in a mod list field for large amounts of text that parses bbcode, made a dropdown menu for year and model selection, added a Sponsored drop down selection, and a few other small items.

94supratt 09-09-2004 02:39 AM

Trying to install on 3.0 I don't find any of the text I am supposed to edit in the image.php file.

EvilLS1 09-09-2004 02:42 AM

Quote:

Originally Posted by 94supratt
Trying to install on 3.0 I don't find any of the text I am supposed to edit in the image.php file.

3.0.what?

EvilLS1 09-09-2004 02:53 AM

In an unhacked image.php the first edit starts around line 41. The second (last) edit is around line 185.

94supratt 09-09-2004 03:01 AM

Quote:

Originally Posted by EvilLS1
3.0.what?

3.0.0

EvilLS1 09-09-2004 03:05 AM

Quote:

Originally Posted by 94supratt
3.0.0

In 3.0.0 its line 41 & 185.

If you still can't find it you can email your image.php file and I'll add the code for you. webmaster@modernmusclecars.net

94supratt 09-09-2004 03:08 AM

This is my lines 40-50


Quote:

/*
NOTE:
for use in imagecategory table:
imagetype = 1 => avatar
imagetype = 2 => icon
imagetype = 3 => smilie
*/

// make sure we are dealing with avatars,smilies or icons
globalize($_REQUEST, array('table' => STR));
switch($table)
and 180-190

Quote:

}

$DB_site->query("DELETE FROM " . TABLE_PREFIX . "imagecategorypermission WHERE imagecategoryid=$imagecategoryid");

foreach($iperm AS $usergroupid => $canuse)
{
if ($canuse == 0)
{
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "imagecategorypermission (imagecategoryid,usergroupid) VALUES ($imagecategoryid,$usergroupid)");
}
}

94supratt 09-09-2004 03:10 AM

email sent


All times are GMT. The time now is 10:51 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.01605 seconds
  • Memory Usage 1,867KB
  • 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
  • (8)bbcode_code_printable
  • (2)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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