vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Super Close Threads v1.0 (https://vborg.vbsupport.ru/showthread.php?t=42885)

g-force2k2 08-28-2002 10:00 PM

Super Close Threads v1.0
 
As requested by Ice Melee...

a big thanks to GoldKnight for helping me beta test this one and get things squared away ;)

What does this hack do?

Well if your and Administrator and at times you don't want anyone editing or replying to a closed thread (including Moderators and S Moderators) this hack will prevent then from doing so...

Super Close and Super Open thread are special admin features that i have included in the admin optioins... once a super close is implemented it will decline moderators and smoderators from replying editing and even accessing the edit thread options...

It is a new type of close that can only be induced by an Administrator in the admin thread options... a Super Close will overide both a close and an open thread at anytime...

Well i hope that some use can be made of this hack :)

To Dos?
File Modifiactions (10)
Template Modifiactions (2)
Template Additions (1)

If you like this hack i'd be greatful if you clicked install ;) regards... Enjoy...

g-force2k2

g-force2k2 08-29-2002 04:26 AM

Screenshot A :: the super close thread redirect

Note: it can be configured in the template ;)

g-force2k2

g-force2k2 08-29-2002 04:27 AM

Screenshot B :: Admin Options Drop Down list

Of course the Moderators S Moderators don't have permission to use this action ;)

g-force2k2

g-force2k2 08-29-2002 04:28 AM

Screenshot C :: Threads Edit Thread Options

This option is only available to the Administrators ;) to Moderators and S Moderators this option is not viewable :p

g-force2k2

Goldknight 08-29-2002 04:30 AM

Since I already have one so...

[high]* Goldknight install
[/high]

As I stated before.. you have been on the roll for making hacks and release hacks. As usual, always best hacker in my book. :cool:

Smoothie 08-29-2002 06:30 AM

Add any extra queries?

kmfdm_kid2000 08-29-2002 08:33 AM

This one's REALLY Functional, especially for my community, thanks...

[high]* kmfdm_kid2000 Installs
[/high]

Takes a bit, but VERY Worth it...Now if only someone would fill in
MY REQUEST, I'd be ONE happy person :D

Boofo 08-29-2002 08:34 AM

Ok, g-force2k2, buddy, here I am looking for my daily "fix" from you. :)

Here is the code I have in the showthread.php:

Code:

if ($thread[open]) {
  $closereason="";
  eval("\$replyopenclosed = \"".gettemplate("showthread_replyopen")."\";");
} else {
  $thread[closereason]=bbcodeparse2($thread[closereason],0,1,1,1);
  eval("\$closereason = \"".gettemplate("showthread_closereason")."\";");
  if (ismoderator($thread[forumid],'canopenclose')) {
    eval("\$replyopenclosed = \"".gettemplate("showthread_replyclosedmod")."\";");
  } else {
    eval("\$replyopenclosed = \"".gettemplate("showthread_replyclosed")."\";");
  }
}

And here is the code you want me to replace it with:

Code:

// +++++++ Super Close Thread Hack [ g-force2k2 ] +++++++
if(($thread[open] == 0) OR ($thread[open] == 2)) {
  $replyclose='https://vborg.vbsupport.ru/images/threadclosed.gif';
} else {
  $replyclose='https://vborg.vbsupport.ru/images/reply.gif';
}
// +++++++ Super Close Thread Hack [ g-force2k2 ] +++++++

Ok, now, how do I incorporate your code into what I have so everything stays working? Everything else in the install file went in without a hitch. :)

kmfdm_kid2000 08-29-2002 08:50 AM

Sucks having to install a hack on top of another...I somehow intergrated the Strike Thru Closed topics with this one on the first try, but there was only 1 small line of PHP that needed intergration...For what it's worth, maybe this'll help someone down the road...*NOTE* This is for having this hack intergrated with Strike thru closed topics!!!

In forumdisplay.php Replace:

PHP Code:

 $thread[newoldhot]='folder';
      if (!
$thread[open]) {
        
$thread[newoldhot]='lock'.$thread[newoldhot];
      } 

with:

PHP Code:

// +++++++ Super Close Thread Hack [ g-force2k2 ] +++++++
      
$thread[newoldhot]='folder';
      if((
$thread[open] == 0) OR ($thread[open] == 2)) {
        
$thread[newoldhot]='lock'.$thread[newoldhot]; 
// Strike-Through Hack
    
$thread[title] = "<span class='locked'>$thread[title]</span>";
    
// End Strike-Through Hack
      
}
// +++++++ Super Close Thread Hack [ g-force2k2 ] +++++++ 

Both hacks work nicely together then...

Thanks again for a GREAT hack!!!

EDIT: There's More stuff that you have to do to get that Strike through Hack to work, but those things are described on the thread for that hack...This is the only instance where they kinda "Brush Against" each other...

Boofo 08-29-2002 08:55 AM

Here's how I did it. :)

Code:

// +++++++ Super Close Thread Hack [ g-force2k2 ] +++++++
      $thread[newoldhot]='folder';
      if(($thread[open] == 0) OR ($thread[open] == 2)) {
        $thread[newoldhot]='lock'.$thread[newoldhot];
// +++++++ Super Close Thread Hack [ g-force2k2 ] +++++++

        // Strike-Through Hack
        $thread[title] = "<span class='locked'>$thread[title]</span>";
        // End Strike-Through Hack
      }



All times are GMT. The time now is 07:01 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.01209 seconds
  • Memory Usage 1,749KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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