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:


All times are GMT. The time now is 09:23 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.00996 seconds
  • Memory Usage 1,760KB
  • 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_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete