Wednesday, 17 January 2018
  1 Replies
  0.9K Visits
0
Votes
Undo
Hi,

jevents creates thumbnails which works fine. But in case the original image is deleted the thumb stays. Is there some nice joomla or jevents way to get rid of those orphans? --- house cleaning. I would go with a cronjob bash, something like below, but would prefer to do it within joomla backend.

thanks,

toni



IFS=$'\n';
FULLMEDIAPATH="."
JEVENTSFOLDER="jevents"

# save all image names of media folder *except jevents* to array
array=( $(find "$FULLMEDIAPATH" -type f -name *.jpg -not -path "*/$JEVENTSFOLDER/*" | sed 's/.*\///') )

# loop through images of jevents and check if they exist in array of media array
for f in $(find "$FULLMEDIAPATH/$JEVENTSFOLDER" -name '*.jpg' -or -name '*.png'); do
if [[ ! " ${array[@]} " =~ `echo $f | sed 's/.*\///'i` ]]; then
echo "not found $f";
# rm $f;
fi
done

unset IFS;
7 years ago
·
#198182
0
Votes
Undo
Sorry - After we upgraded our forum software the site wasn't giving me unread assigned posts so I missed your question :(

The standard images plugin should delete the thumbnails when you delete the event.

Are you referring to the scaled images from the layout editor or the files with prefix "thumb_"? Also can you confirm if you are using the Joomla media manager to select your images or the JEvents uploader?

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.