Forum Replies Created

Viewing 15 replies - 16 through 30 (of 43 total)
  • I am getting the same error

    Thread Starter carla_chalmers

    (@txhorselady)

    I wiped out the test multisite and reinstalled with the latest release. Everything works fine. Must have been pilot error of some type :{

    same for me

    Thread Starter carla_chalmers

    (@txhorselady)

    Great …. thank you very much.

    Thread Starter carla_chalmers

    (@txhorselady)

    anyone?

    Thread Starter carla_chalmers

    (@txhorselady)

    I’m not sure that you would want the custom post type definitions to automatically appear across all blogs. Say a network owner wants to give blog owners the ability to create their own custom post types. In that case there probably should be an option in the plugin configuration that allows the administrator to make the admin menu visible/hidden for blog owners.

    All getting a bit complicated …..HUH?

    Thread Starter carla_chalmers

    (@txhorselady)

    Thread Starter carla_chalmers

    (@txhorselady)

    I’m still in the learning stages on the inner workings of multisite. WordPress multisite works just like wordpress.com

    Basically a new user registers on the main site and is given an option to create a site. (I will be using one of several plugins available to monetize the process) I am using the sub-domain method vs the sub-folder method for the sites. The actual sub-domain is virtual. WordPress creates the necessary files in wp-content/blogs.dir/blog# The directory is actually empty until a user uploads some media. Overrides may also be put in this directory.

    I placed the admin_menu.php in blogs.dir/4/files/cctm/config/menus. The plugin works but the actual content type “Pedigrees” did not show up. I haven’t had any success with importing the content type though. I tried importing the json file but nothing happens. Then I put it in blogs.dir/blog#/files/cctm/defs so i could use the “Definitions on File” option. I am receiving the following errors for each of the custom fields:

    Notice: Undefined index: port in /var/www/vhosts/my-domain.com/httpdocs/wp-content/plugins/custom-content-type-manager/includes/CCTM.php on line 1419 Notice: Undefined index: port in /var/www/vhosts/my-domain.com/httpdocs/wp-content/plugins/custom-content-type-manager/includes/CCTM.php on line 1419

    Thread Starter carla_chalmers

    (@txhorselady)

    Woo Hoo!! … override works with my custom code. Was just thrown for a loop at first because

    In 0.9.5 (on the SVN branch), this stuff now lives in a config file, so if you create your own config file: wp-config/uploads/cctm/menus/admin_menu.php

    Location should have been: wp-content/uploads/cctm/config/menus/admin_menu.php

    So I have one last question. I would like for each new site to automatically have the custom post type pedigrees. Where should I put the .json file so that the plugin can pick it up?

    Thread Starter carla_chalmers

    (@txhorselady)

    Oops I was wrong. By changing the code to the above the menu is now also hidden from the super-admin

    Thread Starter carla_chalmers

    (@txhorselady)

    You could always use an ‘else’ and repeat the code

    Thread Starter carla_chalmers

    (@txhorselady)

    If I change the scope of the if statement (pardon me as I don’t really talk PHP cause I’m an old COBOL programmer who is just learning PHP) to encompass the menu code the Custom Content Type menu hides again. Like this:

    public static function create_admin_menu() {
    		// Adjust menus for multi-site: menu should only be visible to the super_admin
    $capability = 'manage_options';
    
    if (defined('WP_ALLOW_MULTISITE') && is_super_admin()) {
    	$capability = 'manage_network';
    
    $active_post_types = self::get_active_post_types();
    
    // Main menu item
    add_menu_page(
    	__('Manage Custom Content Types', CCTM_TXTDOMAIN),  // page title
    	__('Custom Content Types', CCTM_TXTDOMAIN),      // menu title
    	$capability,						// capability
    	'cctm',								// menu-slug (should be unique)
    	'CCTM::page_main_controller',       // callback function
    	CCTM_URL .'/images/gear.png',       // Icon
    	self::menu_position					// menu position
    );
    
    add_submenu_page(
    	'cctm',          // parent slug (menu-slug from add_menu_page call)
    	__('CCTM Custom Fields', CCTM_TXTDOMAIN),  // page title
    	__('Custom Fields', CCTM_TXTDOMAIN),   // menu title
    	$capability,						// capability
    	'cctm_fields',						// menu_slug: cf = custom fields
    	'CCTM::page_main_controller'		// callback function
    );
    
    add_submenu_page(
    	'cctm',         // parent slug (menu-slug from add_menu_page call)
    	__('CCTM Global Settings', CCTM_TXTDOMAIN),  // page title
    	__('Global Settings', CCTM_TXTDOMAIN),	// menu title
    	$capability,							// capability
    	'cctm_settings',						// menu_slug
    	'CCTM::page_main_controller'			// callback function
    );
    
    add_submenu_page(
    	'cctm',         // parent slug (menu-slug from add_menu_page call)
    	__('CCTM Tools', CCTM_TXTDOMAIN),   // page title
    	__('Tools', CCTM_TXTDOMAIN),    // menu title
    	$capability,					// capability
    	'cctm_tools',					// menu_slug
    	'CCTM::page_main_controller'	// callback function
    );
    
    // Add Custom Fields links to each post type
    if (self::get_setting('show_custom_fields_menu')) {
    	foreach ($active_post_types as $post_type) {
    		$parent_slug = 'edit.php?post_type='.$post_type;
    		if ($post_type == 'post') {
    			$parent_slug = 'edit.php';
    		}
    		add_submenu_page(
    			$parent_slug
    			, __('Custom Fields', CCTM_TXTDOMAIN)
    			, __('Custom Fields', CCTM_TXTDOMAIN)
    			, $capability
    			, 'cctm&a=list_pt_associations&pt='.$post_type
    			, 'CCTM::page_main_controller'
    		);
    	}
    }
    
    // Add Settings links to each post type
    if (self::get_setting('show_settings_menu')) {
    	foreach ($active_post_types as $post_type) {
    		$parent_slug = 'edit.php?post_type='.$post_type;
    		if ( in_array($post_type, self::$reserved_post_types) ) {
    			continue;
    		}
    		add_submenu_page(
    			$parent_slug
    			, __('Settings', CCTM_TXTDOMAIN)
    			, __('Settings', CCTM_TXTDOMAIN)
    			, $capability
    			, 'cctm&a=edit_post_type&pt='.$post_type
    			, 'CCTM::page_main_controller'
    		);
    	}
    }
    }
    }

    Thread Starter carla_chalmers

    (@txhorselady)

    Thread Starter carla_chalmers

    (@txhorselady)

    Nope …. doesn’t work …. I did the past of the code you sent and the menu has reappeared for a basic site user

    Thread Starter carla_chalmers

    (@txhorselady)

    Awesome …. you rock!!! And a very BIG Texas Thank You to you!!!

Viewing 15 replies - 16 through 30 (of 43 total)