Back to vBulletin 3.0 Add-Ons

Homeland Security Advisory System v1.0
Mod Version: 1.00, by yoyoyoyo

This modification is in the archives.
vB Version: 3.0.8 Rating: (1 vote - 4.00 average) Installs: 3
Released: 30 Jul 2005 Last Update: 30 Jul 2005 Downloads: 5
Not Supported Template Edits Additional Files  

HOMELAND SECURITY ADVISORY SYSTEM
for vBulletin
version 1.0
by yoyoyoyo



OVERVIEW

This displays the current 'threat warning'' according to the United States Homeland Security Advisory System. The script visits the Homeland Security page to fetch the current threat level and then displays the approriate image to your visitors. The threat level is cached and is checked once every hour, or (or whenever a new visitor visits your page beyond that time). In other words: if nobody visits your page, then the image is not updated. You can have the threat alert appear on it's own page, below the "What's Going On' box on your forumhome, and also in your vBadvanced CMPS as a module. When someone clicks on the threat level image displayed below the "What's Going On" box or in the CMPS module then it will take them to a page that goes in to more detail about the Homeland Security Advisory System, including links and advice on what precautions to take. This page can also be accessed by a link in the navbar "quick links."

This mod uses a cgi script to retreive and cache the images in real time. This script visits whitehouse.gov, a US federal web site in order to retrieve the current threat level according to the Homeland Security Advisory System (HSAS). You can substitute whatever images you want for each of the alerts, just be sure to name them: elevated, guarded, high, low and severe and place them in the same folder as the cgi script.

There are 3 different image/cgi folders: 'advisory_main,' 'cmps,' and 'wol.' The 'advisory_main,' folder is where the script and images for advisory.php reside, the 'cmps' folder is where the vBadvanced CMPS module scripts and images reside, and 'wol' folder is where the forumhome "Who's Online' images and scripts reside.

BEFORE YOU INSTALL

make sure that your server supports perl scripts and that you have access to the cgi-bin directory via FTP. The CGI scripts require the Perl modules HTTP::Request and LWP; both are commonly installed on most hosts. If you do not have PERL then you can try running a free program called PerlSP found at:
Code:
http://2n-com.de/perlsp/
PerlSP provides an ASP/PHP/JSP like environment for Perl on all servers, dedicated or virtual, with everything that you expect from a web programming environment and before only knew from PHP or ASP.

EDIT THE SCRIPTS

At the very top of each cgi file you will see
Code:
#!/usr/bin/perl -wT
This must point to the Perl on your server. If you don't know it, ask your host or run info.cgi that comes included in the zip on your server to get it. In most cases #!/usr/bin/perl or #!/usr/bin/perl5 works OK.

That is the only thing you need to edit in the cgi files, unless you want the files to be cached more or less frequently than once every hour. If that is the case then open the advisory-caching.cgi script and look for this:
Code:
my $cache = new Cache::FileCache( { namespace => 'HomeLandCache',
									 expires_in => 3600, # 1 hour
									 max_size => 1048576,
									 filemode => 0666} );
change the value in
Code:
expires_in => 3600, # 1 hour
to however long you want it to be and 3600 refers to the number of seconds between caching the file.

UPLOAD THE FILES

Upload all of the file to their respective directories. Keep the structure of the files intact. If your server allows you to run cgi files from anywhere on your server, and you decide to change the directory that the 'advisory' folder will be uploaded to, then please remember to change the filepath in the 'advisory' template as well. 'advisory.php' is uploaded to your forum root directory, and the images are uploaded to the images directory of your forum. 'alert.gif' is uploaded to your images/misc directory. Obviously you do not need to upload the folder 'wol' if you do not intend to use the forumhome display, and you do not need to upload the 'cmps' folder if you do not intend to use the CMPS module. YOU DO NOT NEED TO UPLOAD THE FOLDER NAMED TEMPLATES.

Attached to this post are also a few "alternate" image sets. You can decide which set you want to use, or use the images that come with the install file. You do not need to download the "alternative images" if you want to use the default images.

CHMOD THE FILES

Using your FTP client CHMOD all of the folders, files and subdirectories in the 'advisory' folder to 755. 'chmod' or "change mode" is the UNIX way of changing file permissions. Basically CHMOD refers to setting the access privileges for a file, and you use an FTP client. Highlight the file that you want to change permissions for, and right click and select "Properties" or "Permissions" or "CHMOD" or "File Attributes" (depending on which FTP client you are using).


CREATE THE PHRASES

Go to your Admin Control Panel -> Languages & Phrases -> Phrase Manager -> Add New Phrase and add the phrases listed in the 'phrases.txt' file

CREATE THE TEMPLATES

Go to your Admin Control Panel -> Styles & Templates -> Style Manager and select 'Add New Template' from the drop-down selection menu. Create 2 new templates: 'advisory' and 'adv_portal_homeland' using the contents of each respective text file in the 'templates' folder, making sure that you name them exactly as mentioned, with no capitalization, etc.. NOTE: You do not need to add the 'adv_portal_homeland' template if you are not using vBAdvanced CMPS, or if you don't want the Homeland Security Advisory System module to appear.

EDIT THE FORUMHOME TEMPLATE

Go to your Admin Control Panel -> Styles & Templates -> Style Manager and select 'Edit Templates' from the drop-down selection menu. Then on the next screen click on the "<< >>" button to expand all of the templates, and scroll down to the "Forum Home Templates" and select 'forumhome' and click on the 'Customize' (or 'Edit') button. Make the changes noted in the 'forumhome' template by using the 'forumhome.txt' text file in the 'templates' folder (YOU ONLY NEED TO EDIT THE FORUMHOME TEMPLATE IF YOU WANT TO HAVE THE ADVISORY APPEAR ON THE FORUMHOME, JUST BELOW THE "WHAT'S GOING ON' BOX).

EDIT THE NAVBAR TEMPLATE

Go to your Admin Control Panel -> Styles & Templates -> Style Manager and select 'Edit Templates' from the drop-down selection menu. Then on the next screen click on the "<< >>" button to expand all of the templates, and scroll down to the "Navigation/Breadcrumb Templates" and select 'navbar' and click on the 'Customize' (or 'Edit') button. Make the changes noted in the 'navbar' template by using the 'navbar.txt' text file in the 'templates' folder included in this file. (YOU ONLY NEED TO EDIT THE NAVBAR TEMPLATE IF YOU WANT TO HAVE THE ADVISORY TO APPEAR AS A LINK ON THE NAVBAR, IN THE 'QUICK LINKS' DROPDOWN).

ACTIVATE THE CMPS MODULE

Go to your Admin Control Panel -> vBa CMPS -> Add Module -> TEMPLATE and add the following:
Code:
Module Title: Homeland Security
column: your choice (right or left)
Display Order: your choice
Active: Yes
Template to Include: adv_portal_homeland (the 'adv_portal_' part is already implied- only enter 'homeland')
Use Module Shell Template: No
leave the rest at default and setup your usergroup permissions and click 'Save'

That's it!

PLEASE CLICK IF YOU FIND THIS USEFUL

Download

This modification is archived and cannot be downloaded.

Supporters / CoAuthors

  • yoyoyoyo

Screenshots

       

 

Similar Mods

Advisory Hack vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024