Hi,
1. I have 2 categories that use imported rss feeds from a 3rd party that never has images. I know it is possible to have a default image show in these situations, but was wondering if it was possible to have different default images display depending on the category? For example, for category 1 I would like my posts to display a globe (when there is no image) and for category 2 I would like to show a head.The only reason is for the front pages to look better.
2. Ideally, it would be good to have a folder where we could upload a number of images for the situations where there are no images and one of these is randomly selected each time a blog is imported (so that the same image isn't displayed over and over, but guessing thats impossible
Is there any way of achieving the first question?
Kind regards
Mel
Update
I think |I may have found a solution for my option 2 above.
I found the file (I think) that needs editing:
/modules/mod_easybloglatestblogs/tmpl/default_item.php
And adding the following code here:
if (!$postCover && $params->get('show_photo_placeholder', false)) {
$postCover = $post->getImage($photoSize, true);
}
?>
$path='/components/com_easyblog/themes/wireframe/images/placeholder-image.png';
if(stristr($postCover,$path) !==false){
$dir = "images/blogplaceholder/";
$images = scandir($dir);
$i = rand(2, sizeof($images)-1);
$postCover="images/".$images[$i];
}
<?php if ($postCover) { ?>
However, I just get the code showing on the front end above the blank existing placeholder (see image attached)
Have I got the correct path to thew Latest Blogs placeholder image? Are you able to advise as to what is missing in my code?
Mel