Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GS Shortcodes
#1
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.
My Github Repos: Github
Website: DigiMute
Reply


Messages In This Thread
GS Shortcodes - by n00dles101 - 2012-05-15, 05:25:34
RE: GS Shortcodes - by shawn_a - 2013-06-01, 01:57:58
RE: GS Shortcodes - by Tzvook - 2013-06-01, 02:12:26
RE: GS Shortcodes - by scootball - 2013-06-06, 07:33:42
RE: GS Shortcodes - by n00dles101 - 2013-06-06, 22:45:35
RE: GS Shortcodes - by Tzvook - 2013-06-07, 01:47:53
RE: GS Shortcodes - by marrco - 2013-06-19, 00:06:56
RE: GS Shortcodes - by Kein2009 - 2013-10-15, 00:31:33
RE: GS Shortcodes - by datiswous - 2014-02-10, 23:23:13
RE: GS Shortcodes - by datiswous - 2016-01-04, 20:02:58
RE: GS Shortcodes - by n00dles101 - 2016-01-05, 00:27:35
RE: GS Shortcodes - by jeckyl - 2016-07-21, 00:49:35
RE: GS Shortcodes - by datiswous - 2018-04-30, 08:40:12
RE: GS Shortcodes - by n00dles101 - 2018-04-30, 23:58:21
RE: GS Shortcodes - by shawn_a - 2018-05-01, 02:39:48
GS Shortcodes - by shawn_a - 2012-05-16, 00:14:27
GS Shortcodes - by n00dles101 - 2012-05-16, 07:04:11
GS Shortcodes - by n00dles101 - 2012-07-26, 07:36:41
GS Shortcodes - by Cerulean - 2012-10-13, 12:23:10
GS Shortcodes - by Carlos - 2012-10-13, 16:22:26



Users browsing this thread: 1 Guest(s)