From 9d5384f107ddb5d4c652e75c91ef8622a00d3ce0 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 26 Jan 2017 22:50:27 -0500 Subject: [PATCH] - Remove tinyMCE mentions or convert to addeditortext() - Remove $editselect template value --- include/conversation.php | 11 -- js/acl.js | 117 ++++++++++---------- js/autocomplete.js | 103 +++++++----------- js/main.js | 57 ---------- mod/cal.php | 6 -- mod/contacts.php | 6 -- mod/editpost.php | 10 -- mod/events.php | 7 -- mod/message.php | 17 --- mod/profiles.php | 10 -- mod/wallmessage.php | 10 -- view/templates/contact_head.tpl | 32 ------ view/templates/event_head.tpl | 39 ------- view/templates/head.tpl | 1 - view/templates/jot-header.tpl | 165 ++++------------------------- view/templates/msg-header.tpl | 61 +---------- view/templates/profed_head.tpl | 41 +------ view/templates/wallmsg-header.tpl | 51 +-------- view/theme/frio/templates/head.tpl | 1 - 19 files changed, 122 insertions(+), 623 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 571e2face..a1d086cb9 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1170,23 +1170,14 @@ function format_like($cnt,$arr,$type,$id) { function status_editor($a,$x, $notes_cid = 0, $popup=false) { - $o = ''; $geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : ''); -/* $plaintext = false; - if( local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext')) ) - $plaintext = true;*/ - $plaintext = true; - if( local_user() && feature_enabled(local_user(),'richtext') ) - $plaintext = false; - $tpl = get_markup_template('jot-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, array( '$newpost' => 'true', '$baseurl' => App::get_baseurl(true), - '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$geotag' => $geotag, '$nickname' => $x['nickname'], '$ispublic' => t('Visible to everybody'), @@ -1199,12 +1190,10 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { '$delitems' => t('Delete item(s)?') )); - $tpl = get_markup_template('jot-end.tpl'); $a->page['end'] .= replace_macros($tpl, array( '$newpost' => 'true', '$baseurl' => App::get_baseurl(true), - '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$geotag' => $geotag, '$nickname' => $x['nickname'], '$ispublic' => t('Visible to everybody'), diff --git a/js/acl.js b/js/acl.js index 3c96d1346..4924ac128 100644 --- a/js/acl.js +++ b/js/acl.js @@ -1,12 +1,12 @@ function ACL(backend_url, preset, automention, is_mobile){ - + this.url = backend_url; this.automention = automention; this.is_mobile = is_mobile; - - + + this.kp_timer = null; - + if (preset==undefined) preset = []; this.allow_cid = (preset[0] || []); this.allow_gid = (preset[1] || []); @@ -19,74 +19,69 @@ function ACL(backend_url, preset, automention, is_mobile){ } else { this.nw = 4; } - - + + this.list_content = $("#acl-list-content"); this.item_tpl = unescape($(".acl-list-item[rel=acl-template]").html()); this.showall = $("#acl-showall"); if (preset.length==0) this.showall.addClass("selected"); - + /*events*/ this.showall.click(this.on_showall.bind(this)); $(document).on("click", ".acl-button-show", this.on_button_show.bind(this)); $(document).on("click", ".acl-button-hide", this.on_button_hide.bind(this)); $("#acl-search").keypress(this.on_search.bind(this)); $("#acl-wrapper").parents("form").submit(this.on_submit.bind(this)); - + /* add/remove mentions */ this.element = $("#profile-jot-text"); this.htmlelm = this.element.get()[0]; - + /* startup! */ this.get(0,100); } ACL.prototype.remove_mention = function(id) { - if (!this.automention) return; - var nick = this.data[id].nick; - var searchText = "@"+nick+"+"+id+" "; - if (tinyMCE.activeEditor===null) { - start = this.element.val().indexOf(searchText); - if ( start<0) return; - end = start+searchText.length; - this.element.setSelection(start,end).replaceSelectedText('').collapseSelection(false); - } else { - start = tinyMCE.activeEditor.getContent({format : 'raw'}).search( searchText ); - if ( start<0 ) return; - txt = tinyMCE.activeEditor.getContent(); - newtxt = txt.replace(searchText, ''); - tinyMCE.activeEditor.setContent(newtxt); + if (!this.automention) { + return; } + var nick = this.data[id].nick; + var searchText = "@" + nick + "+" + id + " "; + var start = this.element.val().indexOf(searchText); + if (start < 0) { + return; + } + var end = start + searchText.length; + this.element.setSelection(start, end).replaceSelectedText('').collapseSelection(false); } ACL.prototype.add_mention = function(id) { - if (!this.automention) return; - var nick = this.data[id].nick; - var searchText = "@"+nick+"+"+id+" "; - if (tinyMCE.activeEditor===null) { - if ( this.element.val().indexOf( searchText) >= 0 ) return; - this.element.val( searchText + this.element.val() ); - } else { - if ( tinyMCE.activeEditor.getContent({format : 'raw'}).search(searchText) >= 0 ) return; - tinyMCE.activeEditor.dom.add(tinyMCE.activeEditor.getBody(), 'dummy', {}, searchText); + if (!this.automention) { + return; } + var nick = this.data[id].nick; + var searchText = "@" + nick + "+" + id + " "; + if (this.element.val().indexOf( searchText) >= 0 ) { + return; + } + this.element.val(searchText + this.element.val()); } ACL.prototype.on_submit = function(){ - aclfileds = $("#acl-fields").html(""); + var aclfields = $("#acl-fields").html(""); $(this.allow_gid).each(function(i,v){ - aclfileds.append(""); + aclfields.append(""); }); $(this.allow_cid).each(function(i,v){ - aclfileds.append(""); + aclfields.append(""); }); $(this.deny_gid).each(function(i,v){ - aclfileds.append(""); + aclfields.append(""); }); $(this.deny_cid).each(function(i,v){ - aclfileds.append(""); - }); + aclfields.append(""); + }); } ACL.prototype.search = function(){ @@ -103,19 +98,19 @@ ACL.prototype.on_search = function(event){ ACL.prototype.on_showall = function(event){ event.preventDefault() event.stopPropagation(); - + if (this.showall.hasClass("selected")){ return false; } this.showall.addClass("selected"); - + this.allow_cid = []; this.allow_gid = []; this.deny_cid = []; this.deny_gid = []; - + this.update_view(); - + return false; } @@ -123,7 +118,7 @@ ACL.prototype.on_button_show = function(event){ event.preventDefault() event.stopImmediatePropagation() event.stopPropagation(); - + this.set_allow($(event.target).parent().attr('id')); return false; @@ -141,7 +136,7 @@ ACL.prototype.on_button_hide = function(event){ ACL.prototype.set_allow = function(itemid){ type = itemid[0]; id = parseInt(itemid.substr(1)); - + switch(type){ case "g": if (this.allow_gid.indexOf(id)<0){ @@ -159,7 +154,7 @@ ACL.prototype.set_allow = function(itemid){ this.allow_cid.remove(id); if (this.data[id].forum=="1") this.remove_mention(id); } - if (this.deny_cid.indexOf(id)>=0) this.deny_cid.remove(id); + if (this.deny_cid.indexOf(id)>=0) this.deny_cid.remove(id); break; } this.update_view(); @@ -168,7 +163,7 @@ ACL.prototype.set_allow = function(itemid){ ACL.prototype.set_deny = function(itemid){ type = itemid[0]; id = parseInt(itemid.substr(1)); - + switch(type){ case "g": if (this.deny_gid.indexOf(id)<0){ @@ -202,31 +197,31 @@ ACL.prototype.update_view = function(){ /* jot acl */ $('#jot-perms-icon').removeClass('lock').addClass('unlock'); $('#jot-public').show(); - $('.profile-jot-net input').attr('disabled', false); + $('.profile-jot-net input').attr('disabled', false); if(typeof editor != 'undefined' && editor != false) { $('#profile-jot-desc').html(ispublic); } - + } else { this.showall.removeClass("selected"); /* jot acl */ $('#jot-perms-icon').removeClass('unlock').addClass('lock'); $('#jot-public').hide(); - $('.profile-jot-net input').attr('disabled', 'disabled'); + $('.profile-jot-net input').attr('disabled', 'disabled'); $('#profile-jot-desc').html(' '); } $("#acl-list-content .acl-list-item").each(function(){ $(this).removeClass("groupshow grouphide"); }); - + $("#acl-list-content .acl-list-item").each(function(index, element){ itemid = $(element).attr('id'); type = itemid[0]; id = parseInt(itemid.substr(1)); - + btshow = $(element).children(".acl-button-show").removeClass("selected"); - bthide = $(element).children(".acl-button-hide").removeClass("selected"); - + bthide = $(element).children(".acl-button-hide").removeClass("selected"); + switch(type){ case "g": var uclass = ""; @@ -240,7 +235,7 @@ ACL.prototype.update_view = function(){ bthide.addClass("selected"); uclass="grouphide"; } - + $(this.group_uids[id]).each(function(i,v) { if(uclass == "grouphide") $("#c"+v).removeClass("groupshow"); @@ -253,7 +248,7 @@ ACL.prototype.update_view = function(){ $("#c"+v).addClass(uclass); } }); - + break; case "c": if (this.allow_cid.indexOf(id)>=0){ @@ -263,11 +258,11 @@ ACL.prototype.update_view = function(){ if (this.deny_cid.indexOf(id)>=0){ btshow.removeClass("selected"); bthide.addClass("selected"); - } + } } - + }.bind(this)); - + } @@ -277,7 +272,7 @@ ACL.prototype.get = function(start,count, search){ count:count, search:search, } - + $.ajax({ type:'POST', url: this.url, @@ -295,7 +290,7 @@ ACL.prototype.populate = function(data){ html = "
"+this.item_tpl+"
"; html = html.format(item.photo, item.name, item.type, item.id, (item.forum=='1'?'forum':''), item.network, item.link); if (item.uids!=undefined) this.group_uids[item.id] = item.uids; - + this.list_content.append(html); this.data[item.id] = item; }.bind(this)); @@ -303,7 +298,7 @@ ACL.prototype.populate = function(data){ // Add src attribute for images with a data-src attribute $(el).attr('src', $(el).data("src")); }); - + this.update_view(); } diff --git a/js/autocomplete.js b/js/autocomplete.js index 601544eaa..8702abbcf 100644 --- a/js/autocomplete.js +++ b/js/autocomplete.js @@ -2,10 +2,10 @@ * @brief Friendica people autocomplete * * require jQuery, jquery.textcomplete - * + * * for further documentation look at: * http://yuku-t.com/jquery-textcomplete/ - * + * * https://github.com/yuku-t/jquery-textcomplete/blob/master/doc/how_to_use.md */ @@ -91,7 +91,7 @@ function editor_replace(item) { // 16 chars of hash should be enough. Full hash could be used if it can be done in a visually appealing way. // 16 chars is also the minimum length in the backend (otherwise it's interpreted as a local id). - if(id.length > 16) + if(id.length > 16) id = item.id.substring(0,16); return '$1$2' + item.nick.replace(' ', '') + '+' + id + ' '; @@ -347,61 +347,38 @@ function string2bb(element) { })( jQuery ); /** - * Friendica people autocomplete legacy - * code which is needed for tinymce + * Friendica people autocomplete legacy code * * require jQuery, jquery.textareas */ - -function ACPopup(elm,backend_url){ - this.idsel=-1; +function ACPopup(elm, backend_url){ + this.idsel = -1; this.element = elm; - this.searchText=""; - this.ready=true; + this.searchText = ''; + this.ready = true; this.kp_timer = false; this.url = backend_url; this.conversation_id = null; var conv_id = this.element.id.match(/\d+$/); - if (conv_id) this.conversation_id = conv_id[0]; - console.log("ACPopup elm id",this.element.id,"conversation",this.conversation_id); - - var w = 530; - var h = 130; - - - if(tinyMCE.activeEditor == null) { - style = $(elm).offset(); - w = $(elm).width(); - h = $(elm).height(); - } - else { - // I can't find an "official" way to get the element who get all - // this fraking thing that is tinyMCE. - // This code will broke again at some point... - var container = $(tinyMCE.activeEditor.getContainer()).find("table"); - style = $(container).offset(); - w = $(container).width(); - h = $(container).height(); + if (conv_id) { + this.conversation_id = conv_id[0]; } - style.top=style.top+h; + var w = $(elm).width(); + var h = $(elm).height(); + + var style = $(elm).offset(); + style.top = style.top + h; style.width = w; style.position = 'absolute'; - /* style['max-height'] = '150px'; - style.border = '1px solid red'; - style.background = '#cccccc'; - - style.overflow = 'auto'; - style['z-index'] = '100000'; - */ style.display = 'none'; - this.cont = $("
"); + this.cont = $('
'); this.cont.css(style); - $("body").append(this.cont); - } + $('body').append(this.cont); +} ACPopup.prototype.close = function(){ $(this.cont).remove(); @@ -449,48 +426,42 @@ ACPopup.prototype._search = function(){ } ACPopup.prototype.add = function(label, value){ - var that=this; - var elm = $("
"+label+"
"); + var that = this; + var elm = $('
' + label + '
'); elm.click(function(e){ - t = $(this).attr('title').replace(new RegExp(' \- .*'),''); - if(typeof(that.element.container) === "undefined") { - el=$(that.element); - sel = el.getSelection(); - sel.start = sel.start- that.searchText.length; - el.setSelection(sel.start,sel.end).replaceSelectedText(t+' ').collapseSelection(false); - that.close(); - } - else { - txt = tinyMCE.activeEditor.getContent(); - // alert(that.searchText + ':' + t); - newtxt = txt.replace('@' + that.searchText,'@' + t +' '); - tinyMCE.activeEditor.setContent(newtxt); - tinyMCE.activeEditor.focus(); - that.close(); - } + t = $(this).attr('title').replace(new RegExp(' \- .*'), ''); + el = $(that.element); + sel = el.getSelection(); + sel.start = sel.start - that.searchText.length; + el.setSelection(sel.start, sel.end).replaceSelectedText(t + ' ').collapseSelection(false); + that.close(); }); $(this.cont).append(elm); } ACPopup.prototype.onkey = function(event){ if (event.keyCode == '13') { - if(this.idsel>-1) { + if(this.idsel > -1) { this.cont.children()[this.idsel].click(); event.preventDefault(); - } - else + } else { this.close(); + } } if (event.keyCode == '38') { //cursor up - cmax = this.cont.children().size()-1; + var cmax = this.cont.children().size() - 1; this.idsel--; - if (this.idsel<0) this.idsel=cmax; + if (this.idsel < 0) { + this.idsel = cmax; + } event.preventDefault(); } if (event.keyCode == '40' || event.keyCode == '9') { //cursor down - cmax = this.cont.children().size()-1; + var cmax = this.cont.children().size() - 1; this.idsel++; - if (this.idsel>cmax) this.idsel=0; + if (this.idsel > cmax) { + this.idsel = 0; + } event.preventDefault(); } diff --git a/js/main.js b/js/main.js index 1b7b304a2..13bd50bd8 100644 --- a/js/main.js +++ b/js/main.js @@ -118,9 +118,6 @@ input.val(val); }); - /* setup field_richtext */ - setupFieldRichtext(); - /* popup menus */ function close_last_popup_menu() { if(last_popup_menu) { @@ -655,7 +652,6 @@ function preview_post() { $("#jot-preview").val("1"); $("#jot-preview-content").show(); - tinyMCE.triggerSave(); $.post( "item", $("#profile-jot-form").serialize(), @@ -767,59 +763,6 @@ function notifyMarkAll() { }); } - -// code from http://www.tinymce.com/wiki.php/How-to_implement_a_custom_file_browser -function fcFileBrowser (field_name, url, type, win) { - /* TODO: If you work with sessions in PHP and your client doesn't accept cookies you might need to carry - the session name and session ID in the request string (can look like this: "?PHPSESSID=88p0n70s9dsknra96qhuk6etm5"). - These lines of code extract the necessary parameters and add them back to the filebrowser URL again. */ - - - var cmsURL = baseurl+"/fbrowser/"+type+"/"; - - tinyMCE.activeEditor.windowManager.open({ - file : cmsURL, - title : 'File Browser', - width : 420, // Your dimensions may differ - toy around with them! - height : 400, - resizable : "yes", - inline : "yes", // This parameter only has an effect if you use the inlinepopups plugin! - close_previous : "no" - }, { - window : win, - input : field_name - }); - return false; - } - -function setupFieldRichtext(){ - tinyMCE.init({ - theme : "advanced", - mode : "specific_textareas", - editor_selector: "fieldRichtext", - plugins : "bbcode,paste, inlinepopups", - theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code", - theme_advanced_buttons2 : "", - theme_advanced_buttons3 : "", - theme_advanced_toolbar_location : "top", - theme_advanced_toolbar_align : "center", - theme_advanced_blockformats : "blockquote,code", - theme_advanced_resizing : true, - paste_text_sticky : true, - entity_encoding : "raw", - add_unload_trigger : false, - remove_linebreaks : false, - //force_p_newlines : false, - //force_br_newlines : true, - forced_root_block : 'div', - convert_urls: false, - content_css: baseurl+"/view/custom_tinymce.css", - theme_advanced_path : false, - file_browser_callback : "fcFileBrowser", - }); -} - - /** * sprintf in javascript * "{0} and {1}".format('zero','uno'); diff --git a/mod/cal.php b/mod/cal.php index e70128d33..f43a4e8a7 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -67,10 +67,6 @@ function cal_init(App $a) { function cal_content(App $a) { nav_set_selected('events'); - $editselect = 'none'; - if( feature_enabled(local_user(), 'richtext') ) - $editselect = 'textareas'; - // First day of the week (0 = Sunday) $firstDay = get_pconfig(local_user(),'system','first_day_of_week'); if ($firstDay === false) $firstDay=0; @@ -84,13 +80,11 @@ function cal_content(App $a) { '$module_url' => '/cal/' . $a->data['user']['nickname'], '$modparams' => 2, '$i18n' => $i18n, - '$editselect' => $editselect )); $etpl = get_markup_template('event_end.tpl'); $a->page['end'] .= replace_macros($etpl,array( '$baseurl' => App::get_baseurl(), - '$editselect' => $editselect )); $o =""; diff --git a/mod/contacts.php b/mod/contacts.php index 7882fac1d..9394e81bb 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -489,17 +489,11 @@ function contacts_content(App $a) { $contact_id = $a->data['contact']['id']; $contact = $a->data['contact']; - $editselect = 'none'; - if( feature_enabled(local_user(),'richtext') ) - $editselect = 'exact'; - $a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array( '$baseurl' => App::get_baseurl(true), - '$editselect' => $editselect, )); $a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), array( '$baseurl' => App::get_baseurl(true), - '$editselect' => $editselect, )); require_once('include/contact_selectors.php'); diff --git a/mod/editpost.php b/mod/editpost.php index 2eb427727..f3746317a 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -28,14 +28,6 @@ function editpost_content(App $a) { return; } -/* $plaintext = false; - if( local_user() && intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext') ) - $plaintext = true;*/ - $plaintext = true; - if( local_user() && feature_enabled(local_user(),'richtext') ) - $plaintext = false; - - $o .= replace_macros(get_markup_template("section_title.tpl"),array( '$title' => t('Edit post') )); @@ -43,7 +35,6 @@ function editpost_content(App $a) { $tpl = get_markup_template('jot-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, array( '$baseurl' => App::get_baseurl(), - '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$ispublic' => ' ', // t('Visible to everybody'), '$geotag' => $geotag, '$nickname' => $a->user['nickname'] @@ -52,7 +43,6 @@ function editpost_content(App $a) { $tpl = get_markup_template('jot-end.tpl'); $a->page['end'] .= replace_macros($tpl, array( '$baseurl' => App::get_baseurl(), - '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$ispublic' => ' ', // t('Visible to everybody'), '$geotag' => $geotag, '$nickname' => $a->user['nickname'] diff --git a/mod/events.php b/mod/events.php index 37dc97f0f..ac0c444cb 100644 --- a/mod/events.php +++ b/mod/events.php @@ -220,11 +220,6 @@ function events_content(App $a) { nav_set_selected('events'); } - $editselect = 'none'; - if ( feature_enabled(local_user(), 'richtext') ) { - $editselect = 'textareas'; - } - // get the translation strings for the callendar $i18n = get_event_strings(); @@ -234,13 +229,11 @@ function events_content(App $a) { '$module_url' => '/events', '$modparams' => 1, '$i18n' => $i18n, - '$editselect' => $editselect )); $etpl = get_markup_template('event_end.tpl'); $a->page['end'] .= replace_macros($etpl,array( '$baseurl' => App::get_baseurl(), - '$editselect' => $editselect )); $o =""; diff --git a/mod/message.php b/mod/message.php index 5f5f9f98e..1a808701e 100644 --- a/mod/message.php +++ b/mod/message.php @@ -275,18 +275,9 @@ function message_content(App $a) { $o .= $header; -/* $plaintext = false; - if(intval(get_pconfig(local_user(),'system','plaintext'))) - $plaintext = true;*/ - $plaintext = true; - if( local_user() && feature_enabled(local_user(),'richtext') ) - $plaintext = false; - - $tpl = get_markup_template('msg-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, array( '$baseurl' => App::get_baseurl(true), - '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$nickname' => $a->user['nickname'], '$linkurl' => t('Please enter a link URL:') )); @@ -294,7 +285,6 @@ function message_content(App $a) { $tpl = get_markup_template('msg-end.tpl'); $a->page['end'] .= replace_macros($tpl, array( '$baseurl' => App::get_baseurl(true), - '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$nickname' => $a->user['nickname'], '$linkurl' => t('Please enter a link URL:') )); @@ -397,10 +387,6 @@ function message_content(App $a) { $o .= $header; - $plaintext = true; - if( local_user() && feature_enabled(local_user(),'richtext') ) - $plaintext = false; - $r = q("SELECT `mail`.*, `contact`.`name`, `contact`.`url`, `contact`.`thumb` FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id` WHERE `mail`.`uid` = %d AND `mail`.`id` = %d LIMIT 1", @@ -439,7 +425,6 @@ function message_content(App $a) { $tpl = get_markup_template('msg-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, array( '$baseurl' => App::get_baseurl(true), - '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$nickname' => $a->user['nickname'], '$linkurl' => t('Please enter a link URL:') )); @@ -447,12 +432,10 @@ function message_content(App $a) { $tpl = get_markup_template('msg-end.tpl'); $a->page['end'] .= replace_macros($tpl, array( '$baseurl' => App::get_baseurl(true), - '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$nickname' => $a->user['nickname'], '$linkurl' => t('Please enter a link URL:') )); - $mails = array(); $seen = 0; $unknown = false; diff --git a/mod/profiles.php b/mod/profiles.php index abc9dda55..dd926d488 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -623,23 +623,13 @@ function profiles_content(App $a) { require_once('include/profile_selectors.php'); -/* $editselect = 'textareas'; - if( intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext') ) - $editselect = 'none';*/ - $editselect = 'none'; - if( feature_enabled(local_user(),'richtext') ) - $editselect = 'textareas'; - $a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array( '$baseurl' => App::get_baseurl(true), - '$editselect' => $editselect, )); $a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), array( '$baseurl' => App::get_baseurl(true), - '$editselect' => $editselect, )); - $opt_tpl = get_markup_template("profile-hide-friends.tpl"); $hide_friends = replace_macros($opt_tpl,array( '$yesno' => array( diff --git a/mod/wallmessage.php b/mod/wallmessage.php index c0a30bdcf..257ba6a89 100644 --- a/mod/wallmessage.php +++ b/mod/wallmessage.php @@ -113,16 +113,9 @@ function wallmessage_content(App $a) { return; } - - - $editselect = 'none'; - if( feature_enabled(local_user(), 'richtext') ) - $editselect = '/(profile-jot-text|prvmail-text)/'; - $tpl = get_markup_template('wallmsg-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(true), - '$editselect' => $editselect, '$nickname' => $user['nickname'], '$linkurl' => t('Please enter a link URL:') )); @@ -130,13 +123,10 @@ function wallmessage_content(App $a) { $tpl = get_markup_template('wallmsg-end.tpl'); $a->page['end'] .= replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(true), - '$editselect' => $editselect, '$nickname' => $user['nickname'], '$linkurl' => t('Please enter a link URL:') )); - - $tpl = get_markup_template('wallmessage.tpl'); $o .= replace_macros($tpl,array( '$header' => t('Send Private Message'), diff --git a/view/templates/contact_head.tpl b/view/templates/contact_head.tpl index ceda781ea..e69de29bb 100644 --- a/view/templates/contact_head.tpl +++ b/view/templates/contact_head.tpl @@ -1,32 +0,0 @@ - - - - diff --git a/view/templates/event_head.tpl b/view/templates/event_head.tpl index 5461ea947..b794e6dc4 100644 --- a/view/templates/event_head.tpl +++ b/view/templates/event_head.tpl @@ -156,49 +156,10 @@ }); -{{if $editselect != 'none'}} - - diff --git a/view/templates/jot-header.tpl b/view/templates/jot-header.tpl index 7498bfc42..6ddd69545 100644 --- a/view/templates/jot-header.tpl +++ b/view/templates/jot-header.tpl @@ -2,12 +2,11 @@ - - - - + \ No newline at end of file diff --git a/view/templates/wallmsg-header.tpl b/view/templates/wallmsg-header.tpl index 2d4cd2379..3208ac460 100644 --- a/view/templates/wallmsg-header.tpl +++ b/view/templates/wallmsg-header.tpl @@ -1,52 +1,5 @@ - - - -