[wp-hackers] Feature request: Simplify tables

Benjamin Hawkes-Lewis bhawkeslewis at googlemail.com
Mon May 7 09:51:33 GMT 2007


Something like:

http://accessify.com/tools-and-wizards/accessibility-tools/table-builder/

might also be worth considering.

--
Benjamin Hawkes-Lewis

Computer Guru wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Chetan Kunte wrote:
>> Hi all -
>>
>> WordPress has a great toolset for creating content (both WYSIWYG and
>> mark-up type). The only thing I see missing is a decent way of
>> creating tables within the content story.
>>
>> Right now, the only way you can create tables is by typing out a
>> painful table markup. I love the way Textpattern (via Textile) allows
>> you to create tables (just by using pipes "|") as separators between
>> table contents.
>>
>> Since WordPress already uses some sort of text conversion to generate
>> compliant markup for many things like endash, emdash, etc, is it
>> possible to include this table thing too? This would mean a lot more
>> to academic types, product/service reviewers, people who love to
>> create simple elegant comparison tables, people writing reports, etc.
>>
>> Apologize in advance, if I am posting it in the wrong place. Thanks,
> 
> This would be the right place, welcome to WP-Hackers :)
> 
> I've never created tables in Textpattern, do you care to elaborate on
> how it would work there?
> 
> I don't see how WP's table-creation stuff is difficult, it's standard
> SQL like most other systems, though I'm not averse to making it easier
> if that's possible....
> 
> 
> ///////////////////SAMPLE CODE/////////////////////////
> 
> $sql = "CREATE TABLE `$table_name` (
> `id` int(11) NOT NULL AUTO_INCREMENT,
> `transaction_id` int(11) NOT NULL,
> `first_name` varchar(255) NOT NULL,
> `last_name` varchar(255) NOT NULL,
> `email` varchar(255) NOT NULL,
> `uri` varchar(255) DEFAULT NULL,
> `amount` double NOT NULL,
> `currency` varchar(255) NOT NULL,
> `dot` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
> PRIMARY KEY (`id`)
> );";
> 
> ///////////////////////////////////////////////////////
> 
> I don't see how you can make that any easier yet retain the control that
> you have here.
> 
> How can I specify the table name and the type without writing all out?
> What about primary keys? Foreign Keys? Null/Not Null?
> 
> Though the code may be unsightly, it's pretty straight-forward with
> regards to writing it... no?
> 
> 
> - --
> Computer Guru
> NeoSmart Technologies
> http://neosmart.net/blog/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> 
> iD8DBQFGPuaa3SICh4XKUt0RAl0FAKC7LRDLNgl12heZT7g3MgmOEMM75ACgzphd
> B49HAjzLDe7D0b56ZbJ3FIM=
> =nov0
> -----END PGP SIGNATURE-----
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 



More information about the wp-hackers mailing list