test
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • chinatrumpet Friend
    #162250

    Hi, I am trying to get the JA News Pro module to load images outside of Joomla articles. I am actually using jReviews which stores images in jos_content.images.

    I know JA News Pro allows you to choose between Joomla core / K2 / Flexicontent for where the text and images comes from. From the helper files I can see there is a set of “adapter” files for each of the above and I have scoured the helper.php and jaimage.php and it seems the $image variable is the one carrying the path to the image. I can’t find where this variable is originally defined however so am having trouble building a work around.

    It would be really helpful if someone can let me know where the $image variable is defined. As I am bit of a weekend warrior on all this, it would be great if someone could also suggest the code change needed to alter this image path.

    Thanks.
    ——————————————————————————————-
    JA News Pro 1.0.6
    Template: Teline IV 1.2.4
    jReviews 2.2.07
    Joomla 1.5.22

    chinatrumpet Friend
    #384492

    <blockquote>It would be really helpful if someone can let me know where the $image variable is defined.</blockquote>

    Can anyone out there help?

    Sherlock Friend
    #384582

    Dear chinatrumpet,

    Open the file modulesmod_janewsprohelpershelper.php ,Look for this snap of codes
    [PHP] $regex = ‘#<s*img [^>]*srcs*=s*([“‘])(.*?)1#im’;

    preg_match ( $regex, $row->introtext, $matches );
    if (! count ( $matches ))
    preg_match ( $regex, $row->fulltext, $matches );
    $images = (count ( $matches )) ? $matches : array ();
    $image = ”;
    if (count ( $images ))
    $image = trim ( $images [2] );[/PHP]

    This snap code would search for img tag inside the article content,you can see the $image varible defined here
    [PHP] $image = trim ( $images [2] );[/PHP]

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  Sherlock 13 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum