11
OK I review 3.08 and it is totally different from 4.3 and it is rather hard to implement text links in 3.08.
please do the below. It is just a try but i think it works.
1- In newbb/include/functions.php add to newbb_displayImage function like below:
change this:
function newbb_displayImage($image, $alt = "", $width = 0, $height =0, $style ="margin: 0px;", $sizeMeth='scale')
{
global $xoopsModuleConfig, $forumImage;
static $image_type;
$user_agent_is_IE5 = newbb_isIE5();
if(!isset($image_type)) $image_type = ($xoopsModuleConfig['image_type'] == 'auto')?(($user_agent_is_IE5)?'gif':'png'):$xoopsModuleConfig['image_type'];
$image .= '.'.$image_type;
$imageuri=preg_replace("/^".preg_quote(XOOPS_URL,"/")."/",XOOPS_ROOT_PATH,$image);
if(!preg_match("/^".preg_quote(XOOPS_ROOT_PATH,"/")."/",$imageuri)){
$imageuri = XOOPS_ROOT_PATH."/".$image;
}
if(file_exists($imageuri)){
$size=@getimagesize($imageuri);
if(is_array($size)){
$width=$size[0];
$height=$size[1];
}
}else{
$image=$forumImage['blank'].'.gif';
}
$width .='px';
$height .='px';
$img_style = "width: $width; height:$height; $style";
$image_url = "$image."" style="".$img_style."" alt="".$alt."" align="middle" />";
return $image_url;
}
with this:
function newbb_displayImage($image, $alt = "", $width = 0, $height =0, $style ="margin: 0px;", $sizeMeth='scale')
{
global $xoopsModuleConfig, $forumImage;
// START hacked by irmtfan
if (!empty($xoopsModuleConfig['display_text_links']) && !empty($alt)) {
return $alt;
}
// END hacked by irmtfan
static $image_type;
$user_agent_is_IE5 = newbb_isIE5();
if(!isset($image_type)) $image_type = ($xoopsModuleConfig['image_type'] == 'auto')?(($user_agent_is_IE5)?'gif':'png'):$xoopsModuleConfig['image_type'];
$image .= '.'.$image_type;
$imageuri=preg_replace("/^".preg_quote(XOOPS_URL,"/")."/",XOOPS_ROOT_PATH,$image);
if(!preg_match("/^".preg_quote(XOOPS_ROOT_PATH,"/")."/",$imageuri)){
$imageuri = XOOPS_ROOT_PATH."/".$image;
}
if(file_exists($imageuri)){
$size=@getimagesize($imageuri);
if(is_array($size)){
$width=$size[0];
$height=$size[1];
}
}else{
$image=$forumImage['blank'].'.gif';
}
$width .='px';
$height .='px';
$img_style = "width: $width; height:$height; $style";
$image_url = "$image."" style="".$img_style."" alt="".$alt."" align="middle" />";
return $image_url;
}
2- then you can define the configuration in newbb/include/plugin.php
// Display text links instead of image buttons for edit, reply, .... set true or false
$customConfig["display_text_links"] = true;
deka87:
I hope the above will work for 3.08. please inform us.
Maybe some buttons still show up. you just need to define an ALT key for them in source files.