vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vB Timeslip Database - for Automotive websites (https://vborg.vbsupport.ru/showthread.php?t=110717)

Sidewindr 03-19-2006 10:12 PM

Quote:

Originally Posted by garycutri
This is only the case when viewing the details using the admin account. I saw that a while back but didn't worry about it.

Nope .. all users got it .. it's a problem in the template .. see my fix above.

dsotmoon 03-19-2006 10:53 PM

so just to be sure, since its phrased I can change this over to use it on a 4x4 offroading site and as an example change " 60' " to "lift amount" or "1/8 Mile ET & MPH" to "tire size" etc etc ?

Sidewindr 03-19-2006 10:56 PM

Quote:

Originally Posted by deathemperor
Hi folk.

#1: I don't quite understand what you mean on this. more explanations would be better.

The option in admin CP to enforce a timeslip pic/scan if the timeslip is under say 13.00 seconds or what ever you choose... I think you're missing some of the necessary edits/checks from profile.php I am looking at them now ... but the enforcement options to stop Timeslips under the value set in the admin cp being submitted without a pic.

etc etc etc

Actually the issue appears to be in the modifytimeslip template, the java validation script appears not to run/execute properly. It should also check that if a link is given it is to a jpg or gif file not to a htm etc.

Quote:

Originally Posted by deathemperor
#2: fixed

#3: fixed

#4: it can't be, you can try looking at the demo site in the above post.

It is possible, trust me .. from a fresh install this does not work. You are missing the following edits in image.php

Find in image.php
Code:

// ######################### REQUIRE BACK-END ############################
if ($_REQUEST['type'] == 'profile') // do not modify this $_REQUEST
{
        require_once('./global.php');
}

REPLACE with

Code:

// ######################### REQUIRE BACK-END ############################
// if ($_REQUEST['type'] == 'profile') // do not modify this $_REQUEST
if ($_REQUEST['type'] == 'profile' or $_REQUEST['type'] == 'timeslip') // do not modify this $_REQUEST
{

FIND

Code:

        if ($vbulletin->GPC['type'] == 'profile')
        {
                $table = 'customprofilepic';
                // No permissions to see profile pics
                if (!$vbulletin->options['profilepicenabled'] OR (!($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseeprofilepic']) AND $vbulletin->userinfo['userid'] != $vbulletin->GPC['userid']))
                {
                        exec_shut_down();      // Update location with 'No permission to view profile picture'
                        header('Content-type: image/gif');
                        readfile(DIR . '/' . $vbulletin->options['cleargifurl']);
                        exit;
                }
        }

Replace with

Code:

        if ($vbulletin->GPC['type'] == 'profile')
        {
                $table = 'customprofilepic';
                // No permissions to see profile pics
                if (!$vbulletin->options['profilepicenabled'] OR (!($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseeprofilepic']) AND $vbulletin->userinfo['userid'] != $vbulletin->GPC['userid']))
                {
                        exec_shut_down();      // Update location with 'No permission to view profile picture'
                        header('Content-type: image/gif');
                        readfile(DIR . '/' . $vbulletin->options['cleargifurl']);
                        exit;
                }
        }
        else if ($vbulletin->GPC['type'] == 'timeslip')
        {
                $table = 'customfile';
        }

Quote:

Originally Posted by deathemperor
#5: that was because of my lack of vehicle knowlegde. I will change that if more ppl want it.

Trust me you need to change the DECIMAL values to 6,3 for those fields as there are not many people running under 9.999 seconds on the quarter mile. I'm trying to impart some vehicle knowledge here :)

Quote:

Originally Posted by deathemperor
#6: There are no other possible ways to remove those file editions AFAIK. If you can do it just point me out. I'll be greatful.

I am unsure as well but there HAS to be a way ... some far more complex hacks manage to do it but it requires reworking of the code.

Quote:

Originally Posted by deathemperor
#7: I'll be more greatful if you keep the credit of timeslips on your site. Please do respect the volunteers. Thank you.

Well it would hardly be accurate would it seeing that the hack is not complete and needs extra work to get it working :p Lets get it all working first.

0ptima 03-19-2006 11:37 PM

Quote:

Originally Posted by deathemperor
Sorry for my bad knowledge on vehicle but is it "1/8 Mile ET & MPH" or "1/4 Mile ET & MPH"

It can be both...

deathemperor 03-20-2006 01:06 AM

Quote:

Originally Posted by Sidewindr
The option in admin CP to enforce a timeslip pic/scan if the timeslip is under say 13.00 seconds or what ever you choose... I think you're missing some of the necessary edits/checks from profile.php I am looking at them now ... but the enforcement options to stop Timeslips under the value set in the admin cp being submitted without a pic.

etc etc etc

Actually the issue appears to be in the modifytimeslip template, the java validation script appears not to run/execute properly. It should also check that if a link is given it is to a jpg or gif file not to a htm etc.



It is possible, trust me .. from a fresh install this does not work. You are missing the following edits in image.php

Find in image.php
Code:

// ######################### REQUIRE BACK-END ############################
if ($_REQUEST['type'] == 'profile') // do not modify this $_REQUEST
{
        require_once('./global.php');
}

REPLACE with

Code:

// ######################### REQUIRE BACK-END ############################
// if ($_REQUEST['type'] == 'profile') // do not modify this $_REQUEST
if ($_REQUEST['type'] == 'profile' or $_REQUEST['type'] == 'timeslip') // do not modify this $_REQUEST
{

FIND

Code:

        if ($vbulletin->GPC['type'] == 'profile')
        {
                $table = 'customprofilepic';
                // No permissions to see profile pics
                if (!$vbulletin->options['profilepicenabled'] OR (!($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseeprofilepic']) AND $vbulletin->userinfo['userid'] != $vbulletin->GPC['userid']))
                {
                        exec_shut_down();      // Update location with 'No permission to view profile picture'
                        header('Content-type: image/gif');
                        readfile(DIR . '/' . $vbulletin->options['cleargifurl']);
                        exit;
                }
        }

Replace with

Code:

        if ($vbulletin->GPC['type'] == 'profile')
        {
                $table = 'customprofilepic';
                // No permissions to see profile pics
                if (!$vbulletin->options['profilepicenabled'] OR (!($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseeprofilepic']) AND $vbulletin->userinfo['userid'] != $vbulletin->GPC['userid']))
                {
                        exec_shut_down();      // Update location with 'No permission to view profile picture'
                        header('Content-type: image/gif');
                        readfile(DIR . '/' . $vbulletin->options['cleargifurl']);
                        exit;
                }
        }
        else if ($vbulletin->GPC['type'] == 'timeslip')
        {
                $table = 'customfile';
        }



Trust me you need to change the DECIMAL values to 6,3 for those fields as there are not many people running under 9.999 seconds on the quarter mile. I'm trying to impart some vehicle knowledge here :)



I am unsure as well but there HAS to be a way ... some far more complex hacks manage to do it but it requires reworking of the code.



Well it would hardly be accurate would it seeing that the hack is not complete and needs extra work to get it working :p Lets get it all working first.


Thanks for those, I did miss the edit on image.php. but as Gary's site I did not. Anyway, added.

Another user has requested to change the decimal range, so I changed it too.

Sidewindr 03-20-2006 02:22 AM

I am looking at the java code in the modifytimeslip template.

It appears that the if statment cannot evaluate the values for theform.field55.value etc.

I tested the IF with 1==1 and 2<=3 and it behaves as expected ..

Changing the if statement to just

Code:

if (theform.field55.value<=$vboptions[tdsliprequired]) {
does not work.

Sidewindr 03-20-2006 03:14 AM

Almost fixed it .. will post up when I have :D

Sidewindr 03-20-2006 04:22 AM

Ok the problem in the javascript is that where the variable is "theform.field55.value" it should be "theform.ctb_field55.value" and the smae for all other fieldNN.value's ...

I am wrestling with the logic there at the moment as if you have upload slip pic allowed it will not let woy use a url instead.

tommyxv 03-20-2006 04:31 AM

First I just want to say this hack is awesome and thanks for porting it. I am still testing it on my test board.

I found an issue with removing a timeslip image. It removes the timeslip icon but the image is still there if you follow the original link.

My concern is that the database will hold this data and keep growing.

Can someone try this too. Upload an image, view the image via the timeslip page, save the url, then remove the image and then follow the original URL.

Is it still there?

fkatzenb 03-20-2006 12:16 PM

I have some problems.... I imported the product, I get the following when visiting the php file and I also found that none of the fields have been imported...

Code:

Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT COUNT(*) AS users
                                    FROM TM_VBuser AS user, TM_VBuserfield AS userfield
                                   
                                      WHERE userfield.field55>0
                                    AND user.userid = userfield.userid;

MySQL Error  : Unknown column 'userfield.field55' in 'where clause'
Error Number : 1054
Date        : Monday, March 20th 2006 @ 08:09:13 AM
Script      : http://www.turbo-mopar.com/forums/timeslips.php
Referrer    :
IP Address  : 32.60.71.66
Username    : Frank
Classname    : vb_database



All times are GMT. The time now is 10:50 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.01815 seconds
  • Memory Usage 1,792KB
  • 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
  • (8)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