{"id":481328,"date":"2008-08-19T17:06:14","date_gmt":"2008-08-19T17:06:14","guid":{"rendered":"https:\/\/segue.middlebury.edu\/view\/html\/node\/481328"},"modified":"2013-09-21T17:49:09","modified_gmt":"2013-09-21T17:49:09","slug":"text-templates","status":"publish","type":"page","link":"https:\/\/segueproject.org\/segue-documentation\/about-segue\/text-templates\/","title":{"rendered":"Shortcodes"},"content":{"rendered":"<p>Shortcodes are simple tags for creating dynamic text or embedding objects like is done in platforms such as WordPress. \u00a0Shortcode is adding using the following markup to text:<\/p>\n<div>\n<p>\u00a0\u00a0\u00a0 <span style=\"font-family: 'Courier New';\">{{template_name}}<\/span><\/p>\n<p>Additionally, optional named parameters can also be passed to shortcodes:<\/p>\n<p><span style=\"font-family: 'Courier New';\">{{template_name|paramName=value|param2Name=value2}}<\/span><\/p>\n<p>Shortcodes\u00a0can be useful for inserting predefined scripts or objects into HTML<br \/>\nwithout allowing cross-site scripting attacks. They can also be used to make common<br \/>\nhtml blocks easier to display or change.<\/p>\n<p>Below is a listing of shortcodes\u00a0that came with Segue.<\/p>\n<\/div>\n<h3>Video Shortcode<\/h3>\n<div>\n<h4>video<\/h4>\n<p>This template will allow the embedding of Flash Video from a variety of sources. These sources must be configured by the Segue administrator if they are not included in the default configuration.<\/p>\n<h4>Parameters:<\/h4>\n<dl>\n<dt><strong>service<\/strong><\/dt>\n<dt><\/dt>\n<dd>The service at which this video is hosted &#8212; all lowercase. Examples: youtube, youtube_playlist, google, vimeo, hulu<\/dd>\n<dt><strong>id<\/strong><\/dt>\n<dd>The Id of the video, the specific form of this dependent on the service, but generally this can be found in the URL for flash-video file. Example for YouTube: s13dLaTIHSg<\/dd>\n<dt><strong>width<\/strong><\/dt>\n<dd>The integer width of the player in pixels. Example: 325<\/dd>\n<dt><strong>height<\/strong><\/dt>\n<dd>The integer height of the player in pixels. Example: 250<\/dd>\n<\/dl>\n<h4>Example Usage:<\/h4>\n<p><span style=\"font-family: 'Courier New';\">{{video|service=youtube|id=s13dLaTIHSg|width=425|height=344}}<\/span><br \/>\n[youtube s13dLaTIHSg 425 344]<\/p>\n<p>Note:\u00a0If you paste the embed code from a supported service into a text block, it will automatically be converted into the template markup when saved.<\/p>\n<\/div>\n<h3>Search Text-Template<\/h3>\n<div>\n<div>\n<h4>search<\/h4>\n<p>This template will insert a search form that will open a new window with the search criteria supplied. The default search provider is Google, but other search providers can be used by specifying <em>base_url<\/em> and <em>search_param_name<\/em> options.<\/p>\n<h4>Parameters:<\/h4>\n<dl>\n<dt><strong>base_url<\/strong><\/dt>\n<dd>The base url that the search form will submit to. If specified, the param_name must be specified as well.<\/dd>\n<dt><strong>search_param_name<\/strong><\/dt>\n<dd>The name of the query parameter that will be added to the URL.<\/dd>\n<dt><strong>size<\/strong><\/dt>\n<dd>Optional: The number of characters to show in the field<\/dd>\n<dt><strong>button_text<\/strong><\/dt>\n<dd>Optional: The text to display in the button field, the default is &#8216;Search&#8217;<\/dd>\n<dt><strong>additional_params<\/strong><\/dt>\n<dd>Optional: A url encoded string of paramName=parmValue&amp;paramName2=paramValue2 to be added to the query string. Example &#8216;lang=en_US&amp;go=true&#8217;<\/dd>\n<dt><strong>provider<\/strong><\/dt>\n<dd>Optional: A preconfigured search. If used, all other options except size will be ignored. Allowed values: google, wikipedia, yahoo, youtube<\/dd>\n<\/dl>\n<h4>Example Usage:<\/h4>\n<ul>\n<li><span style=\"font-family: 'Courier New';\">{{search}}<\/span><br \/>\n<form action=\"http:\/\/www.google.com\/search\" method=\"get\" target=\"_blank\"><\/form>\n<\/li>\n<li><span style=\"font-family: 'Courier New';\">{{search|size=50}}<\/span><br \/>\n<form action=\"http:\/\/www.google.com\/search\" method=\"get\" target=\"_blank\"><\/form>\n<\/li>\n<li><span style=\"font-family: 'Courier New';\">{{search|base_url=http:\/\/youtube.com\/results|search_param_name=search_query}}<\/span><br \/>\n<form action=\"http:\/\/youtube.com\/results\" method=\"get\" target=\"_blank\"><\/form>\n<\/li>\n<li><span style=\"font-family: 'Courier New';\">{{search|base_url=http:\/\/youtube.com\/results|search_param_name=search_query|additional_params=search_sort=video_date_uploaded&amp;uploaded=d}}<\/span><br \/>\n<form action=\"http:\/\/youtube.com\/results\" method=\"get\" target=\"_blank\"><\/form>\n<\/li>\n<li><span style=\"font-family: 'Courier New';\">{{search|provider=yahoo}}<\/span><br \/>\n<form action=\"http:\/\/search.yahoo.com\/search\" method=\"get\" target=\"_blank\"><\/form>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<h3>GoogleMaps Text-Template<\/h3>\n<div>\n<div>\n<h4>googlemap<\/h4>\n<p>This template will insert an embedded Google Map. Pasting the Google Map embed-code into a TextBlock will automatically convert the embed-code into template markup.<\/p>\n<h4>Parameters:<\/h4>\n<dl>\n<dt><strong>url<\/strong><\/dt>\n<dt><\/dt>\n<dd>The base url of the map.<\/dd>\n<dt><strong>s<\/strong><\/dt>\n<dt><\/dt>\n<dd>The security token that Google maps uses for their embeded maps, visible in the embed-source code. (Required)<\/dd>\n<dt><strong>width<\/strong><\/dt>\n<dd>The integer width of the map in pixels. (Optional) Example: 325<\/dd>\n<dt><strong>height<\/strong><\/dt>\n<dd>The integer height of the map in pixels. (Optional) Example: 250<\/dd>\n<\/dl>\n<h4>Example Usage:<\/h4>\n<ul>\n<li>{{googlemap|url=http:\/\/maps.google.com\/?ie=UTF8&amp;t=h&amp;ll=44.009021,-73.174374&amp;spn=0.011451,0.013046&amp;z=16|s=AARTsJqzARj-Z8VnW5pkPMLMmZbqrJcYpw}}<\/li>\n<li>{{googlemap|url=http:\/\/maps.google.com\/?ie=UTF8&amp;t=h&amp;ll=44.009021,-73.174374&amp;spn=0.011451,0.013046&amp;z=16|s=AARTsJqzARj-Z8VnW5pkPMLMmZbqrJcYpw|width=425|height=350}}<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<h3>GoogleCalendar<\/h3>\n<div>\n<h4>googlecalendar<\/h4>\n<p>This template will insert an embedded google calendar. It is easiest to copy paste the embed code from <a href=\"http:\/\/www.google.com\/calendar\/\" target=\"_blank\">GoogleCalendar<\/a> rather than manually writing the template markup.<\/p>\n<h4>Parameters:<\/h4>\n<dl>\n<dt><strong>id<\/strong><\/dt>\n<dd>The id of a calendar usually an email address sort of thing. You can specify multiple id parameters. Example: gqq3gqfr4jvo79o1b3e2000fh8@group.calendar.google.com<\/dd>\n<dt><strong>color<\/strong><\/dt>\n<dd>The color of a calendar. You can specify multiple color parameters, one for each calendar id. Example: #ff0044<\/dd>\n<dt><strong>title<\/strong><\/dt>\n<dd>The title to display for the embeded calendar (Optional)<\/dd>\n<dt><strong>width<\/strong><\/dt>\n<dd>The integer width of the calendar in pixels. (Optional) Example: 325<\/dd>\n<dt><strong>height<\/strong><\/dt>\n<dd>The integer height of the calendar in pixels. (Optional) Example: 250<\/dd>\n<dt><strong>mode<\/strong><\/dt>\n<dd>The mode of the calendar &#8211; WEEK, MONTH, or AGENDA (Optional) Example: MONTH<\/dd>\n<dt><strong>show_nav<\/strong><\/dt>\n<dd>Show or hide the navigation buttons at the top of the calendar &#8211; 0 or 1 &#8211; default is 1 (Optional)<\/dd>\n<dt><strong>show_title<\/strong><\/dt>\n<dd>Show or hide the title at the top of the calendar &#8211; 0 or 1 &#8211; default is 1 (Optional)<\/dd>\n<dt><strong>show_date<\/strong><\/dt>\n<dd>Show or hide the date text at the top of the calendar &#8211; 0 or 1 &#8211; default is 1 (Optional)<\/dd>\n<dt><strong>show_tabs<\/strong><\/dt>\n<dd>Show or hide the tabs to week, month, or agenda views at the top of the calendar &#8211; 0 or 1 &#8211; default is 1 (Optional)<\/dd>\n<dt><strong>show_calendars<\/strong><\/dt>\n<dd>Show or hide the calendar list at the top of the calendar &#8211; 0 or 1 &#8211; default is 1 (Optional)<\/dd>\n<dt><strong>bg_color<\/strong><\/dt>\n<dd>Background Color &#8211; default is white #ffffff (Optional) Example #a3902d<\/dd>\n<dt><strong>week_start<\/strong><\/dt>\n<dd>Day of the week to start with &#8211; 1 (Sunday), 2 (Monday), or 7 (Saturday) default is 1 (Optional) Example: 2<\/dd>\n<dt><strong>time_zone<\/strong><\/dt>\n<dd>The time-zone to use default is empty (Optional) Example: America\/New_York<\/dd>\n<\/dl>\n<h4>Example Usage:<\/h4>\n<ul>\n<li>{{googlecalendar|title=My Calendar Title|bg_color=#FFFFFF|week_start=1|time_zone=America\/New_York|color=#528800|id=gqq3gqfr4jvo79o1b3e2000fh8@group.calendar.google.com|height=400}}<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Shortcodes are simple tags for creating dynamic text or embedding objects like is done in platforms such as WordPress. \u00a0Shortcode is adding using the following markup to text: \u00a0\u00a0\u00a0 {{template_name}} Additionally, optional named parameters can also be passed to shortcodes:&hellip; <a href=\"https:\/\/segueproject.org\/segue-documentation\/about-segue\/text-templates\/\" class=\"continue-reading\">More &rarr;<\/a><\/p>\n","protected":false},"author":29,"featured_media":0,"parent":469023,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-481328","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/segueproject.org\/segue-documentation\/wp-json\/wp\/v2\/pages\/481328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/segueproject.org\/segue-documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/segueproject.org\/segue-documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/segueproject.org\/segue-documentation\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/segueproject.org\/segue-documentation\/wp-json\/wp\/v2\/comments?post=481328"}],"version-history":[{"count":2,"href":"https:\/\/segueproject.org\/segue-documentation\/wp-json\/wp\/v2\/pages\/481328\/revisions"}],"predecessor-version":[{"id":200001472289,"href":"https:\/\/segueproject.org\/segue-documentation\/wp-json\/wp\/v2\/pages\/481328\/revisions\/200001472289"}],"up":[{"embeddable":true,"href":"https:\/\/segueproject.org\/segue-documentation\/wp-json\/wp\/v2\/pages\/469023"}],"wp:attachment":[{"href":"https:\/\/segueproject.org\/segue-documentation\/wp-json\/wp\/v2\/media?parent=481328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}