How do I turn off the "auto-comment-out" in Scripts?

For subjects not covered elsewhere

How do I turn off the "auto-comment-out" in Scripts?

Postby izrunas » Thu Mar 12, 2015 5:24 pm

When using the script editor, if I put a PHP code string into the script via the source code view, after I save it, the code is commented out with typical <!-- --> tags. How do I turn off this "feature"?
izrunas
 
Posts: 5
Joined: Tue Feb 17, 2015 11:32 pm

Re: How do I turn off the "auto-comment-out" in Scripts?

Postby fadmin » Thu Mar 12, 2015 5:30 pm

Hmm, that's a good one! I've never tried, but there is no user friendly way to do it and will no doubt require modifying the code of the editor.
Forum Administrator
OSDial
http://osdial.com
fadmin
Site Admin
 
Posts: 283
Joined: Fri Feb 12, 2010 7:27 am

Re: How do I turn off the "auto-comment-out" in Scripts?

Postby nscottbrown » Fri Mar 13, 2015 8:29 am

I'm having the same issue. If we can't embed php into the editor. How else can we get this functionality? Or how can we call a custom php script from a customized button?
nscottbrown
 
Posts: 17
Joined: Fri Mar 13, 2015 8:24 am

Re: How do I turn off the "auto-comment-out" in Scripts?

Postby fadmin » Fri Mar 13, 2015 9:12 am

With the editor not supporting php, and you obviously know php, maybe you should consider using your own custom web page which is called by one of the two buttons on the agent screen.
Forum Administrator
OSDial
http://osdial.com
fadmin
Site Admin
 
Posts: 283
Joined: Fri Feb 12, 2010 7:27 am

Re: How do I turn off the "auto-comment-out" in Scripts?

Postby izrunas » Mon Mar 16, 2015 8:38 pm

So here's what I know so far... TinyMCE is the editor used in the scripting area, but all of the methods listed across various forums fail to provide a working solution to the issue.

Inside tiny_mce_src.js is the directive in question... It's all about the "verify_html" area. While it seems easy enough to just void the verification system...While that would solve the issue, it would also deprive the site of all the "corrective" legit work that that verification process does. I see a mass of find/replace strings, but I have not yet deciphered which one is the one that turns
Code: Select all
<?php .....  ?>
into
Code: Select all
<!--?php  .....  ?-->

This really seems like something that needs to be solved. Being referred to the URL-link buttons is not really a solution--that's a work-around.

Once I find the solution, I will post it here. I really have to admit that it seems quite ludicrous to be stuck with a single editor which disallows any real code as a rule that is unable to be changed without recoding.

Anyone try switching out the wysiwyg editor in OSDial's Templates?
izrunas
 
Posts: 5
Joined: Tue Feb 17, 2015 11:32 pm

Re: How do I turn off the "auto-comment-out" in Scripts?

Postby izrunas » Tue Mar 17, 2015 8:32 am

Does anyone know if the TinyMCE editor has been customized in its code for its inclusion in OSDial? i.e., Is there any reason I should not "upgrade" the TinyMCE from the included v4.1.6 to the current v4.1.9?
izrunas
 
Posts: 5
Joined: Tue Feb 17, 2015 11:32 pm

Re: How do I turn off the "auto-comment-out" in Scripts?

Postby jerryriggin » Fri Jun 05, 2015 4:17 pm

As a work around, you can just update osdial scripts with the following two SQL statements:
Code: Select all
update osdial_scripts set script_text=REPLACE(script_text,'!--?php','?php');
update osdial_scripts set script_text=REPLACE(script_text,'?--','?');
jerryriggin
 
Posts: 4
Joined: Wed Jul 21, 2010 11:31 am

Re: How do I turn off the "auto-comment-out" in Scripts?

Postby amyjames » Fri Aug 07, 2015 3:21 am

I am also facing the similar issue and not get any type of solution yet. Let me try the solution provided by jerryriggin hope it will work.
amyjames
 
Posts: 1
Joined: Thu Aug 06, 2015 6:21 am
Location: United States


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron