Changeset 23

Show
Ignore:
Timestamp:
02/10/09 12:30:15 (3 years ago)
Author:
daris
Message:

portal: removed avatar in news option

Location:
branches/portal_by_daris
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • branches/portal_by_daris/admin/panels.php

    r17 r23  
    135135 
    136136                define('FORUM_PAGE_SECTION', 'start'); 
    137                 define('FORUM_PAGE', 'admin_panels'); 
     137                define('FORUM_PAGE', 'admin-panels'); 
    138138                require FORUM_ROOT.'header.php'; 
    139139 
     
    294294 
    295295        define('FORUM_PAGE_SECTION', 'start'); 
    296         define('FORUM_PAGE', 'admin_panels'); 
     296        define('FORUM_PAGE', 'admin-panels'); 
    297297        require FORUM_ROOT.'header.php'; 
    298298 
     
    386386 
    387387define('FORUM_PAGE_SECTION', 'start'); 
    388 define('FORUM_PAGE', 'admin_panels'); 
     388define('FORUM_PAGE', 'admin-panels'); 
    389389require FORUM_ROOT.'header.php'; 
    390390 
  • branches/portal_by_daris/admin/portal.php

    r20 r23  
    1717else 
    1818        require FORUM_ROOT.'extensions/portal_by_daris/lang/English/admin_portal.php'; 
    19  
    20  
    21 // Display all the categories and forums 
    22 $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  
    6519 
    6620// Setup the form 
     
    9044        <div class="main-content main-frm"> 
    9145                <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> 
    9347                </div> 
    9448                <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_settings_portal']) ?>"> 
     
    9751                                <input type="hidden" name="form_sent" value="1" /> 
    9852                        </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; ?> 
    10054                        <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> 
    10155                                <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; ?> 
    10357                                <div class="txt-set set<?php echo ++$forum_page['item_count'] ?>"> 
    10458                                        <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> 
    10660                                                <div class="txt-input"> 
    10761                                                        <div class="checklist"> 
    10862<?php 
     63 
     64$forums_for_news = explode(',', $forum_config['o_portal_news_forums']); 
    10965 
    11066// Get the list of categories and forums 
     
    12682); 
    12783 
    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; 
    12985$result = $forum_db->query_build($query) or error(__FILE__, __LINE__); 
    13086 
     
    13288while ($cur_forum = $forum_db->fetch_assoc($result)) 
    13389{ 
    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; 
    13591 
    13692        if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? 
     
    14399        } 
    144100 
    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"; 
    146102} 
    147103 
     
    151107                                                </div> 
    152108                                        </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; ?> 
    161111                                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 
    162112                                        <div class="sf-box text"> 
     
    167117                                        </div> 
    168118                                </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; ?> 
    170120                                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 
    171121                                        <div class="sf-box text"> 
     
    176126                                        </div> 
    177127                                </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; ?> 
    185129                        </fieldset> 
    186130<?php 
    187131 
    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; 
    189133 
    190134        // Reset counter 
     
    193137?> 
    194138                        <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> 
    196140                        </div> 
    197141                         
    198142                        <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> 
    199143                                <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; ?> 
    201145                                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 
    202146                                        <div class="sf-box text"> 
     
    205149                                        </div> 
    206150                                </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; ?> 
    208152                                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 
    209153                                        <div class="sf-box text"> 
     
    212156                                        </div> 
    213157                                </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; ?> 
    215159                        </fieldset> 
    216160<?php 
    217161 
    218162 
    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; 
    220164 
    221165        // Reset counter 
     
    224168?> 
    225169                        <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> 
    227171                        </div> 
    228172                         
    229173                        <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> 
    230174                                <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; ?> 
    232176                                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 
    233177                                        <div class="sf-box checkbox"> 
     
    236180                                        </div> 
    237181                                </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; ?> 
    239183                        </fieldset> 
    240184                         
    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; ?> 
    242186                        <div class="frm-buttons"> 
    243187                                <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  
    104104                $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>'; 
    105105 
    106                 // if option for displaying avatar in news is enabled 
    107                 if ($forum_config['o_portal_news_avatar'] == '1') 
    108                         $forum_page['avatar_markup'] = generate_avatar_markup($cur_news['poster_id']); 
    109  
    110106                ($hook = get_hook('xn_portal_by_daris_nw_row_pre_display')) ? eval($hook) : null; 
    111107 
     
    120116        <div class="main-content news panel-content"> 
    121117                <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  
    124118                        <?php echo $forum_page['post_message'] ?> 
    125  
    126                         <div style="clear:both"></div> 
    127119                        <div class="news-info-right"><?php echo implode(' | ', $forum_page['info-right']) ?></div> 
    128120                        <div class="news-info"><?php echo implode(' | ', $forum_page['info']) ?></div> 
  • branches/portal_by_daris/install.php

    r20 r23  
    176176                        'INSERT'        => 'conf_name, conf_value', 
    177177                        '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', 
    185178                        'VALUES'        => '\'o_portal_left_width\', \'15\'' 
    186179                ); 
     
    233226        ); 
    234227        $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__); 
    235245         
    236246        $query = array( 
    237247                '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', 
    262248                'WHERE'         => 'conf_name=\'o_portal_news_description_length\'' 
    263249        ); 
  • branches/portal_by_daris/lang/English/admin_panels.php

    r5 r23  
    2525'Position label'                                =>      'Position:', 
    2626'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.', 
    2828'Edit panels head'                              =>      'Edit, delete or change the position of panels', 
    2929'Edit panel details head'               =>      'Edit panel details', 
  • branches/portal_by_daris/lang/English/admin_portal.php

    r22 r23  
    77 
    88'Portal'                        => 'Portal', 
    9 'Portal head'                   => 'Portal : %s', 
    109 
    1110// -- Index page 
     
    1817'News description length'       => 'News description length', 
    1918'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', 
    2219 
    2320// -- Size 
  • branches/portal_by_daris/manifest.xml

    r21 r23  
    143143if (FORUM_PAGE_SECTION == 'start') 
    144144{ 
    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>'; 
    147147} 
    148148elseif (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>'; 
    150150]]></hook> 
    151151 
     
    160160 
    161161 
    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 
     164array_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'); 
    165165 
    166166]]></hook> 
     
    177177        $form['portal_left_width'] = intval($form['portal_left_width']); 
    178178        $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'; 
    180179        if (!isset($form['portal_panels_all_pages']) || $form['portal_panels_all_pages'] != '1') $form['portal_panels_all_pages'] = '0'; 
    181180} 
  • branches/portal_by_daris/panels.php

    r21 r23  
    2929                foreach ($panels as $cur_panel) 
    3030                { 
    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'))) 
    3232                                continue; 
    3333                         
  • branches/portal_by_daris/style/style.css

    r22 r23  
    5757} 
    5858 
    59 .news .avatar-left { 
    60         float: left; 
    61         margin-right: 10px; 
    62         margin-bottom: 10px; 
    63 } 
    64  
    6559.main-content.panel strong { 
    6660        font-weight: bold;