Hi, I have already got the article data from the wikipedia and I stored it on my computer .Now I want to add the article to the local wiki. I have done a lot of reaserches and I know that there are a lot of things to do. If add a record to the page table ,then the revision,recentchange,text,pagelink table and so on will be changed.So I think maybe there is a easy way to do that .
Can you tell me what should I do ? Should I simply use 'insert,update,select...'words?
Sincerely looking froward you help, thanks
vanessa lee
* 李琴 qli@ica.stc.sh.cn [Tue, 20 Oct 2009 22:01:00 +0800]:
Hi, I have already got the article data from the wikipedia and I
stored
it on my computer .Now I want to add the article to the local wiki. I have done a lot of reaserches and I know that there are a lot of things to do. If add a record to the page table ,then the revision,recentchange,text,pagelink table and so on will be changed.So
I
think maybe there is a easy way to do that .
Can you tell me what should I do ? Should I simply use 'insert,update,select...'words?
Sincerely looking froward you help, thanks
It is much better to use corresponding PHP class layer rather than modify the database directly, because the DB scheme may change in the future. Look at the method doEdit() located in 'includes/Article.php' Dmitriy
李琴 wrote:
Hi, I have already got the article data from the wikipedia and I stored it on my computer .Now I want to add the article to the local wiki. I have done a lot of reaserches and I know that there are a lot of things to do. If add a record to the page table ,then the revision,recentchange,text,pagelink table and so on will be changed.So I think maybe there is a easy way to do that .
Can you tell me what should I do ? Should I simply use 'insert,update,select...'words?
Sincerely looking froward you help, thanks
vanessa lee
If you're working inside mediawiki php.
$wgTitle = Title::newFromText( "MyArticle" ); $wgArticle = new Article( $wgTitle ); $wgArticle->insertNewArticle( "Some text", '', false, false );
If you don't want to work with php, use maintenance/importTextFile.php
2009/10/21 Platonides Platonides@gmail.com:
If you're working inside mediawiki php.
$wgTitle = Title::newFromText( "MyArticle" ); $wgArticle = new Article( $wgTitle ); $wgArticle->insertNewArticle( "Some text", '', false, false );
If you don't want to work with php, use maintenance/importTextFile.php
Please use other variable names than $wgTitle and $wgArticle to reduce confusion with the global variables by the same name.
Roan Kattouw (Catrope)
I'm working inside mediawiki php,but I just beginning. Can you tell me when I finished editing a article and clicked the save button,which variable takes the content of the edit box? Or which function handles the rawText?
Thanks vanessa lee
-----Original Message----- From: Platonides Platonides@gmail.com To: wikitech-l@lists.wikimedia.org Date: Wed, 21 Oct 2009 00:18:47 +0200 Subject: Re: [Wikitech-l] Add record to database
李琴 wrote:
Hi, I have already got the article data from the wikipedia and I stored
it
on my computer .Now I want to add the article to the local wiki. I have done a lot of reaserches and I know that there are a lot of things to do. If add a record to the page table ,then the revision,recentchange,text,pagelink table and so on will be changed.So I think maybe there is a easy way to do that .
Can you tell me what should I do ? Should I simply use 'insert,update,select...'words?
Sincerely looking froward you help, thanks
vanessa lee
If you're working inside mediawiki php.
$wgTitle = Title::newFromText( "MyArticle" ); $wgArticle = new Article( $wgTitle ); $wgArticle->insertNewArticle( "Some text", '', false, false );
If you don't want to work with php, use maintenance/importTextFile.php
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
2009/10/26 李琴 qli@ica.stc.sh.cn:
I'm working inside mediawiki php,but I just beginning. Can you tell me when I finished editing a article and clicked the save button,which variable takes the content of the edit box? Or which function handles the rawText?
It's in $wgRequest->getVal('wpTextbox1'); I'm not sure you want to be messing with EditPage's internals, though, because even most MediaWiki developers think EditPage is scary.
Roan Kattouw (Catrope)
Hi, I setup a Zh-wiki .
And now I have tried to use '$wgTitle = Title::newFromText( "MyArticle" ); $wgArticle = new Article( $wgTitle ); $wgArticle->insertNewArticle( "$text", '', false, false ); //$text contains the rawText fo the new articl'
to add a article to local wiki.But wiki can't recognize the Chinese.The display of this articl are garbled.
Can you tell me why is there such a problem?
Thanks a lot.
vanessa lee
李琴 wrote:
Hi, I have already got the article data from the wikipedia and I stored
it
on my computer .Now I want to add the article to the local wiki. I have done a lot of reaserches and I know that there are a lot of things to do. If add a record to the page table ,then the revision,recentchange,text,pagelink table and so on will be changed.So I think maybe there is a easy way to do that .
Can you tell me what should I do ? Should I simply use 'insert,update,select...'words?
Sincerely looking froward you help, thanks
vanessa lee
If you're working inside mediawiki php.
$wgTitle = Title::newFromText( "MyArticle" ); $wgArticle = new Article( $wgTitle ); $wgArticle->insertNewArticle( "Some text", '', false, false );
If you don't want to work with php, use maintenance/importTextFile.php
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
李琴 wrote:
Hi, I setup a Zh-wiki .
And now I have tried to use '$wgTitle = Title::newFromText( "MyArticle" ); $wgArticle = new Article( $wgTitle ); $wgArticle->insertNewArticle( "$text", '', false, false ); //$text contains the rawText fo the new articl'
to add a article to local wiki.But wiki can't recognize the Chinese.The display of this articl are garbled.
Can you tell me why is there such a problem?
Thanks a lot.
vanessa lee
What do you mean with 'wiki can't recognize the Chinese'? The contents of $text aren't being properly rendered at the wiki? Check that its contents are in utf-8.
hi, I use $wgTitle = Title::newFromText( "MyArticle" ); $wgArticle = new Article( $wgTitle ); $wgArticle->insertNewArticle( "Some text", '', false, false );
to add new articles to WIKI database,and use updateArticle() to update the articles.
But when I use those two fuctions,and implement the program contains them.
The page always redirect to the new article page or the updated article page immediately .
How to solve this problem ?I don't want to let the page jump.
Thanks very much!
vanessa lee
-----Original Message----- From: Platonides Platonides@gmail.com To: wikitech-l@lists.wikimedia.org Date: Wed, 21 Oct 2009 00:18:47 +0200 Subject: Re: [Wikitech-l] Add record to database
李琴 wrote:
Hi, I have already got the article data from the wikipedia and I stored
it
on my computer .Now I want to add the article to the local wiki. I have done a lot of reaserches and I know that there are a lot of things to do. If add a record to the page table ,then the revision,recentchange,text,pagelink table and so on will be changed.So I think maybe there is a easy way to do that .
Can you tell me what should I do ? Should I simply use 'insert,update,select...'words?
Sincerely looking froward you help, thanks
vanessa lee
If you're working inside mediawiki php.
$wgTitle = Title::newFromText( "MyArticle" ); $wgArticle = new Article( $wgTitle ); $wgArticle->insertNewArticle( "Some text", '', false, false );
If you don't want to work with php, use maintenance/importTextFile.php
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
李琴 wrote:
hi, I use $wgTitle = Title::newFromText( "MyArticle" ); $wgArticle = new Article( $wgTitle ); $wgArticle->insertNewArticle( "Some text", '', false, false );
to add new articles to WIKI database,and use updateArticle() to update the articles.
But when I use those two fuctions,and implement the program contains them.
The page always redirect to the new article page or the updated article page immediately .
How to solve this problem ?I don't want to let the page jump.
Thanks very much!
vanessa lee
If it's a program, why are you concerned with "jumping"? Are you running it at the command line or does it have some kind of web interface? How many pages are saved by your program on each batch?
what's the format of article data, xml dump or just plain text?
On Tue, Oct 20, 2009 at 10:01 PM, 李琴 qli@ica.stc.sh.cn wrote:
Hi, I have already got the article data from the wikipedia and I stored it on my computer .Now I want to add the article to the local wiki. I have done a lot of reaserches and I know that there are a lot of things to do. If add a record to the page table ,then the revision,recentchange,text,pagelink table and so on will be changed.So I think maybe there is a easy way to do that .
Can you tell me what should I do ? Should I simply use 'insert,update,select...'words?
Sincerely looking froward you help, thanks
vanessa lee
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
I used the RSS to get the page from the internet and I put it in MySql database.
-----Original Message----- From: Liangent liangent@gmail.com To: Wikimedia developers wikitech-l@lists.wikimedia.org Date: Wed, 21 Oct 2009 18:04:15 +0800 Subject: Re: [Wikitech-l] Add record to database
what's the format of article data, xml dump or just plain text?
On Tue, Oct 20, 2009 at 10:01 PM, 李琴 qli@ica.stc.sh.cn wrote:
Hi, I have already got the article data from the wikipedia and I stored it on my computer .Now I want to add the article to the local wiki. I have done a lot of reaserches and I know that there are a lot of things to do. If add a record to the page table ,then the revision,recentchange,text,pagelink table and so on will be changed.So I think maybe there is a easy way to do that .
Can you tell me what should I do ? Should I simply use 'insert,update,select...'words?
Sincerely looking froward you help, thanks
vanessa lee
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org