Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Homeland Security Advisory System v1.0 Details »
Homeland Security Advisory System v1.0
Mod Version: 1.00, by yoyoyoyo (Member) yoyoyoyo is offline
Developer Last Online: Sep 2008 I like it Show Printable Version Email this Page

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:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

change the value in
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

leave the rest at default and setup your usergroup permissions and click 'Save'

That's it!

PLEASE CLICK INSTALL IF YOU FIND THIS USEFUL

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	screen1.jpg
Views:	167
Size:	406.0 KB
ID:	32584   Click image for larger version

Name:	screen2.jpg
Views:	117
Size:	325.0 KB
ID:	32585   Click image for larger version

Name:	screen3.jpg
Views:	103
Size:	532.8 KB
ID:	32586   Click image for larger version

Name:	screen4.jpg
Views:	178
Size:	60.3 KB
ID:	32587  

Click image for larger version

Name:	screen5.jpg
Views:	143
Size:	78.2 KB
ID:	32588  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Advisory Hack rake vBulletin 2.x Full Releases 10 16 Jan 2003 20:18

Comments
  #2  
Old 30 Jul 2005, 02:06
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
This hack could alternately be used by a forum that is somewhat liberal in it's political orientation to display your feelings about the Homeland Security Alert System. Attached to this post are examples of "liberal" type images (you can create your own- these are just to give you an idea).
Attached Images
File Type: gif privacy_threat_index.gif (15.2 KB, 72 views)
File Type: gif spinner_threat.gif (53.9 KB, 79 views)

Last edited by yoyoyoyo; 30 Jul 2005 at 02:32.
Reply With Quote
  #3  
Old 30 Jul 2005, 05:26
webslugger webslugger is offline
 
Join Date: Dec 2004
well done.
Reply With Quote
  #4  
Old 30 Jul 2005, 18:34
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Originally Posted by webslugger
well done.
up here in Canada im just gunna leave my sting and bell to alert me to trouble. nice hack tho!
Reply With Quote
  #5  
Old 31 Jul 2005, 02:10
bigcurt's Avatar
bigcurt bigcurt is offline
 
Join Date: Nov 2004
Real name: Curtis C.
Ya know yoyo, I love your mods man..they crack me up everytime xD.

~Curt
__________________
My first vB template additions: Add User Color Legend - Add eBay profile to postbit
Curtis C.- Owner and Operator of KeyHunt
Important Linkage: Buy vB - vB Styles
Just wanna ask a vB related question contact me.
Reply With Quote
  #6  
Old 31 Jul 2005, 02:21
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Originally Posted by bigcurt
Ya know yoyo, I love your mods man..they crack me up everytime xD.

~Curt
Oh yeah- this hack is a barrel of laughs...
Reply With Quote
  #7  
Old 31 Jul 2005, 02:57
EFairy's Avatar
EFairy EFairy is offline
 
Join Date: Nov 2002
Nice idea!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 03:26.

Layout Options | Width: Wide Color: