mod_featcats default item img - Joomla! Forum - community, help and support


hello everyone,
i have small problem, if missing img in article, mod_featcats looks bad.
i use default img, article without img, better text align of item in mod_featcats.
i use file_exists function don´t know, place it.
do know where?
thank in advance!
kubo

i got
just add code:

code: select all

 else{
            $item->image = '<img src="http://127.0.0.1/image.jpg" />';
                           }


to modules/mod_featcats/helper.php
here:

code: select all

               $item->image = "";
               if ($show_image) :
                  $img = "";
                  $images = json_decode($item->images);
                  if (isset($images->image_intro) , !empty($images->image_intro)) :
                     $img = $images->image_intro;
                  elseif (isset($images->image_fulltext) , !empty($images->image_fulltext)) :
                     $img = $images->image_fulltext;
                  else :
                     $regex   = "/<img[^>]+src\s*=\s*[\"']\/?([^\"']+)[\"'][^>]*\>/";
                     $search  = $item->introtext;
                     preg_match ($regex, $search, $matches);
                     $images = (count($matches)) ? $matches : array();
                     if ( count($images) ) {
                       $img  = $images[1];
                       }
                       else{
            $item->image = '<img src="http://127.0.0.1/image.jpg" />';
                           }
                  endif;
                  





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support