vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Reason for Closing Thread (https://vborg.vbsupport.ru/showthread.php?t=69625)

dmark101 12-14-2005 05:30 PM

Quote:

Originally Posted by Justice
thanks to the author, and skydancer... does that 3.5.0 mod work with 3.5.2?

yes, it does. :)

Justice 12-15-2005 08:07 AM

thanks

serhat_kk 12-17-2007 08:40 AM

i need this for 3.6.x please

Pirat3 12-17-2007 11:16 PM

Quote:

Originally Posted by serhat_kk (Post 1402704)
i need this for 3.6.x please

same

MediaHound 12-25-2007 03:13 PM

Same here, I need this for 3.6.x - have you guys attempted it?

dmark101 02-24-2008 10:28 PM

Quote:

Originally Posted by MediaHound (Post 1408917)
Same here, I need this for 3.6.x - have you guys attempted it?

i just updated my 3.5.x software to 3.6.8 and it works PERFECTLY.

just remember to follow skydancer's advice toward the end of the text file. :D

sv1cec 03-25-2008 09:39 AM

One question, does this mod take into consideration the permissions? In other words, I would like only the mods, supermods and admins to be able to see the reason for which a thread is closed. I can do it myself, but before installing everything, I would like to know if this is taken care of.

Many thanks.

MediaHound 05-30-2008 06:53 PM

Quote:

Originally Posted by dmark101 (Post 1450308)
i just updated my 3.5.x software to 3.6.8 and it works PERFECTLY.

just remember to follow skydancer's advice toward the end of the text file. :D

Thank you! May I ask what version you are up to now with it working?

MediaHound 05-30-2008 07:25 PM

OK I have it working on 3.7, thanks skydancer, dmark101, and WhSox21.
For the record, regarding skydancers fix -
This line appeared often:
PHP Code:

$vbulletin->url 'showthread.php?' $vbulletin->session->vars['sessionurl'] . "t=$threadid"

So I had to determine where to place:
PHP Code:

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

Mine appears on about line 263... but I use some extra lines of comments in places. ymmv.
Here's to fixing it with each update!
I wish it used hooks and I wish it was a built in feature of vb! I hate editing core files, but we really need this modification on a board of mine.

MediaHound 06-09-2008 07:18 PM

OK we're onto something here.
The big problem with this hack is that it does not use hooks.
Well, I added one of the file edits to a hook. So, if you do this as well, its one less manual edit each time you upgrade.
Visit your admin panel and under Plugins & Products, click add new plugin.
Product is vbulletin
Hook location is showthread_complete
For title you can use "Reason Post Closed - showthread_complete hook"
Execution order you can leave at 5 or whatever your default is
Code is:
PHP Code:

if (!empty($thread['reason']))
{
    eval(
'$reason = "' .fetch_template('showthread_reason') . '";');


Plugin is active - yes
then hit save.
Don't forget to remove the same code from the bottom of your showthread.php file.
Thats one less file edit each time you upgrade.
Now if we could figure out somehow to get the other file edits in postings.php to use hooks, we will be all set....
Its not fun that this breaks with each upgrade, I hate editing core files...
Whats the process to suggest new hook locations, anyway?


All times are GMT. The time now is 12:29 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.01051 seconds
  • Memory Usage 1,744KB
  • 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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