1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[SOLVED - not an XFMG issue] I can insert everyone's media

Discussion in 'Media Gallery Support' started by CyclingTribe, Dec 6, 2014.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    I haven't uploaded any media to XFMG but when I click the camera icon in the editor I'm offered, what seems like, every media item in the gallery.

    What I actually expected to see was the notice that I haven't uploaded any media:


    Is this a permissions issue? Is it because I'm a super admin? or do I just need to run through all the rebuilding options (I haven't done any rebuilding since importing)?

    Shaun :D
  2. Martok

    Martok Well-Known Member

    That definitely doesn't sound right. You should only be able to add your own images via the camera icon.
  3. Chris D

    Chris D XenForo Developer Staff Member

    I can't reproduce this, personally...

  4. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks guys - I've had a dig around in the database and discovered that this is an issue related to our original migration to XF from IP.Suite in Dec 2011.

    I manually moved the images from the IP.Gallery software by downloading them onto my laptop and uploading them to [xfr] User Albums. I created the albums and updated the database to associate them with the username and user ID of the original poster and then uploaded the images. Everything seemed okay; members were happy with the results and so we carried on regardless - new albums were created, new members joined and added their media, and when I did the conversion to XFMG most of it seemed to go okay.

    What I've now found out is that those 646 images that I manually moved over to XF have been ascribed to my user ID. That's why, when I click the camera icon, I have a shed-load of images that appear to belong to me. :LOL:

    Thankfully I still have [xfr] User Albums installed so I can re-associate the images with their original owners.

    Is there an easy way of changing the owner of an image in XFMG from the front-end?

    Shaun :D
    Chris D likes this.
  5. Chris D

    Chris D XenForo Developer Staff Member

    Heh, I had wondered if something like that was a possibility as I couldn't see any way in the code for it to happen.

    Unfortunately, no, there's no front end control to reassign an image to a different user.

    If they have been inserted into an album and the album has the correct user_id it may be possible to update them en masse based on that.

    This should do it but please do take a database backup first:

    UPDATE xengallery_media AS media
    INNER JOIN xengallery_album AS album ON
        (media.album_id = album.album_id)
    SET media.user_id = album.album_user_id
    CyclingTribe and Jeremy like this.
  6. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks Chris, I'll give that a try. (y)
  7. CyclingTribe

    CyclingTribe Well-Known Member

    @Chris D - spot on with the query - many thanks (saved me tons of time manually updating them all!! PHEW!!!). (y)
    Chris D likes this.

Share This Page