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

MG 1.1 Image uplaods

Discussion in 'Media Gallery Support' started by Steff, Jan 23, 2016.

  1. Steff

    Steff Active Member

    Just a quick question.
    Is there anyway of uploading images without them showing in the latest images.
    I'm asking because I wish to upload some stock images to our archives (main categories) but I don't want members to see these images in the latest image list. It would also be great if I was able to change the upload date as I'm replacing missing images that members have already seen but were omitted when I migrated from PhotoPost to XMG
  2. Chris D

    Chris D XenForo Developer Staff Member

    There's no way to do that, but as a workaround you could change the media_date in the xengallery_media table.

    You might want to upload the images to a different category first of all, that none of your normal users can see. Let's say this category has a category ID of 12345, you could then run this query to push the date back:
    UPDATE xengallery_media
    SET media_date = media_date - 31536000
    WHERE category_id = 12345
    31536000 is the number of seconds in one year, hence the query above sets the upload date of all the images to be one year prior to the date it was actually uploaded.

    After you've changed the date, you could then move the images (using inline moderation tools) to the correct category.

    I should add, we don't recommend the use of manual database queries very often, so proceed with caution and take a backup before doing anything in the database.
  3. Steff

    Steff Active Member

    Wow thanks Chris that is an excellent workaround. That will save me anoying members with uploads that they have already seen, but are historically important. :)

Share This Page