Extension talk:TableEdit

The extension looks great, I am looking foward to testing it. --Gundestrup 14:35, 7 April 2007 (UTC)

Rational for off page data
I was just wondering what the rational was for storing data off page. In a case like this it would seem that data entered would not be accessible to the standard wiki search. Is this true? --Dtsig 02:59, 21 April 2007 (UTC)
 * the text gets stored in the wiki as if it was a regular table. There are two reasons for storing it in the external database.  The first has to do with asynchronous data mining of the table content. The idea is that middleware can be written to work on the external db without interfering with the wiki's db or having to go through the MW interfaces.  I'm working on that kind of middleware right now, but it's in Perl, not PHP.  The second is laziness/lack of imagination/coding skill on my part in terms of how to implement it if it was just saved in the wiki.  In hindsight, I probably could have spent more time adapting whatever the parser already does with tables.  -- JimHu 03:15, 21 April 2007 (UTC)
 * Is it possible to simply switch off the external storage? Possibly a variable set so the external db is not required.? --Dtsig 17:22, 24 April 2007 (UTC)
 * not yet. The table loads from the database, not from the wiki page.  That could change in the future, especially with contributions from other coders (hint, hint) JimHu 23:59, 24 April 2007 (UTC)

edit the databasename
Remember to match the database. The database name is hardcoded and must maaatche your database.

find and replace the name database.box and database.row to yourdatabase.box and yourdatabase.row


 * Should this be put in a parameter? Could put this in a parameter and IF null don't even do db bit?  What do you think --Dtsig 17:53, 24 April 2007 (UTC)
 * Sounds like a good idea...not sure how to implement it though. Another global in LocalSettings.php? JimHu 00:00, 25 April 2007 (UTC)
 * That is what I was thinking. Then that global could be used to determine IF using the DB at all.  Default setup would probably be the 'wikibox_db' currently used.  If this param is null then bypass the DB processes.  I will look at the db bits and see about a hack --63.82.135.122 13:03, 25 April 2007 (UTC)

Installation Question

 * Created db wikibox_db and ran the scripts against it
 * Unzipped file and put the TableEdit directory into extensions
 * Added copy/paste the 'require once' to localSettings making sure to change to extensions/tableEdit/tabledit.php

When we simply go to the main page we get the following (which gets overwritten by the top of the page):

Warning: call_user_func(tablesetup)[function:call-user-func]: First argument is expected to be valid callback in c:\program files\apache software foundation\Apache2.2 htdocs wikiSanMar includes\setup.php on line 219

Ideas? I have not tried to create a page with the table in it. Just trying to get the error msg to go away. --Dtsig 17:50, 24 April 2007 (UTC)
 * I don't see the string tablesetup anywhere in the current version. I probably tarballed the wrong intermediate.  Look in SpecialTableEdit.php. Make sure that lines 19-20 are

$wgExtensionFunctions[] = 'tableeditsetup'; function tableeditsetup { The function name in the registry has to match the actual name of the function.


 * Nope .. they are

$wgExtensionFunctions[] = 'tableeditsetup'; function specialtableeditsetup {

I will try to simply rename and see if that does it --63.82.135.122 13:07, 25 April 2007 (UTC)


 * Renaming does appear to solve this error --63.82.135.122 13:16, 25 April 2007 (UTC)
 * What did you rename? -JimHu 14:37, 25 April 2007 (UTC)
 * Renamed

this ->> function specialtableeditsetup to this ->> function tableeditsetup
 * It appeared from your response that that would be the correct move .. yes? --Dtsig 22:05, 25 April 2007 (UTC)
 * Yes -JimHu 22:07, 25 April 2007 (UTC)

Install Sql error
Now on save I get this error

Database error A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "". MySQL returned error "1136: Column count doesn't match value count at row 1 (localhost)".

There is a 1 in the uppper left hand corner of the page.

Will try to work this out as I look at the 'global db' hack mentioned above. Ideas are welcomed  --63.82.135.122 13:16, 25 April 2007 (UTC)
 * The schema changed between 0.1 and 0.2. And it's going to change again in 0.3 It's experimental, remember! ;) The schema doc in the tarball should be accurate. - JimHu 14:37, 25 April 2007 (UTC)
 * I tried downloading again from "Download tableEdit0.2.tgz" but get a Mac OS X error. I used and checked my wiki_db against the one found in the link to your ecoliwiki page. In fact it looks like the tgz file i have is actually 0.1  Is it possible to get to your mac page .. thanks --Dtsig 21:18, 26 April 2007 (UTC)
 * I realized that I had changed the link in the summary box but not in the text of the page here. It should give 0.2 now...or you could wait for 0.3, which will require yet another schema change.  I'll upload that soon. -JimHu 21:45, 26 April 2007 (UTC)
 * If you think it will be in the next week or so I will wait .. thanks--Dtsig 21:46, 26 April 2007 (UTC)

SQL-TableEdit Problem?
In TableEdit.php Line 126 $sql = "INSERT INTO wikibox_db.box VALUES (,'$template','$page_name','$page_uid','$box_uid','$type','$headings',,'$prettytable','".time."')"; What is the correct set for "wikibox_db.box" ??