1
hipoonios
Move comments from one module to another
  • 2012/2/26 14:41

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Hi, I'm currently using a content module on my site. I have about 1000 pages and a lot of comments. Now I'm thinking of using a downloads module instead such TDMDownloads.

My link looks like this:

mysite.com/modules/tinycontent/index.php?id=998

and the link for the TDMDownloads:

mysite.com/modules/TDMDownloads/singlefile.php?lid=998

What is the easiest way to move all comments from the first link to the new one? Is it even possible?
I love Xoops!

2
Mamba
Re: Move comments from one module to another
  • 2012/2/26 15:13

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Look at the _xoopscomments table. You'll need to replace entries related to the module, like the module #:

com_modid

I am not sure if there needs to be changed anything else.

You might try to add a comment to

mysite.com/modules/TDMDownloads/singlefile.php?lid=998

and then compare its entry in the table to a comment for this entry:

mysite.com/modules/tinycontent/index.php?id=998

and then create a query that would make same changes for all TinyContent comments.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
hipoonios
Re: Move comments from one module to another
  • 2012/2/27 9:15

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Thanks! I have not tested it yet. But took a quick look and im pretty sure that will do it.

Now in need to find away to search and replace the com_modid fof all posts in one go. So i dont need to change all one by one manually. Does anyone know if this is possible with phpmyadmin? Or do i need script?
I love Xoops!

4
Mamba
Re: Move comments from one module to another
  • 2012/2/27 9:45

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
Does anyone know if this is possible with phpmyadmin? Or do i need script?

You can run SQL statement in the phpMyAdmin.

Just Google for how to replace in MySQL one value with another, and then use in the SQL tab.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Login

Who's Online

173 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 173


more...

Donat-O-Meter

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

Latest GitHub Commits