Fork me on GitHub

Working with Database tables in Mediashare - will this work?  Bottom

  • I have a huge number of albums & nested albums to add in Mediashare. The nested albums are identically repeated inside each upper-level album. Instead of adding them one at a time, I was thinking about just going into the database and copying the rows over & over, while changing the ms_id, and the ms_parentAlbumId, as I add them... It would save me hours in the long run.

    However, I am not sure about the field labeled "ms_viewkey". What is that for? I'm sure it is system generated, and each of them so far are totally different, so if I copy the rows, and don't change this field, is it going to cause a problem?

    Are there any other problems you can foresee with this approach?

    Thanks for your help!



    After looking again, it also looks like I need to change the fields ms_nestedsetleft and ms_nestedsetright, but those look like they are sequential and no problem.

    --
    From the Ashes of Disaster
    Grow the Roses of Success
  • If I'm not mistaken, the viewkey is the unique identifier for each media item. To verify that, look at an image you've already uploaded that's working and look at the URL. If it matches the viewkey for that item in the database then you have your answer.

    I really don't know how you'd fake that number for an import. It might be meaningless other than needing to be unique, so you could come up with your own unique ids and give it a try. Experiment :)

    Alternatively you could look through the module code and see how viewkey is created to find out if it has to be constructed in any particular way.
  • thanks bronto, I'll experiment with it & keep my fingers crossed for the not needing to be unique part! I don't really know enough about PHP coding to understand all of what I'd be seeing, but it would be a good opportunity to learn more I suppose.
    thanks for your help once again.

    --
    From the Ashes of Disaster
    Grow the Roses of Success

This list is based on users active over the last 60 minutes.