Revision 1681
Added by darkviper over 12 years ago
branches/2.8.x/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
=============================================================================== |
13 | 13 |
|
14 |
03 May-2012 Build 1681 Werner v.d.Decken(DarkViper) |
|
15 |
! reorganisation of default theme of oage-settings |
|
16 |
+ added menu_icon_0 and menu_icon_1 |
|
17 |
! update show_menu2 to handle the new icon fields (see README.de|en.txt) |
|
18 |
+ add new droplet 'iParentIcon' for use with the new icons |
|
19 |
+ added new module-depending language files (not complete yet) in admin/pages |
|
14 | 20 |
03 May-2012 Build 1680 Werner v.d.Decken(DarkViper) |
15 | 21 |
! renamed file class.database.php to Database.php |
16 | 22 |
! renamed class database into Database |
branches/2.8.x/wb/admin/skel/themes/htt/pages_settings.htt | ||
---|---|---|
1 | 1 |
<!-- BEGIN main_block --> |
2 | 2 |
<script src="{ADMIN_URL}/pages/page_settings.js" type="text/javascript"></script> |
3 |
<link href="http://istmzw01.isteam.loc/WB28x-Branch/wb/templates/wb_theme/theme.css" rel="stylesheet" type="text/css" /> |
|
4 | 3 |
<table summary="" cellpadding="5" cellspacing="0" border="0" align="center" width="100%" style="margin-bottom:10px;"> |
5 | 4 |
<tr style="background:#f0f0f0;"> |
6 | 5 |
<td valign="middle" align="left"><h2>{HEADING_MODIFY_PAGE_SETTINGS}</h2></td> |
... | ... | |
15 | 14 |
</span> |
16 | 15 |
<br /> |
17 | 16 |
<span style="color:#999;" class="{DISPLAY_MODIFIED}"> |
18 |
{LAST_MODIFIED} {MODIFIED_BY} ({MODIFIED_BY_USERNAME}), {MODIFIED_WHEN} |
|
17 |
{TEXT_LAST_MODIFIED} {MODIFIED_BY} ({MODIFIED_BY_USERNAME}), {MODIFIED_WHEN}
|
|
19 | 18 |
</span> |
20 | 19 |
</td> |
21 | 20 |
</tr> |
... | ... | |
26 | 25 |
<input type="hidden" name="page_id" value="{PAGE_IDKEY}" /> |
27 | 26 |
<div class="page-settings"> |
28 | 27 |
<div class="page-settings-leftcol"> <!-- left column --> |
28 |
<div class="caption">{TEXT_SECTION_GENERAL}</div> |
|
29 | 29 |
<div> |
30 | 30 |
<label for="">{TEXT_PAGE_TITLE}:</label><input |
31 | 31 |
type="text" name="page_title" value="{PAGE_TITLE}" /> |
32 | 32 |
</div> |
33 | 33 |
<div> |
34 |
<label for="" style="vertical-align: bottom;">{TEXT_PAGE_ICON}:<br /> |
|
35 |
<span style="font-size:0.85em;">( {ICON_DIR} )</span></label><select |
|
36 |
name="page_icon"> |
|
37 |
<option value="0">--- {TEXT_NO_SELECTION} ---</option> |
|
38 |
<!-- BEGIN page_icon_list_block --> |
|
39 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
|
40 |
<!-- END page_icon_list_block --> |
|
41 |
</select> |
|
42 |
</div> |
|
43 |
<div> |
|
34 | 44 |
<label for="">{TEXT_MENU_TITLE}:</label><input |
35 | 45 |
type="text" name="menu_title" value="{MENU_TITLE}" /> |
36 | 46 |
</div> |
37 | 47 |
<div> |
38 |
<label for="">{TEXT_PARENT}:</label><select name="parent"> |
|
39 |
<!-- BEGIN parent_page_list_block --> |
|
40 |
<option value="{ID}"{SELECTED} style="background: {FLAG_ROOT_ICON} no-repeat center left; padding-left: 20px;">{TITLE}</option> |
|
41 |
<!-- END parent_page_list_block --> |
|
48 |
<label for="" style="vertical-align: bottom;">{TEXT_MENU_ICON_0}:<br /> |
|
49 |
<span style="font-size:0.85em;">( {ICON_DIR} )</span></label><select |
|
50 |
name="menu_icon_0"> |
|
51 |
<option value="0">--- {TEXT_NO_SELECTION} ---</option> |
|
52 |
<!-- BEGIN menu_icon0_list_block --> |
|
53 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
|
54 |
<!-- END menu_icon0_list_block --> |
|
42 | 55 |
</select> |
43 | 56 |
</div> |
44 | 57 |
<div> |
45 |
<label for="">{TEXT_VISIBILITY}:</label><select
|
|
46 |
name="visibility" onchange="javascript: toggle_viewers();">
|
|
47 |
<option value="public"{PUBLIC_SELECTED}>{TEXT_PUBLIC}</option>
|
|
48 |
<option value="private"{PRIVATE_SELECTED}>{TEXT_PRIVATE}</option>
|
|
49 |
<option value="registered"{REGISTERED_SELECTED}>{TEXT_REGISTERED}</option>
|
|
50 |
<option value="hidden"{HIDDEN_SELECTED}>{TEXT_HIDDEN}</option>
|
|
51 |
<option value="none"{NO_VIS_SELECTED}>{TEXT_NONE}</option>
|
|
58 |
<label for="" style="vertical-align: bottom;">{TEXT_MENU_ICON_1}:<br />
|
|
59 |
<span style="font-size:0.85em;">( {ICON_DIR} )</span></label><select
|
|
60 |
name="menu_icon_1">
|
|
61 |
<option value="0">--- {TEXT_NO_SELECTION} ---</option>
|
|
62 |
<!-- BEGIN menu_icon1_list_block -->
|
|
63 |
<option value="{VALUE}"{SELECTED}>{NAME}</option>
|
|
64 |
<!-- END menu_icon1_list_block -->
|
|
52 | 65 |
</select> |
53 | 66 |
</div> |
67 |
|
|
54 | 68 |
<div> |
55 | 69 |
<label for="">{TEXT_DESCRIPTION}:</label><textarea |
56 | 70 |
name="description" rows="14" cols="1">{DESCRIPTION}</textarea> |
... | ... | |
59 | 73 |
<label for="">{TEXT_KEYWORDS}:</label><textarea |
60 | 74 |
name="keywords" rows="14" cols="1">{KEYWORDS}</textarea> |
61 | 75 |
</div> |
76 |
<div class="caption">{TEXT_SECTION_ORGANISATION}</div> |
|
62 | 77 |
<div> |
78 |
<label for="">{TEXT_PARENT}:</label><select name="parent"> |
|
79 |
<!-- BEGIN parent_page_list_block --> |
|
80 |
<option value="{ID}"{SELECTED} style="background: {FLAG_ROOT_ICON} no-repeat center left; padding-left: 20px;">{TITLE}</option> |
|
81 |
<!-- END parent_page_list_block --> |
|
82 |
</select> |
|
83 |
</div> |
|
84 |
<!-- BEGIN show_menu_list_block --> |
|
85 |
<div> |
|
86 |
<label for="">{TEXT_MENU}:</label><select |
|
87 |
name="menu"> |
|
88 |
<!-- BEGIN menu_list_block --> |
|
89 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
|
90 |
<!-- END menu_list_block --> |
|
91 |
</select> |
|
92 |
</div> |
|
93 |
<!-- END show_menu_list_block --> |
|
94 |
<div> |
|
63 | 95 |
<label for="">{TEXT_TARGET}:</label><select |
64 | 96 |
name="target" ><!-- value="{TARGET}" --> |
65 | 97 |
<option value="_blank"{BLANK_SELECTED}>{TEXT_NEW_WINDOW}</option> |
... | ... | |
77 | 109 |
<!-- END template_list_block --> |
78 | 110 |
</select> |
79 | 111 |
</div> |
80 |
<!-- BEGIN show_menu_list_block -->
|
|
112 |
<div class="caption">{TEXT_SECTION_CONTENT}</div>
|
|
81 | 113 |
<div> |
82 |
<label for="">{TEXT_MENU}:</label><select |
|
83 |
name="menu"> |
|
84 |
<!-- BEGIN menu_list_block --> |
|
85 |
<option value="{VALUE}"{SELECTED}>{NAME}</option> |
|
86 |
<!-- END menu_list_block --> |
|
87 |
</select> |
|
88 |
</div> |
|
89 |
<!-- END show_menu_list_block --> |
|
90 |
<div> |
|
91 | 114 |
<label for="">{TEXT_LANGUAGE}:</label><select |
92 | 115 |
name="language"> |
93 | 116 |
<!-- BEGIN language_list_block --> |
... | ... | |
113 | 136 |
</select> |
114 | 137 |
</div> |
115 | 138 |
</div> |
139 |
<div class="page-settings-righttoprow"> |
|
140 |
<div class="caption">{TEXT_SECTION_SECURITY}</div> |
|
141 |
<div> |
|
142 |
<label for="">{TEXT_VISIBILITY}:</label><select |
|
143 |
name="visibility" onchange="javascript: toggle_viewers();"> |
|
144 |
<option value="public"{PUBLIC_SELECTED}>{TEXT_PUBLIC}</option> |
|
145 |
<option value="private"{PRIVATE_SELECTED}>{TEXT_PRIVATE}</option> |
|
146 |
<option value="registered"{REGISTERED_SELECTED}>{TEXT_REGISTERED}</option> |
|
147 |
<option value="hidden"{HIDDEN_SELECTED}>{TEXT_HIDDEN}</option> |
|
148 |
<option value="none"{NO_VIS_SELECTED}>{TEXT_NONE}</option> |
|
149 |
</select> |
|
150 |
</div> |
|
151 |
</div> |
|
152 |
|
|
153 |
|
|
116 | 154 |
<div class="page-settings-centercol"> <!-- center column --> |
117 |
{TEXT_ADMINISTRATORS}<hr />
|
|
118 |
{TEXT_GROUP}<br />
|
|
155 |
<b>{TEXT_ADMINISTRATORS}</b><hr />
|
|
156 |
<u>{TEXT_GROUP}</u><br />
|
|
119 | 157 |
<!-- *** List of groups which can administrate this page *** --> |
120 | 158 |
<ul style="list-style-type: none; margin: 0; padding: 0;"> |
121 | 159 |
<!-- BEGIN admin_group_list_block --> |
... | ... | |
126 | 164 |
<!-- END admin_group_list_block --> |
127 | 165 |
</ul> |
128 | 166 |
<hr /> |
129 |
{TEXT_USER}<br />
|
|
167 |
<u>{TEXT_USER}</u><br />
|
|
130 | 168 |
<!-- *** List of users which can administrate this page *** --> |
131 | 169 |
<select name="admin_users[]" multiple="multiple" size="{USER_LIST_SIZE}"> |
132 | 170 |
<option value="0">--- {TEXT_NO_SELECTION} ---</option> |
... | ... | |
137 | 175 |
</div> |
138 | 176 |
|
139 | 177 |
<div id="allowed_viewers" class="page-settings-rightcol" style="{DISPLAY_VIEWERS}"> <!-- right column --> |
140 |
{TEXT_ALLOWED_VIEWERS}<hr />
|
|
141 |
{TEXT_GROUP}<br />
|
|
178 |
<b>{TEXT_ALLOWED_VIEWERS}</b><hr />
|
|
179 |
<u>{TEXT_GROUP}</u><br />
|
|
142 | 180 |
<!-- *** List of groups which can see this page *** --> |
143 | 181 |
<ul style="list-style-type:none;margin:0;padding:0;"> |
144 | 182 |
<!-- BEGIN viewer_group_list_block --> |
... | ... | |
149 | 187 |
<!-- END viewer_group_list_block --> |
150 | 188 |
</ul> |
151 | 189 |
<hr /> |
152 |
{TEXT_USER}<br />
|
|
190 |
<u>{TEXT_USER}</u><br />
|
|
153 | 191 |
<!-- *** List of users which can see this page *** --> |
154 | 192 |
<select name="viewing_users[]" multiple="multiple" size="{USER_LIST_SIZE}"> |
155 | 193 |
<option value="0">--- {TEXT_NO_SELECTION} ---</option> |
... | ... | |
158 | 196 |
<!-- END viewer_user_list_block --> |
159 | 197 |
</select> |
160 | 198 |
</div> |
199 |
|
|
161 | 200 |
<div style="clear:both; padding-top: 1em;"> |
162 | 201 |
<input type="submit" name="submit" value="{TEXT_SAVE}" style="width: 117px;" /> |
163 | 202 |
<input type="reset" name="reset" value="{TEXT_RESET}" style="width: 117px;" /> |
branches/2.8.x/wb/admin/pages/settings.php | ||
---|---|---|
15 | 15 |
* @lastmodified $Date$ |
16 | 16 |
* |
17 | 17 |
*/ |
18 |
|
|
19 |
/* |
|
20 |
*/ |
|
21 | 18 |
// Create new admin object |
22 | 19 |
require('../../config.php'); |
23 | 20 |
require_once(WB_PATH.'/framework/class.admin.php'); |
24 | 21 |
$admin = new admin('Pages', 'pages_settings'); |
25 |
// Include the WB functions file |
|
26 |
//require_once(WB_PATH.'/framework/functions-utf8.php'); |
|
27 | 22 |
|
28 | 23 |
/*-- Parent page list ------------------------------------------------------------------*/ |
29 | 24 |
function parent_list($parent) |
... | ... | |
84 | 79 |
} |
85 | 80 |
} // end of function parent_list |
86 | 81 |
/* -------------------------------------------------------------------------------------*/ |
82 |
$mLang = ModLanguage::getInstance(); |
|
83 |
$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE); |
|
87 | 84 |
$sDisabled = ' disabled="disabled"'; |
88 | 85 |
$sSelected = ' selected="selected"'; |
89 | 86 |
$sChecked = ' checked="checked"'; |
... | ... | |
94 | 91 |
header("Location: index.php"); |
95 | 92 |
exit(0); |
96 | 93 |
} |
97 |
/* |
|
98 |
if( (!($page_id = $admin->checkIDKEY('page_id', 0, $_SERVER['REQUEST_METHOD']))) ) |
|
99 |
{ |
|
100 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']); |
|
101 |
exit(); |
|
102 |
} |
|
103 |
*/ |
|
104 | 94 |
/*-- get all details of current page ---------------------------------------------------*/ |
105 | 95 |
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `page_id` = '.$page_id; |
106 | 96 |
if( ($oPages = $database->query($sql)) ) { |
... | ... | |
154 | 144 |
/*-- workout if we should show the "manage sections" link ------------------------------*/ |
155 | 145 |
$sql = 'SELECT COUNT(*) FROM `'.TABLE_PREFIX.'sections` ' |
156 | 146 |
. 'WHERE `page_id`='.$page_id.' AND `module`=\'menu_link\''; |
157 |
$sections_available = (intval($database->get_one($sql)) != 0); |
|
158 |
if ($sections_available) { |
|
159 |
$oTpl->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;'); |
|
160 |
} elseif(MANAGE_SECTIONS == 'enabled') { |
|
161 |
$oTpl->set_var('TEXT_MANAGE_SECTIONS', $HEADING['MANAGE_SECTIONS']); |
|
162 |
} else { |
|
163 |
$oTpl->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;'); |
|
147 |
$bIsMenuLink = (intval($database->get_one($sql)) != 0); |
|
148 |
$oTpl->set_block('main_block', 'show_manage_sections_block', 'show_manage_sections'); |
|
149 |
if(!$bIsMenuLink && (MANAGE_SECTIONS == true)) { |
|
150 |
$oTpl->parse('show_manage_sections', 'show_manage_sections_block', true); |
|
151 |
}else { |
|
152 |
$oTpl->set_block('show_manage_sections', ''); |
|
164 | 153 |
} |
165 | 154 |
|
155 |
/*-- collect page-icons for select boxes -----------------------------------------------*/ |
|
156 |
$sAllowedImageTypes = '\.jpg|\.jpeg|\.png|\.gif'; |
|
157 |
$aPageIcons = array(); |
|
158 |
$aIcon = array(); |
|
159 |
$sTemplate = ($aCurrentPage['template'] == '' ? DEFAULT_TEMPLATE : $aCurrentPage['template']); |
|
160 |
$sIconDir = str_replace('\\', '/', ((defined('PAGE_ICON_DIR') && PAGE_ICON_DIR != '') ? PAGE_ICON_DIR : MEDIA_DIRECTORY)); |
|
161 |
$sIconDir = str_replace('/*', '/'.$sTemplate, $sIconDir); |
|
162 |
$oTpl->set_var('ICON_DIR', WB_REL.$sIconDir); |
|
163 |
if(is_readable(WB_PATH.$sIconDir)) { |
|
164 |
$oIterator = new DirectoryIterator(WB_PATH.$sIconDir); |
|
165 |
foreach ($oIterator as $fileinfo) { |
|
166 |
if(preg_match('/'.$sAllowedImageTypes.'$/i', $fileinfo->getFilename())) { |
|
167 |
$sItem = str_replace(WB_PATH, '', str_replace('\\', '/', $fileinfo->getPathname())); |
|
168 |
// $sItem = WB_REL.$sItem; |
|
169 |
$aPageIcons[] = array('VALUE'=>$sItem, 'NAME'=>$fileinfo->getFilename()); |
|
170 |
} |
|
171 |
} |
|
172 |
} |
|
173 |
/*-- show page-icon select box ---------------------------------------------------------*/ |
|
174 |
$oTpl->set_block('main_block', 'page_icon_list_block', 'page_icon_list'); |
|
175 |
foreach($aPageIcons as $value) { |
|
176 |
$aIcon = $value; |
|
177 |
$aIcon['SELECTED'] = ($aCurrentPage['page_icon'] == $aIcon['VALUE'] ? $sSelected : ''); |
|
178 |
$oTpl->set_var($aIcon); |
|
179 |
$oTpl->parse('page_icon_list', 'page_icon_list_block', true); |
|
180 |
} |
|
181 |
/*-- show menu-icon-0 select box -------------------------------------------------------*/ |
|
182 |
$oTpl->set_block('main_block', 'menu_icon0_list_block', 'menu_icon0_list'); |
|
183 |
foreach($aPageIcons as $value) { |
|
184 |
$aIcon = $value; |
|
185 |
$aIcon['SELECTED'] = ($aCurrentPage['menu_icon_0'] == $aIcon['VALUE'] ? $sSelected : ''); |
|
186 |
$oTpl->set_var($aIcon); |
|
187 |
$oTpl->parse('menu_icon0_list', 'menu_icon0_list_block', true); |
|
188 |
} |
|
189 |
/*-- show menu-icon-1 select box -------------------------------------------------------*/ |
|
190 |
$oTpl->set_block('main_block', 'menu_icon1_list_block', 'menu_icon1_list'); |
|
191 |
foreach($aPageIcons as $value) { |
|
192 |
$aIcon = $value; |
|
193 |
$aIcon['SELECTED'] = ($aCurrentPage['menu_icon_1'] == $aIcon['VALUE'] ? $sSelected : ''); |
|
194 |
$oTpl->set_var($aIcon); |
|
195 |
$oTpl->parse('menu_icon1_list', 'menu_icon1_list_block', true); |
|
196 |
} |
|
197 |
|
|
166 | 198 |
/*-- show visibility select box --------------------------------------------------------*/ |
167 | 199 |
$aVisibility = array(); |
168 | 200 |
$aVisibility['PUBLIC_SELECTED'] = ($aCurrentPage['visibility'] == 'public' ? $sSelected : ''); |
... | ... | |
305 | 337 |
file_exists(WB_PATH.'/modules/mod_multilingual/update_keys.php') ) |
306 | 338 |
{ |
307 | 339 |
// workout field is set but module missing |
308 |
$TEXT['PAGE_CODE'] = empty($TEXT['PAGE_CODE']) ? 'Pagecode' : $TEXT['PAGE_CODE']; |
|
309 | 340 |
$oTpl->set_var('TEXT_PAGE_CODE', |
310 | 341 |
'<a href="'.WB_URL.'/modules/mod_multilingual/update_keys.php?page_id='. |
311 |
$page_id.'">'.$TEXT['PAGE_CODE'].'</a>'
|
|
342 |
$page_id.'">'.$mLang->TEXT_PAGE_CODE.'</a>'
|
|
312 | 343 |
); |
313 | 344 |
/*-- begin recursive function page_code list ---------------------------------------*/ |
314 | 345 |
function page_code_list($parent) |
... | ... | |
373 | 404 |
$selected = ($aCurrentPage['parent'] == 0 ? $sSelected : ''); |
374 | 405 |
$oTpl->set_var(array( |
375 | 406 |
'VALUE' => 0, |
376 |
'PAGE_CODE' => $TEXT['NONE'],
|
|
407 |
'PAGE_CODE' => $mLang->TEXT_NONE,
|
|
377 | 408 |
'PAGE_VALUE' => '', |
378 | 409 |
'SELECTED' => $selected |
379 | 410 |
) |
... | ... | |
393 | 424 |
if($admin->get_permission('pages_add_l0') == true OR $aCurrentPage['level'] == 0) { |
394 | 425 |
$oTpl->set_var(array( |
395 | 426 |
'ID' => '0', |
396 |
'TITLE' => $TEXT['NONE'],
|
|
427 |
'TITLE' => $mLang->TEXT_NONE,
|
|
397 | 428 |
'SELECTED' => ($aCurrentPage['parent'] == 0 ? $sSelected : ''), |
398 | 429 |
) ); |
399 | 430 |
$oTpl->parse('parent_page_list', 'parent_page_list_block', true); |
... | ... | |
493 | 524 |
$oTpl->set_var('BLANK_SELECTED', ($aCurrentPage['target'] == '_blank' ? $sSelected : '')); |
494 | 525 |
|
495 | 526 |
/*-- insert all needed vars from language files ----------------------------------------*/ |
496 |
$oTpl->set_var(array( |
|
497 |
'HEADING_MODIFY_PAGE_SETTINGS' => $HEADING['MODIFY_PAGE_SETTINGS'], |
|
498 |
'TEXT_CURRENT_PAGE' => $TEXT['CURRENT_PAGE'], |
|
499 |
'TEXT_MODIFY' => $TEXT['MODIFY'], |
|
500 |
'TEXT_MODIFY_PAGE' => $HEADING['MODIFY_PAGE'], |
|
501 |
'LAST_MODIFIED' => $MESSAGE['PAGES_LAST_MODIFIED'], |
|
502 |
'TEXT_PAGE_TITLE' => $TEXT['PAGE_TITLE'], |
|
503 |
'TEXT_MENU_TITLE' => $TEXT['MENU_TITLE'], |
|
504 |
'TEXT_TYPE' => $TEXT['TYPE'], |
|
505 |
'TEXT_MENU' => $TEXT['MENU'], |
|
506 |
'TEXT_PARENT' => $TEXT['PARENT'], |
|
507 |
'TEXT_VISIBILITY' => $TEXT['VISIBILITY'], |
|
508 |
'TEXT_PUBLIC' => $TEXT['PUBLIC'], |
|
509 |
'TEXT_PRIVATE' => $TEXT['PRIVATE'], |
|
510 |
'TEXT_REGISTERED' => $TEXT['REGISTERED'], |
|
511 |
'TEXT_NONE' => $TEXT['NONE'], |
|
512 |
'TEXT_HIDDEN' => $TEXT['HIDDEN'], |
|
513 |
'TEXT_TEMPLATE' => $TEXT['TEMPLATE'], |
|
514 |
'TEXT_TARGET' => $TEXT['TARGET'], |
|
515 |
'TEXT_SYSTEM_DEFAULT' => $TEXT['SYSTEM_DEFAULT'], |
|
516 |
'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'], |
|
517 |
'TEXT_NEW_WINDOW' => $TEXT['NEW_WINDOW'], |
|
518 |
'TEXT_SAME_WINDOW' => $TEXT['SAME_WINDOW'], |
|
519 |
'TEXT_TOP_FRAME' => $TEXT['TOP_FRAME'], |
|
520 |
'TEXT_ADMINISTRATORS' => $TEXT['ADMINISTRATORS'], |
|
521 |
'TEXT_ALLOWED_VIEWERS' => $TEXT['ALLOWED_VIEWERS'], |
|
522 |
'TEXT_USER' => $TEXT['USER'], |
|
523 |
'TEXT_GROUP' => $TEXT['GROUP'], |
|
524 |
'TEXT_DESCRIPTION' => $TEXT['DESCRIPTION'], |
|
525 |
'TEXT_KEYWORDS' => $TEXT['KEYWORDS'], |
|
526 |
'TEXT_SEARCHING' => $TEXT['SEARCHING'], |
|
527 |
'TEXT_LANGUAGE' => $TEXT['LANGUAGE'], |
|
528 |
'TEXT_ENABLED' => $TEXT['ENABLED'], |
|
529 |
'TEXT_DISABLED' => $TEXT['DISABLED'], |
|
530 |
'TEXT_SAVE' => $TEXT['SAVE'], |
|
531 |
'TEXT_RESET' => $TEXT['RESET'], |
|
532 |
'LAST_MODIFIED' => $MESSAGE['PAGES_LAST_MODIFIED'], |
|
533 |
'HEADING_MODIFY_PAGE' => $HEADING['MODIFY_PAGE'], |
|
534 |
'TEXT_NO_SELECTION' => $TEXT['NO_SELECTION'], |
|
535 |
) ); |
|
536 |
|
|
527 |
$oTpl->set_var($mLang->getLangArray()); |
|
528 |
/*-- finalize the page -----------------------------------------------------------------*/ |
|
537 | 529 |
$oTpl->parse('main', 'main_block', false); |
538 | 530 |
$oTpl->pparse('output', 'page'); |
539 |
|
|
540 | 531 |
// Print admin footer |
541 | 532 |
$admin->print_footer(); |
542 |
|
|
543 |
?> |
branches/2.8.x/wb/admin/pages/settings_save.php | ||
---|---|---|
78 | 78 |
$language = (preg_match('/^[A-Z]{2}$/', $language) ? $language : DEFAULT_LANGUAGE); |
79 | 79 |
$menu = intval($admin->get_post('menu')); // fix secunia 2010-91-3 |
80 | 80 |
$page_code = (isset($_POST['page_code']) ? intval($_POST['page_code']) : 0); |
81 |
$sPageIcon = (isset($_POST['page_icon']) ? $_POST['page_icon'] : 0); |
|
82 |
$sMenuIcon0 = (isset($_POST['menu_icon_0']) ? $_POST['menu_icon_0'] : 0); |
|
83 |
$sMenuIcon1 = (isset($_POST['menu_icon_1']) ? $_POST['menu_icon_1'] : 0); |
|
84 |
|
|
85 |
|
|
81 | 86 |
// Validate data |
82 | 87 |
if($page_title == '' || substr($page_title,0,1)=='.') |
83 | 88 |
{ |
... | ... | |
122 | 127 |
$sViewingUsers = implode(',', array_diff($aViewingUsers, array(0))); |
123 | 128 |
$sViewingUsers = (preg_match('/^,|[^0-9,]|,,|,$/', $sViewingUsers) ? array() : $sViewingUsers); |
124 | 129 |
|
130 |
$sPageIcon = (($sPageIcon == '0') ? '' : $sPageIcon); |
|
131 |
if(!is_readable(WB_PATH.$sPageIcon)) { $sPageIcon = ''; } |
|
132 |
$sMenuIcon0 = (($sMenuIcon0 == '0') ? '' : $sMenuIcon0); |
|
133 |
if(!is_readable(WB_PATH.$sMenuIcon0)) { $sMenuIcon0 = ''; } |
|
134 |
$sMenuIcon1 = (($sMenuIcon1 == '0') ? '' : $sMenuIcon1); |
|
135 |
if(!is_readable(WB_PATH.$sMenuIcon1)) { $sMenuIcon1 = ''; } |
|
136 |
|
|
125 | 137 |
// If needed, get new order |
126 | 138 |
if($parent != $old_parent) |
127 | 139 |
{ |
... | ... | |
196 | 208 |
$sql = 'UPDATE `'.TABLE_PREFIX.'pages` ' |
197 | 209 |
. 'SET `parent`='.$parent.', ' |
198 | 210 |
. '`page_title`=\''.$page_title.'\', ' |
211 |
. '`tooltip`=\''.$page_title.'\', ' |
|
212 |
. '`page_icon` =\''.mysql_real_escape_string($sPageIcon).'\', ' |
|
199 | 213 |
. '`menu_title`=\''.$menu_title.'\', ' |
214 |
. '`menu_icon_0` =\''.mysql_real_escape_string($sMenuIcon0).'\', ' |
|
215 |
. '`menu_icon_1` =\''.mysql_real_escape_string($sMenuIcon1).'\', ' |
|
200 | 216 |
. '`menu`='.$menu.', ' |
201 | 217 |
. '`level`='.$level.', ' |
202 | 218 |
. '`page_trail`=\''.$page_trail.'\', ' |
branches/2.8.x/wb/admin/pages/languages/EN.php | ||
---|---|---|
1 |
<?php |
|
2 |
/**************************************************************************************** |
|
3 |
* extended language definition for WebsiteBaker * |
|
4 |
* ACP-module pages * |
|
5 |
* english (GB) * |
|
6 |
****************************************************************************************/ |
|
7 |
|
|
8 |
$HEADING['MODIFY_PAGE'] = 'Modify Page'; |
|
9 |
$HEADING['MODIFY_PAGE_SETTINGS'] = 'Modify Page Settings'; |
|
10 |
|
|
11 |
$TEXT['ADMINISTRATORS'] = 'Administrators'; |
|
12 |
$TEXT['ALLOWED_VIEWERS'] = 'Allowed Viewers'; |
|
13 |
$TEXT['CURRENT_PAGE'] = 'Current Page'; |
|
14 |
$TEXT['DESCRIPTION'] = 'Description'; |
|
15 |
$TEXT['DISABLED'] = 'Disabled'; |
|
16 |
$TEXT['ENABLED'] = 'Enabled'; |
|
17 |
$TEXT['GROUP'] = 'Groups'; |
|
18 |
$TEXT['HIDDEN'] = 'Hidden'; |
|
19 |
$TEXT['KEYWORDS'] = 'Keywords'; |
|
20 |
$TEXT['LANGUAGE'] = 'Language'; |
|
21 |
$TEXT['MANAGE_SECTIONS'] = 'Manage Sections'; |
|
22 |
$TEXT['MENU'] = 'Menu'; |
|
23 |
$TEXT['MENU_TITLE'] = 'Menu Title'; |
|
24 |
$TEXT['MODIFY'] = 'Modify'; |
|
25 |
$TEXT['NEW_WINDOW'] = 'New Window'; |
|
26 |
$TEXT['NO_SELECTION'] = 'no selection'; |
|
27 |
$TEXT['NONE'] = 'None'; |
|
28 |
$TEXT['PAGE_CODE'] = 'Pagecode (language link)'; |
|
29 |
$TEXT['PAGE_TITLE'] = 'Page Title'; |
|
30 |
$TEXT['PARENT'] = 'Parent'; |
|
31 |
$TEXT['PLEASE_SELECT'] = 'Please select'; |
|
32 |
$TEXT['PRIVATE'] = 'Private'; |
|
33 |
$TEXT['PUBLIC'] = 'Public'; |
|
34 |
$TEXT['REGISTERED'] = 'Registered'; |
|
35 |
$TEXT['RESET'] = 'Reset'; |
|
36 |
$TEXT['SAME_WINDOW'] = 'Same Window'; |
|
37 |
$TEXT['SAVE'] = 'Save'; |
|
38 |
$TEXT['SEARCHING'] = 'Searching'; |
|
39 |
$TEXT['SYSTEM_DEFAULT'] = 'System Default'; |
|
40 |
$TEXT['TARGET'] = 'Target'; |
|
41 |
$TEXT['TEMPLATE'] = 'Template'; |
|
42 |
$TEXT['TOP_FRAME'] = 'Top Frame'; |
|
43 |
$TEXT['TYPE'] = 'Type'; |
|
44 |
$TEXT['USER'] = 'Users'; |
|
45 |
$TEXT['VISIBILITY'] = 'Visibility'; |
|
46 |
|
|
47 |
$TEXT['SECTION_GENERAL'] = 'General'; |
|
48 |
$TEXT['SECTION_ORGANISATION'] = 'Organisation'; |
|
49 |
$TEXT['SECTION_CONTENT'] = 'Content'; |
|
50 |
$TEXT['SECTION_SECURITY'] = 'Security'; |
|
51 |
$TEXT['PAGE_ICON'] = 'Page image'; |
|
52 |
$TEXT['MENU_ICON_0'] = 'Menu image normal'; |
|
53 |
$TEXT['MENU_ICON_1'] = 'Menu image hover'; |
|
54 |
|
|
55 |
$MESSAGE['PAGES_LAST_MODIFIED'] = 'Last modification by'; |
|
0 | 56 |
branches/2.8.x/wb/admin/pages/languages/DE.php | ||
---|---|---|
1 |
<?php |
|
2 |
/**************************************************************************************** |
|
3 |
* extended language definition for WebsiteBaker * |
|
4 |
* ACP-module pages * |
|
5 |
* deutsch * |
|
6 |
****************************************************************************************/ |
|
7 |
|
|
8 |
$HEADING['MODIFY_PAGE'] = 'Seite ändern'; |
|
9 |
$HEADING['MODIFY_PAGE_SETTINGS'] = 'Seitenoptionen ändern'; |
|
10 |
|
|
11 |
$TEXT['ADMINISTRATORS'] = 'Administratoren'; |
|
12 |
$TEXT['ALLOWED_VIEWERS'] = 'Zugelassene Besucher'; |
|
13 |
$TEXT['CURRENT_PAGE'] = 'Aktuelle Seite'; |
|
14 |
$TEXT['DESCRIPTION'] = 'Beschreibung'; |
|
15 |
$TEXT['DISABLED'] = 'Ausgeschaltet'; |
|
16 |
$TEXT['ENABLED'] = 'Eingeschaltet'; |
|
17 |
$TEXT['GROUP'] = 'Gruppen'; |
|
18 |
$TEXT['HIDDEN'] = 'Versteckt'; |
|
19 |
$TEXT['KEYWORDS'] = 'Schlüsselwörter'; |
|
20 |
$TEXT['LANGUAGE'] = 'Sprache'; |
|
21 |
$TEXT['LAST_MODIFIED'] = 'Letzte Änderung durch'; |
|
22 |
$TEXT['MANAGE_SECTIONS'] = 'Abschnitte verwalten'; |
|
23 |
$TEXT['MENU'] = 'Menü'; |
|
24 |
$TEXT['MENU_TITLE'] = 'Menütitel'; |
|
25 |
$TEXT['MODIFY'] = 'Ändern'; |
|
26 |
$TEXT['MODIFY_PAGE'] = 'Seite ändern'; |
|
27 |
$TEXT['NEW_WINDOW'] = 'Neues Fenster'; |
|
28 |
$TEXT['NO_SELECTION'] = 'keine Auswahl'; |
|
29 |
$TEXT['NONE'] = 'Keine'; |
|
30 |
$TEXT['PAGE_CODE'] = 'Seitencode (Sprachlink)'; |
|
31 |
$TEXT['PAGE_TITLE'] = 'Seitentitel'; |
|
32 |
$TEXT['PARENT'] = 'Übergeordnete Seite'; |
|
33 |
$TEXT['PLEASE_SELECT'] = 'Bitte auswählen'; |
|
34 |
$TEXT['PRIVATE'] = 'Privat'; |
|
35 |
$TEXT['PUBLIC'] = 'Öffentlich'; |
|
36 |
$TEXT['REGISTERED'] = 'registriert'; |
|
37 |
$TEXT['RESET'] = 'Zurücksetzen'; |
|
38 |
$TEXT['SAME_WINDOW'] = 'Gleiches Fenster'; |
|
39 |
$TEXT['SAVE'] = 'Speichern'; |
|
40 |
$TEXT['SEARCHING'] = 'Suchfunktion'; |
|
41 |
$TEXT['SYSTEM_DEFAULT'] = 'Standardeinstellung'; |
|
42 |
$TEXT['TARGET'] = 'LinkZiel'; |
|
43 |
$TEXT['TEMPLATE'] = 'Template'; |
|
44 |
$TEXT['TOP_FRAME'] = 'Frameset sprengen'; |
|
45 |
$TEXT['TYPE'] = 'Art'; |
|
46 |
$TEXT['USER'] = 'Benutzer'; |
|
47 |
$TEXT['VISIBILITY'] = 'Sichtbarkeit'; |
|
48 |
|
|
49 |
$TEXT['SECTION_GENERAL'] = 'Allgemein'; |
|
50 |
$TEXT['SECTION_ORGANISATION'] = 'Organisation'; |
|
51 |
$TEXT['SECTION_CONTENT'] = 'Inhalt'; |
|
52 |
$TEXT['SECTION_SECURITY'] = 'Sicherheit'; |
|
53 |
$TEXT['PAGE_ICON'] = 'Seitenbild'; |
|
54 |
$TEXT['MENU_ICON_0'] = 'Menübild normal'; |
|
55 |
$TEXT['MENU_ICON_1'] = 'Menübild hover'; |
|
56 |
|
|
57 |
$MESSAGE['PAGES_LAST_MODIFIED'] = 'Letze Änderung durch'; |
|
0 | 58 |
branches/2.8.x/wb/admin/interface/version.php | ||
---|---|---|
51 | 51 |
|
52 | 52 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
53 | 53 |
if(!defined('VERSION')) define('VERSION', '2.8.3'); |
54 |
if(!defined('REVISION')) define('REVISION', '1680');
|
|
54 |
if(!defined('REVISION')) define('REVISION', '1681');
|
|
55 | 55 |
if(!defined('SP')) define('SP', ''); |
branches/2.8.x/wb/modules/show_menu2/README.de.txt | ||
---|---|---|
501 | 501 |
[class] Liste der Klassen für diese Seite |
502 | 502 |
[menu_title] Text des Menütitel |
503 | 503 |
(HTML entity escaped ausser das SM2_NOESCAPE Flag ist gesetzt) |
504 |
[menu_icon_0] die URL zu einer Bilddatei mit normal - Darstellung (ab WB2.9.0)
|
|
505 |
[menu_icon_1] die URL zu einer Bilddatei mit active/hover - Darstellung (ab WB2.9.0)
|
|
504 |
[menu_icon_0] die URL zu einer Bilddatei mit normal - Darstellung (ab WB2.8.4)
|
|
505 |
[menu_icon_1] die URL zu einer Bilddatei mit active/hover - Darstellung (ab WB2.8.4)
|
|
506 | 506 |
[page_title] text des Seitentitel |
507 | 507 |
(HTML entity escaped ausser das SM2_NOESCAPE Flag ist gesetzt) |
508 |
[page_icon] die URL zu einer seitenbezogenen Bilddatei (ab WB2.9.0)
|
|
509 |
[tooltip] Tooltip-Text, der normal im title-Attribut der Links ausgegeben wird |
|
508 |
[page_icon] die URL zu einer seitenbezogenen Bilddatei (ab WB2.8.4)
|
|
509 |
[tooltip] Tooltip-Text, der normal im title-Attribut der Links ausgegeben wird (ab WB2.8.4)
|
|
510 | 510 |
[url] die URL der Seiten für den <a> tag |
511 | 511 |
[target] das Seitenziel für den <a> tag |
512 | 512 |
[page_id] die Page ID des aktuellen Menüpunktes. |
branches/2.8.x/wb/modules/show_menu2/include.php | ||
---|---|---|
539 | 539 |
if (version_compare(WB_VERSION, '2.7', '>=')) { // WB 2.7+ |
540 | 540 |
$fields .= ',`viewing_users`'; |
541 | 541 |
} |
542 |
if(version_compare(WB_VERSION, '2.9.0', '>=')) {
|
|
542 |
if(version_compare(WB_VERSION, '2.8.4', '>=')) {
|
|
543 | 543 |
$fields .= ',`menu_icon_0`,`menu_icon_1`,`page_icon`,`tooltip`'; |
544 | 544 |
} |
545 | 545 |
if ($flags & SM2_ALLINFO) { |
... | ... | |
576 | 576 |
continue; |
577 | 577 |
} |
578 | 578 |
} |
579 |
if(isset($page['page_icon']) && $page['page_icon'] != '') { |
|
580 |
$page['page_icon'] = WB_URL.$page['page_icon']; |
|
581 |
} |
|
582 |
if(isset($page['menu_icon_0']) && $page['menu_icon_0'] != '') { |
|
583 |
$page['menu_icon_0'] = WB_URL.$page['menu_icon_0']; |
|
584 |
} |
|
585 |
if(isset($page['menu_icon_1']) && $page['menu_icon_1'] != '') { |
|
586 |
$page['menu_icon_1'] = WB_URL.$page['menu_icon_1']; |
|
587 |
} |
|
588 |
|
|
579 | 589 |
if(!isset($page['tooltip'])) { $page['tooltip'] = $page['page_title']; } |
580 | 590 |
// ensure that we have an array entry in the table to add this to |
581 | 591 |
$idx = $page['parent']; |
branches/2.8.x/wb/modules/show_menu2/README.en.txt | ||
---|---|---|
449 | 449 |
[ul] <ul> tag including class: '<ul class="[class]">' |
450 | 450 |
[class] List of classes for that page |
451 | 451 |
[menu_title] Menu title text (HTML entity escaped unless SM2_NOESCAPE flag is used) |
452 |
[menu_icon_0] URL poining to an image for display normal - status |
|
453 |
[menu_icon_1] URL poining to an image for display active/hover - status |
|
452 |
[menu_icon_0] URL poining to an image for display normal - status (from WB2.8.4)
|
|
453 |
[menu_icon_1] URL poining to an image for display active/hover - status (from WB2.8.4)
|
|
454 | 454 |
[page_title] Page title text (HTML entity escaped unless SM2_NOESCAPE flag is used) |
455 |
[page_icon] URL poining to an image relating to the current page |
|
455 |
[page_icon] URL poining to an image relating to the current page (from WB2.8.4) |
|
456 |
[tooltip] Tooltip caption, normaly shown in title-attribute of links (ab WB2.8.4) |
|
456 | 457 |
[url] Page URL for the <a> tag |
457 | 458 |
[target] Page target for the <a> tag |
458 | 459 |
[page_id] Page ID of the current menu item |
branches/2.8.x/wb/modules/droplets/example/iParentPageIcon.php | ||
---|---|---|
1 |
//:search for icon in current page and parent pages if not found |
|
2 |
//:Use: [[iParentPageIcon?type=1]] Display the page-icon(0)(default) or menu_icon_0(1) or menu_icon_1(2) if found |
|
3 |
// @author: Werner von der Decken |
|
4 |
// @param int $type: 0=page_icon(default) | 1=menu_icon_0 | 2=menu_icon_1 |
|
5 |
// @param string $icon: name of a default image placed in WB_PATH/TEMPLATE/ |
|
6 |
// @return: a valid image-URL or empty string |
|
7 |
// |
|
8 |
global $wb, $database; |
|
9 |
$type = !isset($type) ? 0 : (intval($type) % 3); |
|
10 |
$icontypes = array( 0=>'page_icon', 1=>'menu_icon_0', 2=>'menu_icon_1'); |
|
11 |
$icon_url = ''; |
|
12 |
if( isset($icon) && file_exists(WB_PATH.'/'.TEMPLATE.'/'.$icon) ) |
|
13 |
{ |
|
14 |
$icon_url = WB_REL.'/'.TEMPLATE.'/'.$icon; |
|
15 |
} |
|
16 |
if( !isset($wb->page_icon) ) { return $icon_url; } |
|
17 |
$tmp_trail = $wb->page_trail; |
|
18 |
$tmp_trail = array_reverse($tmp_trail); |
|
19 |
foreach($tmp_trail as $pid) |
|
20 |
{ |
|
21 |
$sql = 'SELECT `'.$icontypes[$type].'` '; |
|
22 |
$sql .= 'FROM `'.TABLE_PREFIX.'pages` '; |
|
23 |
$sql .= 'WHERE `page_id`='.(int)$pid; |
|
24 |
if( ($icon = $database->get_one($sql)) != false ) |
|
25 |
{ |
|
26 |
if( file_exists(WB_PATH.$icon) ) |
|
27 |
{ |
|
28 |
$icon_url = WB_REL.$icon; |
|
29 |
break; |
|
30 |
} |
|
31 |
} |
|
32 |
} |
|
33 |
return $icon_url; |
|
0 | 34 |
Also available in: Unified diff
reorganisation of default theme of page-settings
added menu_icon_0 and menu_icon_1
update show_menu2 to handle the new icon fields (see README.de|en.txt)
add new droplet 'iParentIcon' for use with the new icons
added new module-depending language files (not complete yet) in admin/pages