Author Topic: make opengoo edit .php .css files etc  (Read 2303 times)

soomon

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
    • Email
make opengoo edit .php .css files etc
« on: 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 :>

cale250

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: make opengoo edit .php .css files etc
« Reply #1 on: 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

Code: [Select]
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?

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: make opengoo edit .php .css files etc
« Reply #2 on: 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.