From 1fdac57d617bc16d3c784f8d6a2a82026b34b085 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 29 Apr 2016 09:58:44 +0200 Subject: jot: cleanup unused variables --- include/conversation.php | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index 7d80b08fc..96207da8e 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1160,7 +1160,6 @@ function status_editor($a, $x, $popup = false) { $tpl = get_markup_template('jot-header.tpl'); App::$page['htmlhead'] .= replace_macros($tpl, array( - '$newpost' => 'true', '$baseurl' => z_root(), '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$pretext' => ((x($x,'pretext')) ? $x['pretext'] : ''), @@ -1168,12 +1167,8 @@ function status_editor($a, $x, $popup = false) { '$nickname' => $x['nickname'], '$ispublic' => t('Visible to everybody'), '$linkurl' => t('Please enter a link URL:'), - '$vidurl' => t('Please enter a video link/URL:'), - '$audurl' => t('Please enter an audio link/URL:'), '$term' => t('Tag term:'), - '$fileas' => t('Save to Folder:'), '$whereareu' => t('Where are you right now?'), - '$expireswhen' => t('Expires YYYY-MM-DD HH:MM'), '$editor_autocomplete'=> ((x($x,'editor_autocomplete')) ? $x['editor_autocomplete'] : ''), '$bbco_autocomplete'=> ((x($x,'bbco_autocomplete')) ? $x['bbco_autocomplete'] : ''), )); @@ -1181,10 +1176,8 @@ function status_editor($a, $x, $popup = false) { $tpl = get_markup_template('jot.tpl'); $jotplugins = ''; - $jotnets = ''; $preview = t('Preview'); -// $preview = ((feature_enabled($x['profile_uid'],'preview')) ? t('Preview') : ''); if(x($x, 'nopreview')) $preview = ''; @@ -1201,7 +1194,6 @@ function status_editor($a, $x, $popup = false) { $cipher = 'aes256'; call_hooks('jot_tool', $jotplugins); - call_hooks('jot_networks', $jotnets); $o .= replace_macros($tpl, array( '$return_path' => ((x($x, 'return_path')) ? $x['return_path'] : App::$query_string), @@ -1218,42 +1210,25 @@ function status_editor($a, $x, $popup = false) { '$underline' => t('Underline'), '$quote' => t('Quote'), '$code' => t('Code'), - '$upload' => t('Upload photo'), - '$shortupload' => t('upload photo'), '$attach' => t('Attach file'), - '$shortattach' => t('attach file'), '$weblink' => t('Insert web link'), - '$shortweblink' => t('web link'), - '$video' => t('Insert video link'), - '$shortvideo' => t('video link'), - '$audio' => t('Insert audio link'), - '$shortaudio' => t('audio link'), '$setloc' => t('Set your location'), - '$shortsetloc' => t('set location'), '$voting' => t('Toggle voting'), '$feature_voting' => $voting, '$consensus' => 0, '$noloc' => ((get_pconfig($x['profile_uid'], 'system', 'use_browser_location')) ? t('Clear browser location') : ''), - '$shortnoloc' => t('clear location'), '$title' => ((x($x, 'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : ''), '$placeholdertitle' => ((x($x, 'placeholdertitle')) ? $x['placeholdertitle'] : t('Title (optional)')), - '$hidetitle' => ((x($x, 'hidetitle')) ? $x['hidetitle'] : false), '$catsenabled' => ((feature_enabled($x['profile_uid'], 'categories') && (! $webpage)) ? 'categories' : ''), '$category' => "", '$placeholdercategory' => t('Categories (optional, comma-separated list)'), - '$wait' => t('Please wait'), '$permset' => t('Permission settings'), - '$shortpermset' => t('permissions'), '$ptyp' => '', '$content' => ((x($x,'body')) ? htmlspecialchars($x['body'], ENT_COMPAT,'UTF-8') : ''), '$attachment' => ((x($x, 'attachment')) ? $x['attachment'] : ''), '$post_id' => '', - '$baseurl' => z_root(), '$defloc' => $x['default_location'], '$visitor' => $x['visitor'], - '$public' => t('Public post'), - '$jotnets' => $jotnets, - '$emtitle' => t('Example: bob@example.com, mary@example.com'), '$lockstate' => $x['lockstate'], '$acl' => $x['acl'], '$mimeselect' => $mimeselect, -- cgit v1.2.3 From b797528b78107b707dc1c56d70e07136d7c31028 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 29 Apr 2016 13:18:42 +0200 Subject: some work on making mod editpost use status_editor() - if you find anything related to jot broken please revert this commit --- include/conversation.php | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index 96207da8e..14fee19b2 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1115,16 +1115,28 @@ function status_editor($a, $x, $popup = false) { if($c && $c['channel_moved']) return $o; - $geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : ''); - $plaintext = true; // if(feature_enabled(local_channel(),'richtext')) // $plaintext = false; - $voting = feature_enabled(local_channel(), 'consensus_tools'); - if(x($x, 'novoting')) - $voting = false; + $feature_voting = feature_enabled($x['profile_uid'], 'consensus_tools'); + if(x($x, 'hide_voting')) + $feature_voting = false; + + $feature_expire = ((feature_enabled($x['profile_uid'], 'content_expire') && (! $webpage)) ? true : false); + if(x($x, 'hide_expire')) + $feature_expire = false; + + $feature_future = ((feature_enabled($x['profile_uid'], 'delayed_posting') && (! $webpage)) ? true : false); + if(x($x, 'hide_future')) + $feature_future = false; + + $geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : ''); + $setloc = t('Set your location'); + $clearloc = ((get_pconfig($x['profile_uid'], 'system', 'use_browser_location')) ? t('Clear browser location') : ''); + if(x($x, 'hide_location')) + $geotag = $setloc = $clearloc = ''; $mimeselect = ''; if(array_key_exists('mimetype', $x) && $x['mimetype']) { @@ -1146,7 +1158,6 @@ function status_editor($a, $x, $popup = false) { $layoutselect = ''; } - if(array_key_exists('channel_select',$x) && $x['channel_select']) { require_once('include/identity.php'); $id_select = identity_selector(); @@ -1154,7 +1165,6 @@ function status_editor($a, $x, $popup = false) { else $id_select = ''; - $webpage = ((x($x,'webpage')) ? $x['webpage'] : ''); $tpl = get_markup_template('jot-header.tpl'); @@ -1165,7 +1175,7 @@ function status_editor($a, $x, $popup = false) { '$pretext' => ((x($x,'pretext')) ? $x['pretext'] : ''), '$geotag' => $geotag, '$nickname' => $x['nickname'], - '$ispublic' => t('Visible to everybody'), + '$ispublic' => ((x($x,'ispublic')) ? $x['ispublic'] : t('Visible to everybody')), '$linkurl' => t('Please enter a link URL:'), '$term' => t('Tag term:'), '$whereareu' => t('Where are you right now?'), @@ -1212,21 +1222,21 @@ function status_editor($a, $x, $popup = false) { '$code' => t('Code'), '$attach' => t('Attach file'), '$weblink' => t('Insert web link'), - '$setloc' => t('Set your location'), + '$setloc' => $setloc, '$voting' => t('Toggle voting'), - '$feature_voting' => $voting, + '$feature_voting' => $feature_voting, '$consensus' => 0, - '$noloc' => ((get_pconfig($x['profile_uid'], 'system', 'use_browser_location')) ? t('Clear browser location') : ''), + '$clearloc' => $clearloc, '$title' => ((x($x, 'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : ''), '$placeholdertitle' => ((x($x, 'placeholdertitle')) ? $x['placeholdertitle'] : t('Title (optional)')), '$catsenabled' => ((feature_enabled($x['profile_uid'], 'categories') && (! $webpage)) ? 'categories' : ''), - '$category' => "", + '$category' => ((x($x, 'category')) ? $x['category'] : ''), '$placeholdercategory' => t('Categories (optional, comma-separated list)'), '$permset' => t('Permission settings'), - '$ptyp' => '', + '$ptyp' => ((x($x, 'ptyp')) ? $x['ptyp'] : ''), '$content' => ((x($x,'body')) ? htmlspecialchars($x['body'], ENT_COMPAT,'UTF-8') : ''), '$attachment' => ((x($x, 'attachment')) ? $x['attachment'] : ''), - '$post_id' => '', + '$post_id' => ((x($x, 'post_id')) ? $x['post_id'] : ''), '$defloc' => $x['default_location'], '$visitor' => $x['visitor'], '$lockstate' => $x['lockstate'], @@ -1240,10 +1250,10 @@ function status_editor($a, $x, $popup = false) { '$source' => ((x($x, 'source')) ? $x['source'] : ''), '$jotplugins' => $jotplugins, '$defexpire' => $defexpire, - '$feature_expire' => ((feature_enabled($x['profile_uid'], 'content_expire') && (! $webpage)) ? true : false), + '$feature_expire' => $feature_expire, '$expires' => t('Set expiration date'), '$defpublish' => $defpublish, - '$feature_future' => ((feature_enabled($x['profile_uid'], 'delayed_posting') && (! $webpage)) ? true : false), + '$feature_future' => $feature_future, '$future_txt' => t('Set publish date'), '$feature_encrypt' => ((feature_enabled($x['profile_uid'], 'content_encrypt') && (! $webpage)) ? true : false), '$encrypt' => t('Encrypt text'), -- cgit v1.2.3 From 931a4fafe316b23bacf92ac1ff35f9b8467415dd Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 29 Apr 2016 21:38:36 +0200 Subject: get rid of the unused ispublic variable --- include/conversation.php | 1 - 1 file changed, 1 deletion(-) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index 14fee19b2..b1b47df39 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1175,7 +1175,6 @@ function status_editor($a, $x, $popup = false) { '$pretext' => ((x($x,'pretext')) ? $x['pretext'] : ''), '$geotag' => $geotag, '$nickname' => $x['nickname'], - '$ispublic' => ((x($x,'ispublic')) ? $x['ispublic'] : t('Visible to everybody')), '$linkurl' => t('Please enter a link URL:'), '$term' => t('Tag term:'), '$whereareu' => t('Where are you right now?'), -- cgit v1.2.3 From 8f16e9ad33e17fcdf5c0b4586b384ea12eeb0716 Mon Sep 17 00:00:00 2001 From: Treer Date: Sun, 1 May 2016 04:39:57 +1000 Subject: update icon names in include/ --- include/conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index b1b47df39..94f1e7da7 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -658,7 +658,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ ); $star = false; - $isstarred = "unstarred icon-star-empty"; + $isstarred = "unstarred fa-star-o"; $lock = (($item['item_private'] || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) ? t('Private Message') -- cgit v1.2.3 From c96b20c55969f96ba191d40908cf005b7f6a58da Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 30 Apr 2016 21:56:52 +0200 Subject: make mod editlayout use status_editor() --- include/conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index b1b47df39..2c1e18099 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1187,7 +1187,7 @@ function status_editor($a, $x, $popup = false) { $jotplugins = ''; $preview = t('Preview'); - if(x($x, 'nopreview')) + if(x($x, 'hide_preview')) $preview = ''; $defexpire = ((($z = get_pconfig($x['profile_uid'], 'system', 'default_post_expire')) && (! $webpage)) ? $z : ''); -- cgit v1.2.3