cruxwireweb
Forum Replies Created
-
Forum: Plugins
In reply to: [YENDIF Video Player & Video Gallery] Youtube API 404 errorThank you very much for your reply and explanation.
Forum: Plugins
In reply to: [YENDIF Video Player & Video Gallery] Youtube API 404 errorAlso, other plug-ins are Akismet, Contact Form 7, Shortcode Exec PHP, and Wordfence. Everything is up to date.
Forum: Fixing WordPress
In reply to: Images not displaying on phonesIt fixed itself – go figure.
Forum: Fixing WordPress
In reply to: Images not displaying on phonesMore info…, the alt tags are not displaying either.
Can anyone recommend a debugging app for Android?
Forum: Plugins
In reply to: [WP Social Sharing] Undefined index errorSorry – the site is not live, so I can’t give you a link.
Forum: Fixing WordPress
In reply to: TinyMCE4 and custom stylesIn my first post, I linked to an article but the link doesn’t work. The correct URL is http://www.wpexplorer.com/wordpress-tinymce-tweaks/.
It’ a great article with other helpful tweaks.
Forum: Fixing WordPress
In reply to: TinyMCE4 and custom stylesUnfortunately, I was not able to figure out how to add a class to the selected element (instead of adding it to a surrounding span.) Nor was I able to figure out how to change the label of the button to anything other than “Formats.”
Forum: Fixing WordPress
In reply to: TinyMCE4 and custom stylesYou are right – I totally suck for that. I’m sorry. Here’s what I figured out.
I created a plug-in. The plug-in contains one PHP file and one js file in a folder titled js.
PHP File
This is the relevant code. The file contains some other code as well, such as defining custom colors. (More info here.)
/* Plugin Name: CW Custom TinyMCE Description: Customizations for TinyMCE 4 */ // --- CUSTOM TINY MCE BUTTON ---------------------------- // Use the PHP below in functions.php and also add the javascript in a seperate file in the theme's js folder. // Hooks your functions into the correct filters function my_add_mce_button() { // check user permissions if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) { return; } // check if WYSIWYG is enabled if ( 'true' == get_user_option( 'rich_editing' ) ) { add_filter( 'mce_external_plugins', 'my_add_tinymce_plugin' ); } } add_action('admin_head', 'my_add_mce_button'); // Declare script for new button function my_add_tinymce_plugin( $plugin_array ) { // customize for each button $plugin_array['cw_font_size_btn'] = plugins_url( 'js/tinymce-custom.js', __FILE__ ); return $plugin_array; }JS File
My javascript is definitely amateur, but this works for me.
(function() { tinymce.PluginManager.add('cw_font_size_btn', function( editor, url ) { editor.addButton( 'cw_font_size_btn', { type: 'listbox', text: 'Font Size',// name on the listbox in the ui icon: false, classes: 'fixed-width widget btn',// adds classes to the div surrounding the <button>. don't need the 'mce-' prefix onselect: function(e) { }, values: [ {text: 'Bigger', onclick : function() { var selected2 = tinyMCE.activeEditor.selection.getContent(); var content2 = ''; var spantitleclass = ' class="bigger"'; if (selected2 !== '') { content2 = '<span'+spantitleclass+'>' + selected2 + '</span>'; } else { content2 = '<span'+spantitleclass+'></span>'; } tinymce.execCommand('mceInsertContent', false, content2); }}, {text: 'Big', onclick : function() { var selected2 = tinyMCE.activeEditor.selection.getContent(); var content2 = ''; var spantitleclass = ' class= "big"'; if (selected2 !== '') { content2 = '<span'+spantitleclass+'>' + selected2 + '</span>'; } else { content2 = '<span'+spantitleclass+'></span>'; } tinymce.execCommand('mceInsertContent', false, content2); }}, {text: 'Small', onclick : function() { var selected2 = tinyMCE.activeEditor.selection.getContent(); var content2 = ''; var spantitleclass = ' class= "small"'; if (selected2 !== '') { content2 = '<span'+spantitleclass+'>' + selected2 + '</span>'; } else { content2 = '<span'+spantitleclass+'></span>'; } tinymce.execCommand('mceInsertContent', false, content2); }}, {text: 'Smaller', onclick : function() { var selected2 = tinyMCE.activeEditor.selection.getContent(); var content2 = ''; var spantitleclass = ' class= "smaller"'; if (selected2 !== '') { content2 = '<span'+spantitleclass+'>' + selected2 + '</span>'; } else { content2 = '<span'+spantitleclass+'></span>'; } tinymce.execCommand('mceInsertContent', false, content2); }}, ] }); }); })();Upload and activate the plug-in.
Forum: Fixing WordPress
In reply to: TinyMCE4 and custom stylesI figured this out, but don’t have time to post the solution – gotta run. I will post the solution tonight or tomorrow though.
Forum: Plugins
In reply to: [Advanced Editor Tools] Please include Color Picker OptionsI second this.
Forum: Hacks
In reply to: Adding Styles to TinyMCE 4.0 (WP 3.9)The answer is here: http://www.wpexplorer.com/wordpress-tinymce-tweaks/
Forum: Fixing WordPress
In reply to: Moved Blog – galleries don't workBump. Can anyone help?
Forum: Fixing WordPress
In reply to: Client can't log inOK. I was hoping to avoid the line-by-line thing, but at least I know there isn’t a viable alternative. Thanks again for your help.
Forum: Fixing WordPress
In reply to: Client can't log inUnless Wordfence or Sucuri checked the database?
Forum: Fixing WordPress
In reply to: Client can't log inActually, I haven’t checked he database yet – still figuring out how. 😉 Do you know if there is a tool I can use for this?