Menu

Search

InstantASP Support

Help & Support


Managing IFCode


IFCode

IFCodes provides a customizable optional syntax / mark-up to format messages posted within InstantForum. This is similar to mark dowm and can be used if you wish to disabled the default WYSIWYG editor.

A number of built-in IFCodes are provided out-the-box; these include tags to bold text, centre text, quote text, create hyperlinks or embed external content - for example YouTube videos.

A number of IFCodes are required by default and should not be removed. When editing IFCode you will notice you cannot delete some tags, these tags are required by the forum. If you don't wish to display the required tags please use the options when editing the IFCode to hide the tag from appearing within the IFCode menu.

Managing IFCodes

To manage the various IFCode tags you'll need to visit the InstantForum Admin CP and go to, IFCode » Manage IFCode, this will present a screen as shown below...

Creating an IFCode tag

To create new IFCode tags go to, IFCode » Manage IFCode and click the Add IFCode option as highlighted above.

Editing an IFCode tag

To edit an existing IFCode tags go to, IFCode » Manage IFCode and click the Edit Tag button next to the tag you wish to edit.

Deleting an IFCode tag

To delete an existing IFCode tags go to, IFCode » Manage IFCode and click the Delete button next to the tag you wish to remove. The delete button may be disabled for some tags; these tags are required by the forum and cannot be removed. If you don't wish to display the required tags please use the options when editing the tag to hide tag from appearing within any IFCode selection.

Creating & Editing an IFCode tag

Tags MUST be wrapped within square brackets i.e. [tag][/tag] is valid whilst {tag}{/tag} will not work. You can add any number of attributes to a [tag] for example [tag attribute=value][/tag] is valid. You will need to accommodate for attributes within the regex replace pattern. If you wanted to search for [size=][/size] within text you would use a regex search pattern of \[size=([^>]*?)\](.*)\[\/size\]. Note the parentheses within the search pattern, any match within the parentheses can be replaced by corresponding $1, $2 etc within your replace pattern. Tags are NOT case-sensitive.

The options below are available when creating or editing an IFCode tag within the forum.
  • Friendly Name
    Used to identity this tag within the IFCode dialog window.

  • Tag Example
    Provide an example of how this tag would be used. For example [center]centered text[/center]. Used to demonstrate usage within the IFCode dialog window.

  • Actual code to insert
    Provide the code that will be added to the document when the user selects this IFCode. For example [center][/center].

  • Display in WYSIWYG editor:
    Tick to show this IFCode tag within the IFCode menu shown within the InstantForum Editor...



  • Nested Tag
    Tick to indicate this is a nested tag. Nesting is useful for container tags such as quotes, div or span tags, typically tags that may appear within themselves.

  • Max Nested Replacements
    Maximum number of nested replacements to perform for this tag. Typically 5-20 replacements is sufficient. This can effect overall performance if set to a very high number.

  • Search Pattern
    Use regular expressions to define a search pattern for your IFCode tag. You should use parentheses to indicate the back references to be replaced.

  • Replace Pattern
    Enter the regular expression replace pattern. You can use $1, $2, $3, etc. to replace the back references. (Text matched by the part in the regex between the first, second, third, etc. pair of parentheses)

Optionally provide private feedback to help us improve this article...

Thank you for your feedback!


Comments require login or registration.

Details

Product: InstantForum
Version: All Versions
Type: INFO
Level: Novice
Article not rated yet.
Article has been viewed 3.6K times.
Last Modified: 3 Years Ago
Last Modified By: Ryan Healey

Options