Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

AmberAlert plugin

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
PHPeter
Smarty n00b


Joined: 18 Mar 2011
Posts: 3
Location: The Netherlands

PostPosted: Fri Mar 18, 2011 2:32 pm    Post subject: AmberAlert plugin Reply with quote

Hi,

I developed a plugin that isn't that high-tech, but i think it's a very usefull plugin. It displays American or Dutch AmberAlerts in webpages.

Even though implementing AmberAlerts on webpages isn't that difficult, availability and easy access will promote displaying AmberAlerts on websites.

pastebin.com/8wXPyJsE
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bimal
Smarty Elite


Joined: 19 Apr 2007
Posts: 423

PostPosted: Wed May 25, 2011 8:12 am    Post subject: Seems good one Reply with quote

It sounds like a good thing.
To extend this post, you may put the usage examples as well.
Back to top
View user's profile Send private message Visit poster's website
DiscoInferno
Smarty Rookie


Joined: 09 Aug 2011
Posts: 18
Location: Moscow, Russia.

PostPosted: Thu Aug 11, 2011 12:56 pm    Post subject: Reply with quote

Right,
List an expamle here, so that everyone can see.
Back to top
View user's profile Send private message Visit poster's website
PHPeter
Smarty n00b


Joined: 18 Mar 2011
Posts: 3
Location: The Netherlands

PostPosted: Thu Aug 11, 2011 1:09 pm    Post subject: Reply with quote

INSTALLATION:

Just include the function.amberalert.php to the Smarty plugin-folder.

PUBLIC PROPERTIES:

Required parameter: state
Uses shortcode for USA-states or shortcode for the Netherlands (NL).

Value options:
NL=The Netherlands
AL=Alabama
AK=Alaska
AR=Arkansas
AZ=Arizona
CA=California
CO=Colorado
CT=Connecticut
DE=Delaware
FL=Florida
HI=Hawaii
IA=Iowa
ID=Idaho
IL=Illinois
IN=Indiana
KS=Kansas
KY=Kentucky
LA=Louisiana
MA=Massachusetts
MD=Maryland
ME=Maine
MI=Michigan
MN=Minnesota
MO=Missouri
MS=Mississippi
MT=Montana
NC=North Carolina
ND=North Dakota
NE=Nebraska
NH=New Hampshire
NJ=New Jersey
NM=New Mexico
NV=Nevada
NY=New York
OH=Ohio
OK=Oklahoma
OR=Oregon
PA=Pennsylvania
RI=Rhode Island
SC=South Carolina
SD=South Dakota
TN=Tennessee
TX=Texas
UT=Utah
VA=Virginia
VT=Vermont
WA=Washington
WI=Wisconsin
WV=West Virginia
WY=Wyoming
AS=American Samoa
DC=District of Colombia
MH=Marshall Islands
MP=Nothern Mariana Islands
PA=Palau
PR=Puerto Rico
VI=US Virgin Islands

Example: {amberalert state=”AZ”}

noscript :
The function returns <script.....></script>, 'noscript' sets the
<noscript></noscript> value (optional).

Example: {amberalert state=”AZ” noscript=”Javascript AmberAlert here”}


SMARTY PLUGIN:

To use the Smarty plugin, copy the Smarty plugin file
function.amberalert.php into your Smarty plugins folder.

examples:
{amberalert state=”AZ”}
{amberalert state=”NL” noscript=”Javascript AmberAlert here”}
{amberalert state=”IL”}
{amberalert state=”PR” noscript=”Javascript AmberAlert here”}

This will output an <script.....></script> tag to display the JavaScript
widget.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP