XF 1.5 Add Sign Up button in a notice

abdfahim

Well-known member
Is it possible to add the standard sign up button (of the visitor panel) in a notice? Apparently, copy-paste does not work :).
 

Brogan

XenForo moderator
Staff member
Yes, it's possible (I used to have a notice like that), but you will need to ensure the HTML and CSS is correct.
 

abdfahim

Well-known member
What about a button with a link to name.tld/login/login ?
Yes, I ended up doing like that. But I was hoping to use the usual XF structure {xen:link ....} ...
 
Last edited:

abdfahim

Well-known member
Well, I tried below code inside a notice, but it resulted the text "{xen:phrase sign_up_now}" linked to "website.com/{xen:link login}" !
Code:
<div><a href="{xen:link login}">{xen:phrase sign_up_now}</a></div>
 

OUTL4W

Active member
try
Code:
 <a class="button" href="{xen:link 'register'}">Register Now!</a>OR<a class="button" href="{xen:link login}"><span style="font-weight:bold;">Log-In</span></a>
this should show a button for either to register or to login
upload_2016-12-12_19-54-6.jpeg
 

abdfahim

Well-known member
try
Code:
 <a class="button" href="{xen:link 'register'}">Register Now!</a>OR<a class="button" href="{xen:link login}"><span style="font-weight:bold;">Log-In</span></a>
this should show a button for either to register or to login
View attachment 145020

Doesn't work as above (pictures below).

It works if I write as below, but I loose the login overlay functionality.
Code:
<a class="button" href="register/">Sign Up For Free</a><a class="button" href="login/">Log In</a>


1.PNG

3.PNG

2.PNG
 

Steve F

Well-known member
Notices do not allow that type of syntax ({xen:link...}).

Code:
<a class="button" href="register/">Register Now!</a>OR<a class="button" href="login/"><span style="font-weight:bold;">Log-In</span></a>
 

abdfahim

Well-known member
  • #10
I thought so. Thanks for confirming. Is there any way I can open the login overlay on clicking login button in the notice?
 

Steve F

Well-known member
  • #11
Yes.

Add the bit in red
Rich (BB code):
<a class="button" href="register/">Register Now!</a>OR<a class="button OverlayTrigger" href="login/"><span style="font-weight:bold;">Log-In</span></a>
Add this to the EXTRA.css template
Code:
.xenOverlay #pageLogin
{
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 20px;
    border: 20px solid rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
 

OUTL4W

Active member
  • #13
Top