Boris,
Thank you for your help. The local extension (see below) has been written
following the standards. What I need to learn is the knowledge of the
basics - how to get the user input value from the input box ($dataKey) to
feed into my extension module. I use the key to retrieve data from
database and display them to the user for user updates. I also need to
learn how to take the user inputs and pass them to my extension for
database update.
<?php
$wgExtensionFunctions[] = "wfMyDataExtension";
function wfMyDataExtension() {
global $wgParser;
$wgParser->setHook("mydata", "extGetData");
}
function extGetData($dataKey) {
....
}
Nelson
Computer Sciences Corporation
Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA
Registered in USA No: C-489-59
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Boris Steipe
<boris.steipe@uto
ronto.ca> To
Sent by: MediaWiki announcements and site
mediawiki-l-bounc admin list
es(a)lists.wikimedi <mediawiki-l(a)lists.wikimedia.org>
a.org cc
Subject
11/30/2007 12:22 Re: [Mediawiki-l] wikitext-php-web
PM
Please respond to
MediaWiki
announcements and
site admin list
<mediawiki-l@list
s.wikimedia.org>
The inputbox extension uses GET to request an URL whereby parameters
for index.php are being passed. It does not interact directly with
the Database. Having user-accessible Wikipages write directly into
the Database is not a good idea.
You may be able to get somewhere with a creative combination of
templates that create links to edit a page's section, and using lst
(the labelled section transclusion extension) to pull contents from
these pages into your table.
Other than that you will need to write your own extension.
HTH,
Boris
On 30-Nov-07, at 9:48 AM, Nelson A Li wrote:
Hello,
I am doing something simple:
1. put an inputbox to get user input key.
2. select data record by the key from DB and display the fields in a
two-column table with field names on left and field values (if key
is not
in DB, display blanks) inside inputboxes on right side of the
table. Allow
user to make changes to the inputboxes and save the fields back to DB.
1. A wiki page has been created to display the key inputbox, but I
am not
clear on how to get the user input and pass it into my SelectDB.php
module.
2. A template has been created to display the table with field
names on
left and field value inputboxes on right, but I don't know how to
populate
them with the DB select results. I have the template linked inside
the key
inputbox as a preload page and Mediawiki magically tried to create
a page
with key as the title using the template.
I had received some helps from a few experts before. I do
understand that
everybody is busy and my problem can be too trivial to be
interesting for
most people. However, I really need help and any help is appreciated.
Nelson
Computer Sciences Corporation
Registered Office: 2100 East Grand Avenue, El Segundo California
90245, USA
Registered in USA No: C-489-59
----------------------------------------------------------------------
----------------------------------------------------------------------
--------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient,
please
delete without copying and kindly advise us by e-mail of the
mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind
CSC to
any order or other contract unless pursuant to explicit written
agreement
or government initiative expressly permitting the use of e-mail for
such
purpose.
----------------------------------------------------------------------
----------------------------------------------------------------------
--------------------------------------------------------------------
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l