Forum Moderators: phranque

Message Too Old, No Replies

Best way to import content into site?

         

CompressedAir

7:04 pm on May 12, 2004 (gmt 0)

10+ Year Member



So now that I've finished getting the design and database structure for my site finished (my website is PHP/MySQL driven), it has come time to write the content for the site.

I am wondering what most people content writing procedures are and how do they bring that to their website.

At first I thought I would just write out the content in Word, and then paste it into the respective rows in the database, but that seems quite time consuming. I then thought I could setup a replica of the db in excel and write my content in the respective rows in the excel file and then upload that excel into my database. But Excel isn't really the best choice for writing any type of paragraph length content or for editing.

Then I thought maybe I could write content in Word, have that link to an Excel file, and then upload that file to the db...
And then I thought, this is getting more and more complicated!

In time, I will be writing a lot of pages, so cell by cell pasting really isn't an ideal solution. Each row/product will include multiple cells of multi-paragraph length content. Each row also will have some short one two word cells, like product name, etc.

Most importantly, I want to make sure I start writing my content in a way that I can easily import it into the website. I don't want to start writing it in one way and then realize, wow I could be saving hours if I did it this way instead.

What do you guys do when you are writing your content for your site? Where do you start writing your content? How do you then import that content into your database?

Thanks!

crashomon

8:24 pm on May 12, 2004 (gmt 0)

10+ Year Member



Hi, use a text editor and regular expressions to 'pre-format' the text for EZ database import

For example: use \t to add tabs where necessary for 'field usage' and
use \n for end of record usage.

Using regular expressions is the best way to convert/prep large amounts of data for use in databases.

Its not the full answer, but once you start seeing how it works, you'll wonder how you got along without it!

Good luck!

Patrick Elward

uncle_bob

8:26 pm on May 12, 2004 (gmt 0)

10+ Year Member



Have you thought of adding content management features to your website, so you can add content via a web page straight into db. Then you are not tied down as to where you work, and it can start to simplify your data entry by having a custom page with the necessary fields/dropdowns etc to add the data easily.

I feel that the CM features are a high priority in website design as otherwise you end up having to edit your site as raw html or db tables.

CompressedAir

9:59 pm on May 12, 2004 (gmt 0)

10+ Year Member



crashomon:
Thanks for the tips. I'm pretty sure my writing will include things like that too. Good to remind me though! :)

uncle_bob:
I didn't really consider adding a specefic webpage with fields that I could fill in. I suppose I could make that without that much work. Although what PhpMyAdmin gives, although not great, would suffice for web-based entry. Even with such a system, I would still need to write things out and then copy them to the webpage, and then make that page add everything to the db.

I had thought I would do it this way from the beginning, but now that I look on it, it just seems to be a pain.

Maybe perhaps what I am looking for, is a direct method that allows me to write my content in Word and then (some automatic steps insert here) and then it's in the database.

Is something like that possible? Or does everyone just do the copy-paste procedure?

crashomon

2:54 pm on May 13, 2004 (gmt 0)

10+ Year Member



Repeat: do NOT use word for cut-n-paste as you'll often be pasting in lots of unneeded code -Microsoft word pasted- content can be up to 53kb, when the same sample pasted in from a text document is only 7k!

So, whenever possible, use a text-based editor (textpad, notepad, etc).

And, sorry, but saving a microsoft word document as "text" isn't good enough either.

(This is the reason why Dreamweaver has a function called "remove Microsoft Word tags")

hope that helps!

crashomon

CompressedAir

5:32 pm on May 17, 2004 (gmt 0)

10+ Year Member



Aha, I didn't realize what you were saying at first about copy-and-paste from Word, but after some testing now I see characters like " ' , don't copy correctly. This seems to be more of a pain than I originally thought.
I was looking through some of the other editors available, UltraEdit looked good.
I'd really like something with spellcheck. I'm going to miss Word's spelling and grammar check though :(.