We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Guests: PM Notification
Topic Started: Jul 26 2013, 11:40 AM (245 Views)
i2pm
Member
[ *  * ]
Like when you view this skin:
http://s4.zetaboards.com/CHWH/index/?setskin=1308636

You see the PM at the bottom right. I would like to have that for guests that view the forum. So it will basically say "You need to register to view content" and if they click it, it will redirect you to the register page. Also an option for them to close the PM box at the bottom right.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
if ($.zb.logged_in === false) {
if ($.zb.get('PMH') !== 'true') {
$('#main').append('<div style="display: block" id="pmtoast"><a href="' + main_url + 'register/" id="pmlink" style="height: 50px">You need to register to view content</a><a id="pmclose" href="#">Close</a></div>');
}

$('#pmtoast a').click(function () {
$.zb.set('PMH', true);
$('#pmtoast').hide('slow');
});
}
//]]>
</script>
Offline Profile Goto Top
 
i2pm
Member
[ *  * ]
Umm when I viewed my board as a guest and refreshed it. I no longer see the box. It only appears once after u clicked it once. Can u edit the code so that it appears every time a user is not logged in.
Edited by i2pm, Jul 26 2013, 04:55 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this:
Code:
 
<script type="text/javascript">
//<![CDATA[
if ($.zb.logged_in === false) {
$('#main').append('<div style="display: block" id="pmtoast"><a href="' + main_url + 'register/" id="pmlink" style="height: 50px">You need to register to view content</a><a id="pmclose" href="#">Close</a></div>');
}
//]]>
</script>
Offline Profile Goto Top
 
i2pm
Member
[ *  * ]
Yes! Exactly what I wanted. Thx again Cory! :)
Offline Profile Goto Top
 
Eccentric Feline
Member Avatar
梦想
[ *  *  *  *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic