vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - Edit "New Thread" Link / Button (https://vborg.vbsupport.ru/showthread.php?t=231363)

JamesGunner 12-27-2009 10:00 PM

Edit "New Thread" Link / Button
 
1 Attachment(s)
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:

HTML Code:

<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:

HTML Code:

<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:

HTML Code:

<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:

HTML Code:

<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:

HTML Code:

<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:

HTML Code:

<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

Quote:

Originally Posted by KevinGupta (Post 1945660)
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

Quote:

Originally Posted by andie215 (Post 2153471)
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:
Code:

<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:
Code:

<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:
Code:

<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:
Code:

<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

Quote:

Originally Posted by Mobo (Post 2356175)
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

Quote:

Originally Posted by mykkal (Post 2545282)
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.


All times are GMT. The time now is 05:52 PM.

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.01172 seconds
  • Memory Usage 1,801KB
  • 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
  • (4)bbcode_code_printable
  • (6)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)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