This topic is locked
[SOLVED]

 Custom button

7/24/2012 3:28:54 PM
PHPRunner General questions
C
charlesfolder author

Please I need some help.
I have two days trying to hide an inserted button
I tried in before display event

with this code
$xt->assign("NewButton1",false);

but it does'nt work.
can somebody help me with this please.

Sergey Kornilov admin 7/25/2012

It doesn't work this way.
You need to switch to HTML mode in Visual Editor and surround button's code with BEGIN/END tags. Here is an example:

{BEGIN mybutton}

<SPAN class=runner-btnframe><SPAN class=runner-btnleft></SPAN><SPAN class=runner-btnright></SPAN><A id=New_Button class=runner-button href="#" typeid="ib">New_Button</A></SPAN>

{END mybutton}


Now in BeforeDisplay event you can use the following:

$xt->assign("mybutton",false);
C
charlesfolder author 7/25/2012



It doesn't work this way.
You need to switch to HTML mode in Visual Editor and surround button's code with BEGIN/END tags. Here is an example:

{BEGIN mybutton}

<SPAN class=runner-btnframe><SPAN class=runner-btnleft></SPAN><SPAN class=runner-btnright></SPAN><A id=New_Button class=runner-button href="#" typeid="ib">New_Button</A></SPAN>

{END mybutton}


Now in BeforeDisplay event you can use the following:

$xt->assign("mybutton",false);


C
charlesfolder author 7/25/2012

Thank you Sergey, I really appreciate your help.

I tried you suggestion and it work like a charm.
Thank you, thank you very much.