在Joomla 1.6注册中添加自定义字段 [英] Add custom field in Joomla 1.6 Registration
问题描述
我想在Joomla 1.6注册页面中插入其他字段,例如电话号码,当前教育年份("FE","SE","TE","BE")等. 我不想使用社区插件,我想破解Joomla中的核心文件并将其添加到jos_user表中.
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.
我见过1.5的教程,但没有1.6的教程.
I've see tutorials for this for 1.5 but no such tutorial for 1.6.
推荐答案
不要破解内核.克隆plugins/user/profile/
插件并使用其他名称(studentprofile等).除profiles
文件夹外,无论您在哪里看到,都将其名称从profile
更改为新名称.假定studentprofile
为名称,在安装克隆后,编辑文件plugins/user/studentprofile/profiles/profile.xml
.您可以在此处添加自定义字段.启用该字段后,编辑plugins/user/studentprofile/studentprofile.xml
和studentprofile.php
以匹配新字段.然后启用该插件.
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 1.6注册中添加自定义字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!