PDA

View Full Version : New Posting Features - Edit "New Thread" Link / Button


JamesGunner
12-27-2009, 10:00 PM
Edit "New Thread" Link / Button

What does this do?
--------------------------------------------------------------------
Modify the Link the users are redirected to when they click the "New Thread" Button.

Installation
--------------------------------------------------------------------

1. Goto admincp -> Plugin System -> Manage Products -> [Add/Import Product]
2. Browse for this product and click Import
3. Edit the Template "FORUMDISPLAY"(without quotes):

FIND:

<vb:if condition="$show['newthreadlink']">
<a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top">
<span>+</span> {vb:rawphrase post_new_thread}
</a>
</vb:if>

REPLACE WITH:

<vb:if condition="$show['newthreadlink']">
<vb:if condition="$foruminfo['new_thread_link']">
<a href="{vb:raw foruminfo.new_thread_link}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top">
<span>+</span> {vb:rawphrase post_new_thread}
</a>
<vb:else />
<a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top">
<span>+</span> {vb:rawphrase post_new_thread}
</a>
</vb:if>
<vb:else />
&nbsp;
</vb:if>

FIND:

<vb:if condition="$show['newthreadlink']">
<li>
<a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow">
{vb:rawphrase post_a_new_thread}&hellip;
</a>
</li>
</vb:if>

REPLACE WITH:

<vb:if condition="$show['newthreadlink']">
<li>
<vb:if condition="$foruminfo['new_thread_link']">
<a href="{vb:raw foruminfo.new_thread_link}" rel="nofollow">
{vb:rawphrase post_new_thread}&hellip;
</a>
<vb:else />
<a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow">
{vb:rawphrase post_new_thread}&hellip;
</a>
</vb:if>
</li>
</vb:if>

FIND:

<vb:if condition="$show['newthreadlink'] AND $show['threadslist']">
<a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_bottom">
<span>+</span> {vb:rawphrase post_new_thread}</a>
</vb:if>

REPLACE WITH:

<vb:if condition="$show['newthreadlink'] AND $show['threadslist']">
<vb:if condition="$foruminfo['new_thread_link']">
<a href="{vb:raw foruminfo.new_thread_link}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_bottom">
<span>+</span> {vb:rawphrase post_new_thread}
</a>
<vb:else />
<a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol"

id="newthreadlink_bottom">
<span>+</span> {vb:rawphrase post_new_thread}
</a>
</vb:if>
<vb:else />
&nbsp;
</vb:if>

3. Click Install in this Thread!

USAGE
--------------------------------------------------------------------
1. Goto admincp -> Forums & Moderators -> Forum Manager
2. Find the Forum where you want the "New Thread" Button link replaced
3. Choose "Edit Forum" -> Go
4. Scroll to the bottom of the Page and locate "Edit New Thread Link/Button"
5. Insert your link and hit SAVE
6. Done

Tested with vb4 Gold and 4.0.1.
As an Alternative I attached the instructions for the Template edits.
Im trying to make the Template edits automatic so any help is greatly appreciated!:D

KevinGupta
01-03-2010, 06:13 AM
Sounds good :D but would love to have it just with one product / upload files ( no template edits ) :P
but thanks a lot for this.. :)

JamesGunner
01-03-2010, 03:34 PM
Sounds good :D but would love to have it just with one product / upload files ( no template edits ) :P
but thanks a lot for this.. :)

Thanks,

Im already working on the auto template edits

Cadellin
04-10-2010, 05:39 PM
A nice little mod this. I can't get it working on 4.0.3 though, I can enter the redirect URL fine but it just doesn't affect the New Thread button. Any chance of an update?

JamesGunner
04-14-2010, 07:14 PM
I will have to test that. Im pretty busy at the moment, so please excuse the delay.

Harelin
10-11-2010, 04:45 AM
This looks like an older mod but I just wanted to say that this fit my needs perfectly and worked well on 4.0.7.

andie215
01-23-2011, 07:28 PM
I can't find the 3rd set of code to replace in 4.1.1 :confused:Any idea's please.

SniperFodder
02-11-2011, 05:10 AM
I was unable to find the 3rd code bit replacement. But insofar it seems to be working without it...

xXNosXx
04-13-2011, 05:26 PM
I can't find the 3rd set of code to replace in 4.1.1 :confused:Any idea's please.
I have the same problem!

afcbob
04-25-2012, 08:12 AM
As said before could not find last code to change but all seems to work without it :up:

chrisbeau
05-18-2012, 06:52 PM
please do a 4.1.12 version :D

Mobo
08-11-2012, 09:19 AM
A 4.2 version would be really helpful.

Mobo
08-11-2012, 09:42 AM
Okay, so I played with this and was able to get it to work with 4.2.0.

Here is what I did...


1. Goto admincp -> Plugin System -> Manage Products -> [Add/Import Product]
2. Browse for this product and import product-new_thread_link
3. Edit the Template "FORUMDISPLAY"(without quotes):

Find:
<vb:if condition="$show['newthreadlink']"><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top"><span>+</span> {vb:rawphrase post_new_thread}</a></vb:if>


Replace with:
<vb:if condition="$show['newthreadlink']">
<li>
<vb:if condition="$foruminfo['new_thread_link']">
<a href="{vb:raw foruminfo.new_thread_link}" rel="nofollow">
{vb:rawphrase post_new_thread}&hellip;
</a>
<vb:else />
<a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow">
{vb:rawphrase post_new_thread}&hellip;
</a>
</vb:if>
</li>
</vb:if>


Find:
<vb:if condition="$show['newthreadlink']">
<a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_bottom"><span>+</span> {vb:rawphrase post_new_thread}</a>
</vb:if>


Replace with:
<vb:if condition="$show['newthreadlink']">
<vb:if condition="$foruminfo['new_thread_link']">
<a href="{vb:raw foruminfo.new_thread_link}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top">
<span>+</span> {vb:rawphrase post_new_thread}
</a>
<vb:else />
<a href="newthread.php?{vb:raw session.sessionurl}do=newthread&amp;f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top">
<span>+</span> {vb:rawphrase post_new_thread}
</a>
</vb:if>
<vb:else />
&nbsp;
</vb:if>

4. Goto admincp -> Forums & Moderators -> Forum Manager
5. Find the Forum where you want the "New Thread" Button link replaced
6. Choose "Edit Forum" -> Go
7. Scroll to the bottom of the Page and locate "Edit New Thread Link/Button"
8. Insert your link and hit SAVE
9. Done

mykkal
05-11-2015, 06:22 AM
Okay, so I played with this and was able to get it to work with 4.2.0.

Here is what I did...



I'm using 4.2.3 beta 4. I used your edit and the "button' disappeared but the text stayed. Has anyone tried using this on 4.2.2 or 4.2.3? Also there should be a third edit because the bottom button is the same.

Is anyone is around that still uses this plugin please here my plea. LOL, please help

blind-eddie
05-11-2015, 09:26 AM
I'm using 4.2.3 beta 4. I used your edit and the "button' disappeared but the text stayed. Has anyone tried using this on 4.2.2 or 4.2.3? Also there should be a third edit because the bottom button is the same.

Is anyone is around that still uses this plugin please here my plea. LOL, please help

There is an auto template edit above in first post to download and import.