Recent Topics

1 Feb 11, 2007 12:23    


	case 'edit':
	case 'filter1':
	case 'filter2':
	case 'update':
		// ---------- Edit blog form ----------
		if( $action == 'edit' )
		{ // permissions have not been checked on update:
			$current_User->check_perm( 'blog_properties', 'edit', true, $blog );
		}

		// Begin payload block:
		$AdminUI->disp_payload_begin();


		// Display VIEW:
		switch( $AdminUI->get_path(1) )
		{
			case 'general':
				$next_action = 'update';
				$AdminUI->disp_view( 'collections/_blogs_general.form.php' );
				break;

			case 'skin':
				$AdminUI->disp_view( 'collections/_blogs_skin.form.php' );
				break;

			case 'display':
				$AdminUI->disp_view( 'collections/_blogs_display.form.php' );
				break;

			case 'advanced':
				$AdminUI->disp_view( 'collections/_blogs_advanced.form.php' );
				break;

			case 'perm':
				$AdminUI->disp_view( 'collections/_blogs_permissions.form.php' );
				break;

			case 'permgroup':
				$AdminUI->disp_view( 'collections/_blogs_permissions_group.form.php' );
				break;
			
			// change start
			default:
				$tab = $AdminUI->get_path(1);
				
				$tab_Plugin = NULL;
				
				$tab_plugin_ID = false;
				
				if( ! empty($tab) )
				{
					if( preg_match( '~^plug_ID_(\d+)$~', $tab, $match ) )
					{
						$tab_plugin_ID = $match[1];
						$tab_Plugin = & $Plugins->get_by_ID( $match[1] );
						if( ! $tab_Plugin )
						{ // Plugin does not exist
							$Messages->add( sprintf( T_( 'The plugin with ID %d could not get instantiated.' ), $tab_plugin_ID ), 'error' );
							$tab_plugin_ID = false;
							$tab_Plugin = false;
							$tab = '';
						}
						else
						{
							$Plugins->call_method_if_active( $tab_plugin_ID, 'AdminTabAction', $params = array() );
						}
					}
					else
					{
						$tab = '';
						$Messages->add( 'Invalid sub-menu!' ); // Should need no translation, prevented by GUI
					}
				}
				
				if ( $tab_Plugin )
					$Plugins->call_method_if_active( $tab_plugin_ID, 'AdminTabPayload', $params = array() );
				
				break;
			// change end
		}

		// End payload block:
		$AdminUI->disp_payload_end();

		break;

In relation to http://forums.b2evolution.net/viewtopic.php?t=10798


Form is loading...