Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Reason for Closing Thread Details »»
Reason for Closing Thread
Version: 1.00, by WhSox21 WhSox21 is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 09-18-2004 Last Update: 09-18-2004 Installs: 40
DB Changes
 
No support by the author.

This hack is my first released free hack.

It runs no extra queries so it should not make any load times longer.

How it works:
Once you click on Close thread in the Thread Tools menu, it will pop up with a javascript alert asking for the reason you are closing. You may click cancel or ok. If you inputted something into the box it will save it and appear at the top right above the first post.

Modifications:
1 Table Modification
3 File Modifications
5 Template Modifications
1 Template Addition

Please click install if you install this hack.

www.hackvb.com - For your custom hacks!

*Note: This was only tested on vb 3.0.3. I have not tested it on any other versions and theoretically it should work, but I'm not sure.

Show Your Support

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

Comments
  #12  
Old 09-19-2004, 04:41 PM
WhSox21 WhSox21 is offline
 
Join Date: Feb 2004
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How did you get that error? That should not happen. I made it so that if you did not fill in a reason it would not display. What were the steps you took to do that? Did you click cancel or ok or how did you do it?

EDIT:
Are you sure you did all the steps in the install? Are you sure you edited postings.php file correctly?
Reply With Quote
  #13  
Old 09-19-2004, 04:48 PM
alqafelah alqafelah is offline
 
Join Date: Jan 2002
Location: usa
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh, yes .. your right .. i'm clicked Cancel ! with click Ok no problem .

thanks for support me
Reply With Quote
  #14  
Old 09-19-2004, 04:52 PM
WhSox21 WhSox21 is offline
 
Join Date: Feb 2004
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you click cancel you shouldn't recieve that either.
Reply With Quote
  #15  
Old 09-19-2004, 04:58 PM
alqafelah alqafelah is offline
 
Join Date: Jan 2002
Location: usa
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that is what happened for me !

if i not write reason and click OK it's not display anything .. if CANCEL it's display !
Reply With Quote
  #16  
Old 09-19-2004, 05:01 PM
WhSox21 WhSox21 is offline
 
Join Date: Feb 2004
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What version of vb are you using? Can you post me lines 165-182 of your postings.php file? It's not doing that for me when I click cancel nor should it for you. There is something wrong with your install or something.
Reply With Quote
  #17  
Old 09-19-2004, 05:10 PM
alqafelah alqafelah is offline
 
Join Date: Jan 2002
Location: usa
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm using 3.03 ..
i will reinstall this hack and take what you request : ( all open/close section )

PHP Code:
// ############################### start do open / close thread ###############################
if ($_POST['do'] == 'openclosethread')
{
    
// permission check
    
if (!can_moderate($threadinfo['forumid'], 'canopenclose'))
    {
        
$forumperms fetch_permissions($threadinfo['forumid']);
        if (!(
$forumperms CANVIEW) OR !($forumperms CANOPENCLOSE))
        {
            
print_no_permission();
        }
        else
        {
            if (!
is_first_poster($threadid))
            {
                
print_no_permission();
            }
        }
    }

    
// check if there is a forum password and if so, ensure the user has it set
    
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);

    if (
$threadinfo['open'])
    {
        
$threadinfo['open'] = 0;
        
$logaction $vbphrase['closed_thread'];
        
$action $vbphrase['closed'];
    }
    else
    {
        
$threadinfo['open'] = 1;
        
$logaction $vbphrase['opened_thread'];
        
$action $vbphrase['opened'];
        
$_POST['reason'] = null;
    }

    
log_moderator_action($threadinfo$logaction);

    
$DB_site->query("UPDATE " TABLE_PREFIX "thread SET open = $threadinfo[open], reason = '" addslashes($_POST[reason]) . "' WHERE threadid = $threadid");

    
$_REQUEST['forceredirect'] = 1;
    
$url "showthread.php?$session[sessionurl]t=$threadid";
    eval(
print_standard_redirect('redirect_openclose'));

}

// ############################### start delete thread ############################### 
Reply With Quote
  #18  
Old 09-19-2004, 05:12 PM
WhSox21 WhSox21 is offline
 
Join Date: Feb 2004
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, that file is correct. I'll see if I can't figure something else out?
Reply With Quote
  #19  
Old 09-19-2004, 05:16 PM
WhSox21 WhSox21 is offline
 
Join Date: Feb 2004
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured it out. It's related to IE. You can do this to simply fix the problem:
postings.php
***************
Code:
FIND:
-------------------
		$action = $vbphrase['closed'];
-------------------
BELOW IT ADD:
-------------------
		if($_POST['reason'] == 'null') $_POST['reason'] = null;
Reply With Quote
  #20  
Old 09-19-2004, 05:19 PM
shadiguy1 shadiguy1 is offline
 
Join Date: Jul 2004
Location: Delco,Pa
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i installed it the box pops up But after wards there is no reason listed for closing thread.
Reply With Quote
  #21  
Old 09-19-2004, 05:21 PM
WhSox21 WhSox21 is offline
 
Join Date: Feb 2004
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you add the hidden field in showthread template?
Reply With Quote
Reply


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 02:40 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.13569 seconds
  • Memory Usage 2,317KB
  • Queries Executed 25 (?)
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_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete