vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vB Timeslip Database -for Automotive websites (https://vborg.vbsupport.ru/showthread.php?t=58076)

Sadie Frost 02-16-2004 01:46 AM

Great hack hon :)

Installed and working perfectly - just having a little problem getting the select boxes to show up on the Edit Timeslip page? I installed the hack and followed ES1's directions, but I just get a normal text box. Select fields work fine on my regular edit profile page. Anyone have any suggestions? Thanks :)

EvilLS1 02-16-2004 02:03 AM

Hey Sadia! :)

Version 1.3 doesn't have select boxes by default (v2.0 for VB3 does).. But its really easy to add them. Its all explained here:
https://vborg.vbsupport.ru/showpost....0&postcount=32

Dewayne

Sadie Frost 02-16-2004 02:46 AM

See I did that, but I still don't get select boxes - I'll go through and try again, maybe I missed something :)

EvilLS1 02-16-2004 02:58 AM

Quote:

Originally Posted by Sadie Frost
See I did that, but I still don't get select boxes - I'll go through and try again, maybe I missed something :)

Have you installed this hack?
https://vborg.vbsupport.ru/showthread.php?t=21833

And are you adding a new select box field? If so, you'll need to find all instances of this (in member.php & register.php):
Code:

(50,51,52,53,54,55,56,57,58,59,60,61,62,63)
And add the field ID # for the new field you added. For example, if the new field ID is 64, then you would replace the above code with this:
Code:

(50,51,52,53,54,55,56,57,58,59,60,61,62,63,64)
You'd need to make 2 edits to register.php and 6 edits to member.php. If ya still can't get it to work let me know and I'll help. :)

Sadie Frost 02-16-2004 03:45 AM

I know I'm doing something stupid...just can't figure out what it is... :D

I have the select field hack installed, and it works fine on the regular edit profile page. (I tried it with the same field I am then trying to add to the edit timeslip page). I also tried to just change an existing field to a select box and that's not working either. I added the field number to member and register like you suggested, and I still get a field, but a regular text field. I can't think of any reason it would show up on Edit Profile and not on Edit Timeslip :(

EvilLS1 02-16-2004 04:14 AM

Ah, I know why its not working for you.. There's a couple more steps that I forgot to mention.

###### In member.php find:
Code:

// ############################### start modify Timeslip Data #######################
if ($action=="edittimeslip") {
  $templatesused = 'timeslips_customfields,usercpnav,modifytimeslip';
  include("./global.php");
  // do modify profile form

  if ($bbuserinfo[userid]==0  or $bbuserinfo[vpban]==0 or $permissions['canmodifyprofile']==0) {
    show_nopermission();
  }

  // get extra profile fields
  $customfields = '';
  $profilefields=$DB_site->query("SELECT *
                                  FROM profilefield
                                  WHERE editable = 1
                                  AND profilefieldid IN (50,51,52,53,54,55,56,57,58,59,60,61,62,63)
                                  ORDER BY displayorder");
  while ($profilefield=$DB_site->fetch_array($profilefields)) {
    $profilefieldname="field$profilefield[profilefieldid]";
   
if ($bgcolor=="{firstaltcolor}") {
      $bgcolor="{secondaltcolor}";
    } else {
      $bgcolor="{firstaltcolor}";
    }


    eval("\$customfields .= \"".gettemplate("timeslips_customfields")."\";");
  }

  if ($allowhtml) {
    $htmlonoff=$ontext;
  } else {
    $htmlonoff=$offtext;
  }
  if ($allowbbcode) {
    $bbcodeonoff=$ontext;
  } else {
    $bbcodeonoff=$offtext;
  }
  if ($allowbbimagecode) {
    $imgcodeonoff=$ontext;
  } else {
    $imgcodeonoff=$offtext;
  }
  if ($allowsmilies) {
    $smiliesonoff=$ontext;
  } else {
    $smiliesonoff=$offtext;
  }

  // draw cp nav bar
  $cpnav[1]="{secondaltcolor}";
  $cpnav[2]="{firstaltcolor}";
  $cpmenu[2]="class=\"fjsel\" selected";
  $cpnav[3]="{secondaltcolor}";
  $cpnav[4]="{secondaltcolor}";
  $cpnav[5]="{secondaltcolor}";
  $cpnav[6]="{secondaltcolor}";
  $cpnav[7]="{secondaltcolor}";
  eval("\$cpnav = \"".gettemplate("usercpnav")."\";");

  eval("dooutput(\"".gettemplate("modifytimeslip")."\");");
}




###### Replace it with:
Code:

// ############################### start modify Timeslip Data #######################
if ($action=="edittimeslip") {
  $templatesused = 'timeslips_customfields,usercpnav,modifytimeslip';
  include("./global.php");
  // do modify profile form

  if ($bbuserinfo[userid]==0  or $bbuserinfo[vpban]==0 or $permissions['canmodifyprofile']==0) {
    show_nopermission();
  }

  // get extra profile fields
  $customfields = '';
  $profilefields=$DB_site->query("SELECT *
                                  FROM profilefield
                                  WHERE editable = 1
                                  AND profilefieldid IN (50,51,52,53,54,55,56,57,58,59,60,61,62,63)
                                  ORDER BY displayorder");
  while ($profilefield=$DB_site->fetch_array($profilefields)) {
    $profilefieldname="field$profilefield[profilefieldid]";
   
if ($bgcolor=="{firstaltcolor}") {
      $bgcolor="{secondaltcolor}";
    } else {
      $bgcolor="{firstaltcolor}";
    }
            // new options
        $TheField="";
        $optionlines = explode(',', $profilefield[options]);
        $option_bit=$optionlines[0];
        if ($profilefield[type]==1) {
                // radio
                while ($option_bit) {
                        $option_bit=trim($option_bit);
                        if ($option_bit == $bbuserinfo[$profilefieldname]) { $LocOn = "checked"; } else { $LocOn = ""; }
                        $TheField .= "<input type=\"radio\" name=\"$profilefieldname\" value=\"$option_bit\" $LocOn> $option_bit ";
                    $option_bit=next($optionlines);
                }
        } elseif ($profilefield[type]==2) {
                // select
                $TheField = "<select size=\"$profilefield[size]\" name=\"$profilefieldname\">";
                while ($option_bit) {
                        $option_bit=trim($option_bit);
                        if ($option_bit == $bbuserinfo[$profilefieldname]) { $LocOn = "selected"; } else { $LocOn = ""; }
                        $TheField .= "<option value=\"$option_bit\" $LocOn>$option_bit</option>";
                        $option_bit=next($optionlines);
                }
                $TheField .= "</select>";       
        } elseif ($profilefield[type]==3) {
                // textarea
                $bbuserinfo[$profilefieldname]=htmlspecialchars($bbuserinfo[$profilefieldname] );
                $TheField = "<textarea name=\"$profilefieldname\" rows=\"6\" cols=\"40\" wrap=\"physical\">$bbuserinfo[$profilefieldname]</textarea>";
        } else {
            $TheField="<input type=\"text\" class=\"bginput\" name=\"$profilefieldname\" value=\"$bbuserinfo[$profilefieldname]\" size=\"$profilefield[size]\" maxlength=\"$profilefield[maxlength]\">";
        }
        if ($profilefield[required] == 1) {
          $TheField .= " <b><font size=1>* Required</font></b>";
        }
        // new options

    eval("\$customfields .= \"".gettemplate("timeslips_customfields")."\";");
  }

  if ($allowhtml) {
    $htmlonoff=$ontext;
  } else {
    $htmlonoff=$offtext;
  }
  if ($allowbbcode) {
    $bbcodeonoff=$ontext;
  } else {
    $bbcodeonoff=$offtext;
  }
  if ($allowbbimagecode) {
    $imgcodeonoff=$ontext;
  } else {
    $imgcodeonoff=$offtext;
  }
  if ($allowsmilies) {
    $smiliesonoff=$ontext;
  } else {
    $smiliesonoff=$offtext;
  }

  // draw cp nav bar
  $cpnav[1]="{secondaltcolor}";
  $cpnav[2]="{firstaltcolor}";
  $cpmenu[2]="class=\"fjsel\" selected";
  $cpnav[3]="{secondaltcolor}";
  $cpnav[4]="{secondaltcolor}";
  $cpnav[5]="{secondaltcolor}";
  $cpnav[6]="{secondaltcolor}";
  $cpnav[7]="{secondaltcolor}";
  eval("\$cpnav = \"".gettemplate("usercpnav")."\";");

  eval("dooutput(\"".gettemplate("modifytimeslip")."\");");
}



###### Replace the entire contents of your timeslips_customfields template with this:
Code:

<tr>
        <td bgcolor="$bgcolor"><normalfont><b>$profilefield[title]:</b></normalfont><br>
        <smallfont>$profilefield[description]</smallfont></td>
        <td bgcolor="$bgcolor"><normalfont>$TheField</normalfont></td>
</tr>

That should do it. ;)

Sadie Frost 02-16-2004 04:32 AM

YES! It works lol :D Thanks for helping me out :D

EvilLS1 02-16-2004 04:41 AM

Anytime. Glad ya got it workin'. :)

Carnage Media 02-24-2004 05:48 AM

hey Evil, what would cause this to happen, you submit your info. but it does not show up? thanks.

EvilLS1 02-24-2004 06:02 AM

Quote:

Originally Posted by Carnage Media
hey Evil, what would cause this to happen, you submit your info. but it does not show up? thanks.

Is it not showing any info at all? If not, make sure that the timeslipsbit template has been added and the spelling of the template name is correct.

If thats not it, what info was submitted and what sort method? Keep in mind that by default it only shows user's that have entered something in the 1/4 mile ET field when sorting by usernames.


All times are GMT. The time now is 04:08 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.01199 seconds
  • Memory Usage 1,767KB
  • 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
  • (2)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
  • (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