[wp-hackers] Modifying admin forms via plugins

Chuck Guenther chuckg at blindmuse.com
Wed Jun 23 04:37:07 UTC 2004


Alex King wrote:
> It's a lot more friendly to the users if they only have one file to 
> deal with.
> 
> --Alex

Hi guys, I've been following this conversation about plugin interface
since the time it started.  That isn't to say I understand it fully, but
it seems there's some strained discussion over the correct method of
"plugin admin interfaces".  It stands to reason, at least my own reason,
that there are two arguments out there which both have their advantages
and disadvantages.

1. Single file plugins for the purpose of usability on the user end.
When a mod wishes to add admin UI for that plugin, he/she might simply
use some (as of yet) unspecified variable and set it to true and check
on the status of said variable with if's and what have you.  

2. The multiple file method.  When the user asks for some plugin UI a
selected interface of included files can be called.  

Now unless I've missed my mark altogether, the two methods are nearly
exactly the same.  Using the multi-file/folder method, the UI is still
constrained within some if/elses, but the code becomes less cluttered as
it can distributed throughout the files.  Where then lies the problem?

The point of making as easy to a user as possible was mentioned, but I
don't see how having a user unzip a directory and one file is any more
difficult than downloading one file and inserting it in the correct
directory; if they setup wordpress I'm sure they can follow some simple
steps.

What it comes down to plugin authors having easily accessible optoins
for their plugins.  There are two obvious answers, database and
flat-file.  In my opinion, the simplest and most easily accessible to
plugin authors is allowing them a small table within the database that
can accessed through functions built into Wordpress; it's would seem a
simple modification of the current structure WP uses to store it's own
options or have I completely missed the mark?  The problem with this is
that it then REQUIRES the plugin author to build a UI for the user to
set the options of said plugin.  But wouldn't it be easier still to add
a little more functionality to WP that simply checked the plugin file
for "available" options under a standard format? Couldn't a class be
made called "plugins" which had an array that had all available options
and default variables? For example ... (this assumes some said class)

$plugins = new plugins;
$plugins->options(	array("name", "default_value"),
			array("name", "default_value"),
			array("name", "default_value"));

Now when the "plugin UI" is called it would be presented in a standard
WP format as read/created by the plugins class.  To me, as a burgeoning
young programmer makes the most sense, or some method as yet devised
using said idea.  

Oh, hi this is my first post. What a tangent. :|

chuckg

--------------------------
I am who I am not who I thought I am
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : /pipermail/hackers_wordpress.org/attachments/20040622/6a3ecce7/attachment.bin


More information about the hackers mailing list