Migrating into rtMedia


#1

Hey there…

I have a custom site with over 65,000 users. I’m converting it over to BuddyPress and would like to use rtMedia to handle the photo galleries for the users. I need some help with the tables/fields you use. (I will also be purchasing some of your addons to enhance the plugin so hopefully that will entice you to help me get it working)

When I move the photos into the database fields for rtMedia, profiles become unresponsive. I assume this means I’m missing something.

INSERT INTO wp_posts
(post_author,post_date,post_date_gmt,post_title,post_excerpt,post_status,comment_status,ping_status,post_name,post_modified,post_modified_gmt,post_parent,guid,menu_order,post_type,comment_count)
SELECT (select user_id from usertable u where u.name = a.name),NOW(),NOW(),album,id,'hidden',
'open','open',album,Now(),Now(),0,CONCAT('http://sitename.com/rtmedia-album/',album,

'/'),0,'rtmedia_album',0
FROM albums a WHERE a.name <> ''
AND a.id IN (SELECT DISTINCT album FROM imagetable WHERE priv <> 1)

INSERT INTO wp_rt_rtm_media
(blog_id,media_id,media_author,media_title,media_type,context,context_id,cover_art)
SELECT 1,(select id from wp_posts w WHERE w.post_excerpt = a.id AND w.post_type = 

'rtmedia_album' AND w.post_author = (select user_id from usertable u where u.name = a.name)),
(select user_id from usertable u where u.name = a.name),
album,'album','profile',(select user_id from usertable u where u.name = a.name),id
 FROM albums a WHERE a.name <> ''
AND a.id IN (SELECT DISTINCT album FROM imagetable WHERE priv <> 1)

INSERT INTO wp_posts
(post_author,post_date,post_date_gmt,post_title,post_excerpt,post_status,comment_status,ping_status,post_name,post_modified,post_modified_gmt,post_parent,guid,menu_order,post_type,post_mime_type,comment_count)
SELECT 
(select user_id from usertable u where u.name = i.name),'1970-01-01','1970-01-01',description,id,'inherit','open','open',description,'1970-01-01','1970-01-01',
(select id from wp_posts w WHERE w.post_excerpt = i.album AND w.post_type = 

'attachment' AND w.post_author = (select user_id from usertable u where u.name = i.name)),
CONCAT('http://sitename.com/pics/',url),0,'attachment',CONCAT('image/',RIGHT(url,3)),0
FROM imagetable i WHERE priv <> 1




INSERT INTO wp_rt_rtm_media
(blog_id,media_id,media_author,media_title,album_id,media_type,context,context_id,cover_art)
SELECT 1,(select id from wp_posts w WHERE w.post_excerpt = i.id AND w.post_type = 

'attachment' AND w.post_author = (select user_id from usertable u where u.name = i.name)),
(select user_id from usertable u where u.name = i.name),
description,
i.album,
'photo','profile',(select user_id from usertable u where u.name = i.name),id
 FROM imagetable i WHERE i.priv <> 1

Any idea what I’m failing to insert? Or if that is the issue?


#2

anyone? I really need to get these albums, photos, and comments moved over but I’m missing something that rtMedia is wanting.


#3

Hi @Britton_Pentakill,

Sorry for delay in reply. As you had created this topic without selecting category, hence we missed your query. Now, I have assigned category to this topic.

You can refer this link for database description -> http://docs.rtcamp.com/rtmedia/developer/database-description/.

I seems not figure out these SQL queries that you have made, can you please simplify it ?


#4