From 939227e8202cd82db8ffd43d266a1959d6cdda08 Mon Sep 17 00:00:00 2001 From: Michael Johnston Date: Sun, 14 Oct 2012 14:30:10 -0400 Subject: [PATCH] Moved comment box on photos to be after the last comment, added text for the Preview link --- mod/photos.php | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index 7108e95698..63b093dc37 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1447,6 +1447,7 @@ function photos_content(&$a) { '$myphoto' => $contact['thumb'], '$comment' => t('Comment'), '$submit' => t('Submit'), + '$preview' => t('Preview'), '$sourceapp' => t($a->sourcename), '$ww' => '' )); @@ -1464,27 +1465,6 @@ function photos_content(&$a) { $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; - if($can_post || can_write_wall($a,$owner_uid)) { - - if($item['last-child']) { - $comments .= replace_macros($cmnt_tpl,array( - '$return_path' => '', - '$jsreload' => $return_url, - '$type' => 'wall-comment', - '$id' => $item['item_id'], - '$parent' => $item['parent'], - '$profile_uid' => $owner_uid, - '$mylink' => $contact['url'], - '$mytitle' => t('This is you'), - '$myphoto' => $contact['thumb'], - '$comment' => t('Comment'), - '$submit' => t('Submit'), - '$sourceapp' => t($a->sourcename), - '$ww' => '' - )); - } - } - if(local_user() && ($item['contact-uid'] == local_user()) && ($item['network'] == 'dfrn') && (! $item['self'] )) { @@ -1522,6 +1502,28 @@ function photos_content(&$a) { '$drop' => $drop, '$comment' => $comment )); + + if($can_post || can_write_wall($a,$owner_uid)) { + + if($item['last-child']) { + $comments .= replace_macros($cmnt_tpl,array( + '$return_path' => '', + '$jsreload' => $return_url, + '$type' => 'wall-comment', + '$id' => $item['item_id'], + '$parent' => $item['parent'], + '$profile_uid' => $owner_uid, + '$mylink' => $contact['url'], + '$mytitle' => t('This is you'), + '$myphoto' => $contact['thumb'], + '$comment' => t('Comment'), + '$submit' => t('Submit'), + '$preview' => t('Preview'), + '$sourceapp' => t($a->sourcename), + '$ww' => '' + )); + } + } } } -- 2.39.5