From c2086ec50ed339fb864c8f0a93fbc40ff530c666 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 16 Nov 2010 23:26:14 -0800 Subject: [PATCH] pull some template strings --- include/auth.php | 11 ++++++++++- mod/contacts.php | 8 ++++++++ view/{en => }/contacts-top.tpl | 2 +- view/en/contact_edit.tpl | 14 +++++++------- view/en/contact_self.tpl | 9 --------- 5 files changed, 26 insertions(+), 18 deletions(-) rename view/{en => }/contacts-top.tpl (96%) delete mode 100644 view/en/contact_self.tpl diff --git a/include/auth.php b/include/auth.php index 5d7ac436b1..0a21a276ad 100644 --- a/include/auth.php +++ b/include/auth.php @@ -69,7 +69,16 @@ else { if(x($_POST,'password')) $encrypted = hash('whirlpool',trim($_POST['password'])); - + else { + if((x($_POST,'auth-params')) && $_POST['auth-params'] === 'login') { + require_once('library/openid.php'); + $openid = new LightOpenID; + $openid->identity = trim($_POST['login-name']); + $a = get_app(); + $openid->returnUrl = $a->get_baseurl() . '/openid'; + goaway($openid->authUrl()); + } + } if((x($_POST,'auth-params')) && $_POST['auth-params'] === 'login') { // process login request diff --git a/mod/contacts.php b/mod/contacts.php index c33c69fa86..9c84c48104 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -198,7 +198,14 @@ function contacts_content(&$a) { } $o .= replace_macros($tpl,array( + '$header' => t('Contact Editor'), + '$visit' => t('Visit $name's profile'), + '$blockunblock' => t('Block/Unblock contact'), + '$ignorecont' => t('Ignore contact'), + '$delete' => t('Delete contact'), '$poll_interval' => contact_poll_interval($r[0]['priority']), + '$lastupdtext' => t('Last updated: '), + '$updpub' => t('Update public posts: '), '$last_update' => (($r[0]['last-update'] == '0000-00-00 00:00:00') ? t('Never') : datetime_convert('UTC',date_default_timezone_get(),$r[0]['last-update'],'D, j M Y, g:i A')), @@ -235,6 +242,7 @@ function contacts_content(&$a) { $tpl = load_view_file("view/contacts-top.tpl"); $o .= replace_macros($tpl,array( + '$header' => t('Contacts'), '$hide_url' => ((strlen($sql_extra)) ? 'contacts/all' : 'contacts' ), '$hide_text' => ((strlen($sql_extra)) ? t('Show Blocked Connections') : t('Hide Blocked Connections')), '$search' => $search, diff --git a/view/en/contacts-top.tpl b/view/contacts-top.tpl similarity index 96% rename from view/en/contacts-top.tpl rename to view/contacts-top.tpl index 2e56fa2ead..3249800938 100644 --- a/view/en/contacts-top.tpl +++ b/view/contacts-top.tpl @@ -1,4 +1,4 @@ -

Contacts

+

$header

$finding diff --git a/view/en/contact_edit.tpl b/view/en/contact_edit.tpl index 96abf00281..a5c8dc4abb 100644 --- a/view/en/contact_edit.tpl +++ b/view/en/contact_edit.tpl @@ -1,5 +1,5 @@ -

Contact Editor

+

$header

$name
@@ -9,23 +9,23 @@
$alt_text
- $name + $name
-
Last updated: $last_update -
Update public posts:
+
$lastupdtext$last_update +
$updpub
$poll_interval
diff --git a/view/en/contact_self.tpl b/view/en/contact_self.tpl deleted file mode 100644 index 7f5467b395..0000000000 --- a/view/en/contact_self.tpl +++ /dev/null @@ -1,9 +0,0 @@ - -$name - -

$name

-

-This is you. -

- -
\ No newline at end of file