From cde9b6370da1735fffab2fe5933334c2ac3320e9 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Tue, 1 Jan 2013 21:05:24 +0100 Subject: [PATCH 1/6] Fix registration form --- mod/register.php | 4 +++- view/register.tpl | 2 +- view/smarty3/register.tpl | 4 ++-- view/theme/frost-mobile/register.tpl | 2 +- view/theme/frost-mobile/smarty3/register.tpl | 4 ++-- view/theme/frost/register.tpl | 2 +- view/theme/frost/smarty3/register.tpl | 4 ++-- 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/mod/register.php b/mod/register.php index 208f97bcb..faee66c26 100644 --- a/mod/register.php +++ b/mod/register.php @@ -214,7 +214,8 @@ function register_content(&$a) { $oidlabel = ''; } else { - $oidhtml = ''; + $oidhtml = ''; + $oidhtml_old = ''; $fillwith = t("You may \x28optionally\x29 fill in this form via OpenID by supplying your OpenID and clicking 'Register'."); $fillext = t('If you are not familiar with OpenID, please leave that field blank and fill in the rest of the items.'); $oidlabel = t("Your OpenID \x28optional\x29: "); @@ -252,6 +253,7 @@ function register_content(&$a) { $o = replace_macros($o, array( '$oidhtml' => $oidhtml, + '$oidhtml_old' => $oidhtml_old, '$invitations' => get_config('system','invitation_only'), '$invite_desc' => t('Membership on this site is by invitation only.'), '$invite_label' => t('Your invitation ID: '), diff --git a/view/register.tpl b/view/register.tpl index 7cf11881a..ed96f969b 100644 --- a/view/register.tpl +++ b/view/register.tpl @@ -12,7 +12,7 @@

$fillext

- $oidhtml + $oidhtml_old
diff --git a/view/smarty3/register.tpl b/view/smarty3/register.tpl index bdec2ffb4..899a9a25a 100644 --- a/view/smarty3/register.tpl +++ b/view/smarty3/register.tpl @@ -12,7 +12,7 @@

{{$fillext}}

- {{$oidhtml}} + {{$oidhtml|sprintf:$oidlabel:$openid}}
@@ -41,7 +41,7 @@
-

{{$nickdesc}}

+

{{$nickdesc|replace:'$sitename':$sitename}}

diff --git a/view/theme/frost-mobile/register.tpl b/view/theme/frost-mobile/register.tpl index cbc58a784..9844049b1 100644 --- a/view/theme/frost-mobile/register.tpl +++ b/view/theme/frost-mobile/register.tpl @@ -12,7 +12,7 @@
- $oidhtml + $oidhtml_old
diff --git a/view/theme/frost-mobile/smarty3/register.tpl b/view/theme/frost-mobile/smarty3/register.tpl index 62b147a8e..f73cd258b 100644 --- a/view/theme/frost-mobile/smarty3/register.tpl +++ b/view/theme/frost-mobile/smarty3/register.tpl @@ -12,7 +12,7 @@
- {{$oidhtml}} + {{$oidhtml|sprintf:$oidlabel:$openid}}
@@ -54,7 +54,7 @@
-

{{$nickdesc}}

+

{{$nickdesc|replace:'$sitename':$sitename}}

{{$publish}} diff --git a/view/theme/frost/register.tpl b/view/theme/frost/register.tpl index 89dcffdf2..7df552e3f 100644 --- a/view/theme/frost/register.tpl +++ b/view/theme/frost/register.tpl @@ -12,7 +12,7 @@
- $oidhtml + $oidhtml_old
diff --git a/view/theme/frost/smarty3/register.tpl b/view/theme/frost/smarty3/register.tpl index 6b8e85a03..198223918 100644 --- a/view/theme/frost/smarty3/register.tpl +++ b/view/theme/frost/smarty3/register.tpl @@ -12,7 +12,7 @@
- {{$oidhtml}} + {{$oidhtml|sprintf:$oidlabel:$openid}}
@@ -55,7 +55,7 @@
-

{{$nickdesc}}

+

{{$nickdesc|replace:'$sitename':$sitename}}

{{$publish}} From 2a3f8f8ee2c08a34b3697604ce51ad62f5ebd1c7 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Tue, 1 Jan 2013 21:08:30 +0100 Subject: [PATCH 2/6] . --- mod/register.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/register.php b/mod/register.php index faee66c26..1712ee84f 100644 --- a/mod/register.php +++ b/mod/register.php @@ -253,7 +253,7 @@ function register_content(&$a) { $o = replace_macros($o, array( '$oidhtml' => $oidhtml, - '$oidhtml_old' => $oidhtml_old, + '$oidhtml_old' => $oidhtml_old, '$invitations' => get_config('system','invitation_only'), '$invite_desc' => t('Membership on this site is by invitation only.'), '$invite_label' => t('Your invitation ID: '), From 5bfd4cf5c4aec5ea36b5ce386c271a5a6ef78aca Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Tue, 1 Jan 2013 22:40:05 +0100 Subject: [PATCH 3/6] Move HTML part of oid to template + replace outside the tpl --- mod/register.php | 3 +-- view/register.tpl | 4 +++- view/smarty3/register.tpl | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mod/register.php b/mod/register.php index 1712ee84f..df46eca43 100644 --- a/mod/register.php +++ b/mod/register.php @@ -253,7 +253,6 @@ function register_content(&$a) { $o = replace_macros($o, array( '$oidhtml' => $oidhtml, - '$oidhtml_old' => $oidhtml_old, '$invitations' => get_config('system','invitation_only'), '$invite_desc' => t('Membership on this site is by invitation only.'), '$invite_label' => t('Your invitation ID: '), @@ -269,7 +268,7 @@ function register_content(&$a) { '$openid' => $openid_url, '$namelabel' => t('Your Full Name ' . "\x28" . 'e.g. Joe Smith' . "\x29" . ': '), '$addrlabel' => t('Your Email Address: '), - '$nickdesc' => t('Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be \'nickname@$sitename\'.'), + '$nickdesc' => str_replace('$sitename',$a->get_hostname(),t('Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be \'nickname@$sitename\'.')), '$nicklabel' => t('Choose a nickname: '), '$photo' => $photo, '$publish' => $profile_publish, diff --git a/view/register.tpl b/view/register.tpl index ed96f969b..2275356a2 100644 --- a/view/register.tpl +++ b/view/register.tpl @@ -11,10 +11,12 @@

$fillwith

$fillext

+{{ if $oidlabel }}
- $oidhtml_old +
+{{ endif }} {{ if $invitations }} diff --git a/view/smarty3/register.tpl b/view/smarty3/register.tpl index 899a9a25a..6e20bea39 100644 --- a/view/smarty3/register.tpl +++ b/view/smarty3/register.tpl @@ -11,10 +11,12 @@

{{$fillwith}}

{{$fillext}}

+{{if $oidlabel }}
- {{$oidhtml|sprintf:$oidlabel:$openid}} +
+{{/if}} {{if $invitations}} From 4ab7820663bf8780a9ea96eaf5268fa9b3549916 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Tue, 1 Jan 2013 22:44:02 +0100 Subject: [PATCH 4/6] . --- mod/register.php | 1 - 1 file changed, 1 deletion(-) diff --git a/mod/register.php b/mod/register.php index df46eca43..bfb27a7b8 100644 --- a/mod/register.php +++ b/mod/register.php @@ -240,7 +240,6 @@ function register_content(&$a) { )); } - $license = ''; $o = get_markup_template("register.tpl"); From 457a3b5220104184f9dc877d44a978f4b110a41e Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Tue, 1 Jan 2013 23:41:26 +0100 Subject: [PATCH 5/6] Change templates remove var modifiers --- view/smarty3/register.tpl | 2 +- view/theme/frost-mobile/register.tpl | 6 ++++-- view/theme/frost-mobile/smarty3/register.tpl | 8 +++++--- view/theme/frost/register.tpl | 6 ++++-- view/theme/frost/smarty3/register.tpl | 8 +++++--- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/view/smarty3/register.tpl b/view/smarty3/register.tpl index 6e20bea39..768ca9387 100644 --- a/view/smarty3/register.tpl +++ b/view/smarty3/register.tpl @@ -43,7 +43,7 @@
-

{{$nickdesc|replace:'$sitename':$sitename}}

+

{{$nickdesc}}

diff --git a/view/theme/frost-mobile/register.tpl b/view/theme/frost-mobile/register.tpl index 9844049b1..041be5e96 100644 --- a/view/theme/frost-mobile/register.tpl +++ b/view/theme/frost-mobile/register.tpl @@ -11,10 +11,12 @@

$realpeople


-
- $oidhtml_old +{{ if $oidlabel }} +
+
+{{ endif }}

$fillwith $fillext

diff --git a/view/theme/frost-mobile/smarty3/register.tpl b/view/theme/frost-mobile/smarty3/register.tpl index f73cd258b..bc0ce4cc9 100644 --- a/view/theme/frost-mobile/smarty3/register.tpl +++ b/view/theme/frost-mobile/smarty3/register.tpl @@ -11,10 +11,12 @@

{{$realpeople}}


-
- {{$oidhtml|sprintf:$oidlabel:$openid}} +{{if $oidlabel }} +
+
+{{/if}}

{{$fillwith}} {{$fillext}}

@@ -54,7 +56,7 @@
-

{{$nickdesc|replace:'$sitename':$sitename}}

+

{{$nickdesc}}

{{$publish}} diff --git a/view/theme/frost/register.tpl b/view/theme/frost/register.tpl index 7df552e3f..15ce5040e 100644 --- a/view/theme/frost/register.tpl +++ b/view/theme/frost/register.tpl @@ -11,10 +11,12 @@

$realpeople


-
- $oidhtml_old +{{ if $oidlabel }} +
+
+{{ endif }}

$fillwith $fillext

diff --git a/view/theme/frost/smarty3/register.tpl b/view/theme/frost/smarty3/register.tpl index 198223918..72b628f39 100644 --- a/view/theme/frost/smarty3/register.tpl +++ b/view/theme/frost/smarty3/register.tpl @@ -11,10 +11,12 @@

{{$realpeople}}


-
- {{$oidhtml|sprintf:$oidlabel:$openid}} +{{if $oidlabel }} +
+
+{{/if}}

{{$fillwith}} {{$fillext}}

@@ -55,7 +57,7 @@
-

{{$nickdesc|replace:'$sitename':$sitename}}

+

{{$nickdesc}}

{{$publish}} From d9961bc3b41c47919efb73b1bf40ec648d06a5b1 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Tue, 1 Jan 2013 23:47:56 +0100 Subject: [PATCH 6/6] revert one change --- mod/register.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mod/register.php b/mod/register.php index bfb27a7b8..f4c657087 100644 --- a/mod/register.php +++ b/mod/register.php @@ -214,8 +214,7 @@ function register_content(&$a) { $oidlabel = ''; } else { - $oidhtml = ''; - $oidhtml_old = ''; + $oidhtml = ''; $fillwith = t("You may \x28optionally\x29 fill in this form via OpenID by supplying your OpenID and clicking 'Register'."); $fillext = t('If you are not familiar with OpenID, please leave that field blank and fill in the rest of the items.'); $oidlabel = t("Your OpenID \x28optional\x29: ");