MyBB Community Forums
[For 1.8] Message for guest to sign up - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: Tutorials (https://community.mybb.com/forum-38.html)
+--- Thread: [For 1.8] Message for guest to sign up (/thread-227872.html)



Message for guest to sign up - Alexander L. - 2020-05-18

Hello,

In this tutorial I will be showing you how to display a message for guests to encourage them to sign up. Perhaps in the near future I can make a tutorial where I demonstrate how you could redirect guests to a new page. 


Requirements:


Step 1:

Install template conditionals

Step 2:

Log into your acp and head over to your templates.


Step 3:

Decide where you want to show your message. In my case I want it in my header.

Step 4:

Usergroup 1 is your guest usergroup

<if $mybb->user['usergroup'] == "1" then>
<div onclick="window.location.href='member.php?action=register'" style="background-color:#EE5A24;color:white;text-align:center;padding:12px 20px;margin-bottom:15px;word-wrap:break-word;border-radius:2px;font-size:13px;"><strong>You haven't registered, if you wish to register, click here.</strong></div><br/>
<else>
</if>



Step 5:

Save your template and try it out.





If you need help or assistance, you can tweet me at @Perileos 
My help/assistance is free as long as you can respect me and my time. 

Kind regards,
A. Longbeach


RE: Message for guest to sign up - DevLife - 2020-05-18

Can post an demo screenshot of how it looks? also how about something like registration subscription? let user decide free or paid.


RE: Message for guest to sign up - Omar G. - 2020-05-19

Thank you for your contribution.

As a suggestion, you shouldn't need the Templates Conditional plugin if you paste the code within the header_welcomeblock_guest template without the <if /> tag.

(2020-05-18, 10:35 PM)DevLife Wrote: how about something like registration subscription? let user decide free or paid.

What does that has to do with this?


RE: Message for guest to sign up - Alexander L. - 2020-05-19

(2020-05-19, 01:32 AM)Omar G. Wrote: Thank you for your contribution.

As a suggestion, you shouldn't need the Templates Conditional plugin if you paste the code within the header_welcomeblock_guest template without the <if /> tag.

(2020-05-18, 10:35 PM)DevLife Wrote: how about something like registration subscription? let user decide free or paid.

What does that has to do with this?

You're right, usually I include this message in postbits and I didn't think about the header_welcomeblock_guest.  Wink