Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Tables version 3 pre-release

Quote Reply
Tables version 3 pre-release
 As I suspected, there came a time in some of my development where it would be needed to edit ALL keys with any name and multiple fields. This also includes foreign keys (when supported).

Here is version 2:
http://www.gossamer-threads.com/...orum.cgi?post=297850

Because I have been doing a lot of my development using GCommunity, I finished tables version 3 using that.



As you can see it displays all keys, all fields involved, and allows for multiple keys.



I had the program get rid of any options that are not functionable... (thanks jscript!)


I plan on translating this plugin for use with Links in the next few weeks, but since I finished this version for COMMUNITY, I figured I would post it now.

For those of you who are avid developers and who use community, try it out and let me know what you think... hopefully I will have the links version ready soon.

Good luck!

- Jonathan
Quote Reply
Re: [jdgamble] Tables version 3 pre-release In reply to
Okay, so I finished translating the version for links (it didn't take as long as I thought).

Let me know what you think, if you find any bugs, if you have any suggestions, comments, or questions, etc.

- Jonathan

Last edited by:

jdgamble: Oct 25, 2007, 7:17 PM
Quote Reply
Re: [jdgamble] Tables version 3 pre-release In reply to
Hi,

Looks wicked :)

Only suggestion I have (I've made this change to the copy I have), is to edit:

Code:
if ($file ne '.' && $file ne '..' && $file ne 'database.def') {

..to

Code:
if ($file ne '.' && $file ne '..' && $file ne 'database.def' && $file =~ /\.def/) {

Basically, the reason for this - is cos if you have other files (or folders) in your def's folder, it will try and read them as tables, which they arn't =)

Cool plugin though - thanks for sharing.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Tables version 3 pre-release In reply to
To neaten things up:

Code:
if (substr($file, -4) eq '.def' && $file ne 'database.def') {
Quote Reply
Re: [jdgamble] Tables version 3 pre-release In reply to
Hi,

I've attached the GForum version to this post for anyone who needs it :) (uses this latest version)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [jdgamble] Tables version 3 pre-release In reply to
Hi Jonathan,

I do not know if you always work on this plugin, but I have an error message :

A fatal error has occured:
Unable to drop: glinks_Links cannot be dropped as table still has references to it at /.../Plugins/Tables.pm line 204.
Please enable debugging in setup for more details.

You have an idea ?

Thanks, Mick
Quote Reply
Re: [MJ_] Tables version 3 pre-release In reply to
For which version? GForum, GLinks, or GCommunity?

- Jonathan
Quote Reply
Re: [jdgamble] Tables version 3 pre-release In reply to
Oops ! GLinks.

Mick
Quote Reply
Re: [MJ_] Tables version 3 pre-release In reply to
That's because "glinks_Links" is one of the main tables used in GLinks. The entire plugin works off of GLinks, and so it is hence needed for the plugin to work.

- Jonathan
Quote Reply
Re: [jdgamble] Tables version 3 pre-release In reply to
Thanks. Smile

Is the proposal of Andy corrected in the last file zip?

Thanks for your answer. Mick
Quote Reply
Tables 3.1 Release In reply to
  



So I finally updated the plugin. Fixes:

- The PM file can now work alone without Links, Community, or Forum (although the standard GT libraries are required)
- It may be necessary to rename the package, but all the code is the same in each version

You can load the plugin like so:

Code:
use Plugins::Tables;

my $tables = new Plugins::Tables(
def_path => "$CFG->{admin_root_path}/defs",
template_path => "$CFG->{admin_root_path}/templates/admin"
);
$tables->handle;

- The pm file is completely stripped out along with a few bug fixes.
- auto_increment fix
- editor_column_help fix
- definition fix - thx andy and wychwood
- the errors are now displayed at the top instead of a white screen when there is an SQL error
- the main menu is a drop down list for ease of use and simplicity
- the templates are now updated to match the SQL::Admin plugin look
- links to return to tables menu

So I hope you avid programmers enjoy this, let me know if there are any more errors, as I may have created new ones when I stripped the code

Voila,

- Jonathan
Quote Reply
Tables 3.2 Release In reply to
So, I went overboard and I believe am releasing the last version of this plugin.

Here are the features and fixes:

* no error if there is no column name when create
* match add key to template style
* frame issue with adv_create
* ability for create errors to display on that page
* error if there is no column type selected
* add keys on create
* allow create, edit, and modify to block options that are not available
* view foreign keys from other tables
* edit auto increment start number
* edit subclass relationship
* edit column trees
* add subclass of admin.pm for hidden variables
* edit tables footer... drop, list all
* do all column error checks

Note: If you have a problem in the community version of the plugin with the table "comm_users" here is the fix:
1.) Open tables plugin, click comm_users
2.) foreach table that begins with "app_" (your application keys) click on that table
3.) make sure "Form Type" is equal to "TEXT" and update that table






Again, I believe this should be everything you could possibly do with this plugin. I have covered every option in "def" files. If you see any bugs or have any suggestions for new features, please let me know.

Enjoy, let me know what you think,

- Jonathan
Quote Reply
Re: [jdgamble] Tables 3.2 Release In reply to
Oooh very cool - cool, will try and have a play with that at some point :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!