1
panigrc
Converting modules
  • 2005/6/21 17:47

  • panigrc

  • Not too shy to talk

  • Posts: 133

  • Since: 2005/4/14


Is there any way to take the data of one module and convert it to fit to another module.

For example take the data of wf-sections and convert it to news module.

Or to another module like ams.

2
davidl2
Re: Converting modules
  • 2005/6/21 18:11

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


It's not impossible, but it is a tricky task.

The new release of WF-Sections will not be too long now :)

3
Mikhail
Re: Converting modules
  • 2005/6/21 18:23

  • Mikhail

  • Just can't stay away

  • Posts: 412

  • Since: 2003/1/19


hey! can be easy! searh for my script that convert wikipedia to wiwimod, and take a look in the "logic".

4
panigrc
Re: Converting modules
  • 2005/6/21 19:15

  • panigrc

  • Not too shy to talk

  • Posts: 133

  • Since: 2005/4/14


mikhail can you give me the link because I couldn't find it ?

5
Mikhail
Re: Converting modules
  • 2005/6/21 19:33

  • Mikhail

  • Just can't stay away

  • Posts: 412

  • Since: 2003/1/19


Quote:

panigrc wrote:
mikhail can you give me the link because I couldn't find it ?



Sure!

Was commented here:
https://xoops.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=34209&forum=30
and here:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=37486&start=10


And this is the code (please, look how easy is):

###### PURE SQL, PHP NOT NEEDED

REPLACE INTO
xoops_wiwi
idkeywordtitlebodylastmodifiedu_idvisibleparentpageidpridcontextBlock )

SELECT 
cur_id
cur_titlecur_titlecur_textUNIX_TIMESTAMP(cur_timestamp), cur_user1'underpop'cur_idcur_id''
FROM cur


Obs: "cur" is the name of the main wikipedia table. And this code can be used with phpmyadmin.

I use something like UNIX_TIMESTAMP(thedate) and TIMESTAMP(thedate) to covert some phpnuke tables that use a diferent date format. But a simple code like this solve the "problem".

6
panigrc
Re: Converting modules
  • 2005/6/22 11:27

  • panigrc

  • Not too shy to talk

  • Posts: 133

  • Since: 2005/4/14


Thank you mikhail it was easier than I thought!

7
Mikhail
Re: Converting modules
  • 2005/6/22 11:50

  • Mikhail

  • Just can't stay away

  • Posts: 412

  • Since: 2003/1/19


Quote:

panigrc wrote:
Thank you mikhail it was easier than I thought!


Great that you understood the logic of this code!! You dont need more than it to convert a CMS like phpnuke to xoops, without php. Another sample, to convert the XOOPS news to weblog mod (should work):

replace INTO
xoops_weblog 
(blog_iduser_idcat_idcreatedtitlecontentstrackbacks)

SELECT storyiduidtopicidcreatedtitlehometextbodytext

FROM xoops_stories


And you can define a default value, like this 2 examples:

Quote:

xoops_weblog (blog_id, 1243, cat_id, created, "Xoops Rulez", contents, trackbacks)


so, the same value 1243 and XOOPS rulez for all lines.

8
panigrc
Re: Converting modules
  • 2005/6/23 13:46

  • panigrc

  • Not too shy to talk

  • Posts: 133

  • Since: 2005/4/14


Basically I study infomation technology and so I understand sql.

But I didn't come to the idea of inserting with select query.

Thanx again!

Login

Who's Online

462 user(s) are online (380 user(s) are browsing Support Forums)


Members: 0


Guests: 462


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits