Code to create a new article in the db

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

Code to create a new article in the db

a@kid
Is there a method i can call that given a title, namespace, and  
content for a page will create a new article in the db?

i'm aware of the inputbox extension but i am looking for something  
that actually creates a new article in the db rather than just  
preloading the edit page with a template.

thanks in advance

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

Re: Code to create a new article in the db

Rob Church
On 05/05/06, a@kid <[hidden email]> wrote:
> Is there a method i can call that given a title, namespace, and
> content for a page will create a new article in the db?
>
> i'm aware of the inputbox extension but i am looking for something
> that actually creates a new article in the db rather than just
> preloading the edit page with a template.

Take a look at the maintenance/importTextFile.php maintenance script
for an example of creating pages. Alternatively, investigate the
Article class a bit more.


Rob Church
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l