New version here:Improved Elgg Profile plugin/改进的Profile插件
New config way:
Pulldown type support
Birthday
Category
string_to_array()
Triggers
特性列表:
我的英语不够好,哪位大大看到我上面的英文有错的话,麻烦用任何方法联络我告知,谢谢谢谢~
View Snow.Hellsing's plugins
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Nice work but some problems.
1. "甲寅(虎)年 三月十九" this is showing after the birthdatefield in the profile page.
2. "Edit profile items" link in admin menu is gone.
3. most of the variables are in chinese in the lib.php file. For example
function cyclical($num) {
$Gan = Array ("甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸" );
$Zhi = Array ("子(鼠)", "丑(牛)", "寅(虎)", "卯(兔)", "辰(龙)", "巳(蛇)", "午(马)", "未(羊)", "申(猴)", "酉(鸡)", "戌(狗)", "亥(猪)" );
return $Gan [$num % 10] . $Zhi [$num % 12];
}
function display() {
$nStr = array (' ', '正', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '腊' );
$nl = sprintf ( "%s年\n%s%s月%s\n", $this->cyclical ( $this->yearCyl ), ($this->isLeap ? " 闰" : ""), $nStr [$this->month], $this->cDay ( $this->day ) );
//echo sprintf("农历 %s%s月%s<br>",($this->isLeap?" 闰":""),$nStr[$this->month],$this->cDay($this->day));
//echo sprintf("%s年 %s月 %s 日",$this->cyclical($this->yearCyl),$this->cyclical($this->monCyl),$this->cyclical($this->dayCyl));
RETURN $nl;
}
function cDay($d) {
$nStr1 = array ('日', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十' );
$nStr2 = array ('初', '十', '廿', '卅', ' ' );
switch ($d) {
case 10 :
$s = '初十';
break;
case 20 :
$s = '二十';
break;
case 30 :
$s = '三十';
break;
default :
$s = $nStr2 [floor ( $d / 10 )];
$s .= $nStr1 [$d % 10];
}
return $s;
}
}
Should be in english for users to know what they are doing.
And a feature request to show birthdates in " 14th Feb 1978" this format would be great and separate access controls for year and rest of the birthdate(day and moth) So that we can just show "14th February " to public.
Thanks for the great work anyway.
"甲寅(虎)年 三月十九" is your birthday in Chinese Lunar calendar }:)
I'll add comments to the class Lunar.This class was write by somebody else.
Year show toggle will add later,I'm hard to get time to do this for now.
And,I disabled profile item edit from admin page.
As the customized profile item doesn't use '$shortname' for metadata name,that makes this problem:U setup a customize profile item name 'website',but it dosen't show the meta named 'website' that user saved before u do the customize.
thanks Snow...very great work!
I'm agree with bosssumon :
a better graphic in edit profile
and more clear code for all....
then i hope elggteam take this work as default for elgg.
thanks again!
About graphic edit profile.Er...I not going to do that as codes is more friendly than to GUI for my self }:P
About the codes in Chinese.All the Chinese char is just for Chinese Lunar birthday output.