dimecris
Forum Replies Created
-
Forum: Plugins
In reply to: [mqTranslate] mqTranslate and WordPress 3.9I’ve installed wordpress 3.9 and mqtranslate (Versión 2.6.2.4 ) and all seem to go all right. But the shortcode ui button in tinyeditor (this is the plugin https://www.ads-software.com/plugins/shortcodes-ui/) disappear. If i disable mqtranslate the button appear again. So mqtranslate is forcing to miss the shorcode ui button.
This is the code they use (maybe is usefully to find the problem)
//add buttons public function Add_custom_buttons( $mce_buttons ){ $mce_buttons[] = '|'; $mce_buttons[] = 'ShortCodeUI'; return $mce_buttons; } public function insert_shortcode_button(){ ?> <style> .sc-desc{background: none repeat scroll 0 0 #F1fc5c;border-radius: 8px 8px 8px 8px;color: #777777;display: block;float: right;margin: 3px 0 10px 5px;max-width: 240px;padding: 15px;} .sc_att{width: 650px;} .sc_container{border:1px solid #ddd;border-bottom:0;background:#f9f9f9;margin-top: 5px;} #sc_f_table label{font-size:12px;font-weight:700;width:200px;display:block;float:left;} #sc_f_table input {padding:30px 10px;border-bottom:1px solid #ddd;border-top:1px solid #fff;} #sc_f_table small{display:block;float:right;width:200px;color:#999;} #sc_f_table input[type="text"], #sc_f_table select{width:280px;font-size:12px;padding:4px; color:#333;line-height:1em;background:#f3f3f3;} #sc_f_table input:focus, .#sc_f_table textarea:focus{background:#fff;} #sc_f_table textarea{width:280px;height:175px;font-size:12px;padding:4px;color:#333;line-height:1.5em;background:#f3f3f3;} #sc_f_table h3 {cursor:pointer;font-size:1em;text-transform: uppercase;margin:0;font-weight:bold;color:#232323;float:left;width:80%;padding:14px 4px;} #sc_f_table th, #sc_f_table td{border:1px solid #bbb;padding:10px;text-align:center;} #sc_f_table th, .#sc_f_table td.feature{border-color:#888;} @import "<?php plugins_url('css/jquery-ui.css',__FILE__);?> "; </style>'; <?php } //set button public function Insert_custom_buttons( $initArray ){ $image = plugins_url('images/tinymce_button.png',__FILE__); $initArray['setup'] = <<<JS [function(ed) { ed.addButton('ShortCodeUI', { title : 'ShortCodeUI', image : '$image', onclick : function() { //launch shortcode ui panel shui_editor = 'visual'; SimpleBox(null,'admin-ajax.php?action=sh_ui_panel','ShortCodes UI'); } }); }][0] JS; return $initArray; }
hi, the same problem. It happen only in custom post. The other page work perfectly.
Here is the code for custom post// Portfolio
$labels_portfolio = array(
‘add_new’ => ‘Add New’, ‘portfolio-type’,
‘add_new_item’ => ‘Add New Proyectos y Actividades’,
‘edit_item’ => ‘Edit Proyectos y Actividades Post’,
‘menu_name’ => ‘Proyectos y Actividades’,
‘name’ => ‘Portfolio’, ‘post type general name’,
‘new_item’ => ‘New Proyectos y Actividades Post’,
‘not_found’ => ‘No Proyectos y Actividades posts found’,
‘not_found_in_trash’ => ‘No Proyectos y Actividades posts found in Trash’,
‘parent_item_colon’ => ”,
‘singular_name’ => ‘Proyectos & Actividades Post’, ‘post type singular name’,
‘search_items’ => ‘Search Proyectos y Actividades Posts’,
‘view_item’ => ‘View Proyectos y Actividades Post’,
);
$args_portfolio = array(
‘capability_type’ => ‘post’,
‘has_archive’ => true,
‘hierarchical’ => true,
‘labels’ => $labels_portfolio,
‘menu_position’ => 4,
‘public’ => true,
‘publicly_queryable’ => true,
‘query_var’ => true,
‘show_in_menu’ => true,
‘show_ui’ => true,
‘supports’ => array( ‘comments’, ‘editor’, ‘excerpt’, ‘thumbnail’, ‘title’ ),
‘singular_label’ => ‘Portfolio’,
‘rewrite’ => array(‘slug’ => ‘proyectos-actividades’)
);
register_post_type( ‘portfolio-type’, $args_portfolio );