PDA

View Full Version : Selected Files Not Closed v1.0.0


AN-net
10-10-2004, 10:00 PM
Selected Files Not Closed(SFNC) v1.0.0
by AN-net/Antonbomb22(Anthony Scudese)



Description:
This will add a new option to the Turn Your vBulletin On and Off options. This new option allows you to choose which files will not display the Forum Closed/Inactive reason. To define which files will not display it I used the THIS_SCRIPT definition which is most commonly defined in all vb files following standard coding. Some instances this may be useful is for portals,galleries,articles, and other sections of your site intergrated with vb but yet you dont want it to be closed when the forums are.

Compatiability:
Tested on vB 3.0.3

Where to Get Support:
-AIM(Antonbomb22)
-email(antonbomb22@animationation.net)
-this thread

Included Files:
-sfncinstall.php

File Edit(s):
1.Open /forumroot/global.php
2.Find:

if (!($permissions['adminpermissions'] & CANCONTROLPANEL))
{
$show['enableforumjump'] = true;
eval('standard_error("' . str_replace("\'", "'", addslashes($vboptions['bbclosedreason'])) . '");');
unset($shutdownqueries['lastvisit']);
}

3.Replace above with:

$vboptions['bbfilesnotclosed']= explode(' ', $vboptions['bbfilesnotclosed']);
if (!($permissions['adminpermissions'] & CANCONTROLPANEL) AND !in_array(THIS_SCRIPT, $vboptions['bbfilesnotclosed']))
{
$show['enableforumjump'] = true;
eval('standard_error("' . str_replace("\'", "'", addslashes($vboptions['bbclosedreason'])) . '");');
unset($shutdownqueries['lastvisit']);
}


Now just run the attached installer;)

Updates/Fixes:
-fixed some typos in the sfncinstall.php file; file updated(10/11/04)

Please click install:Dhttps://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=70444)

Revan
10-11-2004, 05:16 PM
Cool hack mate :)
Luckily my v3 rpg files uses the definition this hack needs ;)

Thats..um..really just what I wanted to say XD
//out

integra99
10-11-2004, 05:37 PM
It would be a nice addition also to do the exact opposite of this hack, be able to select files to close and leave everything else open.

Also, I had trouble running your installer. I will post them up shortly.

/me clicks install!

integra99
10-11-2004, 05:46 PM
print_tabler_header("Installation of Selected Files Not Closed"); needs changed to print_table_header("Installation of Selected Files Not Closed");

$DB_site->query("INSERT INTO ".TABLE_PREFIX."phrase ('languageid`, `varname`, `text`, `phrasetypeid`) VALUES (-1, 'setting_bbfilesnotclosed_desc', needs changed to $DB_site->query("INSERT INTO ".TABLE_PREFIX."phrase (`languageid`, `varname`, `text`, `phrasetypeid`) VALUES (-1, 'setting_bbfilesnotclosed_desc',

AN-net
10-11-2004, 06:14 PM
i see the first change but the second one i dont

will update file:)

integra99
10-11-2004, 06:18 PM
The apostrophe right before languageid kept crashing the installer :)

AN-net
10-11-2004, 06:30 PM
ok all current bugs have been fixed:)

AlexanderT
10-12-2004, 06:59 AM
Nice idea.

Polo
10-12-2004, 12:33 PM
nice idea indeed :)