Feng Forum

Other Topics => Feature requests => : soomon November 28, 2008, 03:27:44 AM

: make opengoo edit .php .css files etc
: soomon November 28, 2008, 03:27:44 AM
hey there,

currently opengoo doesn't seem to support editing of php files.
could you please add support for those files (which are text only) ?
.php , .css etc

thanks :>
: Re: make opengoo edit .php .css files etc
: cale250 November 29, 2008, 04:20:04 PM
There are ways to make this happen. I believe there are 3 files that do some of the handling for MIME types for the application, and they are:

mime_parser.class.php (in environment/classes/mail)
mime_types.class.php (same directory)
mime_types.txt (same)

However, these do e-mail by the appearance...

In the filemanager.js file (located in public/assets/javascript/og) there is a reference to

:
if (r.data.isModifiable) {
actions += String.format(
'<a class="list-action ico-edit" href="#" onclick="og.openLink(\'{0}\')" title="{1}" ' + actionStyle + '>' + lang('edit') + '</a>',
r.data.modifyUrl,lang('edit this document'));
}

Is there anybody that could enlighten us to where we can find where we need to edit to get the php files recognized?
: Re: make opengoo edit .php .css files etc
: ignacio November 29, 2008, 07:37:33 PM
You have to change file 'application/models/project_files/ProjectFile.class.php', function isModifiable (line 356) and function getModifyUrl (line 380).

In the first one you have to return true for PHP files and in the second one you have to return the url that opens the editor. In this case it should be the plain text editor, which is just a big textarea, or if you want to include some fancy source code editor then please share how you do it with the rest of the community.