Project

General

Profile

« Previous | Next » 

Revision 1182

Added by Dietmar over 14 years ago

add two constants in /framework/initialize.php for later feature in database settings
define('EDIT_ONE_SECTION', true) to edit only one section with editor in manage sections
modify page will be loading all sections with editor
define('EDITOR_WIDTH', 900) set min width for editor
adding more information in editor header 1) block 2) module 3) section_id

View differences:

modify.php
31 31
	$page_id = $_GET['page_id'];
32 32
}
33 33

  
34

  
35

  
34 36
// Create new admin object
35 37
require('../../config.php');
36 38
require_once(WB_PATH.'/framework/class.admin.php');
......
41 43
	$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
42 44
}
43 45

  
46
$sectionId = isset($_GET['wysiwyg']) ? htmlspecialchars($admin->get_get('wysiwyg')) : NULL;
47

  
44 48
// Get page details
45 49
$results_array=$admin->get_page_details($page_id);
46 50

  
......
116 120

  
117 121
// Get sections for this page
118 122
$module_permissions = $_SESSION['MODULE_PERMISSIONS'];
123
// workout for edit only one section for faster pageloading
124
// Constant later set in wb_settings, in meantime defined in framework/initialize.php
125
if(defined('EDIT_ONE_SECTION') and EDIT_ONE_SECTION and is_numeric($sectionId))
126
{
119 127
$query_sections = $database->query("SELECT section_id, module, block
128
	FROM ".TABLE_PREFIX."sections WHERE section_id = '$sectionId' ORDER BY position ASC");
129
}
130
else
131
{
132
$query_sections = $database->query("SELECT section_id, module, block
120 133
	FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' ORDER BY position ASC");
134
}
135

  
121 136
if($query_sections->numRows() > 0)
122 137
{
123 138
	while($section = $query_sections->fetchRow())
......
130 145
			// Include the modules editing script if it exists
131 146
			if(file_exists(WB_PATH.'/modules/'.$module.'/modify.php'))
132 147
            {
133
				print '<a name="'.$section_id.'">&nbsp;</a>'."\n";
148
				print /* '<a name="'.$section_id.'"></a>'. */"\n";
134 149
				// output block name if blocks are enabled
135 150
				if (SECTION_BLOCKS) {
136 151
					if (isset($block[$section['block']]) && trim(strip_tags(($block[$section['block']]))) != '')
......
144 159
							$block_name = '#' . (int) $section['block'];
145 160
						}
146 161
					}
147
					print '<b>' . $TEXT['BLOCK'] . ': </b>' . $block_name;
162
					print '<div id="'.$section['section_id'].'"><b>' . $TEXT['BLOCK'] . ': </b>' . $block_name;
148 163
					print '<b>  Modul: </b>' . $section['module']." ";
149
					print '<b>  ID: </b>' . $section_id."\n";
164
					print '<b>  ID: </b>' . $section_id."</div>\n";
150 165
				}
151 166
				require(WB_PATH.'/modules/'.$module.'/modify.php');
152 167
			}

Also available in: Unified diff