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 DATABASEThis 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_id, topic_pid, topic_imgurl, topic_title, topic_description, topic_weight, 1 AS 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
publisher4) 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`,
1 AS image_display,
0 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,
2 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