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
      }


kmfdm_kid2000 08-29-2002 09:01 AM

Yeah, your way looks neater...I'm still learning PHP, mostly I'm teaching myself through hacks :p Good to keep code nice and neat though ;)

Boofo 08-29-2002 09:07 AM

Doing it that way makes it easier later if you have to find a piece of code for a certain hack. Having them all run together can get a little confusing. :)

BTW: I like your sig. A little big for my tastes, but nice graphics to it. :)

Quote:

Originally posted by kmfdm_kid2000
Yeah, your way looks neater...I'm still learning PHP, mostly I'm teaching myself through hacks :p Good to keep code nice and neat though ;)

Gohan 08-29-2002 10:00 AM

Great hack, g-force2k2!

without problem :D

Chris M 08-29-2002 12:53 PM

Ah...So this is a Super Close:)

*installs*

Satan

kmfdm_kid2000 08-29-2002 12:53 PM

Quote:

Originally posted by Boofo
BTW: I like your sig. A little big for my tastes, but nice graphics to it. :)
Thank you ;) There, a smaller version...

g-force2k2 08-29-2002 02:40 PM

Boofo before i attempt any mod for your code... do the templates that are called simply the button coding? regards...

g-force2k2

Keyser S?ze 08-29-2002 06:28 PM

hey looks great

question

does the super close option show to mods/s mods/members? or can only admins see that option

even so, looks great, ill try to install it tonight

Goldknight 08-29-2002 06:56 PM

Quote:

Originally posted by IceMalee
hey looks great

question

does the super close option show to mods/s mods/members? or can only admins see that option

even so, looks great, ill try to install it tonight

Members/SuperMod/Mod can see it but cannot access, it will block them out. Only Admin can access that option.

Keyser S?ze 08-29-2002 07:23 PM

somehow i feel version 1.1 coming after this post :)

how about making it so that when a admin super closes, no other admin, other than that admin can touch it

im thinking make it based on user id

also would be good to have a setting in the admin cp to set it so that super close can be undone by any admin, or only by the admin that closed it, so u can easily turn that on or off


maybe even a new close feature, perm close, which means only the closeing admin can reopen it

i prefer the term "locked" over super close tho, but anyways, what yall think?

Chris M 08-29-2002 07:38 PM

I think what would be better, is almost how you said it, but that the Main Admin (who you define in the code) can override ANY Admin Super Close;)

Satan

g-force2k2 08-29-2002 08:07 PM

if you're the only admin that whats to worry about? a simple mod like that? nah its not worth it... if you want it restricted to yourself i will place the code in this post... otherwise something like that isn't worth the effort ;) regards...

g-force2k2

Keyser S?ze 08-29-2002 08:29 PM

at my forum theres 5 admins, tho only 3 are active

and no theres not much to worry about, but just a added security, thats why i said be able to turn that on or off

Boofo 08-29-2002 10:37 PM

Yes, but there is also the closed reason hack (from, you guessed it, Xenon :)) in there. If I enter the first line of code from your hack in my code, there, it works fine, but it shows an empty closed reason at the top for the thread. Any way to have it open up the closed reason to add the reason for closing it also?

Quote:

Originally posted by g-force2k2
Boofo before i attempt any mod for your code... do the templates that are called simply the button coding? regards...

g-force2k2


g-force2k2 08-29-2002 11:55 PM

could you link me to his hack? i didn't see it in his profile x_X and i will build an addon for you Boofo :) regards...

g-force2k2

Boofo 08-30-2002 12:15 AM

Here you go, my friend. :) Thank you. ;)

https://vborg.vbsupport.ru/showthrea...907#post264907

g-force2k2 08-30-2002 12:25 AM

Okay Boofo i just made a slight alteration ;) try this code...

PHP Code:

if ($thread[open] == 1) {
  
$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")."\";");
   }


regards... btw i should have remember he and Sinecure did that one together :P

g-force2k2

Boofo 08-30-2002 12:35 AM

This is the only line you changed from that code, right?

Code:

if ($thread[open] == 1) {
It works, but now I get a blank Closed Thread Reason at the top of the page. :)

Boofo 08-30-2002 12:42 AM

By the way, my regular Open/Close Thread (above the Super Open/Close thread) in the Admin options no longer works. I get a session error. :)

g-force2k2 08-30-2002 01:05 AM

well that could be just your sessions... not the coding but i could be wrong :p i didn't get any sessions... and i don't know why you get a blank reason :p but i'll keep on the look out ;) regards...

g-force2k2

Boofo 08-30-2002 01:08 AM

What about the regular Open/Close Thread in the admin options? Please let me know something as soon as you find out. I really like this hack and don't want to uninstall it if I don't have to. You seem to make pretty good hacks there. :)

g-force2k2 08-30-2002 02:01 AM

yeah Boofo but if its not a sintax error it maybe just be the server... cause i know i use to get messed up sessions... but i could be wrong... regards...

g-force2k2

Goldknight 08-30-2002 02:04 AM

?? cuz of your and Boofo's "modify" codes? So far yours work well on my net and local server :p

Boofo 08-30-2002 02:15 AM

The regular Open/Close Thread worked fine before. :)

Here is the error I get when I try to use it now:

Quote:

vBulletin Message
The action you have attempted could not be performed as your session appears to be invalid. Click the below link to attempt this action again with a new session.
Try this action again!

Quote:

Originally posted by g-force2k2
yeah Boofo but if its not a sintax error it maybe just be the server... cause i know i use to get messed up sessions... but i could be wrong... regards...

g-force2k2


g-force2k2 08-30-2002 02:26 AM

ya... i used to always get them (on my old server)... maybe it could have something to do with my code... like i said i could be wrong >_O better off asking someone like Xenon or PPN on this one... regards... (i don't know to much about sessions)

g-force2k2

Boofo 08-30-2002 02:29 AM

Ok, but why does it only start doing that now? :)

Quote:

Originally posted by g-force2k2
ya... i used to always get them (on my old server)... maybe it could have something to do with my code... like i said i could be wrong >_O better off asking someone like Xenon or PPN on this one... regards... (i don't know to much about sessions)

g-force2k2


g-force2k2 08-30-2002 02:46 AM

lol i don't know ;p thats why i said its better off asking one of the more experience vb ppl ;) sorry Boofo :( regards...

g-force2k2

Boofo 08-30-2002 03:06 AM

I see how you are. :) That's ok, I'll just uninstall it for now. Since it won't work with the closed thread reason installed, anyway. Thanks anyway. :)

Mono 09-18-2002 02:27 AM

Nice. This one is good for my little spammy mods who like to take advantage of their abilities to post in closed threads.

Clicks install

Works great too.

Bastian B. 09-21-2002 01:54 AM

Super Hack! Very good!

I have install it!

-Sidekick- 09-24-2002 04:22 AM

Is there going to be a upgrade for this hack so it works along with the reason for closing thread hack?


All times are GMT. The time now is 06:33 AM.

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.01424 seconds
  • Memory Usage 1,838KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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