|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
PHPeter Smarty n00b
Joined: 18 Mar 2011 Posts: 3 Location: The Netherlands
|
Posted: Fri Mar 18, 2011 2:32 pm Post subject: AmberAlert plugin |
|
|
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 |
|
bimal Smarty Elite
Joined: 19 Apr 2007 Posts: 423
|
Posted: Wed May 25, 2011 8:12 am Post subject: Seems good one |
|
|
It sounds like a good thing.
To extend this post, you may put the usage examples as well. |
|
Back to top |
|
DiscoInferno Smarty Rookie
Joined: 09 Aug 2011 Posts: 18 Location: Moscow, Russia.
|
Posted: Thu Aug 11, 2011 12:56 pm Post subject: |
|
|
Right,
List an expamle here, so that everyone can see. |
|
Back to top |
|
PHPeter Smarty n00b
Joined: 18 Mar 2011 Posts: 3 Location: The Netherlands
|
Posted: Thu Aug 11, 2011 1:09 pm Post subject: |
|
|
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 |
|
|
|
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
|