Roundcube Community Forum

 

inserting new variable in a skin

Started by flash, August 09, 2006, 12:18:02 PM

Previous topic - Next topic

bpat1434

Quoteas you can see, the first thing it does is convert the command name to lower case. so it is only the command in the code in main.inc that is used for the test needs to be lower case. and your code has that (variable in this case).
You and I were talking about two different things. You were saying in main.inc while I was speaking of inside the template files. So to clear this up...

Inside of main.inc the command MUST be lowercased in the switch statement. Inside of the template files you can use any case you choose and the command will be fired, as long as it's spelled correctly ;)
 
 

tuney

Is there a way to add php into a template ?

bpat1434

No. Each template is parsed in PHP but only for
 
 

davido

Quote from: flash Here is the first section of the routine from main.inc:

function rcube_xml_command($command, $str_attrib, $add_attrib=array())
 {
 global $IMAP, $CONFIG, $OUTPUT;
 $command = strtolower($command);
.... continues

as you can see, the first thing it does is convert the command name to lower case. so it is only the command in the code in main.inc that is used for the test needs to be lower case. and your code has that (variable in this case).

sorry for the confusion. I remembered when I was testing that something had to be lower case, I just got confused as to what it was. sorry :-[

The new RC2 has no function rcube_xml_command($command, $str_attrib, $add_attrib=array()). So how can you do it on the new RC2. What i want is to add a new menu on the task bar.

i have added $MAIN_TASKS = array('mail','sometest','settings','addressbook','logout');

Some test displays with out an icon.

How can i add menu to the task bar.

Thanks

bpat1434

It's in program/includes/rcmail_template.inc on line 440. That's the same function except it's in a class instead of procedural style code.