Using the Pop-up Notification on the Front Page

Using the Pop-up Notification on the Front Page

This capability is provided by the free Joomla plug-in “Simple Popup”, which is configured under Plugins on the back end.

To activate the Simple Popup, copy and paste the following three lines of code into the bottom of ehe website home page FHA Front Page (NOTE: EDIT THIS PAGE TO VIEW CODE):

{simplepopup name=”FhaUrgentMessage” cookie=’7′}
{article 3433}{text}{/article}
{/simplepopup}

Remember to remove these lines after the reason for the message goes away.

The article with ID=3433 is entitled “Emergency Urgent Notice”. The {simplepopup} on the first line will cause the article #3433 to be displayed as a popup in what’s called “fancy window” style, provided a) the article is published, and b) there is no cookie named “spuFhaUrgentMessage”. (spu=simple pop up, of course.) If 3433 is not published, or has expired, or the cookie exists, nothing will be shown. If the popup IS shown, the cookie is set with a lifetime of seven days (cookie=’7′).

When you want to have a message shown, find Emergency Urgent Notice and edit it to look as you wish on the Content tab. Then go to the Publishing tab and set the Start and End publishing dates. Clear the Start and set the End to 7 days or less away (the cookie expiration will begin showing the article again after 7 days, unless it has expired). When you save the article it should start popping up immediately when someone refreshes their page.

However, if this is the second urgent message in less than seven days, the cookie for the first will prevent the second from popping up! The only cure here is to edit FHA Pront Page, the home page, and change the name=”FhaUrgentMessage” to something like name=”FhaUrgentMessage2″. This will set a differently named cookie and the new message will then display. You don’t need to change it back – it’s just a cookie name and both the old and new will presumably expire after seven days, so the changed name can be reused.