TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,026
  • Total Topics: 21,333
  • Online today: 916
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 466
  • Total: 466

giving center block a differnt bg that side block

Started by iGate, October 17, 2008, 03:17:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iGate

hey all,

i want to do is make the background for the center blocks different to that of the side blocks.
i tried to find a div class in the index.template.php but it could not.

if u want to take a look this is my webiste: http://test.ihf.lp.pl/forum/index.php
as u can see the center block bg image is what i wanted to change.

thanks all.

IchBin

The problem with that is that TP use the classes that SMF uses for windowbg2 and catbg etc. If you change these you will also be changing the look of the forum. You are better off customzing your blocks by adding your own custom code and style in the block code.

Lesmond

As IchBin says, you will have to add your own code to the block using html, and use a script block. something like this...

this is a block with just color for the background
<table border="0" width="100%" id="table1" height="141" cellspacing="1" bgcolor="#C0C0C0">
<tr>
<td>
<p align="center"><b>You can fill this with any color you like</b></td>
</tr>
</table>


this is one with a background image
<table border="0" width="100%" id="table2" height="177" background="http://test.ihf.lp.pl/forum/Themes/mysticjade_tp09/images/body-bg.jpg">
<tr>
<td align="center" valign="top"><b><font color="#FFFFFF">You can also
add any image you like, but it will repeat its self </font></b></td>
</tr>
</table>



iGate

my apologies ich and lesmond, when i said background i did not mean the block, i meant the "block title" background. if  need clarification as to what i need please see the link in the OP.

thx.

IchBin

The background and the title have the same issue as I stated in my previous post. The catbg class for the block title is used in many places on the forum.

antechinus

Rather than messing around with script blocks, etc wouldn't it be simpler to edit the TP template to add new css classes, which can then be added to his theme's style.css and styled any way he likes?

As an example, if he knows where to look he can change windowbg2 to windowbgcb (for his center block) then simply add that class to his css and there you go. This can be done for any block.

IchBin

For someone that doesn't know how to code PHP, its most likely not easier for them. There are several places, and often use php to choose between windowbg or windowbg2 for example.

Its much easier to just slap some HTML in a block and customize it to the way you want it.

iGate

well i plan on modifying the admin.template later s i want to learn.

if u could point me in the right direction as to what files may affect the center and side blocks thats would be great. in the mean time i shall search manually

PS: im novice/decent with php. put it this way, if im given code i know how to edit it to make it work for my needs without help usually.

IchBin

TPBlocksLayout.template.php is for the layouts of the blocks. TPortal.template.php has the layout for the articles and forum posts as news. You should find everything you need in there.

This website is proudly hosted on Crocweb Cloud Website Hosting.