TinyPortal

Development => Support => Topic started by: Racenut on September 04, 2005, 04:58:04 PM

Title: Block apperance
Post by: Racenut on September 04, 2005, 04:58:04 PM
Is there anyway to make the blocks pull the catbg of your forum rather than the titlebg?
Title: Re: Block apperance
Post by: borgBOB on September 04, 2005, 05:07:57 PM
The call for titlebg in blocks is found in TPortal.Template.php file.  Just edit it to reflect what you want.
Title: Re: Block apperance
Post by: bloc on September 05, 2005, 11:09:32 AM
Actually its in the TPortalBlocks.template.php. :) TPortal.tempalte is only for the articles/news, even frontblocks use TPortalBlocks.

Find :
         echo '<div class="titlebg" style="padding: 4px; font-weight: bold;">', $block['title'], '</div>';
     echo '<div', ($theme ? ' class="windowbg"' : ''), ' style="padding: 4px;">';

     $func = 'TPortal_' . $block['type'];
     if (function_exists($func))
             $func();
     else
          echo doUBBC($block['body']);

And just change "titlebg" there to "catbg".
Title: Re: Block apperance
Post by: Racenut on October 10, 2005, 08:29:46 PM
Quote from: Bloc on September 05, 2005, 11:09:32 AM
Actually its in the TPortalBlocks.template.php. :) TPortal.tempalte is only for the articles/news, even frontblocks use TPortalBlocks.

Find :
ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ,   echo '<div class="titlebg" style="padding: 4px; font-weight: bold;">', $block['title'], '</div>';
ÂÃ,  ÂÃ,   echo '<div', ($theme ? ' class="windowbg"' : ''), ' style="padding: 4px;">';

ÂÃ,  ÂÃ,   $func = 'TPortal_' . $block['type'];
ÂÃ,  ÂÃ,   if (function_exists($func))
ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ,   $func();
ÂÃ,  ÂÃ,   else
ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ,  ÂÃ,  echo doUBBC($block['body']);

And just change "titlebg" there to "catbg".

I tried the change. It didnt work. Could it be because i have an image as the titlebg or catbg rather than just a color?
Title: Re: Block apperance
Post by: Racenut on October 11, 2005, 10:29:45 PM
ok, then let me ask this question. Where is the tportalblocks file supposed to be located? The one i tried that code on was in a folder called transfer.
Title: Re: Block apperance
Post by: IchBin on October 11, 2005, 11:29:38 PM
The TPortalBlocks.template.php file should be located in the default theme folder.