From f1db34eebcef28cb0748931153926374f6442be6 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 29 Mar 2011 17:19:12 -0700 Subject: more templates gone --- mod/notifications.php | 13 ++++++------- mod/profile_photo.php | 8 +++++--- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'mod') diff --git a/mod/notifications.php b/mod/notifications.php index 93ca82bb0..ed0831aab 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -65,12 +65,11 @@ function notifications_content(&$a) { else $sql_extra = " AND `ignore` = 0 "; - - $tpl = load_view_file('view/intros-top.tpl'); - $o .= replace_macros($tpl,array( - '$hide_url' => ((strlen($sql_extra)) ? 'notifications/all' : 'notifications' ), - '$hide_text' => ((strlen($sql_extra)) ? t('Show Ignored Requests') : t('Hide Ignored Requests')) - )); + $o .= '

' . t('Pending Friend/Connect Notifications') . '

' . "\r\n"; + + $o .= '
'; + $o .= '' + . ((strlen($sql_extra)) ? t('Show Ignored Requests') : t('Hide Ignored Requests')) . '
' . "\r\n"; $r = q("SELECT COUNT(*) AS `total` FROM `intro` @@ -141,7 +140,7 @@ function notifications_content(&$a) { if ($a->config['register_policy'] == REGISTER_APPROVE && $a->config['admin_email'] === $a->user['email']){ - $o .= load_view_file('view/registrations-top.tpl'); + $o .= '

' . t('User registrations waiting for confirm') . '

' . "\r\n"; $r = q("SELECT `register`.*, `contact`.`name`, `user`.`email` FROM `register` diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 68c05625b..48805fbdd 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -196,9 +196,11 @@ function profile_photo_content(&$a) { $o .= replace_macros($tpl,array( '$filename' => $filename, '$resource' => $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'], - '$image_url' => $a->get_baseurl() . '/photo/' . $filename - )); - + '$image_url' => $a->get_baseurl() . '/photo/' . $filename, + '$title' => t('Crop Image'), + '$desc' => t('Please adjust the image cropping for optimum viewing.'), + '$done' => t('Done Editing') + )); return $o; } -- cgit v1.2.3 From 066bdca30dde91fd94c58707f638536ec0ba9002 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 29 Mar 2011 18:57:26 -0700 Subject: optionally set article title --- mod/network.php | 4 +++- mod/profile.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index 2ff15a29b..39679b48a 100644 --- a/mod/network.php +++ b/mod/network.php @@ -70,7 +70,8 @@ function network_content(&$a, $update = 0) { '$utubeurl' => t('Please enter a YouTube link:'), '$vidurl' => t("Please enter a video\x28.ogg\x29 link/URL:"), '$audurl' => t("Please enter an audio\x28.ogg\x29 link/URL:"), - '$whereareu' => t('Where are you right now?') + '$whereareu' => t('Where are you right now?'), + '$title' => t('Enter a title for this item') )); @@ -101,6 +102,7 @@ function network_content(&$a, $update = 0) { '$audio' => t('Insert Vorbis [.ogg] audio'), '$setloc' => t('Set your location'), '$noloc' => t('Clear browser location'), + '$title' => t('Set title'), '$wait' => t('Please wait'), '$permset' => t('Permission settings'), '$content' => '', diff --git a/mod/profile.php b/mod/profile.php index 1101c6998..17f6a2d45 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -138,7 +138,8 @@ function profile_content(&$a, $update = 0) { '$utubeurl' => t('Please enter a YouTube link:'), '$vidurl' => t("Please enter a video\x28.ogg\x29 link/URL:"), '$audurl' => t("Please enter an audio\x28.ogg\x29 link/URL:"), - '$whereareu' => t('Where are you right now?') + '$whereareu' => t('Where are you right now?'), + '$title' => t('Enter a title for this item') )); require_once('include/acl_selectors.php'); @@ -169,6 +170,7 @@ function profile_content(&$a, $update = 0) { '$audio' => t('Insert Vorbis [.ogg] audio'), '$setloc' => t('Set your location'), '$noloc' => t('Clear browser location'), + '$title' => t('Set title'), '$wait' => t('Please wait'), '$permset' => t('Permission settings'), '$content' => '', -- cgit v1.2.3 From 4aa60a7aafe1375a97ed4915f56c8ae1b74d0e0f Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 29 Mar 2011 21:59:28 -0700 Subject: oexchange --- mod/oexchange.php | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 mod/oexchange.php (limited to 'mod') diff --git a/mod/oexchange.php b/mod/oexchange.php new file mode 100644 index 000000000..8dee1cb99 --- /dev/null +++ b/mod/oexchange.php @@ -0,0 +1,53 @@ +argc > 1) && ($a->argv[1] === 'xrd')) { + $tpl = load_view_file('view/oexchange_xrd.tpl'); + + $o = replace_macros($tpl, array('$base' => $a->get_baseurl())); + echo $o; + killme(); + } + + + + +} + +function oexchange_content(&$a) { + + if(! local_user()) { + $o = login(false); + return $o; + } + + if(($a->argc > 1) && $a->argv[1] === 'done') { + notice( t('Post successful.') . EOL); + return; + } + + $url = (((x($_GET,'url')) && strlen($_GET['url'])) ? notags(trim($_GET['url'])) : ''); + + $s = fetch_url($a->get_baseurl() . '/parse_url?url=' . $url); + + if(! strlen($s)) + return; + + require_once('include/html2bbcode.php'); + + $post = array(); + + $post['profile_uid'] = local_user(); + $post['return'] = '/oexchange/done' ; + $post['body'] = html2bbcode($s); + $post['type'] = 'wall'; + + $_POST = $post; + require_once('mod/item.php'); + item_post($a); + +} + + -- cgit v1.2.3 From f198c5cff8932bc1d42c34869afecec6dcab2f46 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 30 Mar 2011 04:07:47 -0700 Subject: secure profile failure --- mod/dfrn_poll.php | 4 ++-- mod/dfrn_request.php | 2 +- mod/oexchange.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mod') diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index bacfe9b94..eb499fbd1 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -63,7 +63,7 @@ function dfrn_poll_init(&$a) { if(count($r)) { - $s = fetch_url($r[0]['poll'] . '?dfrn_id=' . $my_id . '&type=profile-check'); + $s = fetch_url($r[0]['poll'] . '&dfrn_id=' . $my_id . '&type=profile-check'); logger("dfrn_poll: old profile returns " . $s, LOGGER_DATA); @@ -366,7 +366,7 @@ function dfrn_poll_content(&$a) { // URL reply $s = fetch_url($r[0]['poll'] - . '?dfrn_id=' . $encrypted_id + . '&dfrn_id=' . $encrypted_id . '&type=profile-check' . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&challenge=' . $challenge diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 3cd8473cf..f1af1ce4c 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -172,7 +172,7 @@ function dfrn_request_post(&$a) { $dfrn_request = $contact_record['request']; if(strlen($dfrn_request) && strlen($confirm_key)) - $s = fetch_url($dfrn_request . '?confirm_key=' . $confirm_key); + $s = fetch_url($dfrn_request . '&confirm_key=' . $confirm_key); // (ignore reply, nothing we can do it failed) diff --git a/mod/oexchange.php b/mod/oexchange.php index 8dee1cb99..f97356559 100644 --- a/mod/oexchange.php +++ b/mod/oexchange.php @@ -30,7 +30,7 @@ function oexchange_content(&$a) { $url = (((x($_GET,'url')) && strlen($_GET['url'])) ? notags(trim($_GET['url'])) : ''); - $s = fetch_url($a->get_baseurl() . '/parse_url?url=' . $url); + $s = fetch_url($a->get_baseurl() . '/parse_url&url=' . $url); if(! strlen($s)) return; -- cgit v1.2.3 From 04cd865cc94c1c3647beb567baf1bb64af269c4e Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 30 Mar 2011 04:20:40 -0700 Subject: placeholder arg in dfrn conversations --- mod/dfrn_poll.php | 4 ++-- mod/dfrn_request.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index eb499fbd1..686a42d08 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -63,7 +63,7 @@ function dfrn_poll_init(&$a) { if(count($r)) { - $s = fetch_url($r[0]['poll'] . '&dfrn_id=' . $my_id . '&type=profile-check'); + $s = fetch_url($r[0]['poll'] . '?f=&dfrn_id=' . $my_id . '&type=profile-check'); logger("dfrn_poll: old profile returns " . $s, LOGGER_DATA); @@ -366,7 +366,7 @@ function dfrn_poll_content(&$a) { // URL reply $s = fetch_url($r[0]['poll'] - . '&dfrn_id=' . $encrypted_id + . '?f=&dfrn_id=' . $encrypted_id . '&type=profile-check' . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&challenge=' . $challenge diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index f1af1ce4c..cc6355078 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -172,7 +172,7 @@ function dfrn_request_post(&$a) { $dfrn_request = $contact_record['request']; if(strlen($dfrn_request) && strlen($confirm_key)) - $s = fetch_url($dfrn_request . '&confirm_key=' . $confirm_key); + $s = fetch_url($dfrn_request . '?f=&confirm_key=' . $confirm_key); // (ignore reply, nothing we can do it failed) -- cgit v1.2.3