We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

oxwall default image if image not found. | Forum

dave Leader
dave Jul 9 '13

We need to have a place in admin to set a default image.  And if that image is not found via the newsfeed then the default image will be used.

 

What happens is that if someone uploads a photo, then removes it, we get the blank box with the x in the newsfeed.  What i have been doing is going into the userfiles and uploading a default image with the same name so atleast it will show something. 

 

This can easily be done by traping the error, checking fileopen to be sure it does not exist, then renaming the def image to that name.

Den Team
Den Jul 10 '13
By implementing such checking, newsfeed will require additional huge resources for execution. As this file checking should be performed for each photo, displayed in newsfeed. You know files operations are too expensive in PHP :)


There is another way we are going to fix this: newsfeed will perform a checking in db for each photo. An if any none exists, remove it from entry. This will be implemented in some next update. 


dave Leader
dave Jul 10 '13
excellent thanks Den :)