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)

N9ne 09-29-2002 01:48 PM

Question: Does this add queries? If so, how many and on what pages?

g-force2k2 09-29-2002 02:47 PM

Quote:

Originally posted by Tha Rock
Question: Does this add queries? If so, how many and on what pages?
It doesn't add any queries to my knowledge :p regards...

g-force2k2

N9ne 09-29-2002 03:07 PM

Good, I shall install it then ;)

On a side note: g-force: how's those requests coming along [the hacks i requested a while ago]

N9ne 10-23-2002 07:52 PM

I have a problem, PHP people, help me please! :(

if ($thread[open]) {
$replyclose="https://vborg.vbsupport.ru/images/reply.gif";
$thread[closereason]="";
} else {
$replyclose="https://vborg.vbsupport.ru/images/threadclosed.gif";
if (trim($thread[closereason])) {
$thread[closereason]=bbcodeparse2($thread[closereason],0,1,1,1);
eval("\$thread[closereason] = \"".gettemplate("showthread_closereason")."\";" );
} else {
$thread[closereason] = "";
}
}

That is what I have in my showthread.php file...

I have to replace it with:

// +++++++ 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 ] +++++++


I'm sure there's an easy fix for this but I don't know what it is :D

N9ne 10-23-2002 08:13 PM

Attached is a PHP file of my instructions so hopefull it doesn't parse the image code.

N9ne 10-24-2002 04:12 PM

bump, please help! :(

N9ne 10-24-2002 05:13 PM

Ok I managed to fix it for myself! Ok it took me a bit of thinking though [I had no idea where to start!], but in the end I just used some intelligence and tried a few tricks and looked at the PHP, tried to understand it and got a grip of it and fixed it for myself! At first I had a problem that it wasn't calling the template for closereason but I also fixed that, but then I had a problem with it showing the reply image instead of close image but I fixed that too!

Thanks for a great hack, now i can superclose threads :D

mehungie2 02-03-2003 03:30 AM

how do i integrate this hack with close reason hack. im having problems with the showthread.php modifications. please help

mehungie2 02-09-2003 12:09 AM

i hate to double post but can someone help me with this?

Zelda-King 03-23-2003 04:32 PM

It's a nice hack but it would be nice if moderators couldn't alter these threads at all. Currently they can move/delete them still.

I fixed that on my board by adding the code to more sections of postings.php.

eg, at the top of a section under (for example)
PHP Code:

// ############################### start stick / unstick thread ############################### 

you get an 'if' action thing. In this case
PHP Code:

 if ($HTTP_POST_VARS['action'] == 'stick' OR ($action == 'stick' AND $s == $session['dbsessionhash'])) { 

. Under this you get
PHP Code:

$threadid=verifyid("thread",$threadid);
  
$threadinfo=getthreadinfo($threadid);

  if (!
$threadinfo[visible]) {
    
$idname="thread";
    eval(
"standarderror(\"".gettemplate("error_invalidid")."\");"); 

. Just put
PHP Code:

// +++++++ Super Close Thread Hack [ g-force2k2 ] +++++++
  
if(($threadinfo[open] == 2) AND ($bbuserinfo[usergroupid] != 6)) {
    
show_nopermission();
  }
// +++++++ Super Close Thread Hack [ g-force2k2 ] +++++++ 

underneath any function you don't want moderators to have power for, such as deleting/moving a superclosed thread.

Also, in postings.php, it would be better if 'the thread has been successfully superopen/superclose'' read 'super-opened/super-closed or something. Just change
PHP Code:


    $action 
"superclose";
  } elseif(
$threadinfo[open] == 2) {
    
$threadinfo[open] = 1;
    
$action "superopen"

to
PHP Code:

    $action "super-closed";
  } elseif(
$threadinfo[open] == 2) {
    
$threadinfo[open] = 1;
    
$action "super-opened"



All times are GMT. The time now is 03:30 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.01864 seconds
  • Memory Usage 1,753KB
  • 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
  • (6)bbcode_php_printable
  • (1)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