Plugin Idea - simple tweaks

  • PLUGIN IDEA

    We seem to get this a fair bit, where someone new to the platform is playing around, and wanting to do one small modification.  More often than not it's a single line of code as was the case here:
     

    elgg_unextend_view('profile/status''thewire/profile_status');

    The other common use cases are css/js editing.  What if we just had a simple tweaks plugin where you could paste these short code blocks in a textarea in the plugin settings and have them evaluated in the plugin init?

    A textarea for custom global css rules, a textarea for custom global js, and a textarea for php to run on system init

    It's a really simple plugin to create and would take most of the pain away from these scenarios where people resort to hacking core because they don't know how to build a plugin for the one line.  I could see that being something bundled... thoughts?

  • Evan Winslow
    •  
    •  
    •  
    •  

     

    By Evan Winslow 7 hours ago

    "Move to new topic" feature seems broken right now, so I'll bite here.

    I'm hopeful that 2.0 makes such a plugin much less needful. Instead of editing a textarea you go in and just edit start.php. But perhaps for basic css tweaks, such a thing could still be useful.

  • I manually moved this to a new topic

     

    I'm not a fan of the directly editing start.php idea, it ends up being the same as hacking core or a plugin you don't own - when you go to upgrade you have a technical debt of changes that will be overwritten.  My thinking was that the customizations would either be stored in the database or written to a file in dataroot that gets included during system init.  That way it's not actually affecting the plugin, can move with the site/backups, but still have a clear upgrade path for such a plugin.

  • I'm not a fan of the directly editing start.php idea, it ends up being the same as hacking core or a plugin you don't own - when you go to upgrade you have a technical debt of changes that will be overwritten. 

    This is not the case in 2.0. In 2.0 the root start.php does not get overwritten on upgrade. You own it. Perhaps it wasn't clear that's what I meant.

  • oh I see, yeah I wasn't following you on that - thought you were referring to making plugin files writeable like wordpress or something