Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
[OzzModz] Post New Thread Button In Posts Details »»
[OzzModz] Post New Thread Button In Posts
Version: 1.0.0, by ozzy47 ozzy47 is offline
Developer Last Online: Dec 2021 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.x.x Rating:
Released: 09-05-2013 Last Update: 09-05-2013 Installs: 62
Uses Plugins Auto-Templates
Translations  
No support by the author.

Another mod brought to you by,



This is a simple and better way to add a Post New Thread Button to showthread page...to a closed and open thread...above and/or below the posts.

It can be useful to have a Post New Thread Button on showthread very handy, besides being convenient, it has also may help cut down on thread hijacking/going off topic, if that button is right there to click for the member to start a new thread.

Maybe because what they were reading inspires them/makes them think of something similar.

It is a simple installation, just import the product XML, product-ozzy_new_thread_button

You can edit the options under the settings, Ozzy: New Thread Button Settings

Complete Feature List
  • Option to disable the mod completely.
  • Option to show the button above posts.
  • Option to show the button below the posts.
  • Option to select which usergroups can see the button.
-------------------------------------------------------------------------------------------

If you like this mod please hit the button to the right ---->

Please remember to click the, button to the right if you installed the mod ---->

What does 'Marking As Installed' do ?

* It helps you to stay on top of updates - members who have installed modifications will be notified whenever new updates are available.

* For security issues - vbulletin.org will contact all members who have installed a modification whenever a security issue is brought to their attention.

* Marking a modification as installed also helps me know how many people are using my work, giving me extra incentive to provide more features and new modifications.

I appreciate the support!
-------------------------------------------------------------------------------------------

v1.0.0 Initial Release

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
5 благодарности(ей) от:
evelynpriscilla, iiioroh, Judith2, kushal, socialteenz

Comments
  #32  
Old 08-11-2014, 07:35 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marv View Post
Thanks, mate :up:
So I assumed that worked?
Reply With Quote
  #33  
Old 08-12-2014, 11:38 AM
mitch84 mitch84 is offline
 
Join Date: Mar 2008
Location: france
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did not understand why it was malfunctioning, I have this hack that also uses this option. small conflict.
https://vborg.vbsupport.ru/showthread.php?t=276131
Reply With Quote
  #34  
Old 08-12-2014, 12:18 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not really a conflict, of course you will have issues if you use two mods that do the same thing.
Reply With Quote
  #35  
Old 08-12-2014, 04:51 PM
mitch84 mitch84 is offline
 
Join Date: Mar 2008
Location: france
Posts: 516
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it is what I wanted to say
Reply With Quote
  #36  
Old 02-05-2015, 10:20 AM
Daniel's Avatar
Daniel Daniel is offline
 
Join Date: Jul 2005
Location: USA
Posts: 707
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey ozzy, can you instruct me on how to fix this for displaying in the announcements portion of the forum?

I feel so close... lol

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="ozzy_new_thread_button" active="1">
    <title><![CDATA[[Ozzy47] Post New Thread Button In Posts]]></title>
    <description>This mod adds a Post New Thread button to posts</description>
    <version>1.0.0</version>
    <url>https://vborg.vbsupport.ru/showthread.php?t=301929</url>
    <versioncheckurl><![CDATA[https://vborg.vbsupport.ru/misc.php?do=productcheck&pid=ozzy_new_thread_button]]></versioncheckurl>
    <dependencies>
    </dependencies>
    <codes>
    </codes>
    <templates>
    </templates>
    <stylevardfns>
    </stylevardfns>
    <stylevars>
    </stylevars>
    <plugins>
        <plugin active="1" executionorder="5">
            <title>Usergroups Allowed To See The Buttons</title>
            <hookname>admin_options_processing</hookname>
            <phpcode><![CDATA[if (is_array($settings['ozzy_new_thread_button_groups']))
    {
          $settings['ozzy_new_thread_button_groups'] = implode(',', $settings['ozzy_new_thread_button_groups']);
    }]]></phpcode>
        </plugin>
        <plugin active="1" executionorder="5">
            <title>Add Buttons To The Post</title>
            <hookname>parse_templates</hookname>
            <phpcode><![CDATA[// ##################### DEFINE IMPORTANT CONSTANTS #######################
    global $vbulletin, $vbphrase;

     //set the session
    $sessionurl = $session['sessionurl'];
    //set the phrase
    $post_new_thread = $vbphrase['post_new_thread']; 
    //get forum      
    $forumid = $GLOBALS['forumid'];
    

// #############################################################################
// ########################### START MAIN SCRIPT ###############################
// #############################################################################    
    do
    {
        if (!$vbulletin->options['ozzy_new_thread_button_active'])
        {
            // Product is inactive
            break;
        }
        
        if (THIS_SCRIPT != 'announcement')
        {
            // Only run on announcement
            break;
        }            
        
        if (!is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['ozzy_new_thread_button_groups'])))
        {
            // Ensure not to run if user in not in allowed usergroup
            break;
        }
        
        //Set the button and link
        $new_thread_button = '<div style="padding-left:145px; position: relative"><a href="newthread.php?' . $sessionurl . 'do=newthread&amp;f=' . $forumid . '" rel="nofollow" class="newcontent_textcontrol" id="new_thread_button" style="margin-left:10px;"><span>+</span> ' . $post_new_thread . '</a></div>';
        
        //Show button on top
        if ($vbulletin->options['ozzy_new_thread_button_above']) 
        {  
            $find = '<div id="announcementlist">"';
            $replace = $new_thread_button.$find;
            $vbulletin->templatecache['announcement'] = str_replace($find, $replace, $vbulletin->templatecache['announcement']);
        }

        //Show button below
        if ($vbulletin->options['ozzy_new_thread_button_below'])
        {
            $find = '{vb:raw forumjump}"';
            $replace = $new_thread_button.$find;
            $vbulletin->templatecache['announcement'] = str_replace($find, $replace, $vbulletin->templatecache['announcement']);
        }
    }
    while (false);]]></phpcode>
        </plugin>
    </plugins>
    <phrases>
        <phrasetype name="vBulletin Settings" fieldname="vbsettings">
            <phrase name="setting_ozzy_new_thread_button_above_desc" date="1378432022" username="ozzy47" version="1.0.0"><![CDATA[Set this to "Yes" to show the button above the posts.]]></phrase>
            <phrase name="setting_ozzy_new_thread_button_above_title" date="1378432022" username="ozzy47" version="1.0.0"><![CDATA[Show The Button Above The Posts]]></phrase>
            <phrase name="setting_ozzy_new_thread_button_active_desc" date="1378431927" username="ozzy47" version="1.0.0"><![CDATA[Set this to "Yes" to show a new thread button in posts.]]></phrase>
            <phrase name="setting_ozzy_new_thread_button_active_title" date="1378431927" username="ozzy47" version="1.0.0"><![CDATA[New Thread Button Active]]></phrase>
            <phrase name="setting_ozzy_new_thread_button_below_desc" date="1378432076" username="ozzy47" version="1.0.0"><![CDATA[Set this to "Yes" to show the button below the posts.]]></phrase>
            <phrase name="setting_ozzy_new_thread_button_below_title" date="1378432076" username="ozzy47" version="1.0.0"><![CDATA[Show The Button Below The Posts]]></phrase>
            <phrase name="setting_ozzy_new_thread_button_groups_desc" date="1378432183" username="ozzy47" version="1.0.0"><![CDATA[Select which usergroups are allowed to see the Post New Thread button.]]></phrase>
            <phrase name="setting_ozzy_new_thread_button_groups_title" date="1378432183" username="ozzy47" version="1.0.0"><![CDATA[Usergroups Allowed To See The Buttons]]></phrase>
            <phrase name="settinggroup_ozzy_new_thread_button_settings" date="1378431843" username="ozzy47" version="1.0.0"><![CDATA[Ozzy: New Thread Button Settings]]></phrase>
        </phrasetype>
    </phrases>
    <options>
        <settinggroup name="ozzy_new_thread_button_settings" displayorder="65535">
            <setting varname="ozzy_new_thread_button_active" displayorder="10">
                <datatype>boolean</datatype>
                <optioncode>yesno</optioncode>
                <defaultvalue>1</defaultvalue>
            </setting>
            <setting varname="ozzy_new_thread_button_above" displayorder="20">
                <datatype>boolean</datatype>
                <optioncode>yesno</optioncode>
                <defaultvalue>1</defaultvalue>
            </setting>
            <setting varname="ozzy_new_thread_button_below" displayorder="30">
                <datatype>boolean</datatype>
                <optioncode>yesno</optioncode>
                <defaultvalue>1</defaultvalue>
            </setting>
            <setting varname="ozzy_new_thread_button_groups" displayorder="40">
                <datatype>free</datatype>
                <optioncode><![CDATA[" . eval('$options = "";
    foreach($vbulletin->usergroupcache AS $usergroupid => $usergroup) 
{
    $options .= "\\t\\t</b><div class=\\"smallfont\\" style=\\"width: 50%; float: left;\\"><label for=\\"setting[$setting[varname]]$usergroupid\\"><input type=\\"checkbox\\" name=\\"setting[$setting[varname]]"."[]\\" id=\\"setting[$setting[varname]]$usergroupid\\" value=\\"$usergroupid\\"" . iif(strpos(",$setting[value],", ",$usergroupid,") !== false, \' checked="checked"\') . iif($vbulletin->debug, " title=\\"name=&quot;setting[$setting[varname]]&quot;\\"") . " tabindex=\\"1\\" />$usergroup[title]</label></div>\\n";
}
return "<span class=\\"smallfont\\">\\n$options\\t</span>";') . "<input type=\"hidden\" name=\"setting[$setting[varname]][]\" value=\"-1\" />]]></optioncode>
                <defaultvalue>5,6,7</defaultvalue>
            </setting>
        </settinggroup>
    </options>
    <helptopics>
    </helptopics>
    <cronentries>
    </cronentries>
    <faqentries>
    </faqentries>
    <navigation>
    </navigation>
</product>
Reply With Quote
  #37  
Old 02-05-2015, 10:27 AM
Marv Marv is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 372
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another mod of you we´re using, too.

The only downside is, that users hit the button in a non-related forum (like cars) and than write a post about football - and you have a lot of posts to moderate and move them into the subforum 'football'.

By design the user can´t choose where the post should appear. Would be great, if there could be a dropdown inserted on the post create page, when they´d come there via this new thread button.
Reply With Quote
  #38  
Old 02-05-2015, 10:38 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, ya would think, if you are in the Chevy dealer, and wanted to buy a new car, you would not expect to buy a new Ford.

Meaning, if you are in forum X, then that is where the thread will get posted to, not forum Y.

Perhaps make a announcement for your users, or change the text in the button, and add, In This Forum.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04257 seconds
  • Memory Usage 2,305KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (5)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete