From cf2edb5b9ad5f9bad1fa94ad577f1ab8a664e8e6 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 19 Mar 2012 01:20:53 -0700 Subject: [PATCH 1/2] ctrl + left|right cursor keys to prev/next photos --- mod/photos.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index 4406780d3..b294f0a66 100755 --- a/mod/photos.php +++ b/mod/photos.php @@ -1069,7 +1069,7 @@ function photos_content(&$a) { if($can_post && ($ph[0]['uid'] == $owner_uid)) { $tools = array( 'edit' => array($a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $datum . (($cmd === 'edit') ? '' : '/edit'), (($cmd === 'edit') ? t('View photo') : t('Edit photo'))), - 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'] . '?form_security_token=' . get_form_security_token('profile_photo'), t('Use as profile photo')), + 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'], t('Use as profile photo')), ); // lock @@ -1081,6 +1081,17 @@ function photos_content(&$a) { } + if(! $cmd !== 'edit') { + $a->page['htmlhead'] .= ''; + } + if($prevlink) $prevlink = array($prevlink, '') ; From 2349852b4abd1638624b541f173f51d1fb1ea011 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 19 Mar 2012 03:18:39 -0700 Subject: [PATCH 2/2] support "no_smilies" --- include/text.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/text.php b/include/text.php index 89acbf9fa..a0ff1600e 100644 --- a/include/text.php +++ b/include/text.php @@ -694,8 +694,13 @@ function linkify($s) { if(! function_exists('smilies')) { function smilies($s, $sample = false) { + $a = get_app(); + if(intval(get_config('system','no_smilies')) + || (local_user() && intval(get_pconfig(local_user(),'system','no_smilies')))) + return $s; + $s = preg_replace_callback('/
(.*?)<\/pre>/ism','smile_encode',$s);
 	$s = preg_replace_callback('/(.*?)<\/code>/ism','smile_encode',$s);