News:

Wondering if this will always be free?  See why free is better.

Main Menu

Windowbg div clickable

Started by Bounty_y2k, December 21, 2014, 04:38:49 PM

Previous topic - Next topic

Bounty_y2k

I have seen this on some forums and I would like to add it to my own. For instance

Instead of clicking on "News and Updates" text users can click anywhere in that line (inside blue rectangle).

I tried editing BoardIndex.template.php like this:
foreach ($category['boards'] as $board)
{
echo '
<a href="', $board['href'], '" name="b', $board['id'], '">
<tr id="board_', $board['id'], '" class="windowbg2">


//smf code

echo '
</td>
</tr></a>';

But this fails (nothing changes) tried some more but same result. Anyone have an idea?

Biology Forums

You can't wrap <a> around <tr>. In order for this to work, you will have to rewrite how the boardindex.template is designed, and make them all <div> and wrap the <a> around the <div>. Long story short, a lot of work!

Arantor

Or attach onclick events to each of the tds and be careful about nesting events so that you catch clicks on actual links (since there are other links in there than just the board name)

There is the BoardHover mod but I don't think it works too well on custom themes.
Holder of controversial views, all of which my own.


Bounty_y2k

Nice,works like a charm. Thank you once again Arantor. :)

Advertisement: