diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/display.php | 1 | ||||
-rw-r--r-- | mod/network.php | 1 | ||||
-rw-r--r-- | mod/photos.php | 3 | ||||
-rw-r--r-- | mod/profile.php | 1 | ||||
-rw-r--r-- | mod/profile_photo.php | 2 | ||||
-rw-r--r-- | mod/share.php | 23 |
6 files changed, 29 insertions, 2 deletions
diff --git a/mod/display.php b/mod/display.php index 096ea16c9..f919cba64 100644 --- a/mod/display.php +++ b/mod/display.php @@ -155,6 +155,7 @@ function display_content(&$a) { '$id' => $item['id'], '$likethis' => t("I like this \x28toggle\x29"), '$nolike' => t("I don't like this \x28toggle\x29"), + '$share' => t('Share'), '$wait' => t('Please wait') )); } diff --git a/mod/network.php b/mod/network.php index 32c7216d4..1f92145d1 100644 --- a/mod/network.php +++ b/mod/network.php @@ -364,6 +364,7 @@ function network_content(&$a, $update = 0) { '$id' => $item['id'], '$likethis' => t("I like this \x28toggle\x29"), '$nolike' => t("I don't like this \x28toggle\x29"), + '$share' => t('Share'), '$wait' => t('Please wait') )); } diff --git a/mod/photos.php b/mod/photos.php index 929d1c971..4bb6e3eab 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1073,7 +1073,7 @@ function photos_content(&$a) { $tpl = load_view_file('view/photo_item.tpl'); $return_url = $a->cmd; - $like_tpl = load_view_file('view/like.tpl'); + $like_tpl = load_view_file('view/lik_noshare.tpl'); $likebuttons = ''; @@ -1082,6 +1082,7 @@ function photos_content(&$a) { '$id' => $item['id'], '$likethis' => t("I like this \x28toggle\x29"), '$nolike' => t("I don't like this \x28toggle\x29"), + '$share' => t('Share'), '$wait' => t('Please wait') )); } diff --git a/mod/profile.php b/mod/profile.php index 88fc16ebb..3354bc9a3 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -311,6 +311,7 @@ function profile_content(&$a, $update = 0) { '$id' => $item['id'], '$likethis' => t("I like this \x28toggle\x29"), '$nolike' => t("I don't like this \x28toggle\x29"), + '$share' => t('Share'), '$wait' => t('Please wait') )); } diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 0f84a85c9..5365aa3b8 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -87,7 +87,7 @@ function profile_photo_post(&$a) { ); // Update global directory in background - $url = $_SESSION['my_url']; + $url = $a->get_baseurl() . '/profile/' . $a->user['nickname']; if($url && strlen(get_config('system','directory_submit_url'))) proc_run('php',"include/directory.php","$url"); } diff --git a/mod/share.php b/mod/share.php new file mode 100644 index 000000000..8a8229e8a --- /dev/null +++ b/mod/share.php @@ -0,0 +1,23 @@ +<?php + +require_once('bbcode.php'); + +function share_init(&$a) { + + $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0); + if((! $post_id) || (! local_user())) + killme(); + + $r = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1", + intval($post_id) + ); + if(! count($r) || $r[0]['private']) + killme(); + + $o = ''; + + $o .= '♲ <a href="' . $r[0]['author-link'] . '">' . $r[0]['author-name'] . '</a><br />'; + $o .= prepare_body($r[0]); + echo $o . '<br />'; + killme(); +}
\ No newline at end of file |