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)

Big Kahuna 01-28-2005 04:13 AM

So is it working for you now?

Silver_2000_)! 01-28-2005 04:16 AM

The avatars are appearing correctly in the forum after LS1's suggestion helped me find my screw up

Unfortunatly the avatar upload was still broke - So once again thanks to his suggestion reuploaded the unedited version of that file and the uploads worked. So encouraged by finding my own incompetence I re-applied the updated edits from the beta-3.06 file and its all working fine now...

Have to remember to not try to reapply hacks until I have poured my second cup of coffee

Once again - sorry for the fire drill ... everything is OK NOW -
Doug

EvilLS1 01-28-2005 04:36 AM

No problem Doug. Thanks for letting me know. So everything is working properly now (including uploads)?

Silver_2000_)! 01-28-2005 04:41 AM

Quote:

Originally Posted by EvilLS1
No problem Doug. Thanks for letting me know. So everything is working properly now (including uploads)?

Yep

THANKS SO much for jumping in to try to help

Your prior note helped narrow it down so I could see my errors

EvilLS1 01-28-2005 04:50 AM

Quote:

Originally Posted by Silver_2000_)!
Yep

THANKS SO much for jumping in to try to help

Your prior note helped narrow it down so I could see my errors

Great! :) Glad to hear that all is good b/c now I don't have to install a test forum (I'm lazy). :p

I'll leave the 3.0.6 version tagged as BETA until a couple more people confirm a successful installation (just in-case we've overlooked something).


Dewayne

Big Kahuna 01-30-2005 12:47 AM

I'm testing the 3.0.6 version on my test forum and it appears to be working fine. I'll give a link to the live forum once it is installed there. I think the 3.0.6 people will not have a problem. All went very smooth.

I'd like to be able to display the TOP 10 CONFIRMED (ticket submitted) in my forum index. Any chance of getting a bone rolled to me on the code required?

Big Kahuna 01-30-2005 12:55 AM

Quote:

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

What change would I need to make to add the condition of only including those that submitted the proof?

EvilLS1 01-30-2005 01:29 AM

Quote:

Originally Posted by Big Kahuna
I'm testing the 3.0.6 version on my test forum and it appears to be working fine. I'll give a link to the live forum once it is installed there. I think the 3.0.6 people will not have a problem. All went very smooth.

I'd like to be able to display the TOP 10 CONFIRMED (ticket submitted) in my forum index. Any chance of getting a bone rolled to me on the code required?



Well, I've never tried it but it should be just as easy to add the top 10 confirmed to your forum index.

Try this..

In forums/index.php find:
Code:


        'forumhome_pmloggedin',

replace it with:
Code:

        'forumhome_pmloggedin',
        'times',
        'toptimes',


find:
Code:

// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###

above it add:
Code:

// Top Times add-on
$pos = 0;
$condition.=" AND (userfield.field57!='' OR customtimeslippic.dateline!='') AND userfield.field55>0";

$users=$DB_site->query("SELECT *
                          FROM " . TABLE_PREFIX . "user AS user, " . TABLE_PREFIX . "userfield AS userfield
                          LEFT JOIN " . TABLE_PREFIX . "customtimeslippic AS customtimeslippic ON (customtimeslippic.userid = user.userid)
                          WHERE user.userid = userfield.userid
                          $condition 
                          ORDER BY userfield.field55 ASC
                          LIMIT 10");

// Set up vars
while ($userinfo=$DB_site->fetch_array($users)) {
$tdateline = $userinfo[dateline];
$pos++;
$rank= number_format($pos);
$TDusername= $userinfo[username];
$ride= $userinfo[field50];
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="";
}
$userinfo[field57] = trim($userinfo[field57]);
    if ($userinfo[field57]!="")
      {
          $slip="<a href=\"$userinfo[field57]\" target=\"_blank\"><img src=\"$stylevar[imgdir_misc]//slipicon.gif\"  border=0></a>";
      }
      else
      {
          $slip="";
      }
              eval('$times .= "' . fetch_template('times') . '";');
}  // end while
              eval('$toptimes .= "' . fetch_template('toptimes') . '";');



Create a new template named "toptimes" and add the HTML below:
Code:


                <table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr id="cat">
        <td colspan="6" class="tcat" width="100%"><span class="smallfont"><b>?Top 10 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>
        <td class="alt2" align="center"><span class="smallfont"><b>Slip</b></span></td>
</tr>
$times
<tr>
        <td class="tcat" colspan="6"><span class="smallfont"><CENTER>[<a href=$vboptions[bburl]/timeslips.php>Click here to view the complete list</a>]</CENTER></span></td>
</tr>
</table>
<br />


Create a new template named "times" and add the HTML below:
Code:

<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>
<td class="alt1"><if condition="$tdateline!=''">
<a href="image.php?u=$userinfo[userid]&amp;type=timeslip&amp;dateline=$tdateline" target="_blank"><img src="$stylevar[imgdir_misc]/slipicon.gif" border=0></a>
<else />
$slip
</if></td>
</tr>

Then in your forumhome template put $toptimes where ever you want the Top 10 ETs module to show up.


I haven't tested this but it should work.


Dewayne

Big Kahuna 01-30-2005 01:58 PM

Dude -- you is Da man!

I'll play with that in my test forum this afternoon.

Big Kahuna 01-30-2005 04:30 PM

Almost there -- but not quite

I did everything as instructed -- tried twice to make sure -- and I can get the form built on the index page, but no data in it. I have ten test records in the time slip data base (which displays properly on the complete list page) -- three of which have timeslips loaded. It appears to be something in the search for qualifying records criterea. I'm strickly a cut and paster in php and not capable of understanding why the correct records were not selected for the form on the index page.

Any help will be appreciated

Thanx

BK

Big Kahuna 01-30-2005 04:55 PM

MY BAD -- very stupid mistake on my part. I created a templates called Times instead of times.

Works

Thanx

EvilLS1 01-30-2005 05:11 PM

Quote:

Originally Posted by Big Kahuna
MY BAD -- very stupid mistake on my part. I created a templates called Times instead of times.

Works

Thanx

Glad it worked for ya.

BTW, I was just checking out your site .. Thats a nice group of Mopars in your sig. I love the red road runner! :up:

Limey-YMR 01-30-2005 05:45 PM

I've been running 3.06 since it was first released and this hack just kept on chugging, when I put it back into the changed files.

Big Kahuna 01-30-2005 06:51 PM

I have it live now at www.moparstyle.com and credit you on the footer of each page.

Thanx for the comment on the Red Road Runner -- it is 8.95 on the bottle that I'm selling. I race www.texasblackmagic.com which just got a 540 dropped in it. I also race www.rudedodge.com in Nostalgia Super Stock and building www.texaswhale.com for next year. My 16-year-old was the National Points Champ in 2004 for Nostalgia Muscle Car in www.eldiabloblanco.com and my daughter starts racing a low 12-second Aspen this year.

On that Top 10 Confirmed on the Index page - how could I have a condition where the member also has to have a 100 posts? I already see people from other sites signing up just to be in the Top 10 -- but have no intention of becoming an active member?

Dave

EvilLS1 01-30-2005 07:28 PM

Quote:

Originally Posted by Big Kahuna
I have it live now at www.moparstyle.com and credit you on the footer of each page.

Thanx for the comment on the Red Road Runner -- it is 8.95 on the bottle that I'm selling. I race www.texasblackmagic.com which just got a 540 dropped in it. I also race www.rudedodge.com in Nostalgia Super Stock and building www.texaswhale.com for next year. My 16-year-old was the National Points Champ in 2004 for Nostalgia Muscle Car in www.eldiabloblanco.com and my daughter starts racing a low 12-second Aspen this year.

On that Top 10 Confirmed on the Index page - how could I have a condition where the member also has to have a 100 posts? I already see people from other sites signing up just to be in the Top 10 -- but have no intention of becoming an active member?

Dave

Dave,
Those are some very impressive cars! A member of my site who calls himself "The OLE MAN" has built a few quick Mopars including an 8 second B-Body drag car and a SB 72 Demon. I'll have to tell him about moparstyle.com. He may already be registered there.

To limit the top ten list to members with more than 100 posts try this..

In the code you added to forums/index.php find:
Code:

$condition.=" AND (userfield.field57!='' OR customtimeslippic.dateline!='') AND userfield.field55>0";
Replace it with:
Code:

$condition.=" AND (userfield.field57!='' OR customtimeslippic.dateline!='') AND userfield.field55>0 AND user.posts>100";
That should do it.

Thanks for the credits btw.

Dewayne

Big Kahuna 01-31-2005 04:12 PM

Thanx again Dewayne

zurih 01-31-2005 05:15 PM

How can I make some of the fields to be *Required* to sumbit your timeslip???

EvilLS1 01-31-2005 09:38 PM

Quote:

Originally Posted by zurih
How can I make some of the fields to be *Required* to sumbit your timeslip???


You can do that with javascript in your modifytimeslip template..

For example, if you wanted to require field 50 you could do it like this:

In the modifytimeslip template find (two places):
Code:

<script language="javascript">
<!--
function validate(theform) {

Below both instances add this:
Code:


        if (theform.field50.value=="") {
                alert("You have not filled in one or more required fields. Please add all required information and try again.");
                return false; }

The users will get a javascript alert when they submit the form if a required field is missing.

zurih 02-01-2005 04:16 PM

hmmm... not working

Added the lines and nothing... no error

EvilLS1 02-01-2005 07:59 PM

Quote:

Originally Posted by zurih
hmmm... not working

Added the lines and nothing... no error

Are you using v2.1?

zurih 02-01-2005 08:19 PM

yes using v2.1. installed a few days ago..

Is the script working with *select* field type?
because thats what I'm using...
maybe thats the problem?!

thanks

EvilLS1 02-01-2005 08:25 PM

Quote:

Originally Posted by zurih
yes using v2.1. installed a few days ago..

Is the script working with *select* field type?
because thats what I'm using...
maybe thats the problem?!

thanks

What is the default value and field ID for your select field?

zurih 02-02-2005 06:09 AM

default value = none
field ID = 50

I changed a bit the names and properties of the fields..

Also, with the script inside the template, I'm getting in the status bar in IE "Done.. but with errors.."

EvilLS1 02-03-2005 12:11 AM

Quote:

Originally Posted by zurih
default value = none
field ID = 50

I changed a bit the names and properties of the fields..

Ok, if the field ID is 50, the field type is "select", and the default value is blank the following code will work (tested it on my forum).


In the modifytimeslip template find (two places):
Code:

<script language="javascript">
<!--
function validate(theform) {

Below both instances add this:
Code:


        if (theform.field50.value=="0") {
                alert("You have not filled in one or more required fields. Please add all required information and try again.");
                return false; }


Quote:

Also, with the script inside the template, I'm getting in the status bar in IE "Done.. but with errors.."
Make sure you pasted the code correctly. You shouldn't be getting any javascript errors.

92GreenGT 02-04-2005 12:56 AM

Can you add my website to the main list of your automotive sites? Were changing servers right now but it will be back up in no time. www.fullthrottleforums.com

Thanks, love the mod.:nice:

EvilLS1 02-04-2005 03:16 AM

Quote:

Originally Posted by 92GreenGT
Can you add my website to the main list of your automotive sites? Were changing servers right now but it will be back up in no time. www.fullthrottleforums.com

Thanks, love the mod.:nice:

Done. :)

zurih 02-04-2005 08:37 AM

is it possible to add Username search?

EvilLS1 02-04-2005 08:20 PM

Quote:

Originally Posted by zurih
is it possible to add Username search?

You can already sort by username, but you'd have to use the memberlist to actually search for them.

tealv6 02-09-2005 09:43 AM

Just installed a fresh copy of 3.0.6 and trying to get VBtime 2.1 installed. It's there and working... just not showing in the main menu.... If you have any suggestions as to what I'm doing wrong... (and I know I am, new to php) that would be great so I can get my normal board moved over soon.

PHP Code:

<!-- nav buttons bar -->
<
div align="center">
    <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
    <
tr align="center">    
        <!--<
td class="vbmenu_control"><a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a></td>-->
        
        <if 
condition="$show['member']">
            <
td class="vbmenu_control"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a></td>
        </if>
        <if 
condition="$show['registerbutton']">
            <
td class="vbmenu_control"><a href="register.php?$session[sessionurl]">$vbphrase[register]</a></td>
        </if>
        <
td class="vbmenu_control"><a href="faq.php?$session[sessionurl]accesskey="5">$vbphrase[faq]</a></td>
        <
td class="vbmenu_control"><a href="memberlist.php?$session[sessionurl]">$vbphrase[members_list]</a></td>
        <
td class="vbmenu_control"><a href="timeslips.php?$session[sessionurl]">$vbphrase[timeslips]</a></td>
        <
td class="vbmenu_control"><a href="calendar.php?$session[sessionurl]">$vbphrase[calendar]</a></td>
        <if 
condition="$show['popups']">        
            <if 
condition="$show['searchbuttons']">
                <if 
condition="$show['member']"

Site is http://camarov6.com/forums/index.php?

Thank you too!! It's a great product
Steve

EvilLS1 02-09-2005 08:28 PM

Steve,
Check to make sure that you added the phrase for timeslips.

Varname: timeslips
Text: Timeslips

tealv6 02-09-2005 09:22 PM

Ok... I feel like an a$$... I knew that many hours of looking at code would rot my brain.

Thank you for enlightening me!!! On to the next hack :nervous:

Steve

zurih 02-10-2005 08:51 PM

is it possible to make "modifytimeslip" template to be recognized as an individual? I want to make an if condition with define('THIS_SCRIPT', 'xxxx');

how can I do this with modifytimeslip?

thanks

EvilLS1 02-10-2005 10:41 PM

Quote:

Originally Posted by zurih
is it possible to make "modifytimeslip" template to be recognized as an individual? I want to make an if condition with define('THIS_SCRIPT', 'xxxx');

how can I do this with modifytimeslip?

thanks

I think you could do it like this:

in profile.php find:
Code:

define('THIS_SCRIPT', 'profile');
Replace it with:
Code:


if ($_REQUEST['do'] == 'edittimeslip')
{
define('THIS_SCRIPT', 'modifytimeslip');
}
else
{
define('THIS_SCRIPT', 'profile');
}

If that doesn't work you could try something like this in your template conditional:
Code:

<if condition="$templatename == 'modifytimeslip'">
I haven't tried either of those but I think it'll work.

zurih 02-11-2005 08:50 AM

thanks! it works
I used the first way :)

Protoman 02-16-2005 10:30 PM

installed.
would there be a way to add a dyno chart upload to the timeslips display?

I'd be willing to loose the 'Induction' Column to make room for it

EvilLS1 02-16-2005 11:10 PM

Quote:

Originally Posted by corollasbest
installed.
would there be a way to add a dyno chart upload to the timeslips display?

I'd be willing to loose the 'Induction' Column to make room for it

Its possible but will require alot of code edits to add that feature. I may add something like that in v2.2 but it'll be a while.

Protoman 02-16-2005 11:46 PM

I can wait.. thanks, love the mod even as-is.

wynode 02-22-2005 07:40 AM

I'm having a problem with the condition for uploading a timeslip.

I presently have the Require a Timeslip variable set to 13.95, however there seems to be a bit of a flaw when entering say a value quicker than that for the 1/4mile ET

For example, I just tested it using a value of 9 seconds for the 1/4mile ET and the pop up box didn't come up asking for a timeslip.

I then edited the same entry and put a value of 13 and then the dialogue box came up!

Any reason why?

PS: This is a great mod......and the install went fine :)

URL is --> http://www.ozhonda.com/forum

Thanks!

EvilLS1 02-22-2005 09:52 PM

wynode,
Thats a bug in my javascript code. Thanks for pointing it out to me.

To fix it, in your modifytimeslip template find this:
Code:

<if condition="$vboptions[allowtimeslipupload]">
<script language="javascript">
<!--

function validate(theform) {

        if ((theform.field55.value<='$vboptions[tdsliprequired]') && (theform.field55.value>0) && (theform.upload.value=="") && (theform.timeslipdateline.value=="")) {
                alert("An uploaded copy of your timeslip is required if your 1/4 mile ET is $vboptions[tdsliprequired] or quicker.");
                return false; }
}
//-->
</script>

<else />
<script language="javascript">
<!--
function validate(theform) {
        if ((theform.field55.value<='$vboptions[tdsliprequired]') && (theform.field55.value>0) && (theform.field57.value=="")) {
                alert("A link to your timeslip is required if your 1/4 mile ET is $vboptions[tdsliprequired] or quicker.");
                return false; }
}
//-->
</script>
</if>

And replace it with this:
Code:

<if condition="$vboptions[allowtimeslipupload]">
<script language="javascript">
<!--

function validate(theform) {

        if ((theform.field55.value<=$vboptions[tdsliprequired]) && (theform.field55.value>0) && (theform.upload.value=="") && (theform.timeslipdateline.value=="")) {
                alert("An uploaded copy of your timeslip is required if your 1/4 mile ET is $vboptions[tdsliprequired] or quicker.");
                return false; }
}
//-->
</script>

<else />
<script language="javascript">
<!--
function validate(theform) {
        if ((theform.field55.value<=$vboptions[tdsliprequired]) && (theform.field55.value>0) && (theform.field57.value=="")) {
                alert("A link to your timeslip is required if your 1/4 mile ET is $vboptions[tdsliprequired] or quicker.");
                return false; }
}
//-->
</script>
</if>


The instructions have been updated.

wynode 02-22-2005 11:22 PM

Thanks for fixing that up EvilLS1 !!

I'm surprised nobody picked it up (actually I didn't either, another member did and pointed it out to me)

Great work and thanks for adding my site to your list! :)

-Win


All times are GMT. The time now is 09:26 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.02217 seconds
  • Memory Usage 1,895KB
  • 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
  • (1)bbcode_php_printable
  • (15)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