vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   How to... (https://vborg.vbsupport.ru/showthread.php?t=49884)

filburt1 03-10-2003 05:42 PM

Required fields can't be blank at registration. You can set it to blank via the admin CP IIRC though.

Smoothie 03-10-2003 08:18 PM

Is it possible to configure this in the admin cp, under custom profile fields? There is a maximum input line, would it be possible to add a minumum input line?

filburt1 03-10-2003 08:23 PM

Not without hacking. You've come to the right place, though :p

Smoothie 03-11-2003 03:33 AM

Quote:

Originally posted by Xenon
for 1:
in register.php it will work somehow similar, but i'll show you how to do in member.php :)

find that:
PHP Code:

    $varname="field$profilefield[profilefieldid]";
    if (
$profilefield[required] and $$varname=="")
    {
      eval(
"standarderror(\"".gettemplate("error_requiredfieldmissing")."\");");
      exit;
    } 

and change to:
PHP Code:

    $varname="field$profilefield[profilefieldid]";
    if ((
$profilefield[required] and $$varname=="") or ($profilefieldid == and $$varname != "" and strlen($$varname)<5))
    {
      eval(
"standarderror(\"".gettemplate("error_requiredfieldmissing")."\");");
      exit;
    } 

that will disallow all inputs smaller than lenght of 5 except no input :)

Ok, seems a though I won't have much help in getting this integrated into the admin cp. How about steering me in the right direction so I can call another template if users input less than the required amount of characters. :)

Xenon 03-11-2003 09:54 AM

this :)

PHP Code:

$varname="field$profilefield[profilefieldid]";
    if (
$profilefield[required] and $$varname=="")
    {
      eval(
"standarderror(\"".gettemplate("error_requiredfieldmissing")."\");");
      exit;
    } else if (
$profilefieldid == and $$varname != "" and strlen($$varname)<5) {
      eval(
"standarderror(\"".gettemplate("error_notenoughchars")."\");");
      exit;


now create the new template error_notenoughchars :)

Smoothie 03-11-2003 04:59 PM

Thank you Xenon! :)

Smoothie 03-11-2003 05:07 PM

Does the character limit apply to any? So a user could enter something like *#^@! in the locattion field? Is there a way to make it so it has to be actual letters?

Smoothie 03-11-2003 05:23 PM

Quote:

Originally posted by Xenon
this :)

PHP Code:

$varname="field$profilefield[profilefieldid]";
    if (
$profilefield[required] and $$varname=="")
    {
      eval(
"standarderror(\"".gettemplate("error_requiredfieldmissing")."\");");
      exit;
    } else if (
$profilefieldid == and $$varname != "" and strlen($$varname)<5) {
      eval(
"standarderror(\"".gettemplate("error_notenoughchars")."\");");
      exit;


now create the new template error_notenoughchars :)

Maybe it's me, but after I add that code in to member.php and then go to my profile, edit, change my location to only 3 characters, it still allows it.


All times are GMT. The time now is 10:25 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.02244 seconds
  • Memory Usage 1,748KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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