FluxBB.org

Changeset 726

Show
Ignore:
Timestamp:
11/12/08 13:54:58 (2 months ago)
Author:
Paul
Message:

See note to r.719

Location:
fluxbb/branches/fluxbb-1.3-dev/upload
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • fluxbb/branches/fluxbb-1.3-dev/upload/edit.php

    r641 r726  
    176176 
    177177// Setup form 
    178 $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; 
     178$forum_page['fld_count'] = 0; 
    179179$forum_page['form_action'] = forum_link($forum_url['edit'], $id); 
    180180$forum_page['form_attributes'] = array(); 
     
    185185); 
    186186 
    187 // Setup help 
    188 $forum_page['main_head_options'] = array(); 
     187// Setup post features 
     188$forum_page['message_options'] = array(); 
    189189if ($forum_config['p_message_bbcode'] == '1') 
    190         $forum_page['text_options']['bbcode'] = '<span'.(empty($forum_page['text_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'bbcode').'" title="'.sprintf($lang_common['Help page'], $lang_common['BBCode']).'">'.$lang_common['BBCode'].'</a></span>'; 
     190{ 
     191        $forum_page['compose_options']['enabled']['bbcode'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'>'.$lang_common['BBCode enabled'].'</span>'; 
     192        $forum_page['compose_options']['help']['bbcode'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'bbcode').'" title="'.sprintf($lang_common['Help page'], $lang_common['BBCode help']).'">'.$lang_common['BBCode help'].'</a></span>'; 
     193} 
    191194if ($forum_config['p_message_img_tag'] == '1') 
    192         $forum_page['text_options']['img'] = '<span'.(empty($forum_page['text_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'img').'" title="'.sprintf($lang_common['Help page'], $lang_common['Images']).'">'.$lang_common['Images'].'</a></span>'; 
     195{ 
     196        $forum_page['compose_options']['enabled']['img'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'>'.$lang_common['Images enabled'].'</span>'; 
     197        $forum_page['compose_options']['help']['img'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'img').'" title="'.sprintf($lang_common['Help page'], $lang_common['Images help']).'">'.$lang_common['Images help'].'</a></span>'; 
     198} 
    193199if ($forum_config['o_smilies'] == '1') 
    194         $forum_page['text_options']['smilies'] = '<span'.(empty($forum_page['text_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'smilies').'" title="'.sprintf($lang_common['Help page'], $lang_common['Smilies']).'">'.$lang_common['Smilies'].'</a></span>'; 
    195  
     200{ 
     201        $forum_page['compose_options']['enabled']['smilies'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'>'.$lang_common['Smilies enabled'].'</span>'; 
     202        $forum_page['compose_options']['help']['smilies'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'smilies').'" title="'.sprintf($lang_common['Help page'], $lang_common['Smilies help']).'">'.$lang_common['Smilies help'].'</a></span>'; 
     203} 
    196204 
    197205// Setup breadcrumbs 
     
    203211); 
    204212 
     213// Setup main heading 
     214$forum_page['main_hd'] = end($forum_page['crumbs']); 
     215 
    205216($hook = get_hook('ed_pre_header_load')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; 
    206217 
     
    213224($hook = get_hook('ed_main_output_start')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; 
    214225 
     226?> 
     227        <div class="content"> 
     228<?php 
     229 
    215230// If preview selected and there are no errors 
    216231if (isset($_POST['preview']) && empty($forum_page['errors'])) 
     
    219234                require FORUM_ROOT.'include/parser.php'; 
    220235 
    221         // Generate the post heading 
    222         $forum_page['post_ident'] = array(); 
    223         $forum_page['post_ident']['num'] = '<span class="post-num">#</span>'; 
    224         $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($id == $cur_post['first_post_id']) ? $lang_post['Topic byline'] : $lang_post['Reply byline']), '<strong>'.forum_htmlencode($cur_post['poster']).'</strong>').'</span>'; 
    225         $forum_page['post_ident']['link'] = '<span class="post-link">'.format_time(time()).'</span>'; 
    226  
    227236        $forum_page['preview_message'] = parse_message($message, $hide_smilies); 
    228237 
     
    230239 
    231240?> 
    232         <div class="main-subhead"> 
    233                 <h2 class="hn"><span><?php echo $id == $cur_post['first_post_id'] ? $lang_post['Preview edited topic'] : $lang_post['Preview edited reply'] ?></span></h2> 
    234         </div> 
    235         <div id="post-preview" class="main-content main-frm"> 
    236                 <div class="post singlepost"> 
    237                         <div class="posthead"> 
    238                                 <h3 class="hn"><?php echo implode(' ', $forum_page['post_ident']) ?></h3> 
    239 <?php ($hook = get_hook('ed_preview_new_post_head_option')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?> 
    240                         </div> 
    241                         <div class="postbody"> 
    242                                 <div class="post-entry"> 
    243                                         <div class="entry-content"> 
    244                                                 <?php echo $forum_page['preview_message']."\n" ?> 
    245                                         </div> 
     241                <div id="post-preview" class="section section-1 datafrm"> 
     242                        <div class="section-hd"> 
     243                                <h2 class="hn"><span><?php echo $id == $cur_post['first_post_id'] ? $lang_post['Preview edited topic'] : $lang_post['Preview edited reply'] ?></span></h2> 
     244                        </div> 
     245                        <div class="post-entry"> 
     246                                <div class="entry-content"> 
     247                                        <?php echo $forum_page['preview_message']."\n" ?> 
     248                                </div> 
    246249<?php ($hook = get_hook('ed_preview_new_post_entry_data')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?> 
    247                                 </div> 
    248250                        </div> 
    249251                </div> 
    250         </div> 
    251 <?php 
    252  
    253 } 
    254  
    255 ?> 
    256         <div class="main-subhead"> 
    257                 <h2 class="hn"><span><?php echo ($id != $cur_post['first_post_id']) ? $lang_post['Compose edited reply'] : $lang_post['Compose edited topic'] ?></span></h2> 
    258         </div> 
    259         <div id="post-form" class="main-content main-frm"> 
    260 <?php 
    261  
    262         if (!empty($forum_page['text_options'])) 
    263                 echo "\t\t".'<p class="ct-options options">'.sprintf($lang_common['You may use'], implode(' ', $forum_page['text_options'])).'</p>'."\n"; 
     252<?php 
     253 
     254} 
     255 
     256?> 
     257                <div id="post-form" class="section<?php echo (isset($_POST['preview']) && empty($errors)) ? '' : ' section-1' ?> postfrm"> 
     258                        <div class="section-hd"> 
     259                                <h2 class="hn"><span><?php echo ($id != $cur_post['first_post_id']) ? $lang_post['Compose edited reply'] : $lang_post['Compose edited topic'] ?></span></h2> 
     260                        </div> 
     261                        <form id="afocus" method="post" accept-charset="utf-8" action="<?php echo $forum_page['form_action'] ?>"<?php if (!empty($forum_page['form_attributes'])) echo ' '.implode(' ', $forum_page['form_attributes']) ?>> 
     262                        <div class="hidden"> 
     263                                <?php echo implode("\n\t\t\t\t", $forum_page['hidden_fields'])."\n" ?> 
     264                        </div> 
     265<?php 
    264266 
    265267// If there were any errors, show them 
     
    268270 
    269271?> 
    270                 <div class="ct-box error-box"> 
    271                         <h3 class="warn hn"><span><?php echo $lang_post['Post errors'] ?></span></h3> 
    272                         <ul class="error-list"> 
    273                                 <?php echo implode("\n\t\t\t\t", $forum_page['errors'])."\n" ?> 
    274                         </ul> 
    275                 </div> 
    276 <?php 
    277  
    278 } 
    279  
    280 ?> 
    281                 <div id="req-msg" class="req-warn ct-box error-box"> 
    282                         <p><?php printf($lang_common['Required warn'], '<em>'.$lang_common['Required'].'</em>') ?></p> 
    283                 </div> 
    284                 <form id="afocus" class="frm-form" method="post" accept-charset="utf-8" action="<?php echo $forum_page['form_action'] ?>"<?php if (!empty($forum_page['form_attributes'])) echo ' '.implode(' ', $forum_page['form_attributes']) ?>> 
    285                         <div class="hidden"> 
    286                                 <?php echo implode("\n\t\t\t\t", $forum_page['hidden_fields'])."\n" ?> 
    287                         </div> 
    288 <?php ($hook = get_hook('ed_pre_main_fieldset')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?> 
    289                         <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> 
    290                                 <legend class="group-legend"><strong><?php echo $lang_post['Edit post legend'] ?></strong></legend> 
     272                        <div class="error-box"> 
     273                                <h3 class="warn hn"><span><?php echo $lang_post['Post errors'] ?></span></h3> 
     274                                <ul class="error-list"> 
     275                                        <?php echo implode("\n\t\t\t\t\t", $forum_page['errors'])."\n" ?> 
     276                                </ul> 
     277                        </div> 
     278<?php 
     279 
     280} 
     281 
     282?> 
     283                        <div id="req-msg" class="req-warn error-box"> 
     284                                <p><?php printf($lang_common['Required warn'], '<em>'.$lang_common['Required'].'</em>') ?></p> 
     285                        </div> 
     286<?php ($hook = get_hook('ed_pre_main_group')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?> 
     287                        <div class="frm-group frm-group-1"> 
    291288<?php ($hook = get_hook('ed_pre_subject')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?> 
    292 <?php if ($can_edit_subject): ?>                                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> 
     289<?php if ($can_edit_subject): ?>                                <div class="sf-set frm-set frm-set-1"> 
    293290                                        <div class="sf-box text required"> 
    294291                                                <label for="fld<?php echo ++ $forum_page['fld_count'] ?>"><span><?php echo $lang_post['Topic subject'] ?>  <em><?php echo $lang_common['Required'] ?></em></span></label><br /> 
     
    296293                                        </div> 
    297294                                </div> 
    298 <?php endif; ($hook = get_hook('ed_pre_message_box')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>                         <div class="txt-set set<?php echo ++$forum_page['item_count'] ?>"> 
    299                                         <div class="txt-box textarea required"> 
    300                                                 <label for="fld<?php echo ++ $forum_page['fld_count'] ?>"><span><?php echo $lang_post['Write message'] ?>  <em><?php echo $lang_common['Required'] ?></em></span></label> 
    301                                                 <div class="txt-input"><span class="fld-input"><textarea id="fld<?php echo $forum_page['fld_count'] ?>" name="req_message" rows="14" cols="95"><?php echo forum_htmlencode(isset($_POST['req_message']) ? $message : $cur_post['message']) ?></textarea></span></div> 
     295<?php endif; ($hook = get_hook('ed_pre_message_box')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?>                         <div class="tf-set frm-set<?php echo ($can_edit_subject) ? '' : ' frm-set-1' ?>"> 
     296                                        <div class="tf-box textarea required"> 
     297                                                <label for="fld<?php echo ++ $forum_page['fld_count'] ?>"><span><?php echo $lang_post['Write message'] ?>  <em><?php echo $lang_common['Required'] ?></em></span><?php echo (!empty($forum_page['compose_options']['enabled'])) ? ' <br /><small class="compose-options">'.implode(' <br />',$forum_page['compose_options']['enabled']).'</small>' : '' ?></label> 
     298                                                <div class="tf-item"><span class="fld-input"><textarea id="fld<?php echo $forum_page['fld_count'] ?>" name="req_message" rows="14" cols="95"><?php echo forum_htmlencode(isset($_POST['req_message']) ? $message : $cur_post['message']) ?></textarea></span></div> 
    302299                                        </div> 
    303300                                </div> 
     
    308305{ 
    309306        if (isset($_POST['hide_smilies']) || $cur_post['hide_smilies'] == '1') 
    310                 $forum_page['checkboxes']['hide_smilies'] = '<div class="mf-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="hide_smilies" value="1" checked="checked" /></span> <label for="fld'.$forum_page['fld_count'].'">'.$lang_post['Hide smilies'].'</label></div>'; 
     307                $forum_page['checkboxes']['hide_smilies'] = '<div class="gf-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="hide_smilies" value="1" checked="checked" /></span> <label for="fld'.$forum_page['fld_count'].'">'.$lang_post['Hide smilies'].'</label></div>'; 
    311308        else 
    312                 $forum_page['checkboxes']['hide_smilies'] = '<div class="mf-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="hide_smilies" value="1" /></span> <label for="fld'.$forum_page['fld_count'].'">'.$lang_post['Hide smilies'].'</label></div>'; 
     309                $forum_page['checkboxes']['hide_smilies'] = '<div class="gf-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="hide_smilies" value="1" /></span> <label for="fld'.$forum_page['fld_count'].'">'.$lang_post['Hide smilies'].'</label></div>'; 
    313310} 
    314311 
     
    316313{ 
    317314        if ((isset($_POST['form_sent']) && isset($_POST['silent'])) || !isset($_POST['form_sent'])) 
    318                 $forum_page['checkboxes']['silent'] = '<div class="mf-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="silent" value="1" checked="checked" /></span> <label for="fld'.$forum_page['fld_count'].'">'.$lang_post['Silent edit'].'</label></div>'; 
     315                $forum_page['checkboxes']['silent'] = '<div class="gf-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="silent" value="1" checked="checked" /></span> <label for="fld'.$forum_page['fld_count'].'">'.$lang_post['Silent edit'].'</label></div>'; 
    319316        else 
    320                 $forum_page['checkboxes']['silent'] = '<div class="mf-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="silent" value="1" /></span> <label for="fld'.$forum_page['fld_count'].'">'.$lang_post['Silent edit'].'</label></div>'; 
     317                $forum_page['checkboxes']['silent'] = '<div class="gf-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="silent" value="1" /></span> <label for="fld'.$forum_page['fld_count'].'">'.$lang_post['Silent edit'].'</label></div>'; 
    321318} 
    322319 
     
    327324 
    328325?> 
    329                                 <fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>"> 
     326                                <fieldset class="gf-set frm-set"> 
    330327                                        <legend><span><?php echo $lang_post['Post settings'] ?></span></legend> 
    331                                         <div class="mf-box checkbox"> 
     328                                        <div class="gf-box checkbox"> 
    332329                                                <?php echo implode("\n\t\t\t\t\t", $forum_page['checkboxes'])."\n"; ?> 
    333330                                        </div> 
     
    338335} 
    339336 
    340 ($hook = get_hook('ed_pre_main_fieldset_end')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; 
    341  
    342 ?> 
    343                         </fieldset> 
    344 <?php 
    345  
    346 ($hook = get_hook('ed_main_fieldset_end')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; 
     337($hook = get_hook('ed_pre_main_group_end')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; 
     338 
     339?> 
     340                        </div> 
     341<?php 
     342 
     343($hook = get_hook('ed_main_group_end')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; 
    347344 
    348345?> 
    349346                        <div class="frm-buttons"> 
    350                                 <span class="submit"><input type="submit" name="submit" value="<?php echo ($id != $cur_post['first_post_id']) ? $lang_post['Submit reply'] : $lang_post['Submit topic'] ?>" /></span> 
    351                                 <span class="submit"><input type="submit" name="preview" value="<?php echo ($id != $cur_post['first_post_id']) ? $lang_post['Preview reply'] : $lang_post['Preview topic'] ?>" /></span> 
    352                         </div> 
    353                 </form> 
     347                                <p class="frm-actions"><span class="submit"><input type="submit" name="submit" value="<?php echo ($id != $cur_post['first_post_id']) ? $lang_post['Submit reply'] : $lang_post['Submit topic'] ?>" /></span> <span class="submit"><input type="submit" name="preview" value="<?php echo ($id != $cur_post['first_post_id']) ? $lang_post['Preview reply'] : $lang_post['Preview topic'] ?>" /></span></p> 
     348                                <p class="form-help"><?php echo (!empty($forum_page['compose_options']['help'])) ? implode(' ', $forum_page['compose_options']['help']) : '' ?></p> 
     349                        </div> 
     350                        </form> 
     351                </div> 
    354352        </div> 
    355353<?php 
     
    360358 
    361359$tpl_temp = forum_trim(ob_get_contents()); 
    362 $tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main); 
     360$tpl_main = str_replace('<!-- forum_main_content -->', $tpl_temp, $tpl_main); 
    363361ob_end_clean(); 
    364362// END SUBST - <!-- forum_main --> 
  • fluxbb/branches/fluxbb-1.3-dev/upload/include/template/main.tpl

    r720 r726  
    4545 
    4646<!-- forum_crumbs_end --> 
     47 
    4748<!-- forum_qpost --> 
    48  
     49<!-- forum_topicreview --> 
    4950<!-- forum_info --> 
    5051 
  • fluxbb/branches/fluxbb-1.3-dev/upload/lang/English/common.php

    r721 r726  
    5151'Username'                                                      =>      'Username', 
    5252'Registered'                                            =>      'Registered', 
    53 'Write message'                                         =>      'Write message:', 
    5453'Forum'                                                         =>      'Forum', 
    5554'Posts'                                                         =>      'Posts', 
     
    5756'Page'                                                          =>      'Page', 
    5857'Title page'                                            =>      '(Page %s of %s)', 
    59 'BBCode'                                                        =>      'BBCode',       // You probably shouldn't change this 
    60 'Smilies'                                                       =>      'Smilies', 
    61 'Images'                                                        =>      'Images', 
    62 'You may use'                                           =>      'You may use: %s', 
     58'BBCode enabled'                                        =>      'BBCode enabled', 
     59'Images enabled'                                        =>      'Images enabled', 
     60'Smilies enabled'                                       =>      'Smilies enabled', 
     61'BBCode help'                                           =>      'BBCode help',  // You probably shouldn't change this 
     62'Smilies help'                                          =>      'Smilies help', 
     63'Images help'                                           =>      'Images help', 
    6364'and'                                                           =>      'and', 
    6465'Image link'                                            =>      'image',        // This is displayed (i.e. <image>) instead of images when "Show images" is disabled in the profile 
  • fluxbb/branches/fluxbb-1.3-dev/upload/lang/English/post.php

    r589 r726  
    1919'Compose edited reply'  =>      'Compose and post your edited reply', 
    2020'Compose edited topic'  =>      'Compose and post your edited topic', 
    21 'Guest post legend'             =>      'Required information for guests', 
    2221'Post errors'                   =>      '<strong>Warning!</strong> The following errors must be corrected before your message can be posted:', 
    23 'Guest name'                    =>      'Guest name:',  // For guests (instead of Username) 
    24 'Guest e-mail'                  =>      'Guest e-mail:', 
     22'Guest name'                    =>      'Guest name',   // For guests (instead of Username) 
     23'Guest e-mail'                  =>      'Guest e-mail', 
    2524'Post redirect'                 =>      'Post entered. Redirecting 
', 
    2625'Post reply'                    =>      'Post new reply', 
    2726'Post new topic'                =>      'Post new topic', 
    28 'Topic subject'                 =>      'Topic subject:', 
    29 'Write message'                 =>      'Write message:', 
     27'Topic subject'                 =>      'Topic subject', 
     28'Write message'                 =>      'Write message', 
    3029'Hide smilies'                  =>      'Never show smilies as icons (images) for this post.', 
    3130'Subscribe'                             =>      'Subscribe to this topic.', 
     
    3433'Flood'                                 =>      'At least %s seconds have to pass between posts. Please wait a while and try posting again.', 
    3534'Permalink post'                =>      'Permanent link to this post', 
    36 'Post settings'                 =>      'Optional post settings:', 
     35'Post settings'                 =>      'Optional post settings', 
    3736'Preview reply'                 =>      'Preview your new reply', 
    3837'Preview new topic'             =>      'Preview your new topic', 
     
    4443'Topic byline'                  =>      '<span>Topic by </span>%s', 
    4544'Reply byline'                  =>      '<span>Reply by </span>%s', 
    46 'Post posted'                   =>      '<span>Posted </span>%s', 
    47  
    48  
    49  
    5045 
    5146// Edit post 
  • fluxbb/branches/fluxbb-1.3-dev/upload/lang/English/topic.php

    r564 r726  
    3535'RSS topic feed'                =>      'RSS Topic Feed', 
    3636'Quick post'                    =>      'Quick reply to this topic', 
     37'Write message'                 =>      'Write message', 
    3738'Post'                                  =>      'Post', 
    3839'Permalink post'                =>      'Permanent link to this post', 
  • fluxbb/branches/fluxbb-1.3-dev/upload/post.php

    r641 r726  
    111111        if (($forum_user['is_guest'] && $_POST['form_user'] != 'Guest') || (!$forum_user['is_guest'] && $_POST['form_user'] != $forum_user['username'])) 
    112112                message($lang_common['Bad request']); 
    113          
     113 
    114114        // Check for use of incorrect URLs 
    115115        confirm_current_url($fid ? forum_link($forum_url['new_topic'], $fid) : forum_link($forum_url['new_reply'], $tid)); 
     
    251251        if ($qid < 1) 
    252252                message($lang_common['Bad request']); 
    253          
     253 
    254254        // Check for use of incorrect URLs 
    255255        confirm_current_url(forum_link($forum_url['quote'], array($tid, $qid))); 
     
    302302 
    303303// Setup form 
    304 $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; 
     304$forum_page['fld_count'] = 0; 
    305305$forum_page['form_action'] = ($tid ? forum_link($forum_url['new_reply'], $tid) : forum_link($forum_url['new_topic'], $fid)); 
    306306$forum_page['form_attributes'] = array(); 
     
    312312); 
    313313 
    314 // Setup help 
    315 $forum_page['text_options'] = array(); 
     314// Setup post features 
     315$forum_page['message_options'] = array(); 
    316316if ($forum_config['p_message_bbcode'] == '1') 
    317         $forum_page['text_options']['bbcode'] = '<span'.(empty($forum_page['text_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'bbcode').'" title="'.sprintf($lang_common['Help page'], $lang_common['BBCode']).'">'.$lang_common['BBCode'].'</a></span>'; 
     317{ 
     318        $forum_page['compose_options']['enabled']['bbcode'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'>'.$lang_common['BBCode enabled'].'</span>'; 
     319        $forum_page['compose_options']['help']['bbcode'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'bbcode').'" title="'.sprintf($lang_common['Help page'], $lang_common['BBCode help']).'">'.$lang_common['BBCode help'].'</a></span>'; 
     320} 
    318321if ($forum_config['p_message_img_tag'] == '1') 
    319         $forum_page['text_options']['img'] = '<span'.(empty($forum_page['text_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'img').'" title="'.sprintf($lang_common['Help page'], $lang_common['Images']).'">'.$lang_common['Images'].'</a></span>'; 
     322{ 
     323        $forum_page['compose_options']['enabled']['img'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'>'.$lang_common['Images enabled'].'</span>'; 
     324        $forum_page['compose_options']['help']['img'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'img').'" title="'.sprintf($lang_common['Help page'], $lang_common['Images help']).'">'.$lang_common['Images help'].'</a></span>'; 
     325} 
    320326if ($forum_config['o_smilies'] == '1') 
    321         $forum_page['text_options']['smilies'] = '<span'.(empty($forum_page['text_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'smilies').'" title="'.sprintf($lang_common['Help page'], $lang_common['Smilies']).'">'.$lang_common['Smilies'].'</a></span>'; 
     327{ 
     328        $forum_page['compose_options']['enabled']['smilies'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'>'.$lang_common['Smilies enabled'].'</span>'; 
     329        $forum_page['compose_options']['help']['smilies'] = '<span'.(empty($forum_page['compose_options']) ? ' class="item1"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'smilies').'" title="'.sprintf($lang_common['Help page'], $lang_common['Smilies help']).'">'.$lang_common['Smilies help'].'</a></span>'; 
     330} 
    322331 
    323332// Setup breadcrumbs 
     
    328337$forum_page['crumbs'][] = $tid ? $lang_post['Post reply'] : $lang_post['Post new topic']; 
    329338 
     339// Setup main heading 
     340$forum_page['main_hd'] = end($forum_page['crumbs']); 
     341 
    330342($hook = get_hook('po_pre_header_load')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; 
    331343 
     
    333345require FORUM_ROOT.'header.php'; 
    334346 
    335 // START SUBST - <!-- forum_main --> 
     347// START SUBST - <!-- forum_main_content --> 
    336348ob_start(); 
    337349 
    338350($hook = get_hook('po_main_output_start')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; 
     351 
     352?> 
     353        <div class="content"> 
     354<?php 
    339355 
    340356// If preview selected and there are no errors 
     
    346362        $forum_page['preview_message'] = parse_message(forum_trim($message), $hide_smilies); 
    347363 
    348         // Generate the post heading 
    349         $forum_page['post_ident'] = array(); 
    350         $forum_page['post_ident']['num'] = '<span class="post-num">#</span>'; 
    351         $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($tid) ? $lang_post['Reply byline'] : $lang_post['Topic byline']), '<strong>'.forum_htmlencode($forum_user['username']).'</strong>').'</span>'; 
    352         $forum_page['post_ident']['link'] = '<span class="post-link">'.format_time(time()).'</span>'; 
    353  
    354364        ($hook = get_hook('po_preview_pre_display')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; 
    355365 
    356366?> 
    357         <div class="main-subhead"> 
    358                 <h2 class="hn"><span><?php echo $tid ? $lang_post['Preview reply'] : $lang_post['Preview new topic']; ?></span></h2> 
    359         </div> 
    360         <div id="post-preview" class="main-content main-frm"> 
    361                 <div class="post singlepost"> 
    362                         <div class="posthead"> 
    363                                 <h3 class="hn"><?php echo implode(' ', $forum_page['post_ident']) ?></h3> 
    364 <?php ($hook = get_hook('po_preview_new_post_head_option')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?> 
    365                         </div> 
    366                         <div class="postbody"> 
    367                                 <div class="post-entry"> 
    368                                         <div class="entry-content"> 
    369                                                 <?php echo $forum_page['preview_message']."\n" ?> 
    370                                         </div> 
     367                <div id="post-preview" class="section section-1 datafrm"> 
     368                        <div class="section-hd"> 
     369                                <h2 class="hn"><span><?php echo $tid ? $lang_post['Preview reply'] : $lang_post['Preview new topic']; ?></span></h2> 
     370                        </div> 
     371                        <div class="post-entry"> 
     372                                <div class="entry-content"> 
     373                                        <?php echo $forum_page['preview_message']."\n" ?> 
     374                                </div> 
    371375<?php ($hook = get_hook('po_preview_new_post_entry_data')) ? (defined('FORUM_USE_INCLUDE') ? include $hook : eval($hook)) : null; ?> 
    372                                 </div> 
    373376                        </div> 
    374377                </div> 
    375         </div> 
    376 <?php 
    377  
    378 } 
    379  
    380 ?> 
    381         <div class="main-subhead"> 
    382                 <h2 class="hn"><span><?php echo ($tid) ? $lang_post['Compose your reply'] : $lang_post['Compose your topic'] ?></span></h2> 
    383         </div> 
    384         <div id="post-form" class="main-content main-frm"> 
    385 <?php 
    386  
    387         if (!empty($forum_page['text_options'])) 
    388                 echo "\t\t".'<p class="ct-options options">'.sprintf($lang_common['You may use'], implode(' ', $forum_page['text_options'])).'</p>'."\n"; 
     378<?php 
     379 
     380} 
     381 
     382?> 
     383                <div id="post-form" class="section<?php echo (isset($_POST['preview']) && empty($errors)) ? '' : ' section-1' ?> postfrm"> 
     384                        <div class="section-hd"> 
     385                                <h2 class="hn"><span><?php echo ($tid) ? $lang_post['Compose your reply'] : $lang_post['Compose your topic'] ?></span></h2> 
     386                        </div> 
     387                        <form id="afocus" method="post" accept-charset="utf-8" action="<?php echo $forum_page['form_action'] ?>"<?php if (!empty($forum_page['form_attributes'])) echo ' '.implode(' ', $forum_page['form_attributes']) ?>> 
     388                        <div class="hidden"> 
     389                                <?php echo implode("\n\t\t\t\t", $forum_page['hidden_fields'])."\n" ?> 
     390                        </div> 
     391<?php 
    389392 
    390393