Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2002, 07:00 PM
leon2u leon2u is offline
 
Join Date: Mar 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Prefilled Custom Profile Field???

Hai there,

I made an custom profile field which users need to fill out with a serialnumber. This is a required field!!

All serials are starting with '700-' and need to be prefilled in the required Serial textbox field. So that users directly can enter the rest of their serial behin the '-' sign.

How can I do this???

Thanx for your effort already!
Reply With Quote
  #2  
Old 08-26-2002, 09:10 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just when you create the profilefield then give it a default value... but if you really want the serialnumber to be exact then you should use conentation(sp) and connect a variable that equals 700- ie:

in member.php

PHP Code:
$snumber "700-"
but its better off creating your own field because it would be tough to alter the updating of one profilefield...

then you should also maybe use expressions depending upon how close you want the number match to be... regards...

g-force2k2
Reply With Quote
  #3  
Old 08-27-2002, 07:06 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After you took g-force's advice, this hack can help you to force your users enter numeric data for your field..
Reply With Quote
  #4  
Old 08-27-2002, 02:19 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol... i didn't know you made such a hack Logician looks good though

regards...

g-force2k2
Reply With Quote
  #5  
Old 08-27-2002, 02:42 PM
leon2u leon2u is offline
 
Join Date: Mar 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to fill out the code for this in member.php?

And where can i fill out a default value for a custom field?

thanx
Reply With Quote
  #6  
Old 08-27-2002, 02:48 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well you can edit the field value in phpmyadmin and add a default value of 700- if you want but i would prefer using conentation because that way the 700- part cant' be edited and will always be inserted regards...

g-force2k2
Reply With Quote
  #7  
Old 08-27-2002, 02:59 PM
leon2u leon2u is offline
 
Join Date: Mar 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cannot get it to work......sorry how do I have to do this...do i need to add a field in PHPAdmin called Value or so?
Reply With Quote
  #8  
Old 08-27-2002, 03:04 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by g-force2k2
lol... i didn't know you made such a hack Logician looks good though
small hack..one of my firsts..

Quote:
All serials are starting with '700-' and need to be prefilled in the required Serial textbox field. So that users directly can enter the rest of their serial behin the '-' sign.
What about this idea? Since all serials need to start with "700-" why don't you add this info just left to form input field, instead of putting the info inside the form field.

What you are trying to do:

Serial Number : [700-.........................]

What I suggest:
Serial Number : 700-[.........................]

This will save you a lot of trouble like:
a) inserting a default value to your field
b) Checking if user sent the field with only data "700-" or entered some other numbers too
c) More easily applying numeric required hack
etc.

If you like the idea holler and I (or g-force2k2) can tell how your will do it..
Reply With Quote
  #9  
Old 08-27-2002, 03:17 PM
leon2u leon2u is offline
 
Join Date: Mar 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tell me how to do that, I found only this:

Template register_customfields this is where all data comes in from the customfields

Template registeradult there stands this $customfields_required
So here will come in my Serial....plz take a look @ my site
www.inventorusers.nl and go to the registerpage to see the field! See snapshot also...

Do not how to this from here....
Attached Images
File Type: jpg serial.jpg (60.5 KB, 0 views)
Reply With Quote
  #10  
Old 08-27-2002, 03:28 PM
leon2u leon2u is offline
 
Join Date: Mar 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well fixed the hack myself........cool......see snapshot!

Quite simple indeed!

Created a custom template called register_customfields_kg and changed this code in register.php

ORG-CODE:
------------------------------------------------------------------
eval("\$customfields_required .= \"".gettemplate("register_customfields")."\";") ;
------------------------------------------------------------------

NEW CODE:
------------------------------------------------------------------
eval("\$customfields_required .= \"".gettemplate("register_customfields_kg")."\";") ;
------------------------------------------------------------------

Well the solution you can see in the snapshot!

I suppose this is what you mean?
Attached Images
File Type: jpg serial2.jpg (75.3 KB, 0 views)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04193 seconds
  • Memory Usage 2,272KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete