Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: edi67 - helmikuu 11, 2005, 08:17:55 AP

Otsikko: Button NEW THREAD after posted
Kirjoitti: edi67 - helmikuu 11, 2005, 08:17:55 AP
i want ask one thing that i saw in different other forum phpbb, invision after i made one post there is near button REPLY the button NEW THREAD for make another new post.

in SMF there is not this possiblity and for make new post i must return in list of post for click button NEW THREAD is possible insert this button i attach image for make understand it:

here in my forum after POST without button NEW THREAD:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.attack.altervista.org%2Fimmagini%2Freply.jpg&hash=b6b0edf85396bc37cde12f7c33acc90943b35b3f)

here in another forum after POST there is button NEW THREAD without come back

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.attack.altervista.org%2Fimmagini%2Freply2.jpg&hash=a1886feee698a49cef9e97124a12844df59c2afa)
Otsikko: Re: Button NEW THREAD after posted
Kirjoitti: Oldiesmann - helmikuu 11, 2005, 11:14:43 AP
Easy enough to do...

Sources/Display.php

Find
// Set the topic's information for the template.
$context['subject'] = $topicinfo['subject'];
$context['num_views'] = $topicinfo['numViews'];


Add after that
$context['current_board'] = $board;

Find
$context['can_reply'] &= empty($topicinfo['locked']) || allowedTo('moderate_board');

Add after that
$context['can_post_new'] = allowedTo('post_new');

Themes/default/Display.template.php

Find
// Can they reply?  Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], ';sesc=', $context['session_id'], '" onclick="if (!currentSwap) doQuote(', $message['id'], '); else window.location.href = this.href; return false;">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>';


Add before that
// Are they allowed to post new topics?
if ($context['can_post_new'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new_topic.gif" alt="' . $txt[33] . '" border="0" />' : $txt[33]) . '</a>';
Otsikko: Re: Button NEW THREAD after posted
Kirjoitti: edi67 - helmikuu 11, 2005, 12:39:58 IP
sorry oldismann i done modify but nothing appear
Otsikko: Re: Button NEW THREAD after posted
Kirjoitti: Ben_S - helmikuu 11, 2005, 12:46:52 IP
Are you actually using the default theme?

I'd hate that button personally, on boards that have it, I always find people occasionally hit it by mistake.
Otsikko: Re: Button NEW THREAD after posted
Kirjoitti: edi67 - helmikuu 11, 2005, 12:51:31 IP
yes default them

i need only to have it after made post