Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • portalion Friend
    #191553

    Hi

    In JA Bulletin Module there are generated small pics 32x32px with title and alt atribute.
    The code is as follow:

    [PHP]<div class=”box-left”>

    <a href=”/category/K2item” class=”mostread-image”>
    <img src=”/images/resized/media/k2/items/cache/cdfa54053805c4a7f333333333339_Generic_32_32.jpg” alt=”alternative text” title=”title text” /> </a>

    </div>[/PHP]

    The question is how to modify files to achive code like this:

    [PHP]<div class=”box-left”>

    <a href=”/category/K2item” class=”mostread-image”>
    <img src=”/images/resized/media/k2/items/cache/cdfa54053805c4a7f333333333339_Generic_32_32.jpg” alt=”” /> </a>

    </div>[/PHP]

    I would like to remove any text from alt atribute and whole title atribute.

    Looking forward to hearing from you.

    Ninja Lead Moderator
    #509858

    You can try to do with my below solution

    Open modules/mod_jabulletin/helper.php file

    Find public function getAticles($params)

    From line 497 to 514


    if( $thumbnailMode != 'none' ) {
    $imageURL = $jaimage->resize( $imageSource, $w, $h, $crop, $aspect );
    if( $imageURL ){
    if ( $imageURL == $imageSource ) {
    $width = $w ? "width="$w"" : "";
    $height = $h ? "height="$h"" : "";
    $item->image = "<img src="$imageURL" alt="{$item->text}" title="{$item->text}" $width $height />";
    } else {
    $item->image = "<img src="$imageURL" alt="{$item->text}" title="{$item->text}" />";
    }
    } else {
    $item->image = '';
    }
    } else {
    $width = $w ? "width="$w"" : "";
    $height = $h ? "height="$h"" : "";
    $item->image = "<img src="$imageSource" alt="{$item->text}" title="{$item->text}" $width $height />";
    }

    Change to


    if( $thumbnailMode != 'none' ) {
    $imageURL = $jaimage->resize( $imageSource, $w, $h, $crop, $aspect );
    if( $imageURL ){
    if ( $imageURL == $imageSource ) {
    $width = $w ? "width="$w"" : "";
    $height = $h ? "height="$h"" : "";
    $item->image = "<img src="$imageURL" $width $height />";
    } else {
    $item->image = "<img src="$imageURL" />";
    }
    } else {
    $item->image = '';
    }
    } else {
    $width = $w ? "width="$w"" : "";
    $height = $h ? "height="$h"" : "";
    $item->image = "<img src="$imageSource" $width $height />";
    }

    Remember to clear cache from Admin area after making changes

    portalion Friend
    #509884

    Hi Ninja Lead

    In file modules/mod_jabulletin/helper.php I have only 466 lines.
    I have found the function getAticles($params) and modified as you adviced.
    Unfortunately no effect, this must be a wrong file.

    Cache was cleared

    May you propose other other solution?

    phong nam Friend
    #509939

    Hi portalion,

    There are two places within the modulesmod_jabulletinhelper.php file you need to remove alt, title attribute. Anyways, you can backup this file and overwrite it with my attached file. Remember to clear JAT3 cache again after overwriting.


    1. helper.zip
    portalion Friend
    #510008

    Thank you Leo
    Now it works fine 🙂

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

This topic contains 5 replies, has 3 voices, and was last updated by  portalion 11 years ago.

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