Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: maple on September 28, 2012, 17:06:14

Title: Categories, articles and images importing tool
Post by: maple on September 28, 2012, 17:06:14
Hello,

first of all, Elxis 4 it's impressive. Quick, secure, scalable, easy to use...

I've a lot of articles, about 1000. I can see some big waste of time and headache adding one by one from the elxis control panel.

I need a solution for importing this 1000 articles (with some images) and categories, to the elxis 4 database.
About 90% of these articles are from word (.doc or .docx extensions).
Also all these articles are in two or three languages.

So, need an importing tool. Perhaps a component, or something provisional to begin to work as soon as possible.

Thank you very much and congratulations for the very, very good work.

agus
Title: Re: Categories, articles and images importing tool
Post by: StefanSultanov on September 28, 2012, 20:34:24
If Elxis team comes up with such a tool, it would be great!

How about phpMyAdmin?
I've imported some large arrays of articles that way...
Title: Re: Categories, articles and images importing tool
Post by: datahell on September 28, 2012, 22:19:33
MS Word is not a web authoring tool.
It will be a tragic mistake if you import articles from word.

You must first convert Word's messy code into plain text by pasting the word text into a pure text editor (notepad, pspad, etc).
Off course this way you will loose styling but you will get a clean version of the article.
You can also convert word's code into html code but all the converters I have seen don't produce good html.

Things you should also take care of:
Title: Re: Categories, articles and images importing tool
Post by: rentasite on September 28, 2012, 23:05:53
It will be a tragic mistake if you import articles from word.

Thumbs up, on this!
Title: Re: Categories, articles and images importing tool
Post by: maple on September 29, 2012, 13:57:09
Oh, thank you all for the responses.

I can see on the CKEditor a button (past from the word). I don't know if it possible take this engine to keep the word format, or similar one, into the importing tool. Anyway, I already try this button, but, it's not a perfect paste, I know...

Well, Datahell, I haven't good coding knowledgements. Anyone have any importing tool, php script or simple component to take at least a plain text without format and take into the correct categories with images to the Elxis 4 db? It is possible that anyone at Elxis Team make a good importing tool component (images, article, categories, languages) in the near future?

StefanSultanov, could you show the code making part of this across phpMyAdmin?

Thanks so much
agus
Title: Re: Categories, articles and images importing tool
Post by: StefanSultanov on September 30, 2012, 12:40:07
No, mate!
There is no coding involved here.

If you want a clean paste of unformatted text into the text editor from word - you do this:
Copy from Word
Paste to Notepad - Copy from Notepad
Paste into Elxis editor.
(Works fine under Windows 7)

If you don't do that, "the tragedy" appears when you press the HTML button. You'll see Word formatting 10 times as long as your article!
This is slowing your site soooo much, man!

If you want bulk import MANY articles and categories, you must go to PHP MyAdmin and import it as SQL or CSV data.
Such file you can generate with Excel.
http://www.youtube.com/watch?v=wfahu3ggy8c&feature=related
I believe you can take this from here. Be very careful!
You can totally destroy the database and the way Elxis connects with it.
And yet, it's not coding in the real sense of the word.
Good luck!

Anyway, a quick and easy to work with articles importing tool is really a killer feature, if developers decide to implement it. :)

Title: Re: Categories, articles and images importing tool
Post by: datahell on September 30, 2012, 13:09:46
There are many document writers (ms office, libre office, star offfice, etc) and formats (doc, docx, rtf, odt, etc...)
Also the encoding might be different. MS for example uses ANSI. If you import a document written in Greek (windows-1253 or iso-8859-7) from word into Elxis you will get a very bad result as Elxis expects to get text in utf-8. You should make sure to write your texts in utf-8.
Finally your office has a save us/export functionality. You can for example export it as html. But if you look into the generated code you will see that it is tragic.
Do you want your site to have such html code? Personally I don't...

It is almost impossible to create an importing tool that will work 100% correct.
I don't want to create a tool that will possible create problems to the site.
Title: Re: Categories, articles and images importing tool
Post by: maple on September 30, 2012, 17:05:47
Oh, I see that it's a difficult issue. Anyway, thanks to all for your responses.

And, perhaps only importing a plain text articles and categories with no format can be a good solution for a simple importing tool component.

If anyone can help me, I will be very happy... I have about 1000 articles to upload  ;D

If not, 1000 article it's not the same as 10000 hahaha I can do it manually. I'm very fast!  ;D

Anyway, thank you very much to all. Elxis 4 it's awesome!!

agus