View Full Version : Show Thread Enhancements - [OzzModz] Post New Thread Button In Posts
ozzy47
09-05-2013, 10:00 PM
Another mod brought to you by,
https://vborg.vbsupport.ru/external/2015/01/1.png
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 https://vborg.vbsupport.ru/external/2015/08/1.png button to the right ---->
Please remember to click the, https://vborg.vbsupport.ru/external/2015/08/2.png 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
ozzy47
09-06-2013, 02:10 AM
Reserved
Ba'al
09-06-2013, 03:26 AM
awesome, i have wanted this forever.................nice.
DemOnstar
09-06-2013, 04:32 AM
Well, there he goes...Fast and furious...
Didn't take you long to sort that out..
Installed and working...................
Ozzy47 and BOP5 changing the pace of development and injecting enthusiasm and motivation into vB 4.2.1
ozzy47
09-06-2013, 09:20 AM
awesome, i have wanted this forever.................nice.
Thanks, glad ya like it. :)
ozzy47
09-06-2013, 09:20 AM
Well, there he goes...Fast and furious...
Didn't take you long to sort that out..
Installed and working...................
Ozzy47 and BOP5 changing the pace of development and injecting enthusiasm and motivation into vB 4.2.1
Yeah it was not as much work as I expected it was going to be. :)
kapii
09-07-2013, 10:31 AM
Yeah this works much better than the other ones, rated, nominated and marked as installed.
ozzy47
09-07-2013, 06:45 PM
Thanks for marking as installed, rating and nominating,, glad ya like it. :)
crazyboy1661
09-09-2013, 11:43 AM
ozzy47, your MOD is great and you are rocking. To be frank I badly need this mod in xml only and been waiting for this one. You have reduced our work each time dat we upgrade our sites.
ozzy47
09-09-2013, 07:32 PM
ozzy47, your MOD is great and you are rocking. To be frank I badly need this mod in xml only. You have reduced our work each time dat we upgrade our sites.
Glad ya like it, don't forget to mark as installed if you are using it. :)
crazyboy1661
09-10-2013, 09:41 AM
Glad ya like it, don't forget to mark as installed if you are using it. :)
Oh! m sorry ozzy47, I for got it in overview. Rated 5Star.
thanks:up:
ozzy47
09-10-2013, 09:53 AM
Not a problem, thanks. :)
Barbara1
10-03-2013, 04:53 AM
hello ozzy47,
this is a very useful mod. makes a lot easier our lifes at forums.
(installed, rated 5 stars)
i got a very small issue.
at the screenshot i have the buttons at top and also below.
is there a way to fix the below the post buttons so they do not overlap?
(the pic is magnified. thats not the real size of the buttons . lol)
issue solved (post below this one) pic removed.
ozzy47
10-04-2013, 09:20 AM
Sure, edit the plugin, Add Buttons To The Post in the group, [Ozzy47] Post New Thread Button In Posts find this in the code:
$new_thread_button = '<div style="padding-left:145px;
Change 145 to maybe 155 and save. :)
Barbara1
10-04-2013, 11:00 AM
thank you ozzy47. worked like a charm :)
ozzy47
10-04-2013, 11:01 AM
Excellent, glat that worked for you. :)
evelynpriscilla
10-04-2013, 12:24 PM
Is there an option to show 'Reply to this thread' button to guests?
I installed this mod. But when I saw the thread as a guest, the button on the left (reply to this thread) is invisible and this button's position is neither on the left nor centered. If both buttons are visible all the time, the page will look great.
Thanks for this mod :up:
DemOnstar
10-04-2013, 02:14 PM
Is there an option to show 'Reply to this thread' button to guests?
Thanks for this mod :up:
Is that not related to permissions?
jjohns12
10-04-2013, 03:26 PM
Your the man Thanks for this mod.
ozzy47
10-04-2013, 03:45 PM
Is there an option to show 'Reply to this thread' button to guests?
I installed this mod. But when I saw the thread as a guest, the button on the left (reply to this thread) is invisible and this button's position is neither on the left nor centered. If both buttons are visible all the time, the page will look great.
Thanks for this mod :up:
If you have guests set up to be able to post, or reply to threads in their usergroup permissions, then the reply button will show up. Thanks for marking as installed. :)
ozzy47
10-04-2013, 03:46 PM
Your the man Thanks for this mod.
Thanks, glad ya like it, and thanks for marking as installed. :)
m3rl1n
11-30-2013, 11:44 AM
Awesome addition. Is there away to deploy this elsewhere for example under thread title on forum display?
ozzy47
11-30-2013, 11:46 AM
No there is not, as there is already a Post New Thread button on that page.
m3rl1n
11-30-2013, 11:50 AM
sorry wrong thread ...opps
fxdigi-cash
04-23-2014, 01:21 PM
just a quick question, isn't better to edit the template and place a code instead of using a plugin?? I read somewhere that plugins make vb board slow because they run continuously all times...
any idea if that this true?
Thanks
ozzy47
04-24-2014, 01:04 PM
This does not add any additional queries, so no a template edit is not better.
kushal
05-23-2014, 10:58 AM
can we also enable it for forum home too?
Ozzy, have you figured out, where the height of the button can be tweaked?
I had this button on my forums since forever and felt over your addon today. Nicely done with the permissions. I was hoping this one would deal with that, but I guess you haven?t found that option, too. I was searching forth and back through the stylevars and still have no idea, where the heck these stylevars are buried in the machine ;)
Anyone?
ozzy47
08-10-2014, 08:53 PM
Try adding this to your additional.css, and adjust as needed:
.newcontent_textcontrol {
height: 30px;
line-height: 30px;
}
.above_postlist, #above_postlist {
height: 50px;
}]Make sure the red values are the same.
ozzy47
08-11-2014, 07:35 PM
Thanks, mate :up:
So I assumed that worked?
mitch84
08-12-2014, 11:38 AM
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
ozzy47
08-12-2014, 12:18 PM
Not really a conflict, of course you will have issues if you use two mods that do the same thing. :)
mitch84
08-12-2014, 04:51 PM
it is what I wanted to say:)
Daniel
02-05-2015, 10:20 AM
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
<?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&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="setting[$setting[varname]]"\\"") . " 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>
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.
ozzy47
02-05-2015, 10:38 AM
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.