• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Make whole Notice box clickable

Skylined

Active member
#1
To make things easier and to get more user registrations, I would like to make the whole Notice box clickable, not just the text in it.

Is it possible?


upload_2015-8-26_21-9-14.png
 
Last edited:

Chris D

XenForo developer
Staff member
#2
There's actually a neat little trick, borrowing an approach from the alerts drop down that can sort of do this.

It's a bit long winded, for what it is, but it has a nice effect.

Your notice content needs to have a rather strict structure:
HTML:
<ul style="margin: 0">
    <li class="PopupItemLink" style="list-style: none; cursor: pointer;">
        This is a link to a thread <a href="index.php?threads/1" class="PopupItemLink">click here</a> to read it.
    </li>
</ul>
Any content inside the <li> tag (must have a PopupItemLink class) will be clickable, and the link it will activate is the <a> tag (must also have a PopupItemLink class).

It's not exactly how you want it - only the content inside the <li> tag will be clickable, but that's still likely to be more effective (and easier to use) than just a small link.

You will only be able to have one a.PopupItemLink inside an li.PopupItemLink for this to work.