1 (edited by Ruzzz 2009-12-15 00:05)

Topic: Link - Add user to quick post

I ask the developers to do it smile

In viewtopic.php

1)

// Display quick post if enabled
if ($forum_config['o_quickpost'] == '1' &&
    !$forum_user['is_guest'] &&    
    ($cur_topic['post_replies'] == '1' || ($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1')) &&
    ($cur_topic['closed'] == '0' || $forum_page['is_admmod']))

replace:

// Display quick post if enabled
if ($forum_page['is_quick_post_enable'])

2)
before

$user_data_cache = array();
while ($cur_post = $forum_db->fetch_assoc($result))

insert

$forum_page['is_quick_post_enable'] = $forum_config['o_quickpost'] == '1' &&
    !$forum_user['is_guest'] && 
    ($cur_topic['post_replies'] == '1' || ($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1')) &&
    ($cur_topic['closed'] == '0' || $forum_page['is_admmod']);

3)

    if ($cur_post['poster_id'] > 1)
        $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($cur_post['id'] == $cur_topic['first_post_id']) ? $lang_topic['Topic byline'] : $lang_topic['Reply byline']), (($forum_user['g_view_users'] == '1') ? '<a title="'.sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])).'" href="'.forum_link($forum_url['user'], $cur_post['poster_id']).'">'.forum_htmlencode($cur_post['username']).'</a>' : '<strong>'.forum_htmlencode($cur_post['username']).'</strong>')).'</span>';
    else
        $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($cur_post['id'] == $cur_topic['first_post_id']) ? $lang_topic['Topic byline'] : $lang_topic['Reply byline']), '<strong>'.forum_htmlencode($cur_post['username']).'</strong>').'</span>';

replace

    $t_username = forum_htmlencode($cur_post['username']);
    $t_add_user_to_quick_post = ($forum_page['is_quick_post_enable']) ? '<a title="'.$lang_topic['User to quick post'].'" onclick="return insert_text(\'\', \'[b]'.$t_username.'[/b], \')" href="#req_message">↓</a>' : '';
    $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($cur_post['id'] == $cur_topic['first_post_id']) ? $lang_topic['Topic byline'] : $lang_topic['Reply byline']), (($forum_user['g_view_users'] == '1' && $cur_post['poster_id'] > 1) ? '<a title="'.sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])).'" href="'.forum_link($forum_url['user'], $cur_post['poster_id']).'">'.$t_username.'</a>' : '<strong>'.$t_username.'</strong>')).' '.$t_add_user_to_quick_post.'</span>';

2

Re: Link - Add user to quick post

4)
insert in \lang\English\topic.php string:

'User to quick post'    =>    'Add user to quick post'

3 (edited by Ruzzz 2009-12-15 00:06)

Re: Link - Add user to quick post

5)
in post.php

        $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf($lang_post['Post byline'], '<strong>'.forum_htmlencode($cur_post['poster']).'</strong>').'</span>';

replace:

        $t_username = forum_htmlencode($cur_post['poster']);
        $t_add_user_to_quick_post = '<a title="'.$lang_post['User to quick post'].'" onclick="return insert_text(\'\', \'[b]'.$t_username.'[/b], \')" href="#req_message">↑</a>';
        $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf($lang_post['Post byline'], '<strong>'.$t_username.'</strong>').' '.$t_add_user_to_quick_post.'</span>';

6)
insert in \lang\English\post.php string:

'User to quick post'    =>    'Add user to quick post'