vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How to add a user profile field when installing a plugin (https://vborg.vbsupport.ru/showthread.php?t=138839)

Analogpoint 02-08-2007 06:22 PM

How to add a user profile field when installing a plugin
 
How can I add a user profile field when installing a plugin?

I'm working on a plugin and as part of the plugin, it needs to create a user profile field and then save what field number it is for internal use. So when the plugin gets installed, it creates the field, sees that it's field8 and saves "field8" to a config option for the plugin. Is this possible?

Thanks,

Reeve of shinra 02-08-2007 07:29 PM

Try hard coding the field name.

ie: "newfieldname"

What is the purpose of the field? You may want to add it to the user table.

Analogpoint 02-12-2007 02:14 PM

Thanks for the answer Reeve.

Hard coding the fieldname makes sense.... If I add the field to the user or userfield tables during the installation of the product/plugin, how can I add the additional information such as the title and description/instructions that appear by the field when the user is looking at their profile?

What this is for is simply a plugin/product that adds a field to the user profile (the users fill it in) and the plugin automatically modifies the postbit to add that field to be displayed. You can do the same thing by adding a custom user field manually and modifying the template. I just want to automate the process by providing a product/plugin to do it all in one shot.

Thanks.

al3bed 10-10-2009 10:04 AM

Quote:

Originally Posted by Analogpoint (Post 1180646)
Thanks for the answer Reeve.

I just want to automate the process by providing a product/plugin to do it all in one shot.

Thanks.

me too. :)

I try to do this using admincp/profilefield.php process. field will be added to the database but will not displayed in user profile or the admincp field list.

any one have any idea about this?


All times are GMT. The time now is 10:18 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.00939 seconds
  • Memory Usage 1,713KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete