vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Forum Home Enhancements - Create New Threads in Forum Home (https://vborg.vbsupport.ru/showthread.php?t=259338)

JGreig 02-22-2011 10:00 PM

Create New Threads in Forum Home
 
1 Attachment(s)
A simple little edit which allows registered members to click an icon and be taken directly to a new thread page for that specific forum id. In other words, you can create a thread directly from the forum home for each forum.

Styles & Templates >> Forum Home Templates >> forumhome_forumbit_level2_post >> Find:
Code:

<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
Add after:
Code:

<if condition="$show['member']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$forum[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newth.png" alt="$vbphrase[post_new_thread]" border="0" /></a></if>

Upload the icon to your themes /buttons folder. Alternatively, you can specify a new icon image by editing:
Code:

<img src="$stylevar[imgdir_button]/newth.png" alt="$vbphrase[post_new_thread]" border="0" />
See screenshot for a more accurate description of this edit.

---------------------------------
If you use this for a plugin, please credit me. If you use this on your forum, click installed! Thank you for reading.

Cybershaolin 02-24-2011 02:44 AM

What about if you have sub-forums on a forum in forumhome and if you only allow members to post on these sub-forums? Users get an error message saying the forum is closed for new messages since they must only post in the sub-forums listed there.

JGreig 02-24-2011 04:20 PM

I don't quite understand, are you getting an error when you add this?

SPARKS MAN 03-06-2011 06:44 PM

thankx alot

JGreig 03-08-2011 04:59 PM

No problem, your very welcome.

Akyeame Kwame 10-14-2011 06:48 AM

Great mod! I've been looking for this for a year...only saw it for 4.0.
Note, to do this for sub-forums you can repeat the same process for forumhome_forumbit_level1_post
I've also added the button to my top menu and hard-coded my open forum id into it, so now it's easier than ever to start a new thread even for the slowest of members.

Akyeame Kwame 01-21-2017 04:02 PM

For VB 4.2+
Code:

<vb:if condition="$show['member']"><a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw forum.forumid}" rel="nofollow"><img src="{vb:stylevar imgdir_button}/newth.png" alt="$vbphrase[post_new_thread]" border="0" /></a></vb:if>

Kane@airrifle 01-21-2017 07:04 PM

Quote:

Originally Posted by Akyeame Kwame (Post 2581164)
For VB 4.2+
Code:

<vb:if condition="$show['member']"><a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw forum.forumid}" rel="nofollow"><img src="{vb:stylevar imgdir_button}/newth.png" alt="$vbphrase[post_new_thread]" border="0" /></a></vb:if>

:up:

Add a conditional if you have forums that are locked/closed to new posts.

Code:

<vb:if condition="$forum['allowposting']"><vb:if condition="$show['member']"><a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw forum.forumid}" rel="nofollow"><img src="{vb:stylevar imgdir_button}/newth.png" alt="Post New Thread" border="0" /></a></vb:if></vb:if>


All times are GMT. The time now is 08:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01999 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete