Changeset 23 for branches/portal_by_daris/admin
- Timestamp:
- 02/10/09 12:30:15 (3 years ago)
- Location:
- branches/portal_by_daris/admin
- Files:
-
- 2 modified
-
panels.php (modified) (3 diffs)
-
portal.php (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/portal_by_daris/admin/panels.php
r17 r23 135 135 136 136 define('FORUM_PAGE_SECTION', 'start'); 137 define('FORUM_PAGE', 'admin _panels');137 define('FORUM_PAGE', 'admin-panels'); 138 138 require FORUM_ROOT.'header.php'; 139 139 … … 294 294 295 295 define('FORUM_PAGE_SECTION', 'start'); 296 define('FORUM_PAGE', 'admin _panels');296 define('FORUM_PAGE', 'admin-panels'); 297 297 require FORUM_ROOT.'header.php'; 298 298 … … 386 386 387 387 define('FORUM_PAGE_SECTION', 'start'); 388 define('FORUM_PAGE', 'admin _panels');388 define('FORUM_PAGE', 'admin-panels'); 389 389 require FORUM_ROOT.'header.php'; 390 390 -
branches/portal_by_daris/admin/portal.php
r20 r23 17 17 else 18 18 require FORUM_ROOT.'extensions/portal_by_daris/lang/English/admin_portal.php'; 19 20 21 // Display all the categories and forums22 $query = array(23 'SELECT' => 'c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.disp_position',24 'FROM' => 'categories AS c',25 'JOINS' => array(26 array(27 'INNER JOIN' => 'forums AS f',28 'ON' => 'c.id=f.cat_id'29 )30 ),31 'ORDER BY' => 'c.disp_position, c.id, f.disp_position'32 );33 ($hook = get_hook('aop_portal_qr_get_cats_and_forums')) ? eval($hook) : null;34 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);35 36 $news_forums = $cur_cat_html = '';37 38 $news_array = explode(',', $forum_config['o_portal_news_forums']);39 40 ($hook = get_hook('aop_portal_explode_news_forums')) ? eval($hook) : null;41 42 43 if ($forum_db->num_rows($result))44 {45 $cur_category = -1;46 47 while ($cur_forum = $forum_db->fetch_assoc($result))48 {49 if ($cur_forum['cid'] != $cur_category) // A new category since last iteration?50 {51 $cur_cat_html = ($cur_category != -1 ? '</optgroup>' : '').'<optgroup label="'.forum_htmlencode($cur_forum['cat_name']).'">';52 $news_forums .= $cur_cat_html;53 54 ($hook = get_hook('aop_portal_get_forums_loop_category')) ? eval($hook) : null;55 56 $cur_category = $cur_forum['cid'];57 }58 59 $news_forums .= '<option value="'.$cur_forum['fid'].'"'.(in_array($cur_forum['fid'], $news_array) ? ' selected="selected"' : '').'>'.forum_htmlencode($cur_forum['forum_name']).'</option>';60 61 ($hook = get_hook('aop_portal_get_forums_loop')) ? eval($hook) : null;62 }63 }64 65 19 66 20 // Setup the form … … 90 44 <div class="main-content main-frm"> 91 45 <div class="content-head"> 92 <h2 class="hn"><span><?php printf($lang_admin_portal['Portal head'], $lang_admin_portal['Index page head'])?></span></h2>46 <h2 class="hn"><span><?php echo $lang_admin_portal['Index page head'] ?></span></h2> 93 47 </div> 94 48 <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_settings_portal']) ?>"> … … 97 51 <input type="hidden" name="form_sent" value="1" /> 98 52 </div> 99 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>53 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? eval($hook) : null; ?> 100 54 <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> 101 55 <legend class="group-legend"><strong><?php echo $lang_admin_portal['Forums for news legend'] ?></strong></legend> 102 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_checkbox')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>56 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_checkbox')) ? eval($hook) : null; ?> 103 57 <div class="txt-set set<?php echo ++$forum_page['item_count'] ?>"> 104 58 <div class="txt-box textarea"> 105 <label for="fld<?php echo $forum_page['fld_count']+1 ?>"><span><?php echo $lang_admin_portal['Forums for news label'] ?></span>< !--<small><?php echo $lang_admin_settings['Maintenance message help'] ?></small>--></label>59 <label for="fld<?php echo $forum_page['fld_count']+1 ?>"><span><?php echo $lang_admin_portal['Forums for news label'] ?></span></label> 106 60 <div class="txt-input"> 107 61 <div class="checklist"> 108 62 <?php 63 64 $forums_for_news = explode(',', $forum_config['o_portal_news_forums']); 109 65 110 66 // Get the list of categories and forums … … 126 82 ); 127 83 128 ($hook = get_hook('se_qr_get_cats_and_forums')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null;84 ($hook = get_hook('se_qr_get_cats_and_forums')) ? eval($hook) : null; 129 85 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); 130 86 … … 132 88 while ($cur_forum = $forum_db->fetch_assoc($result)) 133 89 { 134 ($hook = get_hook('se_forum_loop_start')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null;90 ($hook = get_hook('se_forum_loop_start')) ? eval($hook) : null; 135 91 136 92 if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? … … 143 99 } 144 100 145 echo "\t\t\t\t\t\t\t\t".'<div class="checklist-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="form[portal_news_forums][]" value="'.$cur_forum['fid'].'"'.(in_array($cur_forum['fid'], $ news_array) ? ' checked="checked"' : '').'/></span> <label for="fld'.$forum_page['fld_count'].'">'.forum_htmlencode($cur_forum['forum_name']).'</label></div>'."\n";101 echo "\t\t\t\t\t\t\t\t".'<div class="checklist-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="form[portal_news_forums][]" value="'.$cur_forum['fid'].'"'.(in_array($cur_forum['fid'], $forums_for_news) ? ' checked="checked"' : '').'/></span> <label for="fld'.$forum_page['fld_count'].'">'.forum_htmlencode($cur_forum['forum_name']).'</label></div>'."\n"; 146 102 } 147 103 … … 151 107 </div> 152 108 </div> 153 </div> 154 155 156 <?/* 157 158 <select id="fld<?php echo $forum_page['fld_count'] ?>" name="form[portal_news_forums][]" multiple="multiple" size="8"><?php echo $news_forums ?></optgroup></select> 159 160 <?php*/ ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?> 109 </div> 110 <? ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? eval($hook) : null; ?> 161 111 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 162 112 <div class="sf-box text"> … … 167 117 </div> 168 118 </div> 169 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>119 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? eval($hook) : null; ?> 170 120 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 171 121 <div class="sf-box text"> … … 176 126 </div> 177 127 </div> 178 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 179 <div class="sf-box checkbox"> 180 <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[portal_news_avatar]" value="1"<?php if ($forum_config['o_portal_news_avatar'] == '1') echo ' checked="checked"' ?> /></span> 181 <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_portal['Avatar in news'] ?></span> <?php echo $lang_admin_portal['Avatar in news info'] ?></label> 182 </div> 183 </div> 184 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset_end')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?> 128 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset_end')) ? eval($hook) : null; ?> 185 129 </fieldset> 186 130 <?php 187 131 188 ($hook = get_hook('aop_features_sig_fieldset_end')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null;132 ($hook = get_hook('aop_features_sig_fieldset_end')) ? eval($hook) : null; 189 133 190 134 // Reset counter … … 193 137 ?> 194 138 <div class="content-head"> 195 <h2 class="hn"><span><?php printf($lang_admin_portal['Portal head'], $lang_admin_portal['Size head'])?></span></h2>139 <h2 class="hn"><span><?php echo $lang_admin_portal['Size head'] ?></span></h2> 196 140 </div> 197 141 198 142 <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> 199 143 <legend class="group-legend"><strong><?php echo $lang_admin_portal['Size legend'] ?></strong></legend> 200 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>144 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? eval($hook) : null; ?> 201 145 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 202 146 <div class="sf-box text"> … … 205 149 </div> 206 150 </div> 207 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>151 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? eval($hook) : null; ?> 208 152 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 209 153 <div class="sf-box text"> … … 212 156 </div> 213 157 </div> 214 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset_end')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>158 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset_end')) ? eval($hook) : null; ?> 215 159 </fieldset> 216 160 <?php 217 161 218 162 219 ($hook = get_hook('aop_features_sig_fieldset_end')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null;163 ($hook = get_hook('aop_features_sig_fieldset_end')) ? eval($hook) : null; 220 164 221 165 // Reset counter … … 224 168 ?> 225 169 <div class="content-head"> 226 <h2 class="hn"><span><?php printf($lang_admin_portal['Portal head'], $lang_admin_portal['Advanced settings head'])?></span></h2>170 <h2 class="hn"><span><?php echo $lang_admin_portal['Advanced settings head'] ?></span></h2> 227 171 </div> 228 172 229 173 <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> 230 174 <legend class="group-legend"><strong><?php echo $lang_admin_portal['Advanced settings legend'] ?></strong></legend> 231 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>175 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? eval($hook) : null; ?> 232 176 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 233 177 <div class="sf-box checkbox"> … … 236 180 </div> 237 181 </div> 238 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset_end')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>182 <?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset_end')) ? eval($hook) : null; ?> 239 183 </fieldset> 240 184 241 <?php ($hook = get_hook('aop_maintenance_maintenance_fieldset_end')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>185 <?php ($hook = get_hook('aop_maintenance_maintenance_fieldset_end')) ? eval($hook) : null; ?> 242 186 <div class="frm-buttons"> 243 187 <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></span>