Forum Replies Created

Viewing 13 replies - 31 through 43 (of 43 total)
  • Thread Starter carla_chalmers

    (@txhorselady)

    Thread Starter carla_chalmers

    (@txhorselady)

    Yes it worked. The Custom Content Type menu hides when I am logged in as a regular site administrator or user but shows up when logged in as the super admin

    Thread Starter carla_chalmers

    (@txhorselady)

    Now I just have to figure out how to automatically use pass the Pedigree custom post type to a new site when it is created. Any ideas?

    Also, since the change in my code will probably be changed when you update the plugin will a wordpress override work on it?

    Thread Starter carla_chalmers

    (@txhorselady)

    OK …. got it. Since you pointed me to the code used to display the Custom Content Types admin menu I just encased it in `if(is_super_admin() )’ like this:

    if (is_super_admin() ) {
    		// Main menu item
    		add_menu_page(
    			__('Manage Custom Content Types', CCTM_TXTDOMAIN),  // page title
    			__('Custom Content Types', CCTM_TXTDOMAIN),      // menu title
    			'manage_options',              // 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
    			'manage_options',        // 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
    			'manage_options',       // 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 Themes', CCTM_TXTDOMAIN), 		// page title
    			__('Themes', CCTM_TXTDOMAIN), 			// menu title
    			'manage_options', 						// capability
    			'cctm_themes',  						// 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
    			'manage_options',       // capability
    			'cctm_tools',        // menu_slug
    			'CCTM::page_main_controller'    // callback function
    		);
    
    		/*
    		add_submenu_page(
    			'cctm', 								// parent slug (menu-slug from add_menu_page call)
    			__('CCTM Information', CCTM_TXTDOMAIN), // page title
    			__('Info', CCTM_TXTDOMAIN), 			// menu title
    			'manage_options', 						// capability
    			'cctm_info', 							// menu_slug
    			'CCTM::page_main_controller' 			// callback function
    		);
    */
    
    		/*
    		add_submenu_page(
    			'cctm',				 					// parent slug (menu-slug from add_menu_page call)
    			__('CCTM Store', CCTM_TXTDOMAIN), 		// page title
    			__('Store', CCTM_TXTDOMAIN), 			// menu title
    			'manage_options', 						// capability
    			'cctm_store', 							// menu_slug
    			'CCTM::page_main_controller' 			// callback function
    		);
    
    		add_submenu_page(
    			'cctm',				 					// parent slug (menu-slug from add_menu_page call)
    			__('CCTM Help', CCTM_TXTDOMAIN), 		// page title
    			__('Help', CCTM_TXTDOMAIN), 			// menu title
    			'manage_options', 						// capability
    			'cctm_help',					 		// menu_slug
    			'CCTM::page_main_controller' 			// callback function
    		);
    
    	add_submenu_page(
    		'themes.php'
    		, _x('Editor', 'theme editor')
    		, _x('Editor', 'theme editor')
    		, 'edit_themes'
    		, 'theme-editor.php');
    	add_submenu_page(
    		$ptype_obj->show_in_menu,
    		$ptype_obj->labels->name,
    		$ptype_obj->labels->all_items,
    		$ptype_obj->cap->edit_posts
    		, "edit.php?post_type=$ptype" );
    
    */
    		// print '<pre>'; print_r(self::$data); print '</pre>'; exit;
    		// Add Custom Fields links
    		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)
    					, 'manage_options'
    					, 'cctm&a=list_pt_associations&pt='.$post_type
    					, 'CCTM::page_main_controller'
    				);
    			}
    		}
    
    		// Add Settings links
    		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)
    					, 'manage_options'
    					, 'cctm&a=edit_post_type&pt='.$post_type
    					, 'CCTM::page_main_controller'
    				);
    			}
    		}
    		}
    	}
    Thread Starter carla_chalmers

    (@txhorselady)

    The users (creators) of these sites will have very little knowledge if at all. They basically are after pre designed sites that they can plug their information into. Basically I am needing to provide a custom post/page type that provides the structure to input horse pedigrees. There are pedigree plugins but they are pretty ‘nasty’ in their implementation and output. At the moment I already have around 500 people who who have signed up as being interested in the type of “canned” to advertise their horse businesses.

    I haven’t tried the “manage-network” permissions yet but hope to get a chance tomorrow.

    Thread Starter carla_chalmers

    (@txhorselady)

    Well commenting out the <strong>add_action('admin_menu','CCTM::create_admin_menu');</strong> line of code worked but I’m not sure if I will be able to use this approach. This particular multisite installation will be designed so that users can automatically create their own sites and we are anticipating over 1000 sites to be created.

    Maybe I could use a site clone plugin to create each site.

    Thread Starter carla_chalmers

    (@txhorselady)

    I’ll give this a try later this afternoon and get back to you. Thank you so much for your help

    Thread Starter carla_chalmers

    (@txhorselady)

    Yes it is a bit tricky. There is a super admin in multisite but it doesn’t seem to help me much.

    I absolutely love your plugin but it looks like I might have to write my own to handle this scenario. I will be using yours many times in my single site installations in the future.

    Thread Starter carla_chalmers

    (@txhorselady)

    I guess I am just having a problem getting my head around how to limit the permissions of the users. The owners of each site will be administrators but also generally novice users that really don’t need to see the much of the inner workings of the site. I would only like them to be able to see the actual custom post type but not have the ability to create new post types or custom fields.

    Thread Starter carla_chalmers

    (@txhorselady)

    Thank you Christine ….. I had to do the unspeakable and use 777 on the permissions to get the update to work.

    Thread Starter carla_chalmers

    (@txhorselady)

    Bump

    I am having much the same problem as bkabel. The tabs show up but nothing happens when I click on them.

    Thread Starter carla_chalmers

    (@txhorselady)

    Any ideas?

Viewing 13 replies - 31 through 43 (of 43 total)