Web Page Bulletin Board

Display a short message on a bulletin board that fits in with the Carter Lake suite.

Create a message that will display any kind of information originating from a tag in the testtags.txt file. If the weather tag isn’t in there, you can easily add the ones you want.
Most of all, you can create a script and have it display what you want under your own conditions.

Customized the messages with your own scripts like the two that are included. If you have NexStorm, the included script will display a message that a storm is xx miles away. The other script displays sunburn time in minutes according to the UV tag. Angelos provided the code for that.
Those are only two possibilities of displaying almost any type of a short message that you can create.

Some of the useful Weather Display tags that can be used to display short messages are %myuserdailyreport% %warningemailalarm% %dailywarning/forecast% %NOAAEvent%

The bulletin board will only display when there is an active message or alert so you don’t have to see a blank board most of the time.
There are two style of bulletin boards that you can switch from. Either use the ol’ cork style board or switch it to the web page theme as shown below.

Of coarse there are requirements. WD - Carter Lake template with testtags - php5

Download it here http://www.weather.ricksturf.com/scripts/BulletinBoard.zip

I’ll be glad to help ya out if you run into troubles or have questions.

Curly


bboards.png

Hi Curly,

Nice work, I have it up and running on my site and have a quick question. Is there a way to have the script read a plain text file? That way a quick “notice” could be put up from any where I might be by just uploading a new message text file to the server. So it would have to read the text file from the server and display the message.

BTW I was getting an error on this line…

$text_alert = $tdstart . $b.  $tdend;

There was a period after $text_alert that caused an error on the page.

Thanks,

Jack

Update: Figured it out Curly, did a little mod to the closestorm script and now I can change the txt file from anywhere!

Hello Jack,

Thanks for the compliment!

There is a quick way to add a message on the fly but you would need to set it up to perform that task.
It’s much easier to configure the file if you first create the page you want to send and then edit the bboard file.
Create a file that will contain your message. This could be done in notepad. The message needs to be in a php format so the script can read it.
Put this line in there.

<?php  $myowntext = "Severe Weather Expected"; ?>

Your message would replace severe weather expected. Save it as abc.php and upload it. This will also be your template file to change the message later on.

Open the bboard.php file to include the filename you just created and add $myowntext to one of the empty strings. This is described in the read_me.
Once they are uploaded, the message will be displayed until you change the abc file. To turn off the message, change the message in the abc file to “” Save it and upload it.

OK, now the error…
That period needs to be in there to display additional messages. What happened was I left out a line of code to first create an empty array. I fixed it in the zip file.
You can do the following to fix what you have.
Find this with the period in place

// Print all messages to be inserted in a table
foreach ($text_message as $b) {
 $text_alert .= $tdstart . $b.  $tdend;
}

Replace it with this

// Create a blank array
$text_alert = "";

// Print all messages to be inserted in a table
foreach ($text_message as $b) {
 $text_alert .= $tdstart . $b.  $tdend;
}

Curly

Update: Figured it out Curly, did a little mod to the closestorm script and now I can change the txt file from anywhere!

:signcool:
8)

It blends right in with the rest of the page.

Whoopsy, sorry Curly, i never saw this post since testing it out for you :oops:

Its running great and as expected :slight_smile:

For folks that want to add a message on the fly, the way i do it is using this setup tag
$dailywarning and then in WD’s Input Daily Weather, then the right hand box, thats titled
Weather warning/forecast input, i add my text there, you can see it on my index page
the the one with Saturdays forecast is the one i just added to the image below and todays
forecast is added to the box on the left, Saturday’s forecast was added just now to show
you how i do it…

Curly:

One question if i may please?

How do i set the order i.e. I would like mine to show in this order
currentalarmflashing
weathercondinput
dailywarning

But sadly no matter how hard o try to arange those tags around the order never changes
on the page, whats the best way please?


How do i set the order i.e. I would like mine to show in this order currentalarmflashing weathercondinput dailywarning

The order of the bulletin messages starts at $text0 as the most important and ends with $text9 as the least importance. You do have those three set correctly with $myuserdailyreport in the bottom spot as the least import message and $myuserdailyreport will be display as the last bulletin if any of the others are active.

It should display the bulletins in order the way you have it now.
However, the script was updated once since you installed it and there may be a quirk somewhere with what you have. ? I suggest that you try the updated file and see if there is a difference - http://www.weather.ricksturf.com/scripts/BulletinBoard.zip

Curly

Ok will do thanks a lot Curly!!

HI Curly, Sadly its still the same

I have it likethis

// Alert messages to use in the bulletin board in order of importance
// $text0 is most important - $text9 is least important
$text0 = $currentalarmflashing;
$text1 = $weathercondinput;
$text2 = $statusmessage;
$text3 = $dailywarning;
$text4 = “”;
$text5 = “”;
$text6 = “”;
$text7 = “”;
$text8 = $uv_warn;
$text9 = $myuserdailyreport;

Just the bboard.php is all you need.
Those other files are instuctions and samples if needed.

Your first bulletin starts out with this Saturday : and that is from $dailywarning
The second bulletin starts with Dry with some bright and is from $myuserdailyreport

$dailywarning is above $myuserdailyreport in your settings and is displaying the correct order as listed

$text0 = $currentalarmflashing;
$text1 = $weathercondinput;
$text2 = $statusmessage;
$text3 = $dailywarning;
$text4 = "";
$text5 = "";
$text6 = "";
$text7 = "";
$text8 = $uv_warn;
$text9 = $myuserdailyreport;

oh my, I always thought weathercondinput was the other one #-o sorry Curly :oops:

Thats got it sorted, i cant beleive i was that stupid, dont say a word…

Any heads up on the UV warn, do i need to set anything up to get it working, i would like to use it please?
I have the lang file on the server now :slight_smile:

Hey no problem Bashy… It’s hard to keep track of so many things going on at once. :smiley:

To use the UV, you will need to include lang.php near the examples in bboard.php and enter $uv_warn in one of the empty $text spots. You will then be good to go!

Thanks Curly,

When does the burn time start to display is it once it reaches a certain UV level
cause i aint seen it display yet and my burn time is currently at 1036 minutes

Great addition by the way :slight_smile:

Bashy,

Just an FYI, you can turn off the “corkboard” style within the script…

$corkBoard = false; // true = cork board   false = theme style

It will then mimic your site css. You may have already known this and tried it, just wanted to throw it out there! BTW your site is looking really nice and the BB is a nice addition!

Regards,

Jack

Hi
I’ve got the bulletin board working, well basically. I am a complete novice and don’t really understand the tags. I tried using Bashy’s $dailywarning but after adding the %dailywarning% to the testtags All that showed on the board was %dailywarning% .
Can I use the board to put other random facts, a bit like the “On this Day” info you have on your site? I have a message on mine asking visitors to add a message to the Blog page, I did this simply by typing the message in the WD input daily weather page, but if I put any puntuation in I get a testtags error message.

Any help appreciated
Phil

Hi Phil,
To get Bashys warnings to works, you will need to put this in your testtags.txt file $dailywarning = “%dailywarning/forecast%”; Whatever you enter in the daily weather, $dailywarning will display it.
In the bboard.php file, you will need to add $dailywarning to $text5 = “”; It will look like this $text5 = $dailywarning;
You can add anything to be displayed on the bulletin board. It would be easier to set up a small file to edit and upload instead of editing the bboard.php file.
I can help you customize any application.

Curly

Curly thanks for the reply.
To display a “free text” message for displaying any general stuff such as an “on this day” quote do I create a php file in notepad as you mentioned in an earlier post. I really have no knowledge on how to do this.
Phil

You can do it that way for an instant type of message. If you want to add something like “On This Day”, it wouldn’t be too much different except the “module” script would be written to pull text from another web site.

Curly

Once again Thanks. It’s getting late here now, I’ll look into that tomorrow

Hi Curly

Is there a way i can use a .txt file to be shown on the board please
i.e. pull the info from the file and show on the board, much the same
as it does from WD already?