• 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

CyclingTribe

Well-known member
#1
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:

upload_2014-12-6_21-35-52.png

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)?

Cheers,
Shaun :D
 

CyclingTribe

Well-known member
#4
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?

Cheers,
Shaun :D
 

Chris D

XenForo developer
Staff member
#5
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:

Code:
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