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)

Dj22 06-19-2004 07:17 PM

i could be wrong but when i installed this users were able to upload avatars as big as timeslips..

its seems to be the graphic type it enables it for a larger size in the functions_upload file?

i turned it back to the original one and it worked for the avatars

EvilLS1 06-19-2004 11:15 PM

Quote:

Originally Posted by Dj22
i could be wrong but when i installed this users were able to upload avatars as big as timeslips..

its seems to be the graphic type it enables it for a larger size in the functions_upload file?

i turned it back to the original one and it worked for the avatars

Ah, I know what the problem is. At some point the $permissions variable was changed to $imagepermissions in the functions_upload.php file. I copied that bit from my test board which is running RC1.. I believe this was changed in RC2 or RC3.

Anyway, heres the fix (only needed if you have v2.1):

In includes/functions_upload.php find:
Code:

    if ($type=="timeslippic") {
        $maxwidth=$vboptions[tdmaxwidth];
        $maxheight=$vboptions[tdmaxheight];
        $maxsize=$vboptions[tdmaxsize];
    } else {
        // get maximum filesize/dimensions etc.
        $maxwidth = &$permissions[$type . 'maxwidth'];
        $maxheight = &$permissions[$type . 'maxheight'];
        $maxsize = &$permissions[$type . 'maxsize'];
    }

Replace it with:
Code:

    if ($type=="timeslippic") {
        $maxwidth=$vboptions[tdmaxwidth];
        $maxheight=$vboptions[tdmaxheight];
        $maxsize=$vboptions[tdmaxsize];
    } else {
        // get maximum filesize/dimensions etc.
        $maxwidth = &$imagepermissions[$type . 'maxwidth'];
        $maxheight = &$imagepermissions[$type . 'maxheight'];
        $maxsize = &$imagepermissions[$type . 'maxsize'];
    }

I updated the hack instructions. Thanks for pointing this out. :)

dcevoclub 06-20-2004 02:33 PM

ok i added a new column to the userfield database, however i can't seem to find where this adds the variables, or inserts them to the database? this is for the "classing" addon that i asked for help 2 days ago.

i added 1 line to profilefields, and now

Warning: Invalid argument supplied for foreach() in /home/dsmdragtimes/includes/functions_user.php on line 575

EvilLS1 06-20-2004 05:55 PM

Quote:

Originally Posted by dcevoclub
ok i added a new column to the userfield database, however i can't seem to find where this adds the variables, or inserts them to the database?

dcevoclub,
I'm still not clear on exactly what you're trying to do. If you can give me a better description I'll try to help you when I get time.

If I'm understanding correctly, you want to add a drop down menu to the edit vehicle profile page which allows the user to select a class. Then you want to add the ability to sort by classes to timeslips.php? If so, tell me the name of each class that can be selected.

Also, it would be much easier for me to just add this myself rather than trying to explain how to add it. If you'll set me up a temporary admin account and FTP account I'll add it for you.

Quote:

Originally Posted by dcevoclub
this is for the "classing" addon that i asked for help 2 days ago.

I do appologize and I wasn't trying to ignore your request, but as I stated in the first post of this thread:

"Support:
I will support basic installation and troubleshooting only. I will not be offering support for customizing or adding new features."

It would be nearly impossible for me to help customize this hack for everyone who installs it. I work 6 days per week and simply don't have time.

dcevoclub 06-20-2004 07:29 PM

Quote:

Originally Posted by EvilLS1
dcevoclub,
I'm still not clear on exactly what you're trying to do. If you can give me a better description I'll try to help you when I get time.

If I'm understanding correctly, you want to add a drop down menu to the edit vehicle profile page which allows the user to select a class. Then you want to add the ability to sort by classes to timeslips.php? If so, tell me the name of each class that can be selected.

Also, it would be much easier for me to just add this myself rather than trying to explain how to add it. If you'll set me up a temporary admin account and FTP account I'll add it for you.


I do appologize and I wasn't trying to ignore your request, but as I stated in the first post of this thread:

"Support:
I will support basic installation and troubleshooting only. I will not be offering support for customizing or adding new features."

It would be nearly impossible for me to help customize this hack for everyone who installs it. I work 6 days per week and simply don't have time.


sorry... what files do you need to edit so i can arrange for them to be "editable" but yes, thats all i want, is to have different classing, for lets say, street, and full drag or whatever.

EvilLS1 06-20-2004 08:09 PM

Quote:

Originally Posted by dcevoclub
sorry... what files do you need to edit so i can arrange for them to be "editable" but yes, thats all i want, is to have different classing, for lets say, street, and full drag or whatever.

member.php, includes/functions_user.php, and timeslips.php.

Also, I need to know the exact name of all classes that you want availible in the drop down menu.

You can email me at webmaster@modernmusclecars.net

EvilLS1 06-21-2004 01:34 AM

dcevoclub,

First go to your admincp and add a new custom profile field. The names of the classes must be exactly as I list them or it won't work when sorting on the timeslips page.

Go to: admincp >> User Profile Fields >> Add New User Profile Field

Profile Field Type: Single Selection Menu

Click Continue.

Title: Class
Description: whatever you want

Options:
Street
Outlaw
Full Drag

Set Default: Yes, include a first blank option.

Display Order: Whatever you want

Field Required: No

Field Editable by User? Yes

Field Hidden on Profile? No

Field Searchable on Members List? No

Show on Members List? No

Allow user to input their own value for this option? No

Max length of allowed user input: 15

Display Size: 15

Regular Expression: 0

Which page displays this option? Edit Profile

Click Save.


Now on the next screen (the user profile field manager screen) find the new field that you just added. Over to the right of the new field you'll see a link that says [Edit]. Hold your mouse over that link (don't click it) and look at the bottom of your browser where it shows the url. Make a note of the field ID # for the field you just added.

Assuming that you're still using v2.0 in member.php and includes/functions_user.php find all instances of this (there will be several):

Code:

(50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65)
Now in the code below replace the XX with the field ID of the new class field.. Then copy the code below and replace ALL instances of the code above in member.php and includes/functions_user.php:
Code:

(50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,XX)
Save & upload.

Now open timeslips.php and find this:

Code:

$natasp='N/A';
Below it add this:
Code:

$street = 'Street';
$outlaw = 'Outlaw';
$drag = 'Full Drag';

Still in timeslips.php find:

Code:

  }
    else if ($_REQUEST['do'] == 'na')
  {
        $condition.=" AND userfield.field65='$natasp' AND userfield.field55>'".intval($number)."'";
        $cond.=" WHERE userfield.field55!=''";
        $orderby="userfield.field55";
        $direction=ASC;
        $bracket13="<b>[</b>";
        $bracket14="<b>]</b>";

Below it add:
Code:

  }
    else if ($_REQUEST['do'] == 'street')
  {
        $condition.=" AND userfield.fieldXX='$street' AND userfield.field55>'".intval($number)."'";
        $cond.=" WHERE userfield.field55!=''";
        $orderby="userfield.field55";
        $direction=ASC;
        $bracket133="<b>[</b>";
        $bracket143="<b>]</b>";
  }
    else if ($_REQUEST['do'] == 'outlaw')
  {
        $condition.=" AND userfield.fieldXX='$outlaw' AND userfield.field55>'".intval($number)."'";
        $cond.=" WHERE userfield.field55!=''";
        $orderby="userfield.field55";
        $direction=ASC;
        $bracket133="<b>[</b>";
        $bracket143="<b>]</b>";
  }
    else if ($_REQUEST['do'] == 'drag')
  {
        $condition.=" AND userfield.fieldXX='$drag' AND userfield.field55>'".intval($number)."'";
        $cond.=" WHERE userfield.field55!=''";
        $orderby="userfield.field55";
        $direction=ASC;
        $bracket133="<b>[</b>";
        $bracket143="<b>]</b>";

Now in the chunk of code above find all 3 instances of XX and replace it with the field ID for the new class field.


Still in timeslips.php find:
Code:

$spacer=" - ";
Below it add:
Code:

$class = "---";
Find:
Code:

$pos++;
Below it add:
Code:

$class = $userinfo[fieldXX];
Again, replace the XX in the code above with the field ID for the class field.


Save and upload timeslips.php

In your timeslips template find:
Code:

<td bgcolor="{categorybackcolor}" colspan="5" class="tcat"><b> Timeslip Database
Replace it with:
Code:

<td bgcolor="{categorybackcolor}" colspan="6" class="tcat"><b> Timeslip Database
Find:
Code:

<option value="timeslips.php?$session[sessionurl]&do=na">N/A cars only</option>
Below it add:
Code:

<option value="timeslips.php?$session[sessionurl]&do=street">Street Class</option>
<option value="timeslips.php?$session[sessionurl]&do=outlaw">Outlaw Class</option>
<option value="timeslips.php?$session[sessionurl]&do=drag">Full Drag Class</option>

Find:
Code:

<td class="thead" align="center">$bracket13<b>Induction</b>$bracket14</td>
Below it add:
Code:

<td class="thead" align="center">$bracket133<b>Class</b>$bracket143</td>
Find:
Code:

<td class="tfoot" colspan="10">
Replace it with:
Code:

<td class="tfoot" colspan="11">

In your timeslipsbit template find:
Code:

<td class="alt2">$induction</td>
Below it add:
Code:

<td class="alt1">$class</td>
Thats it! If you added the profile field class names exactly as I said and you replaced all of the XXs with the correct field ID it will work.


Now you know why I said it would be much easier if I just do it myself. ;)

dcevoclub 06-21-2004 02:00 AM

ok thanks man, i got it in, but when you go to submit time slip it doesn't show, on the main page it shows the "class" column... do i need to edit profile.php?

EvilLS1 06-21-2004 02:25 AM

Quote:

Originally Posted by dcevoclub
ok thanks man, i got it in, but when you go to submit time slip it doesn't show, on the main page it shows the "class" column... do i need to edit profile.php?

No edits to profile.php are needed. Also this has no effect on showing the timeslips. Did you make other changes earlier that need to be removed? If not, go back and re-check all of the edits to make sure they're correct. If you didn't miss anything it will work.

dcevoclub 06-21-2004 01:24 PM

Quote:

Originally Posted by EvilLS1
No edits to profile.php are needed. Also this has no effect on showing the timeslips. Did you make other changes earlier that need to be removed? If not, go back and re-check all of the edits to make sure they're correct. If you didn't miss anything it will work.

i wiped everything out and re-installed from scratch, and follwed the instructions there is still not dropbox in the edit profile for the class under induction which is where is suppose to be right?

EvilLS1 06-21-2004 03:26 PM

Quote:

Originally Posted by dcevoclub
i wiped everything out and re-installed from scratch, and follwed the instructions there is still not dropbox in the edit profile for the class under induction which is where is suppose to be right?

In member.php and includes/functions_user.php make sure you added the new field ID to all instances of this:
Code:

(50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65)
You'll need to do that in 2 places for member.php and 4 places in includes/functions_user.php. If its not showing up you either missed one or didn't add the correct field ID #.

EvilLS1 06-21-2004 07:29 PM

Quote:

Originally Posted by dcevoclub
i wiped everything out and re-installed from scratch, and follwed the instructions there is still not dropbox in the edit profile for the class under induction which is where is suppose to be right?

dcevoclub,
Just to verify that it works I followed my own instructions and added the classes bit to my test forum. It worked flawlessly (check the screenshot).

I don't know what else to suggest other than to check your settings for the new class profile field and make sure they're exactly as I posted above. Unless you want me to add it for you theres nothing else I can do.

dcevoclub 06-21-2004 07:45 PM

i pm'd you a logon, to check the settings....

EvilLS1 06-21-2004 07:51 PM

Quote:

Originally Posted by dcevoclub
i pm'd you a logon, to check the settings....

The file edits appear to be correct, so like I said it has to be either the settings in your admincp for the new field or wrong profile field ID #. I can't check those things so you'll have to check them yourself.

dcevoclub 06-21-2004 08:23 PM

i got it, i'm a retard thanks for all your help

EvilLS1 06-21-2004 08:27 PM

Quote:

Originally Posted by dcevoclub
i got it, i'm a retard thanks for all your help

N/P. Just out of curiosity, what was the problem?

dcevoclub 06-21-2004 09:47 PM

haha i selected make it required

dcevoclub 06-22-2004 12:07 AM

oh man, don't kill me...

but i never tested this until now... when you submit a timeslip it goes into the db, but its not displayed on timeslips.php

EvilLS1 06-22-2004 11:45 AM

Quote:

Originally Posted by dcevoclub
oh man, don't kill me...

but i never tested this until now... when you submit a timeslip it goes into the db, but its not displayed on timeslips.php

Whats not being displayed? Only the class info?

dcevoclub 06-22-2004 12:09 PM

no when i enter a new timeslip...it doesn't show on the list..

EvilLS1 06-22-2004 12:25 PM

Quote:

Originally Posted by dcevoclub
no when i enter a new timeslip...it doesn't show on the list..

Whats not being displayed? The timeslip image itself or the info for the timeslip or the new class bit that we just added? Please be more specific. I just went to your board and added my info and everything displayed. I didn't see the option for the class though. Did you remove it?

Let me know and I'll help you with it when I get home from work this afternoon.

dcevoclub 06-22-2004 01:15 PM

the timeslips, and this is on another page i'm working on. and the info for the timeslip

EvilLS1 06-22-2004 02:44 PM

Quote:

Originally Posted by dcevoclub
the timeslips, and this is on another page i'm working on. and the info for the timeslip

Can you give me a link so that I can check it out?

ludachris 06-25-2004 06:48 PM

For some reason, I'm not able to manually change profile info via the admincp for members. I changed their usergroup and it erased their vehicle info. When I tried to re-input the data, it will not take. Any idea if this is related to the hack? or maybe it's a permissions thing?

EvilLS1 06-25-2004 07:01 PM

Quote:

Originally Posted by ludachris
For some reason, I'm not able to manually change profile info via the admincp for members. I changed their usergroup and it erased their vehicle info. When I tried to re-input the data, it will not take. Any idea if this is related to the hack? or maybe it's a permissions thing?

A few weeks ago there was a bug fix sent out for v2.0 that corrected a problem with admincp/user.php when updating someone's user profile. If you'll click the install button you'd be notified about bug fixes such as this one. ;)

https://vborg.vbsupport.ru/showpost....&postcount=177

ludachris 06-25-2004 07:20 PM

Quote:

Originally Posted by EvilLS1
A few weeks ago there was a bug fix sent out for v2.0 that corrected a problem with admincp/user.php when updating someone's user profile. If you'll click the install button you'd be notified about bug fixes such as this one. ;)

https://vborg.vbsupport.ru/showpost....&postcount=177

Thanks for the quick response - "Install" has been clicked :) thought I had already done that.

zerinS4 06-29-2004 10:47 PM

Just added it to http://www.eurotechniks.com ... now if I can figure out how the heck to add that Torque field. My head is spinning from reading all these posts :)

EvilLS1 06-30-2004 11:02 PM

Quote:

Originally Posted by zerinS4
Just added it to http://www.eurotechniks.com ... now if I can figure out how the heck to add that Torque field. My head is spinning from reading all these posts :)

Added your link. If you have basic knowledge of php you can see how to add new fields in this example:
https://vborg.vbsupport.ru/showpost....&postcount=247

Sidewindr 07-04-2004 12:12 PM

Quote:

Originally Posted by EvilLS1
You want to stop certian user groups from adding timeslip info but they can still see the timeslips page right?

If so, in profile.php find this:
Code:

if ($_REQUEST['do'] == 'edittimeslip')
{

Add this below it:
(change the x's in array(x,x,x) to the group IDs that you don't want to have access).
Code:

if (in_array($bbuserinfo['membergroupids'], array(x,x,x)))
{
        print_no_permission();
}


Is there a more elegant way to do this in the admincp and move the option "Can edit Vehicle Profile?" to the usergroup ???

EvilLS1 07-04-2004 05:39 PM

Quote:

Originally Posted by Sidewindr
Is there a more elegant way to do this in the admincp and move the option "Can edit Vehicle Profile?" to the usergroup ???


In admincp/usergroup.php find:
Code:

        print_yes_no_row($vbphrase['can_view_others_profile_pictures'], 'usergroup[canseeprofilepic]', $ug_bitfield['canseeprofilepic']);
Below it add:
Code:

                print_yes_no_row($vbphrase['can_edit_vehicle_profile'], 'usergroup[cantimeslip]', $ug_bitfield['cantimeslip']);
(in vb3.0.2 or earlier)
In includes/init.php find:
Code:

        'caneditownusernotes'      => 131072
Replace it with:
Code:

        'caneditownusernotes'      => 131072,
        'cantimeslip'              => 262144

---------------------------------------------------------------------
{edit} If you're using v3.0.3 or later skip the edit above and use this edit instead:
In includes/init.php find:
Code:

        'canseehiddencustomfields' => 262144,
Replace it with:

Code:

        'canseehiddencustomfields' => 262144,
        'cantimeslip'              => 16777216,

-----------------------------------------------------------------------

In profile.php find:
Code:

if ($_REQUEST['do'] == 'edittimeslip')
{

Below it add:
Code:

if (!($permissions['genericpermissions'] & CANTIMESLIP))
{
        print_no_permission();
}

Then just set the permission for each usergroup.

Sidewindr 07-05-2004 05:41 AM

Worked a treat ... however I upgraded to 3.03 and now when I list the timeslips it displays ALL members even those with no ET info...

Where is the code that does not display users with not info (ie ET is 0)

EvilLS1 07-05-2004 06:10 AM

Quote:

Originally Posted by Sidewindr
Worked a treat ... however I upgraded to 3.03 and now when I list the timeslips it displays ALL members even those with no ET info...


Where is the code that does not display users with not info (ie ET is 0)

Hmm.. Thats odd. This started when you upgraded your forum software to 3.0.2? Have you modified timeslips.php at all? If so, try uploading a fresh copy and see if it works. Upgrading to 3.0.2 shouldn't have any effect on how the timeslips page functions.

Sidewindr 07-05-2004 06:20 AM

I upgraded to 3.0.2 then 3.0.3 ..

Fresh copy of timeslips.php made no difference :(

EvilLS1 07-05-2004 06:33 AM

If you had already installed vB Timeslip Database before upgrading your forums to v3.0.2 or later you'll need to upload the attached file (TD302.php) to your admincp directory and run it. The upgrade script for vB 3.0.2 and newer versions sets the custom user fields to medium text. Some of the timeslip fields must be set to DECIMAL in order for the timeslips page to sort & display them correctly. The attached file (TD302.php) will correct that for you.

Sidewindr 07-05-2004 10:29 AM

Seems to have done the trick :) Top stuff!! :banana:

Sidewindr 07-05-2004 10:34 AM

I have one more suggestion :)

How about a Diff Ratio field ?? :)

Also it seems as an Admin I cannot uload a timeslip for a user, only link to a URL whereas the user can upload a timeslip into the forum database. Any ideas?

Logan 07-05-2004 05:36 PM

Quote:

Originally Posted by Sidewindr
I have one more suggestion :)

How about a Diff Ratio field ?? :)

Also it seems as an Admin I cannot uload a timeslip for a user, only link to a URL whereas the user can upload a timeslip into the forum database. Any ideas?

EvilLS1, I had the same problem as Sidewindr, the new file works for me too...

EvilLS1 07-05-2004 07:55 PM

For anyone who has recently upgraded to vB 3.0.2 or later please read this post:
https://vborg.vbsupport.ru/showpost....&postcount=274

EvilLS1 07-05-2004 07:58 PM

Quote:

Originally Posted by Sidewindr
I have one more suggestion :)

How about a Diff Ratio field ?? :)

Also it seems as an Admin I cannot uload a timeslip for a user, only link to a URL whereas the user can upload a timeslip into the forum database. Any ideas?

Good suggestions. I might add those in the next version.

Sidewindr & Logan, Be sure to read the last part of this post to completely fix sorting problems after upgrading to vb 3.0.2 or later.

Sidewindr 07-05-2004 09:53 PM

Roger wilco :)

Any idea on when you might be looking at the next version ?? :nervous: :o


All times are GMT. The time now is 05: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.01763 seconds
  • Memory Usage 1,899KB
  • 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
  • (33)bbcode_code_printable
  • (22)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