Author Topic: How to create a new style  (Read 16804 times)

0 Members and 2 Guests are viewing this topic.

Inspirer

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 262
    • Mibew Messenger
How to create a new style
« on: June 13, 2010, 09:10:22 AM »
Template language

It is an extremely simple one. If you are familiar with php take a look at libs/expand.php (120 lines of code). It consists of:

A number of predefined variables:
${webimroot}, ${jsver}, ${tplroot}, ${styleid}, ${pagination}, ${errors}

Access to localized messages:
${msg:<idofstring>}, example ${msg:typing.remote}

Access to variables passed to the page from the PHP code:
${page:<idofvar>}, example: ${page:predefinedAnswers}

Access to form variables (to have proper initial values):
<input .... value="${form:email}"/>

Include other .tpl file:
${include:chat.tpl}

Conditional clauses:
${if:varname}  ${endif:varname}
${ifnot:varname}  ${endif:varname}
${if:varname} ${else:varname}  ${endif:varname}

(available variables: user, agent, historyParams, canChangeName, canpost, sslLink, neediframesrc, errors)

Editing/testing .tpl

Use "Settings -> Themes preview" page to check your templates in test environment.
« Last Edit: June 13, 2010, 09:15:31 AM by Inspirer »

Korund

  • Jr. Member
  • **
  • Posts: 1
Re: How to create a new style
« Reply #1 on: September 07, 2010, 05:45:36 PM »
Hi!
Excuse me, may be this theme offtop. But, I must know.
I  create "new style" for chat. Where send my job for publication. ???

logos010

  • Jr. Member
  • **
  • Posts: 3
Re: How to create a new style
« Reply #2 on: August 02, 2011, 12:24:00 AM »
helpfull information, thanks

doc123

  • Jr. Member
  • **
  • Posts: 3
Re: How to create a new style
« Reply #3 on: August 03, 2012, 01:40:08 PM »
Hi Friends,

From where I find out new styles if anybody has something kindly provide me. We started mibew for our remote dba support site. It is really superb and working fine. I am also looking for buttons. If any one has idea of new buttons (online,offline blinking) then kindly guide me.