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)

Grant Sherwood 09-22-2004 10:40 AM

Ok, i have another question. Alot of members use n2o so they have both N/A and P/A times. Is there a way I can make it where it show's both if they have it? Also, when i try and sort them by N/A, and Usernames yours is the only one that shows up.

EvilLS1 09-22-2004 07:50 PM

Quote:

Ok, i have another question. Alot of members use n2o so they have both N/A and P/A times. Is there a way I can make it where it show's both if they have it?
Its not possible to sort by more that one ET at a time so they would just have to choose one or the other.

Quote:

Also, when i try and sort them by N/A, and Usernames yours is the only one that shows up.
Thats because its sorting N/A 1/4 mile times. Everything is based on 1/4 mile times by default because thats the most popular track length when people discuss drag racing. So when you click "Show N/A cars only" the query selects all members who are N/A and orders by 1/4 mile ET. It has to order by something or else you would just have a mixed list of users not ranked in any specific order.

If you want it to sort N/A cars by 1/8 mile ET instead do this..

In timeslips.php find:
Code:

    else if ($_REQUEST['do'] == 'na')
  {
        $condition.=" AND userfield.field65='$natasp' AND userfield.field55>0";
        $cond.=" WHERE userfield.field65='$natasp' AND userfield.field55>0";
        $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.field53>0";
        $cond.=" WHERE userfield.field65='$natasp' AND userfield.field53>0";
        $orderby="userfield.field53";
        $direction=ASC;
        $bracket13="<b>[</b>";
        $bracket14="<b>]</b>";
  }


zer026 10-03-2004 03:34 AM

What would be the conditional statement to display a link to a users uploaded
timeslip(just the timeslip not the full "details" page) if they have submitted one from in their vbgarage?

or,
link to the users full "details" page(if they have submitted timeslip data)?

EvilLS1 10-03-2004 04:27 AM

Quote:

Originally Posted by zer026
What would be the conditional statement to display a link to a users uploaded
timeslip(just the timeslip not the full "details" page) if they have submitted one from in their vbgarage?

or,
link to the users full "details" page(if they have submitted timeslip data)?


Adding a link to the details page is easy. Just use a conditional to check if the user has entered something in the 1/4 mile ET field like this:

Code:

<if condition="$user[field55] >0">
<a href="member.php?$session[sessionurl]&do=vehicledetails&userid=$id">Timeslip Details</a>
</if>


As for adding a link to the timeslip itself, I believe that would require adding a query to vbgarage.php in order to get the dateline.

I didn't test this but it should work:

In vbgarage.php find:
Code:

    eval('$commentbits .= "' . fetch_template('vbgarage_commentbits') . '";');
        }

Below it add:
Code:

  $timeslip=$DB_site->query("SELECT dateline
                          FROM " . TABLE_PREFIX . "customtimeslippic WHERE userid = $id LIMIT 1
        ");
    $result_timeslip = $DB_site->fetch_Array($timeslip);
    $tdateline = $result_timeslip[dateline];

Then put this somewhere in your vbgarage_viewgarage template:
Code:

<if condition="$tdateline!=''">
<a href="image.php?u=$id&amp;type=timeslip&amp;dateline=$tdateline" target="_blank">View Timeslip <img src="$stylevar[imgdir_misc]/slipicon.gif" border=0></a>
</if>


zer026 10-03-2004 05:12 AM

Both of your answers worked perfectly! I also must say that was just about the quickest response known to mankind! Your help is massively appreciated.

zer026 10-03-2004 07:43 AM

When the timeslip input page loads in the userscp, it loads with the usercp menu on the lefthand side. How do I remove the usercp menu when it loads, i.e, just the timeslip edit vehicle profile section loads under the navbar, no lefthand side menu. I know this may sound odd but I would like timeslip usercp section to look uniform with the vbgarage usercp section since I have them linking to each other. Personally I like the lefthand side menu for all the cp sections however vbgarage doesn't incorporate it and there's probably little chance of me contacting magnus as to how to add it.

Any help would once again be greatly appreciated.

EvilLS1 10-03-2004 08:31 PM

Quote:

Originally Posted by zer026
When the timeslip input page loads in the userscp, it loads with the usercp menu on the lefthand side. How do I remove the usercp menu when it loads, i.e, just the timeslip edit vehicle profile section loads under the navbar, no lefthand side menu. I know this may sound odd but I would like timeslip usercp section to look uniform with the vbgarage usercp section since I have them linking to each other. Personally I like the lefthand side menu for all the cp sections however vbgarage doesn't incorporate it and there's probably little chance of me contacting magnus as to how to add it.

Any help would once again be greatly appreciated.


In your "USERCP_SHELL" template find:
Code:

$navbar
Below it add:
Code:

<if condition="$_REQUEST['do'] != edittimeslip">
Find:
Code:

<!-- main page contents -->
$HTML

Above it add:
Code:

</if>

zer026 10-03-2004 11:30 PM

And again it worked perfectly. Thanks so much for your fantastic support for your Timeslip mod. I'm sure my members are going to love it when the rest of the forum is finished. Thanks Again!:)

EvilLS1 10-06-2004 04:38 AM

You're welcome. :)

94supratt 10-15-2004 09:35 PM

nm found it


All times are GMT. The time now is 12:41 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.01826 seconds
  • Memory Usage 1,751KB
  • 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
  • (10)bbcode_code_printable
  • (4)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