Contributions > Plugins, tips, and tricks

How to create a new style

(1/2) > >>

Inspirer:
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.

Korund:
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:
helpfull information, thanks

doc123:
Hi Friends,

From where I find out new styles if anybody has something kindly provide me. We started mibew for our dbametrix 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.

sushi:
Hello,

I add a PHP variable in source and i need to display this content in the template.

I try ${page:my_var} but it's doesn't work!

I hope you will be able to help me!

Sorry for my bad english i'm not english.

Regards,

sushis

Navigation

[0] Message Index

[#] Next page

Go to full version