Added signature, alias, publicEmail, publicProfile preferences.
This commit is contained in:
parent
25dd1f5465
commit
fc3616a97b
4 changed files with 26 additions and 7 deletions
|
|
@ -17,5 +17,16 @@ delete from international where languageId=2 and namespace='WebGUI' and internat
|
|||
insert into international (internationalId,languageId,namespace,message,lastUpdated) values (836,2,'WebGUI','Schnipsel sind Text-Elemente, die mehrfach auf Ihrer Seite genutzt werden k?nnen. Dinge wie Java-Scripts, Style Sheets, Flash Animationen oder einfach nur Slogans sind Beispiele hierf?r. Das beste daran ist, dass Sie ?nderungen, die zum Beispiel in einem Slogan oder Werbespruch durchgef?hrt werden m?ssen, an zentraler Stelle ?ndern k?nnen.<br><br>\r\n<b>Name</b><br>Vergeben Sie einen eindeutigen Namen, damit Sie das Schnipsel sp?ter schnell wiederfinden k?nnen.<br><br>\r\n<b>In welches Verzeichnis</b><br>In welchen Ordner m?chten Sie das Schnipsel speichern<br><br>\r\n<b>Schnipsel</b><br>Geben Sie hier den Text ein oder noch einfacher: kopieren Sie den ben?tigten Text oder auch JavaScript-Code ?ber die Zwischenablage ein.', 1043421646);
|
||||
alter table groups add column ipFilter varchar(255);
|
||||
insert into international (internationalId,languageId,namespace,message,lastUpdated) values (857,1,'WebGUI','IP Address', 1043878310);
|
||||
insert into international (internationalId,languageId,namespace,message,lastUpdated) values (861,1,'WebGUI','Make profile public?', 1043879954);
|
||||
insert into international (internationalId,languageId,namespace,message,lastUpdated) values (860,1,'WebGUI','Make email address public?', 1043879942);
|
||||
insert into international (internationalId,languageId,namespace,message,lastUpdated) values (859,1,'WebGUI','Signature', 1043879866);
|
||||
insert into international (internationalId,languageId,namespace,message,lastUpdated) values (858,1,'WebGUI','Alias', 1043879848);
|
||||
INSERT INTO userProfileField VALUES ('alias','WebGUI::International::get(858)',1,0,'text','','',4,3,0);
|
||||
INSERT INTO userProfileField VALUES ('signature','WebGUI::International::get(859)',1,0,'HTMLArea','','',5,3,0);
|
||||
INSERT INTO userProfileField VALUES ('publicProfile','WebGUI::International::get(861)',1,0,'yesNo','','[1]',9,4,0);
|
||||
INSERT INTO userProfileField VALUES ('publicEmail','WebGUI::International::get(860)',1,0,'yesNo','','[1]',10,4,0);
|
||||
insert into international (internationalId,languageId,namespace,message,lastUpdated) values (862,1,'WebGUI','This user\'s profile is not public.', 1043881275);
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -228,6 +228,7 @@ sub lockThread {
|
|||
#-------------------------------------------------------------------
|
||||
sub post {
|
||||
my ($html, $header, $footer, $f, %message);
|
||||
my $signature = "\n\n\n".$session{user}{signature} if ($session{user}{signature} ne "");
|
||||
tie %message, 'Tie::CPHash';
|
||||
$f = WebGUI::HTMLForm->new;
|
||||
if ($session{form}{replyTo} ne "") { # is a reply
|
||||
|
|
@ -236,7 +237,7 @@ sub post {
|
|||
$footer = formatHeader($message{subject},$message{userId},$message{username},$message{dateOfPost},$message{views},
|
||||
'',$message{status})
|
||||
.'<p>'.formatMessage($message{message});
|
||||
$message{message} = "";
|
||||
$message{message} = $signature;
|
||||
$message{subject} = "Re: ".$message{subject} unless ($message{subject} =~ /^Re:/);
|
||||
$session{form}{mid} = "new";
|
||||
$f->hidden("replyTo",$session{form}{replyTo});
|
||||
|
|
@ -248,6 +249,7 @@ sub post {
|
|||
if ($session{user}{userId} == 1) {
|
||||
$f->text("visitorName",WebGUI::International::get(438));
|
||||
}
|
||||
$message{message} = $signature;
|
||||
} else { # is editing an existing message
|
||||
$header = WebGUI::International::get(228);
|
||||
%message = getMessage($session{form}{mid});
|
||||
|
|
@ -287,7 +289,7 @@ sub postSave {
|
|||
$username = $session{form}{visitorName};
|
||||
}
|
||||
} else {
|
||||
$username = $session{user}{username};
|
||||
$username = $session{user}{alias};
|
||||
}
|
||||
if ($session{form}{sid} eq "") {
|
||||
$session{form}{sid} = 0;
|
||||
|
|
|
|||
|
|
@ -552,10 +552,13 @@ sub www_viewProfile {
|
|||
my ($a, %data, $category, $label, $value, $previousCategory, $output, $u, %gender);
|
||||
%gender = ('neuter'=>WebGUI::International::get(403),'male'=>WebGUI::International::get(339),'female'=>WebGUI::International::get(340));
|
||||
$u = WebGUI::User->new($session{form}{uid});
|
||||
my $header = '<h1>'.WebGUI::International::get(347).' '.$u->username.'</h1>';
|
||||
if ($u->username eq "") {
|
||||
WebGUI::Privilege::notMember();
|
||||
return WebGUI::Privilege::notMember();
|
||||
} elsif ($u->profileField("publicProfile") < 1) {
|
||||
return $header.WebGUI::International::get(862);
|
||||
} elsif ($session{user}{userId} != 1) {
|
||||
$output .= '<h1>'.WebGUI::International::get(347).' '.$u->username.'</h1>';
|
||||
$output = $header;
|
||||
$output .= '<table>';
|
||||
$a = WebGUI::SQL->read("select * from userProfileField,userProfileCategory
|
||||
where userProfileField.profileCategoryId=userProfileCategory.profileCategoryId
|
||||
|
|
@ -574,7 +577,9 @@ sub www_viewProfile {
|
|||
} else {
|
||||
$value = $u->profileField($data{fieldName});
|
||||
}
|
||||
$output .= '<tr><td class="tableHeader">'.$label.'</td><td class="tableData">'.$value.'</td></tr>';
|
||||
unless ($data{fieldName} eq "email" and $u->profileField("publicEmail") < 1) {
|
||||
$output .= '<tr><td class="tableHeader">'.$label.'</td><td class="tableData">'.$value.'</td></tr>';
|
||||
}
|
||||
$previousCategory = $category;
|
||||
}
|
||||
$a->finish;
|
||||
|
|
@ -582,10 +587,10 @@ sub www_viewProfile {
|
|||
if ($session{user}{userId} == $session{form}{uid}) {
|
||||
$output .= _accountOptions();
|
||||
}
|
||||
return $output;
|
||||
} else {
|
||||
$output .= WebGUI::Privilege::insufficient();
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ sub _setupUserInfo {
|
|||
if ($user{userId} eq "") {
|
||||
_setupUserInfo("1");
|
||||
} else {
|
||||
$user{alias} = $user{username};
|
||||
%profile = WebGUI::SQL->buildHash("select userProfileField.fieldName, userProfileData.fieldData
|
||||
from userProfileData, userProfileField where userProfileData.fieldName=userProfileField.fieldName
|
||||
and userProfileData.userId='$user{userId}'");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue