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)

Black Hole 07-23-2007 02:48 AM

I recently upgraded to 3.6.7 PL1. In an attempt to fix a couple of problems, I reverted a couple of my templates and lost the navbar link to the Timeslip Hack.

In going through this thread, I downloaded the 3.6 version 1.2, unzipped the file, and attempted to import the XML file with overwrite checked and I receive a database error when doing so.

I receive the following error...

Quote:

Database error in vBulletin 3.6.7:

Invalid SQL:
INSERT INTO profilefield (profilefieldid,required,hidden,maxlength,size,dis playorder,editable,type,data,height,def,optional,s earchable,memberlist,regex,form,html) VALUES
(50,0,0,'20','20','50','1','input','','0','0','0', '0','0','0','','0');

MySQL Error : Duplicate entry '50' for key 1
Error Number : 1062
Date : Sunday, July 22nd 2007 @ 11:45:06 PM
Script : removed
Referrer : removed
IP Address : removed
Username : Black Hole
Classname : vb_database
This is an upgrade as I'm currently running 3.5.0.

Please advise.

Thanks,

Matt.

webgod 07-23-2007 05:13 PM

Quote:

Originally Posted by Black Hole (Post 1298712)
I recently upgraded to 3.6.7 PL1. In an attempt to fix a couple of problems, I reverted a couple of my templates and lost the navbar link to the Timeslip Hack.

In going through this thread, I downloaded the 3.6 version 1.2, unzipped the file, and attempted to import the XML file with overwrite checked and I receive a database error when doing so.

I receive the following error...



This is an upgrade as I'm currently running 3.5.0.

Please advise.

Thanks,

Matt.


The error is that you are inserting a duplicate record into the table, that requires it be a unique (primary key)



all you need to do to put the link back into the nav bar is follow this in the instructions:
PHP Code:

###### In your navbar template find:

        
<td class="vbmenu_control"><a href="memberlist.php?$session[sessionurl]">$vbphrase[members_list]</a></td>



###### Below it add:

        
<td class="vbmenu_control"><a href="timeslips.php?$session[sessionurl]">$vbphrase[timeslips]</a></td


webgod 07-23-2007 05:15 PM

Quote:

Originally Posted by calgdsm (Post 1297422)
from what i can tell there is no support with this product, so i say go for it. Could you start a new thread for it?

I'd love to...


but I'd still like the permission of the author.. or an OK from a Moderator.

I don't want to step on anyones toes.

Black Hole 07-24-2007 02:37 AM

Quote:

Originally Posted by webgod (Post 1299364)
The error is that you are inserting a duplicate record into the table, that requires it be a unique (primary key)



all you need to do to put the link back into the nav bar is follow this in the instructions:
PHP Code:

###### In your navbar template find:

        
<td class="vbmenu_control"><a href="memberlist.php?$session[sessionurl]">$vbphrase[members_list]</a></td>



###### Below it add:

        
<td class="vbmenu_control"><a href="timeslips.php?$session[sessionurl]">$vbphrase[timeslips]</a></td


Thanks!!!!:):up:

0ptima 08-04-2007 08:58 PM

I upgraded my 3.6.4 board to 3.6.8 and there are some differences in the vb code that you need to change.

In the 3.6.x hack it says:

Code:

###### In image.php find:

if ($_REQUEST['type'] == 'profile') // do not modify this $_REQUEST


###### REPLACE IT WITH:

if ($_REQUEST['type'] == 'profile' or $_REQUEST['type'] == 'timeslip') // do not modify this $_REQUEST

In 3.6.8 it should say:

Code:

###### In image.php find:

else if ($_REQUEST['type'] == 'profile') // do not modify this $_REQUEST

###### REPLACE IT WITH:

else if ($_REQUEST['type'] == 'profile' or $_REQUEST['type'] == 'timeslip') // do not modify this $_REQUEST

In the 3.6.x hack it says:

Code:

###### In member.php find:
// *********************
// CUSTOM PROFILE FIELDS
$profilefields = $db->query_read_slave("
    SELECT profilefieldid, required, type, data, def, height
    FROM " . TABLE_PREFIX . "profilefield
    WHERE form = 0 " . iif(!($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']), "
        AND hidden = 0") . "
    ORDER BY displayorder
");

###### Replace it with:

// *********************
// CUSTOM PROFILE FIELDS
$profilefields = $db->query_read_slave("
    SELECT profilefieldid, required, type, data, def, height
    FROM " . TABLE_PREFIX . "profilefield
    WHERE profilefieldid NOT IN (50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65) AND form = 0 " . iif(!($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']), "
        AND hidden = 0") . "
    ORDER BY displayorder
");

In 3.6.8 it should say:

Code:

###### In member.php find:
// *********************
    // CUSTOM PROFILE FIELDS
    $profilefield_categories = array(0 => array());
    $profilefields_result = $db->query_read_slave("
        SELECT pf.profilefieldid, pf.profilefieldcategoryid, pf.required, pf.type, pf.data, pf.def, pf.height
        FROM " . TABLE_PREFIX . "profilefield AS pf
        LEFT JOIN " . TABLE_PREFIX . "profilefieldcategory AS pfc ON(pfc.profilefieldcategoryid = pf.profilefieldcategoryid)
        WHERE pf.form = 0 " . iif(!($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']), "
                AND pf.hidden = 0") . "
        ORDER BY pfc.displayorder, pf.displayorder
    ");

###### Replace it with:
    // CUSTOM PROFILE FIELDS
$profilefield_categories = array(0 => array());
    $profilefields_result = $db->query_read_slave("
        SELECT pf.profilefieldid, pf.profilefieldcategoryid, pf.required, pf.type, pf.data, pf.def, pf.height
        FROM " . TABLE_PREFIX . "profilefield AS pf
        LEFT JOIN " . TABLE_PREFIX . "profilefieldcategory AS pfc ON(pfc.profilefieldcategoryid = pf.profilefieldcategoryid)
        WHERE pf.profilefieldid NOT IN (50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65) AND pf.form = 0 " . iif(!($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']), "
                AND pf.hidden = 0") . "
        ORDER BY pfc.displayorder, pf.displayorder
    ");

Everything seems to work ok except for the timeslip upload. There are no errors, the slip just does not show up. Ive attached the complete updated instructions.

Devilbrad 08-11-2007 06:25 PM

Everything works fine on my board with 3.6.7 except if I click a username to view their profile I get this error message.

Quote:

Database error in vBulletin 3.6.7:

Invalid SQL:

SELECT pf.profilefieldid, pf.profilefieldcategoryid, pf.required, pf.type, pf.data, pf.def, pf.height
FROM profilefield AS pf
LEFT JOIN profilefieldcategory AS pfc ON(pfc.profilefieldcategoryid = pf.profilefieldcategoryid)
WHERE pf.profilefieldid NOT IN (50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65 AND pf.form = 0
ORDER BY pfc.displayorder, pf.displayorder;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY pfc.displayorder, pf.displayorder' at line 5
Error Number : 1064
Date : Saturday, August 11th 2007 @ 03:24:25 PM
Script : http://www.devilbrad.com/member.php?find=lastposter&f=5
Referrer : http://www.devilbrad.com/index.php
IP Address : 68.127.148.159
Username : Devilbrad
Classname : vb_database
What have I done wrong???

0ptima 08-12-2007 01:56 AM

There is a missing bracket on this line

PHP Code:

NOT IN (50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65 

It should say this

PHP Code:

NOT IN (50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65

I update the instructions I posted for VB 3.6.8

Devilbrad 08-12-2007 01:47 PM

Sweet! Got it working now! Thanks! I also upgraded to 3.6.8 and because of all the posts about losing info in this thread, thought I would share what I do. I save a list of all my php edits in a seperate folder thats easy to read, each text file is the name of the php file in my database that needs to be changed (basically cut and paste the specific instructions from each mod). When a new version of vBB comes out, I edit all the php files before uploading to my server and never get a mishap or lose stuff.

Eclipsed830 08-14-2007 03:42 PM

Does anyone know if there is a way to include an if statement in the members profile to display timeslip info?

webgod 08-14-2007 04:04 PM

Quote:

Originally Posted by Eclipsed830 (Post 1317426)
Does anyone know if there is a way to include an if statement in the members profile to display timeslip info?




Definitely.. I put it in the postbit template.

here is my post with all the info filled in:
http://www.chicagosvt.com/forums/sho...&postcount=127

and here are examples of various stages of completed info:
http://www.chicagosvt.com/forums/sho...d.php3?t=23654


here's a snipet of my postbit template to get you started:
Code:

<if condition="$post['field50']">
<p >
<hr color="#000000" size="1" width="100%">
<div class="smallfont">

<if condition="$post['field50']"><b>Vehicle:</b> $post[field50]</if>

&nbsp;&nbsp;&nbsp;

<if condition="$post['field51'] and $post['field51'] != '0.0'"><b>HP:</b> $post[field51]
</if>

&nbsp;&nbsp;&nbsp;

<if condition="$post['field66'] and $post['field66'] != '0.0'"><b>TQ:</b> $post[field66]
</if>

&nbsp;&nbsp;&nbsp;

<if condition="$post['field55'] and $post['field55'] != '0.00'"><b>1/4 Mile:</b> $post[field55]</if><if condition="$post['field56'] and $post['field56'] != '0.00'">@ $post[field56]
</if>

</div>
<hr color="#000000" size="1" width="100%">
</p>
</if>



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