Yes it is possible. My concerns are grave and many.
I feel like an ex-smoker telling a smoker to quit. I used to use/develop a plugin that did exactly what you want. But I’ve quit supporting it.
Don’t allow users other than the SuperAdmin to edit files – especially on a live multisite. In my install in school, I don’t even allow the SuperAdmin to edit files, and I’m the SuperAdmin. I get nervous about the very existence of theme-editor.php in the wp-admin folder in the first place.
- Userthemes Revisited plugin for WPMU could do that. But was primarily intended for faculty to edit themes. It has not been updated for WP3 multisite. I no longer have a download link for the version that worked with WPMU2.9.2.
- How are you going to stop editors from using something like a php unlink command on the entire file structure?
- And thats just the files, the database is global so anything can be inserted/deleted by an enterprising theme-editor as well.
- The php the editor allows to be inserted into theme files is unfiltered. I know of no php filter. CSS filters yes, PHP filters none.
- Have you ever tried to trouble shoot the cause of a php/apache core dump? It is frightening to see a server hard drive swell with core dumps to the crack of doom. Not so much fun figuring out how(who) to make them stop.
- There are many reasons the theme editor has been disabled, your proposed use is one of the biggest reasons I would not enable the theme editor.
Ok, having said that, an alterative is to install a WAMP/MAMP/LAMP in a student account of a local workstation(use Deep Freeze or some other deployable lab solution to lock/rebuild the file dirs after logout). Install a single wp3 there(or a multisite as a theme-editor may as well be a SuperAdmin anyway). Let them tinker with theme building/editing to their hearts content: theme editor, text editor, whatever. Then have students submit completed themes to the SuperAdmin so you can inspect the code for nasty bits and test them on your own localhost install, all before uploading them to a live site.
Sorry, but I’m a teacher myself and I just can’t encourage you allow php file editing on a shared live server-type machine. I’d be an uptight Dad, if some Johnny Fairplay deleted my son’s weekend/term/year project/portfolio/blog, or whatever else is installed on the machine.
This is the best advice ever.
I gotta say, someone asked this in another thread, they did get an answer how, and I should’ve given them all the reasons not to.
Will bookmark this post & use as a reference. (Thanks, D.)
Thread Starter
jalien
(@jalien)
Thanks to both of you. I actually found a copy of Userthemes Revisited for 2.9.2 in pastebin and a method for making it work with 3.0 before posting, but still wondered if there was a safe way to do this. I think I’ll try using Portable Apps XAMPP with an individual install of WordPress, that way I can customize it, then simply give each student a copy the whole setup to add to their usb drive. Then I’ll see if I can get it working with MAMP (saw someone did a neat job getting it working cross platform with Windows and Mac (Windows Portable Apps should work with Linux using Wine, so this could work on all three platforms).