Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
Thread management in quick reply Details »»
Thread management in quick reply
Version: 1.00, by Sador Sador is offline
Developer Last Online: Mar 2011 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.1 Rating:
Released: 01-22-2010 Last Update: Never Installs: 7
Template Edits
Re-useable Code Code Changes  
No support by the author.

Thread management in quick reply
I've used this on my vBulletin 3.x forum for quite some time, but unfortunately it didn't work in vBulletin 4 anymore. I noticed there wasn't anyone making this mod, so I decided to make it myself and share it with you guys.

Description:
This is a pretty small mod that will add 2 checkboxes in your quick reply for those that have permissions to use it. With those checkboxes you'll be able to open, close, stick and unstick the thread you're in when you submit a message using the quick reply.

You don't need to set any special permissions or anything, if a user has the permissions to open, close, stick or unstick threads in the forum they're in they will automatically be able to use this. If not, they won't even see it, of course.

Now for the actual mod:

Go to your Admin CP, to Styles & Templates, Style manager, edit templates.

Now, in SHOWTHREAD find:

Code:
{vb:rawphrase show_your_signature}
<div class="blockrow" id="aftersubmit">
		</vb:if>
</div>
after add:

Code:
  <vb:if condition="$show['openclose']">     
          <li><label for="cb_openclose"><input type="checkbox" name="openclose" id="cb_openclose" value="1" tabindex="1" {vb:raw checked.openclose} /> <vb:if condition="$show['closethread']">{vb:rawphrase close_this_thread}<vb:else />{vb:rawphrase reopen_this_thread}</vb:if></label></li>
</vb:if>
<vb:if condition="$show['stickunstick']">          
          <li><label for="cb_stickunstick"><input type="checkbox" name="stickunstick" id="cb_stickunstick" value="1" tabindex="1" {vb:raw checked.stickunstick} /> <vb:if condition="$show['unstickthread']">{vb:rawphrase unstick_this_thread}<vb:else />{vb:rawphrase stick_this_thread}</vb:if></label></li>
</vb:if>
Now you need to edit the showthread.php file.

Find:

Code:
// build quick reply if appropriate
if ($show['quickreply'])
{
	require_once(DIR . '/includes/functions_editor.php');

	$show['wysiwyg'] = ($forum['allowbbcode'] ? is_wysiwyg_compatible() : 0);

	// set show signature hidden field
	$showsig = iif($vbulletin->userinfo['signature'], 1, 0);
After add:

Code:
	// can this user stick this thread?
	if (can_moderate($threadinfo['forumid'], 'canmanagethreads'))
	{
		$show['stickunstick'] = true;
	}
	else
	{
		$show['stickunstick'] = false;
	}
if ($show['openclose'] OR $show['stickunstick'])
	{
		$show['closethread'] = iif($threadinfo['open'], true, false);
		$show['unstickthread'] = iif($threadinfo['sticky'], true, false);
        }
        	else
	{
		$threadmanagement = '';
	}
All done.

There are two small disadvantages:
- You need to edit showthread.php, so you might have to do the edit again when you overwrite the file (for example when upgrading vBulletin).
- You need to do the template edit for every style you want it in.

I don't know if it's even possible to do this mod another way so you won't have those problems, but it's not in my capabilities anyway. Support will probably be limited, sorry for that.

Also, thanks to Lynne for helping me getting this to work.

Have fun with this mod and please mark as installed if you decide to use it.

Screenshots

File Type: jpg thread management.jpg (22.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-23-2010, 12:58 AM
carrlos's Avatar
carrlos carrlos is offline
 
Join Date: Nov 2006
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First!
Reply With Quote
  #3  
Old 01-23-2010, 03:23 AM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In 3.8 there is a mod that does this without file edits.
https://vborg.vbsupport.ru/showthread.php?t=100492

so it is possible. Even tho it might be past your capabilities like you said, thought I would point it out to you.
Reply With Quote
  #4  
Old 05-06-2010, 03:59 PM
CvP's Avatar
CvP CvP is offline
 
Join Date: Aug 2006
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope someone makes it a product.
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 09:57 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.04419 seconds
  • Memory Usage 2,248KB
  • Queries Executed 20 (?)
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
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (1)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)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_postinfo_query
  • fetch_postinfo
  • 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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete