1
benell
Partners Hack
  • 2003/12/24 19:08

  • benell

  • Just popping in

  • Posts: 63

  • Since: 2003/12/7


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?


2
Stewdio
Re: Partners Hack
  • 2003/12/24 19:34

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Log into your site and go to the admin panel and use the template manager. From there you should be able to edit the layout of your partners block.

3
benell
Re: Partners Hack
  • 2003/12/24 19:58

  • benell

  • Just popping in

  • Posts: 63

  • Since: 2003/12/7


I know that i dont know what i should edit to get the wished result?

4
svaha
Re: Partners Hack
  • 2003/12/24 20:12

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


To center the image/title place <center> before the href and </center> after the href in xoopspartners_block_site.html like this :

Quote:
<{if $partner.image != ""}><center>
<img src="<{$partner.image}>" width="102" height="47" border="0" alt="<{$partner.title}>" <{$block.fadeImage}> /></center><br />
<{/if}>
<center><{$partner.title}></center>
</a>
<{if $block.insertBr != ""}>


When you have the default template of XOOPS you first have to make a clone, edit the clone and then make the clone the default

Succes

5
benell
Re: Partners Hack
  • 2003/12/25 8:20

  • benell

  • Just popping in

  • Posts: 63

  • Since: 2003/12/7


I tried it, but it does not work?

6
svaha
Re: Partners Hack
  • 2003/12/25 9:31

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Delete the xoopspartner blocks in the directory xoops_root/template_c
Refresh you browser and then it should work
Succes

7
benell
Re: Partners Hack
  • 2003/12/25 18:32

  • benell

  • Just popping in

  • Posts: 63

  • Since: 2003/12/7


Reply ok thank you very much it works

Login

Who's Online

182 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 182


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits