HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Importing photos with "all the goodies"

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#96777 (In Topic #19209)
Avatar

Well-settled

I want to import Drupal 5 photo galleries

This is a piece of the picture from http://ocportal.com/forum/topicview/misc/deploying/back-to-that-drupal-5.htm#post_96776.
I have about 5000 photos organized in galleries that I want to import. I want to get at least the titles, gallery and description included. While I will want to add the comments, this is the same as comments from any of the other data types such as blogs.

I see the ability to import the photos with the gallery relationship. But, what about the title and description? Note that I am not concerned that I need to massage the data before import. I am looking for a well-defined format in which to present it.
Back to the top
 
Posted
Rating:
#96779
Avatar

Community saint

I am not familiar enough with Drupal to give you explicit advice on how to do it however what I can recommend is that you could use the functions in sources/gallery2.php to add your images.

You could write some code that queries your drupal galleries and then use the function add_image to add it to ocPortal.

If you have any coding skills I am sure you could figure it out fairly easy if not then you'll need someones help for sure. I would love to help but right now I am in the middle of a site rebuild that will have me very busy for the next week or 2. After that if you're still stuck I might be able to help.

I have written a couple of importers (one for Revennuke and one for SMF2) but what I did was study existing importers to figure out how to do it.

1 thing I think you should focus on is getting your users imported first as I imagine you will need to link your gallery images to users?
Back to the top
 
Posted
Rating:
#96844
Avatar

Well-settled

That approach makes sense to me. I had been looking at the various "canned import" things but it does seem like it would be easier to just add code to read the info and call the existing functions. Thanks for the suggestion.

As for importing users, yes, it does need to be done first but I virtually have it done. As there is a built-in import tool for users, I just grab the Drupal user info and massage it. I did this work in AWK -- mostly because AWK has been my favorite tool for writing disposable data massaging scripts for about 30 years.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: