Creating a new revision of an existing article using Pages On Demand extension or other means

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating a new revision of an existing article using Pages On Demand extension or other means

Flip Mozart
I tried using Jim Hu's Pages on Demand extension to generate a page dynamically.  So far so good.  

Now, I have a use case that is slightly different.  

1) When a user clicks on a red link (non-existent article) or a blue link (to an existing article), I want to generate the article anew in both cases.

2) I have no problem handling the red link.   I am interested when the user clicks on the blue link.  I  want to fetch the latest revision of that page (let's say the article is named Gene:HPRT1).  Then I want to do something with it BEFORE presenting it (in VIEW mode, not EDIT mode) to the user, like adding text before or after the original text.  See below:

     Gene:HPRT1 (View mode)    
     ----------------------------------------------------] EDIT [------------
     (Some dynamically generated text)  

     (Original text from latest revision of Gene:HPRT1)

     (Another piece of dynamically generated text)  
     ---------------------------------------------------------------------------

3) When the user leaves the article/page shown above, either by clicking EDIT then SAVE or by clicking on another article hyperlink, I want the above to become the latest revision of the article Gene:HPRT1.
 
I would like to know how I can modify Pages on Demand to do this.  

If I try the call below, I get an error (because article with same name already exists):

    $article = new Article();

I still don't have a mastery of the MediaWiki API.  Can someone point me to  URLs and/or documentation that can help me understand what's going on under the MediaWiki hood?

Thanks and happy holidays!

Filip

 Send instant messages to your online friends http://uk.messenger.yahoo.com 
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Basic skills

Nelson A Li
Hello,

1. Can someone tell me how to manually or dynamically create a page that
shows the following table for user inputs?
(See attached file: Snap.png)
2. Assume question one resolved, which means that I have created the page
manually in MediaWiki.  If I want to use php code to retrieve the data from
wikidb and pre-populate the table fields so that users can see the current
value before they put updates, how do I "call" this page and pass the
db-retrieved data to the page?

3. After user inputs the updates and hit the "Submit updates" button, how
do I get the user inputs in order to update my wikidb?

I am pretty new to MW and still struggle to the core php code.  Please give
detail instructions when answer my questions.  Thank you and have a Happy
New Year.

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
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Basic skills

Christensen, Courtney
Nelson,

The mailing list strips attachments for everyone's safety.  Do you think
you could post your image on a publicly accessible site instead?  

Do you just want a page with a form that a user fills out and then you
create a new article from the form input?  If that is the case, create a
new special page and use the $wgRequest variable to work with the
submitted data.

-Courtney

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nelson A
Li
Sent: Thursday, December 27, 2007 12:25 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] Basic skills

Hello,

1. Can someone tell me how to manually or dynamically create a page that
shows the following table for user inputs?
(See attached file: Snap.png)
2. Assume question one resolved, which means that I have created the
page
manually in MediaWiki.  If I want to use php code to retrieve the data
from
wikidb and pre-populate the table fields so that users can see the
current
value before they put updates, how do I "call" this page and pass the
db-retrieved data to the page?

3. After user inputs the updates and hit the "Submit updates" button,
how
do I get the user inputs in order to update my wikidb?

I am pretty new to MW and still struggle to the core php code.  Please
give
detail instructions when answer my questions.  Thank you and have a
Happy
New Year.

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
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Basic skills

Dave Sigafoos
You can create "boilerplate" pages with either extension Boilerplate or
BoilerplateSelection.

You might be able to use TableEdit extension for the tables.  It does
store the data in an external database and might be used.  You might
want to talk to the author (I think it was Jim Hu).

There might be a way to dynamically create a new "db" item for each new
page created.

DSig .. Just Chillin'


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Christensen, Courtney
Sent: Thursday, December 27, 2007 10:52
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Basic skills

Nelson,

The mailing list strips attachments for everyone's safety.  Do you think
you could post your image on a publicly accessible site instead?  

Do you just want a page with a form that a user fills out and then you
create a new article from the form input?  If that is the case, create a
new special page and use the $wgRequest variable to work with the
submitted data.

-Courtney

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nelson A
Li
Sent: Thursday, December 27, 2007 12:25 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] Basic skills

Hello,

1. Can someone tell me how to manually or dynamically create a page that
shows the following table for user inputs?
(See attached file: Snap.png)
2. Assume question one resolved, which means that I have created the
page
manually in MediaWiki.  If I want to use php code to retrieve the data
from
wikidb and pre-populate the table fields so that users can see the
current
value before they put updates, how do I "call" this page and pass the
db-retrieved data to the page?

3. After user inputs the updates and hit the "Submit updates" button,
how
do I get the user inputs in order to update my wikidb?

I am pretty new to MW and still struggle to the core php code.  Please
give
detail instructions when answer my questions.  Thank you and have a
Happy
New Year.

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
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Basic skills

Nelson A Li
In reply to this post by Christensen, Courtney
Courtney,

Yes, the attached screenshot is just a html with a form table.  You may not
believe it, but it is true that I don't know how to manulally create a wiki
page with the form that user can fill out.  Also, I would like to be able
to pre-fill the form using php code with the data I retrieved from the DB.


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.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------




                                                                           
             "Christensen,                                                
             Courtney"                                                    
             <ChristensenC@BAT                                          To
             TELLE.ORG>                MediaWiki announcements and site    
             Sent by:                  admin list                          
             mediawiki-l-bounc         <[hidden email]>  
             [hidden email]                                          cc
             a.org                                                        
                                                                   Subject
                                       Re: [Mediawiki-l] Basic skills      
             12/27/2007 01:51                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                            
                 MediaWiki                                                
             announcements and                                            
              site admin list                                              
             <mediawiki-l@list                                            
             s.wikimedia.org>                                              
                                                                           
                                                                           




Nelson,

The mailing list strips attachments for everyone's safety.  Do you think
you could post your image on a publicly accessible site instead?

Do you just want a page with a form that a user fills out and then you
create a new article from the form input?  If that is the case, create a
new special page and use the $wgRequest variable to work with the
submitted data.

-Courtney

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nelson A
Li
Sent: Thursday, December 27, 2007 12:25 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] Basic skills

Hello,

1. Can someone tell me how to manually or dynamically create a page that
shows the following table for user inputs?
(See attached file: Snap.png)
2. Assume question one resolved, which means that I have created the
page
manually in MediaWiki.  If I want to use php code to retrieve the data
from
wikidb and pre-populate the table fields so that users can see the
current
value before they put updates, how do I "call" this page and pass the
db-retrieved data to the page?

3. After user inputs the updates and hit the "Submit updates" button,
how
do I get the user inputs in order to update my wikidb?

I am pretty new to MW and still struggle to the core php code.  Please
give
detail instructions when answer my questions.  Thank you and have a
Happy
New Year.

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
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l



_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Basic skills

Nelson A Li
In reply to this post by Dave Sigafoos
Dave,

I am working behind company's firewall that is why I could not show you
what I have.  I just recieved some help from Courtney Christensen and have
the same question from both of your answers: how do I create a form with
textinput fields in this boilerplate page?  Do I use some kind of "nowiki'
or <pre> to escape and embed the html directly in the page?

I got some help from Professor Jim Hu before and played with TableEdit
extension.  It was a very nice extension but I just could not get rid off a
timing error message.  I may try to talk to him again.   But I need to
resolve the first basic thing first.

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.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------




                                                                           
             "Dave Sigafoos"                                              
             <davesigafoos@san                                            
             mar.com>                                                   To
             Sent by:                  "MediaWiki announcements and site  
             mediawiki-l-bounc         admin list"                        
             [hidden email]         <[hidden email]>  
             a.org                                                      cc
                                                                           
                                                                   Subject
             12/27/2007 01:59          Re: [Mediawiki-l] Basic skills      
             PM                                                            
                                                                           
                                                                           
             Please respond to                                            
                 MediaWiki                                                
             announcements and                                            
              site admin list                                              
             <mediawiki-l@list                                            
             s.wikimedia.org>                                              
                                                                           
                                                                           




You can create "boilerplate" pages with either extension Boilerplate or
BoilerplateSelection.

You might be able to use TableEdit extension for the tables.  It does
store the data in an external database and might be used.  You might
want to talk to the author (I think it was Jim Hu).

There might be a way to dynamically create a new "db" item for each new
page created.

DSig .. Just Chillin'


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Christensen, Courtney
Sent: Thursday, December 27, 2007 10:52
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Basic skills

Nelson,

The mailing list strips attachments for everyone's safety.  Do you think
you could post your image on a publicly accessible site instead?

Do you just want a page with a form that a user fills out and then you
create a new article from the form input?  If that is the case, create a
new special page and use the $wgRequest variable to work with the
submitted data.

-Courtney

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nelson A
Li
Sent: Thursday, December 27, 2007 12:25 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] Basic skills

Hello,

1. Can someone tell me how to manually or dynamically create a page that
shows the following table for user inputs?
(See attached file: Snap.png)
2. Assume question one resolved, which means that I have created the
page
manually in MediaWiki.  If I want to use php code to retrieve the data
from
wikidb and pre-populate the table fields so that users can see the
current
value before they put updates, how do I "call" this page and pass the
db-retrieved data to the page?

3. After user inputs the updates and hit the "Submit updates" button,
how
do I get the user inputs in order to update my wikidb?

I am pretty new to MW and still struggle to the core php code.  Please
give
detail instructions when answer my questions.  Thank you and have a
Happy
New Year.

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
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l



_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Basic skills

Nelson A Li
Hello,

Is there a doc somewhere describing what is happening beind the scene when
a page is created manually?  I am not clear about the relationships between
article, parser, title, page contents, database, box,  ...etc.

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
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Basic skills

Nelson A Li
In reply to this post by Dave Sigafoos
Dave,

When I created the Boilerplate page, edit the html form in it, and save the
page, the table is created.  But the form and input html staements are
shown "as is".  MW does not recognize the form and input tags.  I have
looks through several extensions (Simple Forms, CustomEdit, RawMsg, ...)
and could not identify an extension to render the raw html in wiki page.
Could you elaborate a little more about how do I create a page with a form
imbedded in it?  Thank you.

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.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------




                                                                           
             "Dave Sigafoos"                                              
             <davesigafoos@san                                            
             mar.com>                                                   To
             Sent by:                  "MediaWiki announcements and site  
             mediawiki-l-bounc         admin list"                        
             [hidden email]         <[hidden email]>  
             a.org                                                      cc
                                                                           
                                                                   Subject
             12/27/2007 01:59          Re: [Mediawiki-l] Basic skills      
             PM                                                            
                                                                           
                                                                           
             Please respond to                                            
                 MediaWiki                                                
             announcements and                                            
              site admin list                                              
             <mediawiki-l@list                                            
             s.wikimedia.org>                                              
                                                                           
                                                                           




You can create "boilerplate" pages with either extension Boilerplate or
BoilerplateSelection.

You might be able to use TableEdit extension for the tables.  It does
store the data in an external database and might be used.  You might
want to talk to the author (I think it was Jim Hu).

There might be a way to dynamically create a new "db" item for each new
page created.

DSig .. Just Chillin'


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Christensen, Courtney
Sent: Thursday, December 27, 2007 10:52
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Basic skills

Nelson,

The mailing list strips attachments for everyone's safety.  Do you think
you could post your image on a publicly accessible site instead?

Do you just want a page with a form that a user fills out and then you
create a new article from the form input?  If that is the case, create a
new special page and use the $wgRequest variable to work with the
submitted data.

-Courtney

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nelson A
Li
Sent: Thursday, December 27, 2007 12:25 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] Basic skills

Hello,

1. Can someone tell me how to manually or dynamically create a page that
shows the following table for user inputs?
(See attached file: Snap.png)
2. Assume question one resolved, which means that I have created the
page
manually in MediaWiki.  If I want to use php code to retrieve the data
from
wikidb and pre-populate the table fields so that users can see the
current
value before they put updates, how do I "call" this page and pass the
db-retrieved data to the page?

3. After user inputs the updates and hit the "Submit updates" button,
how
do I get the user inputs in order to update my wikidb?

I am pretty new to MW and still struggle to the core php code.  Please
give
detail instructions when answer my questions.  Thank you and have a
Happy
New Year.

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
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l



_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Basic skills

Hiram Clawson
In reply to this post by Nelson A Li
Good Afternoon Nelson:

It sounds like you are attempting to write something that could
be done in an extension:
        http://www.mediawiki.org/wiki/Extensions

You could create a simple extension that would display a form
for users to interact with, and with the "submit" button you
could then do anything you wanted to do with the input.  Extensions
are not seriously difficult, although you should know some php
programming.

Alternatively, you could use a template to start a new page,
where the template starts the organization of the page as you
would like to see it.

There are probably a number of methods you could use to implement
your function.

--Hiram

Nelson A Li wrote:
> Courtney,
>
> Yes, the attached screenshot is just a html with a form table.  You may not
> believe it, but it is true that I don't know how to manulally create a wiki
> page with the form that user can fill out.  Also, I would like to be able
> to pre-fill the form using php code with the data I retrieved from the DB.
>
>
> Nelson

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Basic skills

Christensen, Courtney
Nelson,

Here is the MediaWiki Documentation for creating Special Pages:
http://www.mediawiki.org/wiki/Manual:Special_pages

You should use the MediaWiki database wrapper to access database
information.  This is an example of select usage for the wrapper.  I
haven't found any great tutorials on using it, but you can always read
the database.php class.  
$db =& wfGetDB( DB_SLAVE );
//select
$rslt=$db->select( array( 'page' ), //from which tables
                         array( 'el_from' ), //columns to select
                         array( 'el_from=page_id', //where clauses
                         'el_to'=>$pageTitle->getDBkey() ),
                         'Database::select',
                         array( 'ORDER BY'=>'page_title' ) ); //options

If I were trying to make a webform for my wiki users to fill out and
create a page from, I would write a SpecialPage.  I would write out the
form I needed in html and put it in a variable using HEREDOC so I didn't
have to worry about quoting issues.  If you need parts of the form to be
prefilled you will need to put use the database code I sent you
(modified to get the information you need) and store that data in
variables which you should include in the proper places in your form.
(i.e. <input type="text" name="fname" value="$userFName" /> )
Ask your users to supply a title, or hardcode one of your own and make
it a title object.
$title = Title::newFromText($userTitle);
$article = new Article($title);
$article->doEdit($articleText, 'comment', EDIT_NEW );

And presto!  You have a form created article in your wiki.

Good luck,
-Courtney

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Hiram
Clawson
Sent: Thursday, December 27, 2007 6:57 PM
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Basic skills

Good Afternoon Nelson:

It sounds like you are attempting to write something that could
be done in an extension:
        http://www.mediawiki.org/wiki/Extensions

You could create a simple extension that would display a form
for users to interact with, and with the "submit" button you
could then do anything you wanted to do with the input.  Extensions
are not seriously difficult, although you should know some php
programming.

Alternatively, you could use a template to start a new page,
where the template starts the organization of the page as you
would like to see it.

There are probably a number of methods you could use to implement
your function.

--Hiram

Nelson A Li wrote:
> Courtney,
>
> Yes, the attached screenshot is just a html with a form table.  You
may not
> believe it, but it is true that I don't know how to manulally create a
wiki
> page with the form that user can fill out.  Also, I would like to be
able
> to pre-fill the form using php code with the data I retrieved from the
DB.
>
>
> Nelson

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Basic skills

Dave Sigafoos
In reply to this post by Nelson A Li
Nelson,
On rereading your original post, I believe that the boilerplate will not
suit our needs.  They are a way to create a new edit page in edit mode.
You are looking for a page to display to the user for some data input.
At least that is how I read it.

Writing your own Special Page extension might be the easiest way to get
exactly what you want.  It will take a fairly thorough knowledge of PHP
and its object model to connect with Mediawiki


DSig .. Just Chillin'


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nelson A
Li
Sent: Thursday, December 27, 2007 14:58
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Basic skills

Dave,

When I created the Boilerplate page, edit the html form in it, and save
the
page, the table is created.  But the form and input html staements are
shown "as is".  MW does not recognize the form and input tags.  I have
looks through several extensions (Simple Forms, CustomEdit, RawMsg, ...)
and could not identify an extension to render the raw html in wiki page.
Could you elaborate a little more about how do I create a page with a
form
imbedded in it?  Thank you.

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.
------------------------------------------------------------------------
------------------------------------------------------------------------
----------------------------------------------------------------




 

             "Dave Sigafoos"

             <davesigafoos@san

             mar.com>
To
             Sent by:                  "MediaWiki announcements and site

             mediawiki-l-bounc         admin list"

             [hidden email]         <[hidden email]>

             a.org
cc
 

 
Subject
             12/27/2007 01:59          Re: [Mediawiki-l] Basic skills

             PM

 

 

             Please respond to

                 MediaWiki

             announcements and

              site admin list

             <mediawiki-l@list

             s.wikimedia.org>

 

 





You can create "boilerplate" pages with either extension Boilerplate or
BoilerplateSelection.

You might be able to use TableEdit extension for the tables.  It does
store the data in an external database and might be used.  You might
want to talk to the author (I think it was Jim Hu).

There might be a way to dynamically create a new "db" item for each new
page created.

DSig .. Just Chillin'


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Christensen, Courtney
Sent: Thursday, December 27, 2007 10:52
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Basic skills

Nelson,

The mailing list strips attachments for everyone's safety.  Do you think
you could post your image on a publicly accessible site instead?

Do you just want a page with a form that a user fills out and then you
create a new article from the form input?  If that is the case, create a
new special page and use the $wgRequest variable to work with the
submitted data.

-Courtney

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nelson A
Li
Sent: Thursday, December 27, 2007 12:25 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] Basic skills

Hello,

1. Can someone tell me how to manually or dynamically create a page that
shows the following table for user inputs?
(See attached file: Snap.png)
2. Assume question one resolved, which means that I have created the
page
manually in MediaWiki.  If I want to use php code to retrieve the data
from
wikidb and pre-populate the table fields so that users can see the
current
value before they put updates, how do I "call" this page and pass the
db-retrieved data to the page?

3. After user inputs the updates and hit the "Submit updates" button,
how
do I get the user inputs in order to update my wikidb?

I am pretty new to MW and still struggle to the core php code.  Please
give
detail instructions when answer my questions.  Thank you and have a
Happy
New Year.

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
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l



_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l