MyBB Community Forums

Full Version: Quick New Thread on Index
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Well, because I do it on pretty much every forum I have, I would like to show you how to make a little link to make a new reply on the index page.

Here is an example:
[Image: filesf088eb89daa961a74e8cdcf01f62593b.png]

Step 1
Go into your AdminCP, and proceed to Templates & Style. Manage your way to templates, then click on the theme that you are using.

Scroll down to Forum Bit Templates, click that and then select forumbit_depth2_forum.

Step 2
Once you have opened that file, this is what is should look like. Maybe not exactly, but very similar:

<tr>
<td class="{$bgcolor}" align="center" valign="top" width="0" style="display:none;"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td><td class="{$bgcolor}" align="center" valign="top" width="1"><img src="uploads/ficons/{$forum['ficon']}" alt="{$forum['name']}" /></td>
<td class="{$bgcolor}" valign="top">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap"><strong>Threads:</strong> {$threads}{$unapproved['unapproved_threads']}<br>
<strong>Posts:</strong> {$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>

One the 6th line, or somewhere close, you should see: <strong><a href="{$forum_url}">{$forum['name']}</a></strong>

Right before that, add the following code:

For Image:
<a href="newthread.php?fid={$forum['fid']}" title="New Topic"><img src="IMG_CODE_HERE" /></a>
This would be a very nice image to use: [Image: 103c263e0cbcfe6fa4f22b95449a33cb.png]

For Text:
<a href="newthread.php?fid={$forum['fid']}" title="New Topic">TEXT HERE</a>

So it should look like this:
<tr>
<td class="{$bgcolor}" align="center" valign="top" width="0" style="display:none;"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td><td class="{$bgcolor}" align="center" valign="top" width="1"><img src="uploads/ficons/{$forum['ficon']}" alt="{$forum['name']}" /></td>
<td class="{$bgcolor}" valign="top">
<!-- CODE BELOW -->
<a href="newthread.php?fid={$forum['fid']}" title="New Topic"><img src="http://freewayhost.net/files/103c263e0cbcfe6fa4f22b95449a33cb.png" /></a><strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
<!-- CODE ABOVE -->
</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap"><strong>Threads:</strong> {$threads}{$unapproved['unapproved_threads']}<br>
<strong>Posts:</strong> {$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>

Step 3
Once all that is completed, save the file and refresh your forum. You should see it now.

If you have any questions, please post them below. Thanks!
Google will index sections as "New Topic - Section Title" using this.
(2012-01-22, 03:39 AM)MJ456 Wrote: [ -> ]nice,but isn't there is a create new thread from main index plugin and tutorial thread already?

Probably, it's a simple task so I'm sure that others have made tutorials before.

(2012-01-22, 03:51 AM)Solidus Wrote: [ -> ]Google will index sections as "New Topic - Section Title" using this.

Remove title="New Topic"