News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Change Column Width

Started by omega4711, August 09, 2007, 02:55:01 PM

Previous topic - Next topic

omega4711

Hello,

i'm fairly new to SMF and quite a noob, but at the same time experienced in finding the code snippets i need to change my themes on the net. But what i could not find was the place where i can change the column width of the forum index. I looked trough all the template files numerous times, and searched the forum and google, but without any luck.

The reason i want to change the relative width is to integrate the forum seamlessly with Joomla.

Any help would be appreciated!

Greetings,

omega

Deaks

What collumn do you wish to change?

the ones shown on the main page are found in boardindex.template
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

omega4711

I am sorry that i didn't answer for a long time - i move to another place so i was quite busy  :D

I made a screenshot how i want to change the layout:

hxxp:img250.imageshack.us/my.php?image=layoutwb8.jpg [nonactive]

I already searched the boardindex.template, but obviously i'm not good enough to find the relevant lines - i really feel dumb right now  :-[


omega4711

After 5 hours of countless edit attempts, i really can't go on with this. Help anyone ?

codenaught

Ok, the instructions many vary for your template.

But see if you can find the same code in Themes/<theme_name>/BoardIndex.template.php:

Find:

<td ' , !empty($board['children']) ? 'rowspan="2"' : '' , ' class="windowbg" width="6%" align="center" valign="top"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';

Change the valign="top" to valign="middle" so it becomes:

<td ' , !empty($board['children']) ? 'rowspan="2"' : '' , ' class="windowbg" width="6%" align="center" valign="middle"><a href="', $scripturl, '?action=unread;board=', $board['id'], '.0">';

Then if you want to descrease the width of the main board name / board description column, you can find and edit:

<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />


And add a width="" attribute so that it is a smaller width than it currently is.

<td class="windowbg2" width="30%">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />


You may also want to adjust the width for the Posts / Topics column:

<td class="windowbg" valign="middle" align="center" style="width: 12ex;"><span class="smalltext">

And then for the last post column:

Find:

<td class="windowbg2" valign="middle" width="22%">

Change the 22% in that to a bigger width.
Dev Consultant
Former SMF Doc Coordinator

omega4711

you rock, dear sir !

worked like a charm.

My error was that i looked for width attributes where there were none, instead of adding them like you instructed.

Thanks!

ajaaskel

#6
I guess something is changed because I can't find those definitions in "BoardIndex.template.php".  How is adjustment of column width for each column on the main page done with SMF v2.0.9 ?

Edit:
I actually found a solution for some of the rightmost columns in this thread:

http://www.simplemachines.org/community/index.php?topic=478055.msg3344703#msg3344703

However, there is another related problem: 
The message header is truncated early in the rightmost column.  That is something I'd really like to fix.  Please see the attached screenprint below:

Advertisement: