1
sova
Transfer the content of XNews module to Publisher
  • 2013/11/14 10:38

  • sova

  • Not too shy to talk

  • Posts: 149

  • Since: 2010/4/13


How to transfer the content of the XNews module to Publisher

2
redheadedrod
Re: Transfer the content of XNews module to Publisher

Is there an export function in xNews then you can use an import function in Publisher? otherwise look for a conversion option or direct import in Publisher. If there is not an option to do this you may have to dump a copy of the xNews database, modify the entries to line up with Publisher and post them yourself. Does require some simple knowledge of SQL but is not hard.

3
Bleekk
Re: Transfer the content of XNews module to Publisher
  • 2013/11/14 23:38

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


I will try to put some sql together so you can import main things to publisher

4
Bleekk
Re: Transfer the content of XNews module to Publisher
  • 2013/11/15 10:28

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


Ok here are some SQL queries which will help you to export xnews articles to publisher

IMPORTANT:
YOU NEED A FRESH PUBLISHER INSTALL
PLEASE MAKE A BACKUP OF YOUR DATABASE


This export do NOT take care of documents in the xnews articles, only images are transferred

In the SQL queries you need to replace <prefix> with prefix of your tables!

1) First we export the xnews categories and import them to the publisher module

INSERT INTO `<prefix>_publisher_categories
(`
categoryid`,`parentid`,`image`,`name`,`description`,`weight`,`moderator`)
SELECT Topic_idtopic_pidtopic_imgurltopic_titletopic_descriptiontopic_weightAS moderator
FROM  
`<prefix>_nw_topics`


2) --> !! Go to Administration of the Publisher module and SET the PERMISSIONS! !! <--

3) Go to IMAGE MANAGER and create a category with the name publisher

4) Publisher uses the image manager to manager the article images
-> Copy all images from "uploads/xnews/topics/" to "uploads/"

5) INSERT all images in the image manager -> CATEGORY publisher

INSERT INTO `<prefix>_image`(`image_name`, `image_nicename`, `image_mimetype`, `image_display`, `image_weight`, `imgcat_id`)
SELECT 
s
.picture
RIGHT(s.picture,13) AS nicename
CONCAT('image/'RIGHT(s.picture,3)) AS `mimetype`, 
AS image_display
AS image_weight,
c.imgcat_id
FROM 
<prefix>_nw_stories s, <prefix>_imagecategory c 
WHERE s
.picture <> ''
AND c.imgcat_name =  'publisher'


6) Export all xnews articles to publisher

INSERT INTO `<prefix>_publisher_items`(
`
itemid`, `uid`, `title`, `datesub`, `status`, `dohtml`, `dosmiley`, `summary`, `body`, `counter`, `categoryid`, `comments`, `rating`, `votes`, `image`, `images`, `dobr`
)
SELECT 
st
.storyid
st.uid
st.title
st.published,
AS Status,
CASE 
st.nohtml 
WHEN 0 THEN 1
WHEN 1 THEN 0
END 
AS nohtml,
CASE 
st.nosmiley
WHEN 0 THEN 1
WHEN 1 THEN 0
END 
AS nosmiley
st.hometext
st.bodytext
st.counter
st.topicid
st.comments
st.rating
st.votes
im.image_id,
im.image_id AS pictures
st.dobr
FROM 
<prefix>_nw_stories st
LEFT OUTER JOIN 
<prefix>_image im
ON st
.picture im.image_name



That's it! I have tested it with a fresh install and it works very well

5
sova
Re: Transfer the content of XNews module to Publisher
  • 2014/1/9 10:46

  • sova

  • Not too shy to talk

  • Posts: 149

  • Since: 2010/4/13


After installing Publisher, This error shows
/Frameworks/moduleclasses/moduleadmin/ is required!!!

-----------------------------------------
Quote:

Bleekk wrote:

1) First we export the xnews categories and import them to the publisher module

INSERT INTO `<prefix>_publisher_categories
(`
categoryid`,`parentid`,`image`,`name`,`description`,`weight`,`moderator`)
SELECT Topic_idtopic_pidtopic_imgurltopic_titletopic_descriptiontopic_weightAS moderator
FROM  
`<prefix>_nw_topics`


Explain more
From within phpmyadmin or ...

6
Bleekk
Re: Transfer the content of XNews module to Publisher
  • 2014/1/9 11:42

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


yes you do the sql stuff in phpmyadmin

do you have this folder in your system "/Frameworks/moduleclasses/moduleadmin/"?

7
sova
Re: Transfer the content of XNews module to Publisher
  • 2014/1/9 13:29

  • sova

  • Not too shy to talk

  • Posts: 149

  • Since: 2010/4/13


Quote:

Bleekk wrote:
do you have this folder in your system "/Frameworks/moduleclasses/moduleadmin/"?

yes

-----------------------

I have done to steps 4
Next steps will not catch

Do I should to move all items from the XNews module To Publisher? (Manually, All 5,000 items?)

8
Bleekk
Re: Transfer the content of XNews module to Publisher
  • 2014/1/9 15:26

  • Bleekk

  • Theme Designer

  • Posts: 940

  • Since: 2002/12/14


please do not forget to change <prefix> to the prefix of your tables!

9
sova
Re: Transfer the content of XNews module to Publisher
  • 2014/1/11 4:37

  • sova

  • Not too shy to talk

  • Posts: 149

  • Since: 2010/4/13


I could not do
You do for me?

10
Mamba
Re: Transfer the content of XNews module to Publisher
  • 2014/1/11 4:55

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


We prefer to teach people how to fish, instead of giving them the fish

Tell us what have you done, and what didn't work? What errors have you received, and where?

This way other people can learn something too...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Login

Who's Online

199 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 199


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