Gossamer Forum
Quote Reply
New Plugin: Tables
I created this plugin for myself so that I would not have to use SQL::Creator everytime I wanted to mess around with creating and dropping tables for new programs. Since Links already has the edit part built in, I filled in the rest.

Let me know what you think.


(For some reason when you import the file, author and version name do not import correctly.) Let me know if you can fix that.

Thanks and Good Luck!

- Jonathan
Quote Reply
Re: [jdgamble] New Plugin: Tables In reply to
Your install tar filename MUST be the same as the plugin module ("tables.tar" needs to be "Tables.tar").

If it's not, two things happen:

1) the 'meta' info doesn't work
2) the plugin will NOT install.

After renaming the file, it will install okay. However, the Links::init() line in tables.cgi has your admin path hardcoded into it. It needs to be changed to:

Code:
Links::init();

so that your installer will correct it.

Should be okay after fixing that stuff.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] New Plugin: Tables In reply to
Yeah thanks. I didn't realize that it had to have the same name. I had copied the regular expression for Links::init() from another plugin so I assumed it worked. But I fixed both things now so let me know what you think.

Thanks,

- Jonathan
Quote Reply
Re: [jdgamble] New Plugin: Tables In reply to
The regular exprssion works, but it was expecting different input so it wouldn't match what was actually in tables.cgi.
Code:
/Links::init\('[^']+'\)/

should work, I think.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] New Plugin: Tables In reply to
Good call... also, you don't need the () around it... so :

Links::init\('[^']+'\), works fine. So once again, here is version 1.0.1 ; )

Hope this one works well!

- Jonathan

Last edited by:

jdgamble: Aug 5, 2006, 11:06 AM
Quote Reply
Re: [jdgamble] New Plugin: Tables In reply to
I realized I forgot to take in account the table prefix. This should fix that problem:



(Rough screen shot I know!)

Hope this helps,

- Jonathan
Quote Reply
Re: [jdgamble] New Plugin: Tables In reply to
Nice one and should save some time

I suggest giving the user the ability to sort the tables by name or size..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] New Plugin: Tables In reply to
Yeah, thats next on the todo list for it.

- Jonathan
Quote Reply
Re: [katabd] New Plugin: Tables In reply to
Well, I've updated the plugin, as requested, with a record sort. I have put all of the html code into templates, and I moved the main source code to the pm file. So, its better organized, with one new feature.

As soon as I get time, I plan on adding a simple key editor to edit your primary and foreign keys. I also am going to add the ability to edit the ai (auto increment) in the tables. These are simple features that any person with a custom db could have use for. I anyone can think of anything else to make our lives easier (related to this plugin of course), I just might add new functionality; so let me know.

Since Links 3.2, you might have to edit the tables_createtable.html (in the admin directory) to allow the creation of ALL the types of fields. I will update this when I add the key editor. This software is FREE. Here are some screenshots:



See you when I add the new features,

- Jonathan