Jump to content
MakeWebGames

Module editor by kyle


Recommended Posts

Hello MWG,

I just uploaded a new module to the market place and figured I would showcase it a little for once it gets approved.

This is a file editor for your ACP and uses Ace Editor to modify your files. It acts similar to most of your IDEs in regards to some keyboard shortcuts like saving, find/replace, etc and also has a little helper by pressing Ctrl+h or cmd+h.

I also tried to make it so you don't accidentally lose any unsaved changes by navigating away since your last save and I also added some screenshots fo you to take a look

Code View

129749686_ScreenShot2021-05-08at8_53_48AM.thumb.png.80960730b6844fd69124b4b32fb4d595.png

 

Navigating away with a dirty editor

561547607_ScreenShot2021-05-08at8_54_32AM.thumb.png.a51959806e9aedc66f8e3c88e3d9b73e.png

File Saved

1698941355_ScreenShot2021-05-08at8_55_19AM.thumb.png.22fc14174935ba3986b255ad5c849b4b.png

Help Prompt

715663244_ScreenShot2021-05-08at8_55_41AM.thumb.png.4fe20b6cf8145b83ef4a3cedb53995f1.png

Syntax Error

283539002_ScreenShot2021-05-08at10_04_49AM.thumb.png.dacb7f899cf61fa2aec77e22b61b0fbf.png

Just showing that it supports other file types

Screen Shot 2021-05-08 at 8.54.46 AM.png

 

Edited by KyleMassacre
  • Like 6
Link to comment
Share on other sites

On 5/8/2021 at 3:52 PM, KyleMassacre said:

Hello MWG,

I just uploaded a new module to the market place and figured I would showcase it a little for once it gets approved.

This is a file editor for your ACP and uses Ace Editor to modify your files. It acts similar to most of your IDEs in regards to some keyboard shortcuts like saving, find/replace, etc and also has a little helper by pressing Ctrl+h or cmd+h.

I also tried to make it so you don't accidentally lose any unsaved changes by navigating away since your last save and I also added some screenshots fo you to take a look

Code View

129749686_ScreenShot2021-05-08at8_53_48AM.thumb.png.80960730b6844fd69124b4b32fb4d595.png

 

Navigating away with a dirty editor

561547607_ScreenShot2021-05-08at8_54_32AM.thumb.png.a51959806e9aedc66f8e3c88e3d9b73e.png

File Saved

1698941355_ScreenShot2021-05-08at8_55_19AM.thumb.png.22fc14174935ba3986b255ad5c849b4b.png

Help Prompt

715663244_ScreenShot2021-05-08at8_55_41AM.thumb.png.4fe20b6cf8145b83ef4a3cedb53995f1.png

Syntax Error

283539002_ScreenShot2021-05-08at10_04_49AM.thumb.png.dacb7f899cf61fa2aec77e22b61b0fbf.png

Just showing that it supports other file types

Screen Shot 2021-05-08 at 8.54.46 AM.png

 

Was waiting for @KyleMassacre to add file editor. I knew he was. Far better looking then what I seen coming though.

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, KyleMassacre said:

You were actually one of the main reasons I created this lol. I know you program a lot (if not 100%) on your phone

You don't release no slop, it's all in or nothing. Kinda like me. So I kind of foreseen an editor coming.

  • Like 1
Link to comment
Share on other sites

15 minutes ago, Canjucks said:

Does it come with any added security?

What do you mean by security? Since this is editing real php files it’s only as safe as the person editing the file can be. This does not interact with a database whatsoever so you wouldn’t have any db vulnerabilities if that is what you are asking. 

Link to comment
Share on other sites

  • 4 months later...
10 hours ago, Sim said:

 

Clicking any of the directories does not have any effect. Does not open up listted filled which I am assuming it should be doing next.

@KyleMassacre can't find thread so started own.

Screenshot_20210917-143225.thumb.png.51324e5947c678189b4dd5de06626779.png

Hmm interesting. I can't tell what could be wrong other than the javascript not loading properly since the editor isnt even styling up. Without any logs its tough to figure out

Link to comment
Share on other sites

Iv'e found a fix for this there is nothing wrong with the JS files its the 

public function loadScripts()
    {
        $jsFiles = [
		
            '/modules/installed/moduleEditor/ace/ace.js',
            '/modules/installed/moduleEditor/ace/ext-modelist.js',
            '/modules/installed/moduleEditor/ace/ext-language_tools.js',
        ];
        $scripts = '';
        foreach ($jsFiles as $jsFile) {
            $scripts .= "<script src='{$jsFile}'></script>\n\r";
        }

        $this->html .= $this->page->buildElement('jsFiles', ['scripts' => $scripts]);
    }

lines 53 - 55

 

            '/modules/installed/moduleEditor/ace/ace.js',
            '/modules/installed/moduleEditor/ace/ext-modelist.js',
            '/modules/installed/moduleEditor/ace/ext-language_tools.js',

 

I had to put my folder name before the first '/

 

so mine looks like this now and that seems to fix the issue

 

            '/gangster/modules/installed/moduleEditor/ace/ace.js',
            '/gangster/modules/installed/moduleEditor/ace/ext-modelist.js',
            '/gangster/modules/installed/moduleEditor/ace/ext-language_tools.js',

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...