1
function b_xoopsPartners_show($options)
{
global $xoopsDB;
$myts =& MyTextSanitizer::getInstance();
$block = array();
$arrayIds = array();
if ( !empty($options[2]) ) {
$arrayIds = xoopspartners_random($options[3]);
} else {
$arrayIds = xoopspartners_random($options[3],false,$options[5],$options[6]);
}
foreach ( $arrayIds as $id ) {
$result = $xoopsDB->query("SELECT id, url, image, title FROM ".$xoopsDB->prefix("partners")." WHERE id=$id");
list($id, $url, $image, $title) = $xoopsDB->fetchrow($result);
$url = $myts->makeTboxData4Show($url);
$origtitle = $title;
$title = $myts->makeTboxData4Show($title);
$image = $myts->makeTboxData4Show($image);
if ( strlen($origtitle) > 19 ) {$title = $myts->makeTboxData4Show(substr($origtitle, 0, 19))."..";
}
$partners['id'] = $id;
$partners['url'] = $url;
if ( !empty($image) && ($options[4] == 1 || $options[4] == 3) ) {
$partners['image'] = $image;
}
if ( empty($image) || $options[4] == 2 || $options[4] == 3 ) {
$partners['title'] = $title;
} else {
$partners['title'] = '';
}
$block['partners'][] = $partners;
}
if ($options[0] == 1) {
$block['insertBr'] = true;
}
if( $options[1] == 1 ){
$block['fadeImage'] = 'style="filter:alpha(opacity=20);" onmouseover="nereidFade(this,100,30,5)" onmouseout="nereidFade(this,50,30,5)"';
}
return $block;
}
This is the code of the show partner from the partner block.php, i like to change the layout, tha images are centerend. and maybe change the max image with and height
But i dont understand it ? anyone help?