Add custom field in Joomla 1.6 Registration

2019-04-01 03:34发布

问题:

I want to insert extra fields in Joomla 1.6 registration page like phone no, current year of education ("FE", "SE", "TE", "BE") etc. I don't want to use Community plugin, I want to hack the core files in Joomla to do this and add the required information to jos_user table.

I've see tutorials for this for 1.5 but no such tutorial for 1.6.

回答1:

Don't hack core. Clone the plugins/user/profile/ plugin with a different name (studentprofile, etc...). Except for the profiles folder, change the names from profile to the new one wherever you see it. Assuming studentprofile as the name, after you've installed the clone, edit the file plugins/user/studentprofile/profiles/profile.xml. This is where you can add your custom fields. After the field is enabled, edit the plugins/user/studentprofile/studentprofile.xml and studentprofile.php to match the new fields. Then enable the plugin.



标签: joomla