1
nuker
space around images
  • 2006/11/23 20:44

  • nuker

  • Not too shy to talk

  • Posts: 129

  • Since: 2002/12/14


how can we add some space around the images when adding them into our pages via the image manager?

example: the news module. when adding an image to the story, the text runs too close to the image. some white space needs to exist around the image.

i'm sure once i know which files to look into, i can add a css style for the image to put a white border around the image.

problem... i dont' know what file(s) to edit!

thanks!!!

2
jensclas
Re: space around images

Bump:
Is there someone more clever than me who can help with this (AKA a coder??) thanks - jen

3
frankblack
Re: space around images
  • 2006/11/24 20:27

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


class/module.textsanitizer.php, adapt this code to your needs:

if ($allowimage != 1) {
            
$replacements[] = '\3';
            
$replacements[] = '\1';
            
$replacements[] = '.XOOPS_URL.'/image.php?id=\4" target="_blank">\4';
            
$replacements[] = '.XOOPS_URL.'/image.php?id=\2" target="_blank">\3';
        } else {
            
$replacements[] = '';
            
$replacements[] = '';
            
$replacements[] = '.XOOPS_URL.'/image.php?id=\4" align="\2" alt="\4" />';
            
$replacements[] = '.XOOPS_URL.'/image.php?id=\2" alt="\3" />';
        }

4
snow77
Re: space around images
  • 2006/11/24 21:20

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


you can do it through the css too

like this, although depends of the css styles applied in the the theme the code could vary since each theme developer has their own ways to name the styles:

(you can delete the border part if you like)


For images in center blocks (the code for bottom blocks is not there, you'd have to follow the examples and create the styles):

#centerLcolumn .blockContent img, #centerRcolumn .blockContent img, #centerCcolumn .blockContent img
{
margin: 5px;
border: 1px solid #000000;
}


For images in news articles:

.itemBody img
{
margin: 5px;
border: 1px solid #000000;
}

and you can keep searching in the styles to where else you you'd want to apply this.

Login

Who's Online

369 user(s) are online (270 user(s) are browsing Support Forums)


Members: 0


Guests: 369


more...

Donat-O-Meter

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

Latest GitHub Commits