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

Disabling images that were posted before a specific date?

STORMS

Active member
#1
Recently, I've been trying to remove images that were posted before last weekend and so far I've been able to disable the tag using this in EXTRA.css:

/* Block all images*/
.bbCodeImage {
display: none !important;
}

Is it possible to display only IMG's that were posted after a specified date using this method?
 

JulianD

Well-known member
#2
There is no easy way (by easy, I mean there is not Admin Panel for something like this) to do it but I think every possible solution to achieve this involves programming.

Do you want to remove attached images, or external images posted using the
 

STORMS

Active member
#3
There is no easy way (by easy, I mean there is not Admin Panel for something like this) to do it but I think every possible solution to achieve this involves programming.

Do you want to remove attached images, or external images posted using the
External images.
 

JulianD

Well-known member
#4
I know that MySQL supports regular expressions but I'm not sure if that's enough to do what you're asking. Maybe a small php script that loops through the messages doing a regular expression replace would be fine, but unfortunately I don't know much about regular expressions. I can't help you :(
 

Mike Edge

Formerly Da Bookie Mon
#5
You could use

Code:
delete FROM `xf_attachment` WHERE `attachment_id` >='145478451258';
replacing the 145478451258 with the expression date of the last image you want to keep.