Title: Pionect's Replies | WordPress.org

---

# Pionect

  [  ](https://wordpress.org/support/users/pionect/)

 *   [Profile](https://wordpress.org/support/users/pionect/)
 *   [Topics Started](https://wordpress.org/support/users/pionect/topics/)
 *   [Replies Created](https://wordpress.org/support/users/pionect/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/pionect/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/pionect/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/pionect/engagements/)
 *   [Favorites](https://wordpress.org/support/users/pionect/favorites/)

 Search replies:

## Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Phimind Excel Export Plus] Configurable capability](https://wordpress.org/support/topic/configurable-capability/)
 *  Thread Starter [Pionect](https://wordpress.org/support/users/pionect/)
 * (@pionect)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/configurable-capability/#post-4632830)
 * I made a change in _class.phimind.php_ on line 78.
    To change the capability ‘
   edit_plugins’ to ‘eeplus’
 * And in my plugin i’ve added:
 *     ```
       register_activation_hook( __FILE__, array("pnct_excelExport", "add_permissions") );
   
       class pnct_excelExport{
   
           function add_permissions(){
               global $wp_roles;
               $wp_roles->add_cap("administrator", "eeplus");
               $wp_roles->add_cap("editor", "eeplus");
           }
   
       }
       new pnct_excelExport();
       ```
   
 * It would be easy if you changed line 78 like this:
 *     ```
       $capability = apply_filters('phimind_excel_export_capability', 'edit_plugins');
       add_submenu_page( ... , $capability,  ... );
       ```
   
 * Or you could set it fixed to something like ‘eeplus’, like I did.
    In that case
   it would be nice if you’d include the first piece of code with ‘add_permissions’.
   And then add a filter so others are able to change the affected roles.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Phimind Excel Export Plus] CSS problem with bootstrap](https://wordpress.org/support/topic/css-problem-with-bootstrap/)
 *  Thread Starter [Pionect](https://wordpress.org/support/users/pionect/)
 * (@pionect)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/css-problem-with-bootstrap/#post-4633374)
 * It’s not a good practice to make changes in a framework but I simply removed 
   the troublemakers from bootstrap’s CSS.
    I guess the bootstrap doesn’t necessarily
   has to get updated ever.
 * I’ve removed this two pieces:
 *     ```
       body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}
       a{color:#08c;text-decoration:none}
       a:hover,a:focus{color:#005580;text-decoration:underline}
       ```
   
 * and
 *     ```
       ul,ol{padding:0;margin:0 0 10px 25px}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Specific Content] Select Default Options for all posts](https://wordpress.org/support/topic/select-default-options-for-all-posts/)
 *  [Pionect](https://wordpress.org/support/users/pionect/)
 * (@pionect)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/select-default-options-for-all-posts/#post-4340194)
 * I didn’t try to dictate you, my apologies if it looked like that.
    Consider this
   my feature request. To me it seemed helpful for the community to be able to set
   defaults.
 * Two solutions are: custom hooks in your plugin or a settingspage for your plugin.
 * For others looking for a solution, here is mine:
    add the following code to your
   theme’s functions.php
 *     ```
       add_action('admin_enqueue_scripts', array($this, 'private_usc_script') );
   
       function private_usc_script($hook) {
         if( 'post-new.php' != $hook ){
           return;
         }
   
         wp_enqueue_script( 'privatecontent', get_template_directory_uri() . '/js/privatecontent.js' );
       }
       ```
   
 * create a new file in your theme’s js folder called ‘privatecontent.js’
 *     ```
       jQuery(document).ready(function($){
          $('#User_specific_content input[name*=logged]:first').prop('checked',true);
       });
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[User Specific Content] Select Default Options for all posts](https://wordpress.org/support/topic/select-default-options-for-all-posts/)
 *  [Pionect](https://wordpress.org/support/users/pionect/)
 * (@pionect)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/select-default-options-for-all-posts/#post-4340192)
 * I’m not satisfied with this answer.
 * Allmost all posts on my site should be private by default except for a few that
   should be public.
    This piece of code would make all posts the same, even after
   the editor changed the U_S_C settings. Isn’t it possible to set defaults for 
   the metaboxes on ‘new posts/pages’ so they can be overwritten by editors?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Phimind Excel Export Plus] Categories on the Export](https://wordpress.org/support/topic/categories-on-the-export/)
 *  [Pionect](https://wordpress.org/support/users/pionect/)
 * (@pionect)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/categories-on-the-export/#post-4176518)
 * [@sterdog](https://wordpress.org/support/users/sterdog/): I’ve changed my query
   to fit different database prefixes. I hope this will fix your issue.
 *     ```
       case "categories":
       global $wpdb;
       $query = "SELECT GROUP_CONCAT(t.name) as categories
       FROM ".$wpdb->prefix."term_relationships tr
       INNER JOIN ".$wpdb->prefix."term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
       INNER JOIN ".$wpdb->prefix."terms t ON t.term_id = tt.term_id
       WHERE object_id = $post->ID ";
       $field_value = $wpdb->get_var( $query );
       break;
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Phimind Excel Export Plus] Categories on the Export](https://wordpress.org/support/topic/categories-on-the-export/)
 *  [Pionect](https://wordpress.org/support/users/pionect/)
 * (@pionect)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/categories-on-the-export/#post-4176504)
 * I’ve just build the feature to export the categories (not the filter).
    There
   are only two additions to be made in /controllers/class.phimind_excel_export_plus.
   php
 * First on line 50 add
    `$this->array_wp_custom_columns["categories"] = "Categories";`
 * The second addition on line 318
 *     ```
       case "categories":
       $query = 'SELECT GROUP_CONCAT(t.name) as categories
       FROM wp_term_relationships tr
       INNER JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
       INNER JOIN wp_terms t ON t.term_id = tt.term_id
       WHERE object_id = '.$post->ID;
       global $wpdb;
       $field_value = $wpdb->get_var( $query );
       break;
       ```
   
 * [@yuri](https://wordpress.org/support/users/yuri/), could you insert this into
   the plugin?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Phimind Excel Export Plus] CSS problem with bootstrap](https://wordpress.org/support/topic/css-problem-with-bootstrap/)
 *  Thread Starter [Pionect](https://wordpress.org/support/users/pionect/)
 * (@pionect)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/css-problem-with-bootstrap/#post-4633024)
 * Secondly the style of the page ‘Excel Export +’ isn’t correct.
    The page has 
   a white background but not if you scroll down. The white background is comming
   from bootstrap.
 * If the admin menu is not as long as the browser window, the bottom turns to white
   instead of being black.

Viewing 7 replies - 1 through 7 (of 7 total)