Changeset 23
- Timestamp:
- 02/10/09 12:30:15 (3 years ago)
- Location:
- branches/portal_by_daris
- Files:
-
- 9 modified
-
admin/panels.php (modified) (3 diffs)
-
admin/portal.php (modified) (14 diffs)
-
index.php (modified) (2 diffs)
-
install.php (modified) (2 diffs)
-
lang/English/admin_panels.php (modified) (1 diff)
-
lang/English/admin_portal.php (modified) (2 diffs)
-
manifest.xml (modified) (3 diffs)
-
panels.php (modified) (1 diff)
-
style/style.css (modified) (1 diff)
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> -
branches/portal_by_daris/index.php
r18 r23 104 104 $forum_page['info-right'][] = '<a href="'.forum_link($forum_url['topic'], array($cur_news['id'], sef_friendly($cur_news['subject']))).'">'.$lang_portal['Comments'].': '.$cur_news['num_replies'].'</a>'; 105 105 106 // if option for displaying avatar in news is enabled107 if ($forum_config['o_portal_news_avatar'] == '1')108 $forum_page['avatar_markup'] = generate_avatar_markup($cur_news['poster_id']);109 110 106 ($hook = get_hook('xn_portal_by_daris_nw_row_pre_display')) ? eval($hook) : null; 111 107 … … 120 116 <div class="main-content news panel-content"> 121 117 <div class="entry-content"> 122 <?php if (isset($forum_page['avatar_markup']) && $forum_page['avatar_markup'] != '') : ?> <div class="avatar-left"><?php echo $forum_page['avatar_markup'] ?></div><?php endif; ?>123 124 118 <?php echo $forum_page['post_message'] ?> 125 126 <div style="clear:both"></div>127 119 <div class="news-info-right"><?php echo implode(' | ', $forum_page['info-right']) ?></div> 128 120 <div class="news-info"><?php echo implode(' | ', $forum_page['info']) ?></div> -
branches/portal_by_daris/install.php
r20 r23 176 176 'INSERT' => 'conf_name, conf_value', 177 177 'INTO' => 'config', 178 'VALUES' => '\'o_portal_news_avatar\', 0'179 );180 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);181 182 $query = array(183 'INSERT' => 'conf_name, conf_value',184 'INTO' => 'config',185 178 'VALUES' => '\'o_portal_left_width\', \'15\'' 186 179 ); … … 233 226 ); 234 227 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); 228 $query = array( 229 'DELETE' => 'config', 230 'WHERE' => 'conf_name=\'o_portal_left_width\'' 231 ); 232 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); 233 234 $query = array( 235 'DELETE' => 'config', 236 'WHERE' => 'conf_name=\'o_portal_right_width\'' 237 ); 238 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); 239 240 $query = array( 241 'DELETE' => 'config', 242 'WHERE' => 'conf_name=\'o_portal_panels_all_pages\'' 243 ); 244 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); 235 245 236 246 $query = array( 237 247 'DELETE' => 'config', 238 'WHERE' => 'conf_name=\'o_portal_news_avatar\''239 );240 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);241 242 $query = array(243 'DELETE' => 'config',244 'WHERE' => 'conf_name=\'o_portal_left_width\''245 );246 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);247 248 $query = array(249 'DELETE' => 'config',250 'WHERE' => 'conf_name=\'o_portal_right_width\''251 );252 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);253 254 $query = array(255 'DELETE' => 'config',256 'WHERE' => 'conf_name=\'o_portal_panels_all_pages\''257 );258 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);259 260 $query = array(261 'DELETE' => 'config',262 248 'WHERE' => 'conf_name=\'o_portal_news_description_length\'' 263 249 ); -
branches/portal_by_daris/lang/English/admin_panels.php
r5 r23 25 25 'Position label' => 'Position:', 26 26 'Panel content' => 'Panel content:', 27 'Panel content help' => 'Content will be ignored if panel file is selected. You may use HTML in your content.',27 'Panel content help' => 'Content will be ignored if panel file is selected. You may use HTML and PHP code in your content.', 28 28 'Edit panels head' => 'Edit, delete or change the position of panels', 29 29 'Edit panel details head' => 'Edit panel details', -
branches/portal_by_daris/lang/English/admin_portal.php
r22 r23 7 7 8 8 'Portal' => 'Portal', 9 'Portal head' => 'Portal : %s',10 9 11 10 // -- Index page … … 18 17 'News description length' => 'News description length', 19 18 'News description length info' => 'Max length of news description. Type 0 to show all post content as news description.', 20 'Avatar in news' => 'Avatar in news',21 'Avatar in news info' => 'Show user avatar (if exists) in news',22 19 23 20 // -- Size -
branches/portal_by_daris/manifest.xml
r21 r23 143 143 if (FORUM_PAGE_SECTION == 'start') 144 144 { 145 $forum_page['admin_submenu']['pages'] = '<li'.((FORUM_PAGE == 'admin-pages') ? ' class=" isactive"' : '').'><a href="'.forum_link($forum_url['admin_pages']).'">'.$lang_portal['Pages'].'</a></li>';146 $forum_page['admin_submenu']['panels'] = '<li'.((FORUM_PAGE == 'admin-panels') ? ' class=" isactive"' : '').'><a href="'.forum_link($forum_url['admin_panels']).'">'.$lang_portal['Panels'].'</a></li>';145 $forum_page['admin_submenu']['pages'] = '<li'.((FORUM_PAGE == 'admin-pages') ? ' class="active"' : '').'><a href="'.forum_link($forum_url['admin_pages']).'">'.$lang_portal['Pages'].'</a></li>'; 146 $forum_page['admin_submenu']['panels'] = '<li'.((FORUM_PAGE == 'admin-panels') ? ' class="active"' : '').'><a href="'.forum_link($forum_url['admin_panels']).'">'.$lang_portal['Panels'].'</a></li>'; 147 147 } 148 148 elseif (FORUM_PAGE_SECTION == 'settings') 149 $forum_page['admin_submenu']['settings-portal'] = '<li'.((FORUM_PAGE == 'admin-settings-portal') ? ' class=" isactive"' : '').'><a href="'.forum_link($forum_url['admin_settings_portal']).'">'.$lang_portal['Portal'].'</a></li>';149 $forum_page['admin_submenu']['settings-portal'] = '<li'.((FORUM_PAGE == 'admin-settings-portal') ? ' class="active"' : '').'><a href="'.forum_link($forum_url['admin_settings_portal']).'">'.$lang_portal['Portal'].'</a></li>'; 150 150 ]]></hook> 151 151 … … 160 160 161 161 162 $links['index'] = '<li id="navportal"'.((FORUM_PAGE == 'news' || FORUM_PAGE == 'pages') ? ' class=" isactive"' : '').'><a href="'.forum_link($forum_url['index']).'"><span>'.$lang_common['Index'].'</span></a></li>';163 164 array_insert($links, 1, '<li id="navindex"'.((FORUM_PAGE == 'index') ? ' class=" isactive"' : '').'><a href="'.forum_link($forum_url['forums']).'"><span>'.$lang_common['Forum'].'</span></a></li>', 'forum');162 $links['index'] = '<li id="navportal"'.((FORUM_PAGE == 'news' || FORUM_PAGE == 'pages') ? ' class="active"' : '').'><a href="'.forum_link($forum_url['index']).'"><span>'.$lang_common['Index'].'</span></a></li>'; 163 164 array_insert($links, 1, '<li id="navindex"'.((FORUM_PAGE == 'index') ? ' class="active"' : '').'><a href="'.forum_link($forum_url['forums']).'"><span>'.$lang_common['Forum'].'</span></a></li>', 'forum'); 165 165 166 166 ]]></hook> … … 177 177 $form['portal_left_width'] = intval($form['portal_left_width']); 178 178 $form['portal_right_width'] = intval($form['portal_right_width']); 179 if (!isset($form['portal_news_avatar']) || $form['portal_news_avatar'] != '1') $form['portal_news_avatar'] = '0';180 179 if (!isset($form['portal_panels_all_pages']) || $form['portal_panels_all_pages'] != '1') $form['portal_panels_all_pages'] = '0'; 181 180 } -
branches/portal_by_daris/panels.php
r21 r23 29 29 foreach ($panels as $cur_panel) 30 30 { 31 if ($left_width == 0 && $location == 0 || $right_width == 0 && $location == 3 || FORUM_PAGE == 'pages' && $location == 3 || $forum_config['o_portal_panels_all_pages'] == 1 && $location == 3 )31 if ($left_width == 0 && $location == 0 || $right_width == 0 && $location == 3 || FORUM_PAGE == 'pages' && $location == 3 || $forum_config['o_portal_panels_all_pages'] == 1 && $location == 3 && !in_array(FORUM_PAGE, array('news', 'pages'))) 32 32 continue; 33 33 -
branches/portal_by_daris/style/style.css
r22 r23 57 57 } 58 58 59 .news .avatar-left {60 float: left;61 margin-right: 10px;62 margin-bottom: 10px;63 }64 65 59 .main-content.panel strong { 66 60 font-weight: bold;