2012-05-15, 05:25:34
GS_Shortcodes is a port of Wordpress Shortcodes for GetSimple.
Download version 1.0 from extend:
http://get-simple.info/extend/plugin/gs-shortcodes/493/
It comes with the following Shortcodes built in and ready for use:
* PageField
* Youtube Video
* Google Chart
* Vimeo Video
* Google Maps
CREATING YOUR OWN SHORTCODES
As GS_Shortcodes is a port of Wordpress shortcodes any tutorials for developing also apply here.
There is also a file in GS_Shortcodes\shortcodes_sample.php which has tons of example shortcodes.
INCLUDING SHORTCODES IN YOUR THEME
If you wish to add new shortcodes to your theme or distribute them as part of a theme just create a shortcodes.php in the root of your theme folder. It will be read in by the system.
BUNDLED SHORTCODES
PAGEFIELD
The pagefield shortcode allows you to output any field from any page in your pages.
For example if you wished to output the published date of the current page you would use
[ pagefield field='pubDate' ]
This page was published: Mon, 02 Jul 2012 22:01:08 +0100
To output the field from another page use
[ pagefield page='index' field=title' /]
The title of the index page is: Welcome to TheMatrix
YOUTUBE VIDEO
The YouTube shortcode allows you to insert YouTube videos in your pages.
It accepts 3 parameters
id - the id of the YouTube video you wish to embed
width - width of the video
height - height of the video
To display a Youtube video just enter
[ youtube id='aGSKrC7dGcY&ob=av2e' width='500' height='300' /]
VIMEO VIDEO
The Vimeo shortcode allows you to insert Vimeo videos in your pages.
It accepts 3 parameters
id - the id of the YouTube video you wish to embed
width - width of the video
height - height of the video
So now in your pages if you want to insert a Vimeo video just enter
[ vimeo id='44467835' width='500' height='300' /]
GOOGLE CHART
This shortcode allows you to use the Google Chart API to create a dynamic charts in your pages.
It accepts the following parameters:
type, type of chart - line, xyline, sparkline, meter, scatter, venn, pie, pie2d
data, comma delimleted data
colors, comma delimeted list of Hex colors for data
size, width by height of chart. eg. 500x300
bg, Hex color for background
title, title of chart
labels, comma delimeted list of labels for data
advanced, other options see Google Chart API for more details
For example :
[ chart data="41.52,37.79,20.67,0.03" bg="F7F9FA" labels="Reffering+sites|Search+Engines|Direct+traffic|Other" colors="058DC7,50B432,ED561B,EDEF00" size="488x200" title="Traffic Sources" type="pie"]
GOOGLE MAPS
This shortcode allows you to insert a Google Map into your pages.
You can use the following options to customize your map:
lat , latitude
lon , longtitude
id, unique ID for multiple maps
z, zoom level, 0=world, 20=fully zoomed
w, width of map (default 400)
h, height of map (default 300)
maptype, map type ROADMAP | SATELLITE | HYBRID | TERRAIN
address, any valid google map address
marker, add a marker to the map
markerimage, url to a custom marker image
infowindow, text to display in an infowindow, marker should be set to true
infowindowdefault, show an info window (yes or no) default no
hidecontrols => 'false',
scale => 'false',
scrollwheel => 'true'
Adding a map to your page
To add a basic world map to your page just use
[ googelmap]
The address parameter accepts any valid Google maps address, and the "z" parameter for zoom level (ex: 0=world, 20=really zoomed in)
Ex: [ googlemap address="'Dublin, Ireland" z="7" ]
Multiple Maps
If you want to use multiple maps on a page you must specify an 'id' on each shortcode:
Ex: [ googlemap id="map1" address="'Dublin, Ireland" z="7" ]
[ googlemap id="map2" address="'Dublin, Ireland" z="7" ]
*** Note all the above examples have a space between the first [ and the shortcode remove the space if pasting.
Download version 1.0 from extend:
http://get-simple.info/extend/plugin/gs-shortcodes/493/
It comes with the following Shortcodes built in and ready for use:
* PageField
* Youtube Video
* Google Chart
* Vimeo Video
* Google Maps
CREATING YOUR OWN SHORTCODES
As GS_Shortcodes is a port of Wordpress shortcodes any tutorials for developing also apply here.
There is also a file in GS_Shortcodes\shortcodes_sample.php which has tons of example shortcodes.
INCLUDING SHORTCODES IN YOUR THEME
If you wish to add new shortcodes to your theme or distribute them as part of a theme just create a shortcodes.php in the root of your theme folder. It will be read in by the system.
BUNDLED SHORTCODES
PAGEFIELD
The pagefield shortcode allows you to output any field from any page in your pages.
For example if you wished to output the published date of the current page you would use
[ pagefield field='pubDate' ]
This page was published: Mon, 02 Jul 2012 22:01:08 +0100
To output the field from another page use
[ pagefield page='index' field=title' /]
The title of the index page is: Welcome to TheMatrix
YOUTUBE VIDEO
The YouTube shortcode allows you to insert YouTube videos in your pages.
It accepts 3 parameters
id - the id of the YouTube video you wish to embed
width - width of the video
height - height of the video
To display a Youtube video just enter
[ youtube id='aGSKrC7dGcY&ob=av2e' width='500' height='300' /]
VIMEO VIDEO
The Vimeo shortcode allows you to insert Vimeo videos in your pages.
It accepts 3 parameters
id - the id of the YouTube video you wish to embed
width - width of the video
height - height of the video
So now in your pages if you want to insert a Vimeo video just enter
[ vimeo id='44467835' width='500' height='300' /]
GOOGLE CHART
This shortcode allows you to use the Google Chart API to create a dynamic charts in your pages.
It accepts the following parameters:
type, type of chart - line, xyline, sparkline, meter, scatter, venn, pie, pie2d
data, comma delimleted data
colors, comma delimeted list of Hex colors for data
size, width by height of chart. eg. 500x300
bg, Hex color for background
title, title of chart
labels, comma delimeted list of labels for data
advanced, other options see Google Chart API for more details
For example :
[ chart data="41.52,37.79,20.67,0.03" bg="F7F9FA" labels="Reffering+sites|Search+Engines|Direct+traffic|Other" colors="058DC7,50B432,ED561B,EDEF00" size="488x200" title="Traffic Sources" type="pie"]
GOOGLE MAPS
This shortcode allows you to insert a Google Map into your pages.
You can use the following options to customize your map:
lat , latitude
lon , longtitude
id, unique ID for multiple maps
z, zoom level, 0=world, 20=fully zoomed
w, width of map (default 400)
h, height of map (default 300)
maptype, map type ROADMAP | SATELLITE | HYBRID | TERRAIN
address, any valid google map address
marker, add a marker to the map
markerimage, url to a custom marker image
infowindow, text to display in an infowindow, marker should be set to true
infowindowdefault, show an info window (yes or no) default no
hidecontrols => 'false',
scale => 'false',
scrollwheel => 'true'
Adding a map to your page
To add a basic world map to your page just use
[ googelmap]
The address parameter accepts any valid Google maps address, and the "z" parameter for zoom level (ex: 0=world, 20=really zoomed in)
Ex: [ googlemap address="'Dublin, Ireland" z="7" ]
Multiple Maps
If you want to use multiple maps on a page you must specify an 'id' on each shortcode:
Ex: [ googlemap id="map1" address="'Dublin, Ireland" z="7" ]
[ googlemap id="map2" address="'Dublin, Ireland" z="7" ]
*** Note all the above examples have a space between the first [ and the shortcode remove the space if pasting.