BuddyDev

Search

Recreating from another app

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #39548

    Hi Brajesh, Ravi..

    Decided to make a new gallery and member site separate from my main wordpress site. In the end I went for Piwigo art gallery application. Not bad, but I need more features and a wordpress core.

    I am wanting to transfer everything into mediapress/buddypress and I know it will be a big task, I was hoping I could use WP all import to map fields between the two applications. Plus I don’t mind creating the users from scratch if needed, but would appreciate any kind of advice regarding the albums and assigning those to the users. If need be I could add those manually also, but would rather make things as automatic as possible.

    So are there any ways to FTP folders and folder structures to mediapress and have it read these in, instead of manual ?

    As I say any advice at all to make the job simpler would be great.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #39553

    Hi,
    Welcome back.
    For the current version of MediaPress(There are plans to move meta to separate table in 2.0), all extra data is stored in post meta.

    1. MediaPress galleries are stored as custom post type ‘mpp-gallery’. The gallery creator is the post_author field.
    We store an extra post meta ‘_mpp_component_id’ for each gallery. This is either user id for user/sitewide gallery or group id if the gallery belongs to group.
    You will also need another meta ‘_mpp_media_count’ which stores the number of media in a gallery.

    2. We also use 3 taxonomies(with predefined terms slug) for type, status and component

    The Taxonomies and terms are:-
    ‘mpp-component’ :- ‘_members’, ‘_groups’, ‘_sitewide’ (underscore is prefixed for uniqueness)
    ‘mpp-type’ :- ‘_photo’, ‘_video’, ‘_audio’
    ‘mpp-status’:- ‘_public’, ‘_private’, ‘_loggedin’, ‘_groupsonly’, ‘_friendsonly’, ‘_followersonly’, ‘_followingonly’.

    You do not have to create these terms as they will be automatically created for the taxonomies based on your current active plugins/components.

    You will need to assign one of the status, type and component term to each gallery and then ad the component meta.

    2. The media is stored as WordPress attachment post type. Gallery is set using post_parent field. We set the component_id and status, type, component in the same way as above.

    Each attachment contains some of the post meta. The following 2 are needed.

    
    '_mpp_component_id' :- Numeric value as explains for gallery
    
    '_mpp_is_mpp_media' :-  numeric value(1). It is used to mark the attachment as MediaPress media. 
    

    Hope you can map it and use as you need.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #39558

    Thank you gloriously for all the info Brajesh, hope you are well.

    I realised that the directory structure used for my other application was a duplicate of the original mediapress structure, in that all the folders are numbered based on the user ID of the member. I think also I may have a database copy from back then also which would include the mediapress entries. If not I can look at the details you’ve given here and see if I can work out how to recreate the member gallery from my old setup onto this new website.

    Thanks again

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #39561

    Brajesh…

    If I have an old copy of the database, which tables would I import ? I think this is going to be the easiest way. Then I can search and replace domain references.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #39571

    Hi,
    In case of old database, you only need to impost bthe Posts and post meta table.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #39575

    Hi,

    I took the plunge and gave it a go, initially things looked ok. I imported the users table and the user meta table, as these would have to tie in with posts and postmeta, but even though it imported all the galleries and the correct titles etc, they all had an incorrect URL and were mapped to the admin member. No media showing, even though same structure.

    I think the next would be to import all the buddypress tables?

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #39576

    I searched and replaced the URL references to the old domain also

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #39588

    Hi,
    Please link me to your site and a page with media. I will check the media src and assist you.

    Thank you
    Brajesh

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #39591
    This reply has been marked as private.

You must be logged in to reply to this topic.

This topic is: not resolved