Advertisement:

Howto create a sidebar for my theme

Aloittaja farenheitcx, toukokuu 21, 2011, 04:08:35 IP

« edellinen - seuraava »

farenheitcx

Hi!
First, i search on this forum but the codes here can't help me to solve my question.

I need some help to personalize my theme. My smf version is 1.1.13, the trouble now is for add a customizable sidebar in the index.template, something like this screenshot:


[nofollow]

For more info, see the index.template attachment on this topic
http://www.megaupload.com/?d=005J3FDB [nofollow]

Baby Daisy

あなたは私のお尻にキスするとき、私はそれを愛する

farenheitcx

Thanks dude, but that is not what I needed. I am searching a way to create that sidebar, not with a mod to do that.

Baby Daisy

The easiest way to do it is to install SP and then customize it the way you want... it would make things a lot easier for you.
あなたは私のお尻にキスするとき、私はそれを愛する

Gary

Though floating a div to the right in the correct place on index.template.php also does the trick. :P
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Antechinus

Or you can use relative positioning instead of float (can be more stable that way, depending on exactly what you're after). Or you can wrap one div inside the other. ;)

Check these out for a start: http://matthewjamestaylor.com/blog/perfect-multi-column-liquid-layouts and http://matthewjamestaylor.com/blog/ultimate-multi-column-liquid-layouts-em-and-pixel-widths

farenheitcx

#6
Very nice guys!. I can solve this, only find and replace this

search this in indextemplate.php
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '


replace with

<table id="mainbody" valign="top">
<tr>
<td style="width:704px">';
}

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
<td valign="top" style="padding-top:29px" valign="top">
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like-box href="http://www.facebook.com/pages/Clan-G-unit/121848454538860" width="292" show_faces="true" stream="false" header="true"></fb:like-box>
</td>
</tr>
</table>


This is a simple way with table.
In this example, i use the sidebar to put the facebook like button. Enjoy!

Antechinus

Why do you need the div if you're using a table? You can just put the code straight into the table cell.

farenheitcx

Lainaus käyttäjältä: Antechinus - toukokuu 22, 2011, 03:50:27 IP
Why do you need the div if you're using a table? You can just put the code straight into the table cell.

Fixed. Thanks.

Advertisement: