-
AuthorPosts
-
portalion Friend
portalion
- Join date:
- October 2009
- Posts:
- 63
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 11
- Thanked:
- 2 times in 1 posts
October 20, 2013 at 4:50 pm #191553Hi
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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
October 22, 2013 at 1:18 pm #509858You 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 Friendportalion
- Join date:
- October 2009
- Posts:
- 63
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 11
- Thanked:
- 2 times in 1 posts
October 22, 2013 at 4:38 pm #509884Hi 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 Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
October 23, 2013 at 8:17 am #509939Hi 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 user says Thank You to phong nam for this useful post
-
AuthorPosts
This topic contains 5 replies, has 3 voices, and was last updated by portalion 11 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum