Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: Desktop - helmikuu 10, 2006, 05:48:40 AP

Otsikko: MouseOver highlight for table cells?
Kirjoitti: Desktop - helmikuu 10, 2006, 05:48:40 AP
I'm trying to have the catagory tablecells as links to the boards. This is what I tried...

In Boardindex.template.php I changed this :
<td class="windowbg2" align="left" width="60%">

to this :

<td class="windowbg2" align="left" width="60%" onmouseover="this.className=\'windowbg\'" onmouseout="this.className = \'windowbg2\'" onClick="document.location=\'', $board['link'], '\'">


Which didn't work exactly:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi1.tinypic.com%2Fnfo3k9.jpg&hash=884354d95b68c28d14ede6ff237146df9d6fe279)

So what can I use instead of  ', $board['link'], ' to link each sell to it's board? Or is there another way of doing it? Please help! Thanks!
Otsikko: Re: MouseOver highlight for table cells?
Kirjoitti: Acf - helmikuu 10, 2006, 10:54:28 AP

onClick="document.location=\'', $settings['default_theme_url'], 'index.php?board=', $board['id'], '\'"
i am not sure but think that this will work.

Otsikko: Re: MouseOver highlight for table cells?
Kirjoitti: Desktop - helmikuu 11, 2006, 01:55:41 IP
That worked thanks so so much! It rocks!

I tried to work out how to do that for the boards themselves too but I couldn't figure out where to put the code or what the code was. Would that be in messageindex.template.php? Where abouts would it go?
Otsikko: Re: MouseOver highlight for table cells?
Kirjoitti: trenchteam - heinäkuu 09, 2006, 12:59:52 AP
I tried this over and over with no success. In the default template around 137 I found this to work.

<td class="windowbg2" onmouseover="this.className=\'windowbg\'" onmouseout="this.className = \'windowbg2\'" onClick="document.location=\'', $settings['default_theme_url'], 'index.php?board=', $board['id'], '\'">

Just thought I'd share that with everyone.
Otsikko: Re: MouseOver highlight for table cells?
Kirjoitti: niko - heinäkuu 09, 2006, 07:56:37 AP
make a block element with 100% width and height? <a href="" style="display: block; width: 100%; height: 100%;">Text</a>