Categories > Your tips & tricks >

Change markers [] into {} or else - (updated)

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Skrol29
Date: 2005-04-18
Time: 01:25

Change markers [] into {} or else - (updated)

There is an undocumented feature that enables you to change the TBS tag markers.

Field and block markers have been set to '[' and ']' only for optimisation consideration. '{' and '}' are common in Javascript code and Style definitions, but '[' and ']' are more rare.

For TBS versions >= 2.02
----------------------------
Tag markers can have one or several characters. They can be forced when creating a new TBS instance.
Example #1:
  $TBS = new clsTinyButStrong('{,}');
Example #2:
  $TBS = new clsTinyButStrong('{{,}}');

For TBS versions >= 2.0 and 2.01
-------------------------------------
Tag markers can have only one character. They can be forced when creating a new TBS instance.
Example:
  $TBS = new clsTinyButStrong('{}');

For TBS versions = 1.xx
--------------------------
Tag markers can have only one character. They can be forced using global variables just after insterting the TBS class.
Example:
  include_once('tbs_class.php') ;
  $tbs_ChrOpen = '{' ;
  $tbs_ChrClose = '}' ;

By: DJMoran
Date: 2009-02-19
Time: 20:22

Re: Change markers [] into {} or else - (updated)

alternatively you can change the markers in the class file so that you don't have to add an extra line of code to every file which uses the template system

This is around line 478 in the php5 class file