BraDyCMS

BraDypUS CMS

View the Project on GitHub jbogdani/BraDyCMS

Customtags

BraDyCMS has a built-in support for a number of customtags, i.e., a fast way of adding dynamic content, snippets, external addons, etc., in template files or inside article’s content.

All custom tags have a name, may have content and may none, one or more have attributes. All custom tags should be enclosed in double square brackets and should always be closed. This way you should always have an opening tag, e.g.: [[mycustomtag]] and a closing tag, e.g.: [[/mycustomtag]]. In between you may have some content.

You can also have none, one or more parameters. Parameters should be inserted in the opening tag, e.g.: [[mycustomtag param1=”param1 value” param2=”param2 value” etc…]]

For example the following examples are all valid:

You can build your own custom tags by building a new plugin


Docs


addThis(‘only_js’)

Adds the necessary HTML and javascript code to display an AddThis share widget

Minimal example: [[addThis]][[/addThis]]

Complete example: [[addThis only_js=”true”]]Share +[[/addThis]]


cl_gallery(‘class’)

Displays imageless galleries, for conditional image loading. This custom tags should be used together with the provided jquery.cl_gallery.js javascript plugin

Minimal example: [[cl_gallery]]gallery_name[[/cl_gallery]]

Complete example: [[cl_gallery class=”horizontal small” rel=”gallery-one”]]gallery_name[[/cl_gallery]]


download(‘class’,’limit’,’getObject’,’getList’)

Displays table with file download node data and links or array with files download data

Minimal example: [[download]]node_name[[/download]]

Complete example: [[download class=”table table-striped”]]node_name[[/download]]


dwnl(‘file’,’title’, ‘rel’, ‘class’)

Returns valid html with link to download file, if file is available, with file download count

Minimal example: [[dwnl file=”pdf_file.pdf”]]Download now PDF version (total downloads: {tot})[[/dwnl]]

Complete example: [[dwnl file=”pdf_file.pdf” title=”Download PDF version” rel=”PDF” class=”download_link”]]Download now PDF version (total downloads: {tot})[[/dwnl]]


fb_comments(content)

Adds the necessary HTML and javascript code to display Facebook’s comments widget. For a list of all the available options check this link: https://developers.facebook.com/docs/reference/plugins/comments

Minimal example: [[fb_comments]][[/fb_comments]]


fb_follow(content)

Adds the necessary HTML and javascript code to display Facebook’s follow widget. For a list of all the available options check this link: https://developers.facebook.com/docs/reference/plugins/follow

Minimal example: [[fb_follow]]http://facebook.com/rest_of_the_url_to_follow[[/fb_follow]]


fb_like(content)

Adds the necessary HTML and javascript code to display Facebook’s Like widget. For a list of all the available options check this link: https://developers.facebook.com/docs/reference/plugins/like

Minimal example: [[fb_like]][[/fb_like]]


fb_like_box(data)

Adds the necessary HTML and javascript code to display Facebook’s Like-box widget. For a list of all the available options check this link: https://developers.facebook.com/docs/reference/plugins/like-box

Minimal example: [[fb_like_box]]https://www.facebook.com/BraDypUS.net[[/fb_like_box]]


fb_send(‘width’,’num_posts’,’colorscheme’)

Adds the necessary HTML and javascript code to display Facebook’s Send widget. For a list of all the available options check this link: https://developers.facebook.com/docs/reference/plugins/send

Minimal example: [[fb_send]][[/fb_send]]


fig(‘path’,’width’,’align’,’fancybox’,’href’,’href_class’,’gal’)

Adds complete HTML code to display figures and captions easily. This custom tag, differently from the [[figure]] custom tag permits the use of rich html text in captions

Minimal example:

[[fig path="image_url"]][[/fig]]

Outputs

<figure>
  <div class="image">
    <img src="image_url">
  </div>
</figure>

Complete example:

[[fig path="image_url" width="300px" align="left" href="http://bradypus.net" href_class="bordered" gal="first_gallery"]]image_caption[[/figure]]

Outputs

<figure class="figure">
  <div class="image">
    <a href="http://bradypus.net" rel="first_gallery" data-fancybox="first_gallery"
        class="fancybox bordered" data-fancybox-type="iframe"
        title="image_caption" data-caption="image_caption">
      <img src="image_url">
    </a>
  </div>
  <figcaption class="caption">image_caption</figcaption>
</figure>

flash(‘width’,’height’,’other’)

Adds HTML code to include a FLW file

Minimal example: [[flash]]./sites/default/images/flash/test.flw[[/flash]]

Complete example: [[flash width=”400” height=”300” autoplay=”true”]]./sites/default/images/flash/test.flw[[/flash]]


gallery(‘class’, ‘thumb_dim’, ‘rel’)

Displays an existing image gallery

Minimal example: [[gallery]]gallery_name[[/gallery]]

Complete example: [[gallery class=”horizontal small” rel=”gallery_one” thumb_dim=”200x200”]]gallery_name[[/gallery]]


gplus_plusone(‘href’,’href’,’annotation’, ‘width’, ‘align’, ‘expandTo’, ‘callback’, ‘onstartinteraction’, ‘onendinteraction’, ‘recommendations’, ‘count’)

Adds the necessary HTML and javascript code to display GooglePlus’ +1 widget. For a list of all the available options check this link: https://developers.google.com/+/web/+1button/

Minimal example: [[gplus_plusone]][[/gplus_plusone]]


gcalendar(‘class’)

Outputs well formatted html string that embeds a google calendar

Minimal example: [[gcalendar]]somecalendar@group.calendar.google.com[[/gcalendar]]


gplus_plusone(‘href’,’href’,’annotation’, ‘width’, ‘align’, ‘expandTo’, ‘callback’, ‘onstartinteraction’, ‘onendinteraction’, ‘recommendations’, ‘count’)

Adds the necessary HTML and javascript code to display GooglePlus’ +1 widget. For a list of all the available options check this link: https://developers.google.com/+/web/+1button/

Minimal example: [[gplus_plusone]][[/gplus_plusone]]


link(‘art’,’title’,’rel’,’class’,’id’)

Adds an internal link to an article

Minimal example: [[link art=”contacts”]]Contact us[[/link]]

Complete example: [[link art=”contacts” title=”Contact us” rel=”help” class=”primary-link” id=”contact”]]Contact us[[/link]]


map(‘width’,’height’)

Shows a user map in article content

Minimal example: [[map]]where_we_are[[/map]]

Complete example: [[map width=”300px” height=”200px”]]where_we_are[[/map]]


twitt_share(‘data’)

Adds the necessary HTML and javascript code to show a Twitter share button

Minimal example: [[twitt_share]][[/twitt_share]]

Complete Example [[twitt_share via=”TheBraDypUS” text=”BraDypUS rocks!” hashtags=”bradycms” lang=”en”]]http://bradypus.net[[/twitt_share]]


twitter(‘twitter_username’,’id’)

Adds the necessary HTML and javascript code to show a Twitter widget

Minimal example: [[twitter user=”twitter_username” id=”twitter_widget_id”]]Some intro text[[/twitter]]


userform(‘inline’)

Shows a user form in article content

Minimal example: [[userform]]contact[[/userform]]

Complete example: [[userform inline=”true”]]contact[[/userform]]


vimeo(‘width’,’height’)

Adds necessary HTML code to embed a Vimeo video

Minimal example: [[vimeo]]vimeo_id[[/vimeo]]

Complete example: [[vimeo width=”560” height=”315”]]vimeo_id[[/vimeo]]


youtube(‘width’,’height’,’ratio’, ‘align’, ‘class’, ‘time’)

Adds necessary HTML code to embed a Youtube video

Minimal example: [[youtube]]youtube_id[[/youtube]]

Complete example: [[youtube width=”560” height=”315”]]you_tube_id[[/youtube]] or [[youtube ratio=”4by3”]]you_tube_id[[/youtube]] or [[youtube width=”560” height=”315” align=”center” class=”myTube” start=”100”]]you_tube_id[[/youtube]]