X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=89fef2ee8652f26d432c9867c9c14743de1daf0b;hb=ad2aded25986f423835ce2bafe78169235d374ce;hp=70f21d96878e5878f84e95a1042c864ad1b7976a;hpb=c2e35d2d35a9586bd564368f39544dc487cafc12;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 70f21d9687..89fef2ee86 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -562,6 +562,8 @@ foreach($_FILES AS $key => $val) { if(($maximagesize) && ($filesize > $maximagesize)) { notice( t('Image exceeds size limit of ') . $maximagesize . EOL); @unlink($src); + $foo = 0; + call_hooks('photo_post_end',$foo); return; } @@ -574,6 +576,8 @@ foreach($_FILES AS $key => $val) { logger('mod/photos.php: photos_post(): unable to process image' , 'LOGGER_DEBUG'); notice( t('Unable to process image.') . EOL ); @unlink($src); + $foo = 0; + call_hooks('photo_post_end',$foo); killme(); } @@ -828,7 +832,7 @@ function photos_content(&$a) { - $tpl = load_view_file('view/photos_upload.tpl'); + $tpl = get_markup_template('photos_upload.tpl'); $o .= replace_macros($tpl,array( '$pagename' => t('Upload Photos'), '$sessid' => session_id(), @@ -874,7 +878,7 @@ function photos_content(&$a) { if($cmd === 'edit') { if(($album != t('Profile Photos')) && ($album != t('Contact Photos'))) { if($can_post) { - $edit_tpl = load_view_file('view/album_edit.tpl'); + $edit_tpl = get_markup_template('album_edit.tpl'); $o .= replace_macros($edit_tpl,array( '$nametext' => t('New album name: '), '$nickname' => $a->data['user']['nickname'], @@ -895,7 +899,7 @@ function photos_content(&$a) { } } } - $tpl = load_view_file('view/photo_album.tpl'); + $tpl = get_markup_template('photo_album.tpl'); if(count($r)) foreach($r as $rr) { $o .= replace_macros($tpl,array( @@ -1073,7 +1077,7 @@ function photos_content(&$a) { $edit = Null; if(($cmd === 'edit') && ($can_post)) { - $edit_tpl = load_view_file('view/photo_edit.tpl'); + $edit_tpl = get_markup_template('photo_edit.tpl'); $edit = replace_macros($edit_tpl, array( '$id' => $ph[0]['id'], '$album' => $ph[0]['album'], @@ -1095,11 +1099,11 @@ function photos_content(&$a) { if(count($linked_items)) { - $cmnt_tpl = load_view_file('view/comment_item.tpl'); - $tpl = load_view_file('view/photo_item.tpl'); + $cmnt_tpl = get_markup_template('comment_item.tpl'); + $tpl = get_markup_template('photo_item.tpl'); $return_url = $a->cmd; - $like_tpl = load_view_file('view/like_noshare.tpl'); + $like_tpl = get_markup_template('like_noshare.tpl'); $likebuttons = ''; @@ -1166,6 +1170,8 @@ function photos_content(&$a) { '$mylink' => $contact['url'], '$mytitle' => t('This is you'), '$myphoto' => $contact['thumb'], + '$comment' => t('Comment'), + '$submit' => t('Submit'), '$ww' => '' )); } @@ -1195,6 +1201,8 @@ function photos_content(&$a) { '$mylink' => $contact['url'], '$mytitle' => t('This is you'), '$myphoto' => $contact['thumb'], + '$comment' => t('Comment'), + '$submit' => t('Submit'), '$ww' => '' )); } @@ -1221,7 +1229,7 @@ function photos_content(&$a) { $drop = ''; if(($item['contact-id'] == remote_user()) || ($item['uid'] == local_user())) - $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete'))); + $drop = replace_macros(get_markup_template('wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete'))); $comments .= replace_macros($template,array( @@ -1243,7 +1251,7 @@ function photos_content(&$a) { $paginate = paginate($a); } - $photo_tpl = load_view_file('view/photo_view.tpl'); + $photo_tpl = get_markup_template('photo_view.tpl'); $o .= replace_macros($photo_tpl, array( '$id' => $ph[0]['id'], '$album' => array($album_link,$ph[0]['album']), @@ -1294,7 +1302,7 @@ function photos_content(&$a) { . $a->data['user']['nickname'] . '/upload' . '">' . t('Upload New Photos') . ''; } - $tpl = load_view_file('view/photo_top.tpl'); + $tpl = get_markup_template('photo_top.tpl'); if(count($r)) { foreach($r as $rr) { $o .= replace_macros($tpl,array(