Improved Elgg Profile plugin/改进的Profile插件 v0.50

Release Notes

New version released in plugin pack from snow.

This is a experimental plugin.It uses a new format to config profile,that conflicts with any other plugins that touches $CONFIG->profile,so this plugin its fragile.I don't suggest install this experimental plugin on a non-testing site.


What's new in 0.50

  • input/datepulldown a input view that get a int unix timestamp,display it in three pulldown with year,month and day,automaticly convert user's selection to a unix timestamp int for submit.
  • Improved plugin hook.I found plugin hook may use like interceptor stack in Struts2,humm,I means,AOP.But I doubt plugin hook causes performence reduce.
  • Adieu to the Lunar Calendar.It was a feature required by my customer.I relized that it make all the world's people confused.Sorry :P

New config way:

  • Which profile field config in a ElggObject with a 'profilefield' subtype,title,valuetype,category and isUnique metadata
  • function profilefield($title,$valuetype,$category,$isUnique = FALSE,$options = '') in lib.php for make field objects
  • $CONFIG->profile now is a array of profilefield object 

Pulldown type support

  • Appoint the second param of profilefield() as 'pulldown' and pass an array of options to the profilefield() funtion at the last param,it'll return a pulldown type profile field.In edit page,u got a pulldown with those options.


  • In edit page,birthday field was split into three pulldown with year,month and day.
  • In userdetail page,it show as a text type.
  • User can config show or hide her/his birth year.
  • Especially,it compute your Chinese Lunar calendar birthday and show after the Gegorian calendar birthday : )


  • Profile items was shown in sections with category title in userdetials and edit page.


  • In lib.php there is a mod of string_of_array(),which split string also by ',' and ' '.


  • In edit action,before save data to database and after save done,there are plugin hooks.


  • 新的配置profile的方式。ProfileItem()函数返回一个条目,get_profile_conf()函数返回完整profile配置。
  • datepulldown类型的日期下拉表单视图。把unix timestamp类型的时间显示为三个下拉列表,分别为年月日。自动把用户的选择即时转换为int类型。
  • 支持下拉菜单类型的条目,只需要在调用profilefield()生成一个条目对象的时候指定第二个参数为'pulldown'并给最后一个形参传递一个可选值数组
  • 添加了生日,在编辑页面显示为三个下拉列表,分别选择年、月、日
  • 可以选择隐藏生日年份或显示完整生日
  • 现在可以给个人信息条目指定分类,并且在个人信息和编辑页面每个分类之间会有简单的分隔
  • tag类型的条目现在用全角逗号和空格也可以分割字符串,这是为了照顾中国用户的使用习惯做的改动。
  • 在action/edit里,保存数据之前和之后各添加了一个插件勾。

Here comes the screenshot:


profile edit


This cat has travelled far far away and dont know when will come back.I still remember my promises.Sorry,guys.


  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 9672
  • Recommendations: 0

Other Projects

View Snow.Hellsing's plugins