GetProcessedVariables(); } /** * Inserts CSS/Javascript code for Layout feature * */ function AddHeaderLayoutCode(){ $layoutHeaderCode = ""; //TODO Add CSS file links for rendering the page $layoutHeaderCode .= "\n\n\n"; $layoutHeaderCode .= "\n"; //TODO Call GenerateCSSSettings() to generate CSS code. $layoutHeaderCode .= FlutterLayout::GenerateCSSSettings($settings); echo $layoutHeaderCode; //TODO If the user has enough privileges, add CSS/Javascript file links for editing the Layout if (current_user_can(FLUTTER_CAPABILITY_LAYOUT)){ require_once("RCCWP_WritePostPage.php"); $FLUTTER_URI = FLUTTER_URI; $jquery_path = FLUTTER_URI."js/layout/jquery.js"; $jqueryui_path = FLUTTER_URI."js/layout/jquery.ui.js"; $ui_path = FLUTTER_URI."js/layout/ui.js"; $ui_css_path = FLUTTER_URI."css/layout_style.css"; global $template, $wpdb; $page = basename($template); RCCWP_WritePostPage::CustomFieldsCSSScripts(); wp_enqueue_script('tiny_mce'); $templateName = get_option('template'); $LayoutSettings = $wpdb->get_var("SELECT settings FROM ".FLUTTER_TABLE_LAYOUT_SETTINGS." WHERE theme = '$templateName' AND page='$page'"); ?> \n"; $CSS_string .= "\n"; return $CSS_string; } /** * Inserts CSS/Javascript code for Layout feature * */ function AddFooterLayoutCode(){ if (current_user_can(FLUTTER_CAPABILITY_LAYOUT)){ ?>
Content Here.
get_var("SELECT settings_id FROM ".FLUTTER_TABLE_LAYOUT_SETTINGS." WHERE theme = '$templateName' AND page='$pageName'"); if (empty($settingsID)) { $wpdb->query("INSERT INTO ".FLUTTER_TABLE_LAYOUT_SETTINGS." (theme,page,settings) VALUES ('$templateName','$pageName','$pageLayoutSettings')"); $settingsID = $wpdb->insert_id; }else{ $wpdb->query("UPDATE ".FLUTTER_TABLE_LAYOUT_SETTINGS. " SET settings = '$pageLayoutSettings' ". " WHERE settings_id = '$settingsID' "); } return $settingsID; } function SaveModulesPositions($modulesPositionsStr, $currentPage){ $modulesPositions = json_decode(stripslashes($modulesPositionsStr)); if (!is_array($modulesPositions)) { $modulesPositions = array(); $modulesPositions[0] = json_decode(stripslashes($modulesPositionsStr)); } foreach($modulesPositions as $modulesPosition){ foreach($modulesPosition->modules as $blockID){ $moduleSettings = FlutterLayoutBlock::GetModuleSettingsByBlock($blockID); $moduleSettings->position = $modulesPosition->position; $moduleSettings->SaveSettings(); } } return true; } function GetModuleSettings($blockID){ require_once("RCCWP_WritePostPage.php"); // Retieve the settings for $blockID $moduleSettings = FlutterLayoutBlock::GetModuleSettingsByBlock($blockID); foreach($moduleSettings->variables as $variable) { $variable->properties = array(); $inputName = $variable->variable_name; $variableValue = $variable->value; ?> variables as $varKey => $variable) { $moduleSettings->variables[$varKey]->value = $_POST[$variable->variable_name]; } $moduleSettings->SaveValues(); } } /** * Loads the modules for the current theme/page/position * * @param unknown_type $position */ function flutter_modules($position){ global $template; global $mod_vars; $page = basename($template); // Get all the modules for the current theme-page-position. $modulesBlock = FlutterLayoutBlock::GetModules($page, $position); // For each module, load its settings. foreach($modulesBlock as $moduleBlock){ // Put the settings in a global variable for the module. $mod_vars = $moduleBlock->GetProcessedVariables(); ?>

title ?>

GetModuleTemplateFile()); ?>