|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
Add record to databaseHi, 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@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to database* 李琴 <qli@...> [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 _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: 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@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to database2009/10/21 Platonides <Platonides@...>:
> 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) _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to databasewhat's the format of article data, xml dump or just plain text?
On Tue, Oct 20, 2009 at 10:01 PM, 李琴 <qli@...> 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@... > https://lists.wikimedia.org/mailman/listinfo/wikitech-l > Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to databaseLiangent wrote:
> what's the format of article data, xml dump or just plain text? Plain text. There are other tools for importing from xml format. _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to databaseI used the RSS to get the page from the internet and I put it in MySql
database. -----Original Message----- From: Liangent <liangent@...> To: Wikimedia developers <wikitech-l@...> 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@...> 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@... > https://lists.wikimedia.org/mailman/listinfo/wikitech-l > Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to databaseI'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@...> To: wikitech-l@... 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@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to database2009/10/26 李琴 <qli@...>:
> 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) _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to databaseHi,
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@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to database李琴 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. _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to databasehi,
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@...> To: wikitech-l@... 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@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: Add record to database李琴 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? _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
| Free embeddable forum powered by Nabble | Forum Help |