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.

这是一个实验性的插件,使用新的格式配置profile条目。这导致它和任何修改profile设置的插件冲突。请不要在非测试站点上使用。

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.

Birthday

  • 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 : )

Category

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

string_to_array()

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

Triggers

  • 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

profile edit

Snow.Hellsing

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

Stats

  • 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