How do you make the height of the article image 100%?

Discussion in 'General Chat' started by brainegg, Oct 10, 2008.

  1. brainegg

    brainegg New Member

    I want the images on my website to display as 100px in width and 100% in height. That makes it much easier for somebody to resize their image. Whenever I put that in, the system doesn't recognize the 100% in height. How do I modify the article image to display like that?
  2. Vasily_B.

    Vasily_B. Project Manager

    In configuration -> Publishing, set
    Article Photos width: 100
    Article Photos height: 0

    Images will be resized only when it width > 100px
  3. brainegg

    brainegg New Member

    Also, how do you take off the border from around the image? I also want to make the image a regular image instead of a background image.
  4. Vasily_B.

    Vasily_B. Project Manager

    If you familiar with HTML and CSS, you can look at function printImage in file includes/classes/sbr.front.smarty.php
  5. brainegg

    brainegg New Member

    Hi Sergey,

    I was able to take off the border but I can't figure out how to change it from a background image to a regular image.
  6. Vasily_B.

    Vasily_B. Project Manager

    Add to beginning of the function next line
    PHP:
    $aParams['printpage'] = true;
  7. brainegg

    brainegg New Member

    Hi Sergey,

    I'm a little confused with your instructions. Where should I add that?

    function printImage($aParams)
    {
    $config = &sbrConfig::instance();
    $thumbUrl = SBR_URL;
    $thumbUrl.= $aParams['imgfile'] && is_file("uploads/".$aParams['imgfile']) ?
    'uploads/'.$aParams['imgfile'] : $config->get('templates').$config->get('tmpl').'/img/no-preview.gif';
    if(isset($aParams['printpage']))
  8. Vasily_B.

    Vasily_B. Project Manager

    Make it looks like this

    PHP:
    function printImage($aParams)
    {
        $aParams['printpage'] = true;

        $config = &sbrConfig::instance();
        $thumbUrl = SBR_URL;

Share This Page