glFusion Wiki

Site Tools


Auto tags

Auto tags provide a method to integrate various types of content together. For example, the Media Gallery plugin has several auto tags to allow you to easily integrate media items, slideshows, or other Media Gallery stuff into stories, static pages, etc. glFusion has several standard auto tags and each plugin generally provides one or more auto tags to allow their content to be used.

glFusion also has the ability to upload community developed auto tags, which can extend the site functionality.

With some creative use, there are some amazing things you can accomplish with auto tags and they are very easy to use.

Detailed Documentation

Custom Auto tags

Custom auto tag name
Description of the custom auto tag
Click to enable, unchecked is disabled
If checked, the PHP class {tag}.class.php will be called to expand the tag. The Replacement text will be ignored.
Auto tags take the form [tag:{p1} {p2}]. In the Replacement field you can use any valid HTML. You can include {p1} and/or {p2} parameters in your replacement string by using the replacement macros %1% and %2% respectively.
Auto tags are commonly used to create links. A Replacement field of <a href="">%2%</a> when combined with this tag: Tag: foo this is a link will result in the string <a href="">This is a link</a>
You may also use %0% to represent the entire string after the first colon, this is handy when you want to use only a single parameter, and the value will contain whitespace which would otherwise be interpreted as a delimiter between multiple parameters. The %site_url% and $site_admin_url% macros can also be used, and will be replaced by the base url and admin url respectively.


We will create a new auto tag called website that will allow user's to enter a link to their website in entry fields like the User About Me box, comments, forum posts, etc.

  1. Select Custom AutoTag from the main Auto tag Admin page
  2. Select Create New
  3. Enter website as the auto tag name
  4. Enter website:link link text as the description
  5. Check Enabled?
  6. Leave PHPfn? unchecked
  7. Enter <a href="%1%" target="_blank">%2%</a> in the Replacement Field
  8. Save it

We've just created a new auto tag called website. To use it, you would enter something link the following:

[website: glFusion Home]

The auto tag will create a link to with the link text being glFusion Home.

This is a simple and safe way to allow user's to enter a link to a website in comments, etc.

Using Autotags in Templates

You can now use any auto tag in the glFusion templates. To use an auto tag in a template, simply use this format:

{!!autotag slideshow:200901010123 width:50 !!}
2016/07/16 19:39
glfusion/siteadministration/autotags.txt · Last modified: 2017/01/18 06:40 (external edit)

Page Tools