Project

General

Profile

« Previous | Next » 

Revision 846

Added by doc over 16 years ago

Added output of block names to modify pages dialogue if blocks are enabled

View differences:

trunk/CHANGELOG
12 12

  
13 13
------------------------------------- 2.7.1 -------------------------------------
14 14
21-June-2008 Christian Sommer
15
#	updated show_menu2 to version 4.60 (to avoid disappearing menus)
15
+	added output of block names to modify pages dialogue if blocks are enabled
16
!	updated show_menu2 to version 4.60 (to avoid disappearing menus)
16 17
08-Jun-2008 Thomas Hornik
17 18
#	hebrew-table in charsets-table.php was faultily imported - fixed. Thanks to forum-member iti.
18 19
24-May-2008 Christian Sommer
trunk/wb/admin/pages/modify.php
96 96
$template->parse('main', 'main_block', false);
97 97
$template->pparse('output', 'page');
98 98

  
99
// get template used for the displayed page (for displaying block details)
100
if (SECTION_BLOCKS) {
101
	$sql = "SELECT `template` from `" . TABLE_PREFIX . "pages` WHERE `page_id` = '$page_id' ";
102
	$result = $database->query($sql);
103
	if ($result && $result->numRows() == 1) {
104
		$row = $result->fetchRow();
105
		$page_template = ($row['template'] == '') ? DEFAULT_TEMPLATE : $row['template'];
106
		// include template info file if exists
107
		if (file_exists(WB_PATH . '/templates/' . $page_template . '/info.php')) {
108
			include_once(WB_PATH . '/templates/' . $page_template . '/info.php');
109
		}
110
	}
111
}
112
	
99 113
// Get sections for this page
100 114
$module_permissions = $_SESSION['MODULE_PERMISSIONS'];
101
$query_sections = $database->query("SELECT section_id,module FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' ORDER BY position ASC");
115
$query_sections = $database->query("SELECT section_id, module, block 
116
	FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' ORDER BY position ASC");
102 117
if($query_sections->numRows() > 0) {
103 118
	while($section = $query_sections->fetchRow()) {
104 119
		$section_id = $section['section_id'];
......
108 123
			// Include the modules editing script if it exists
109 124
			if(file_exists(WB_PATH.'/modules/'.$module.'/modify.php')) {
110 125
				echo '<a name="'.$section_id.'"></a>';
126
				// output block name if blocks are enabled
127
				if (SECTION_BLOCKS) {
128
					if (isset($block[$section['block']]) && trim(strip_tags(($block[$section['block']]))) != '') {
129
						$block_name = htmlentities(strip_tags($block[$section['block']]));
130
					} else {
131
						if ($section['block'] == 1) {
132
							$block_name = $TEXT['MAIN'];
133
						} else {
134
							$block_name = '#' . (int) $section['block'];
135
						}
136
					}
137
					echo '<b>' . $TEXT['BLOCK'] . ': </b>' . $block_name;
138
				}
111 139
				require(WB_PATH.'/modules/'.$module.'/modify.php');
112 140
			}
113 141
		}

Also available in: Unified diff