Advertise Here

Author Topic: Code Conversion  (Read 2225 times)

0 Members and 1 Guest are viewing this topic.

Offline Oldcrow

  • SMF For Free Newbie
  • *
  • Posts: 1
    • View Profile

  • Total Badges: 7
    Badges: (View All)
    Mobile User Combination Topic Starter Level 1 First Post
Code Conversion
« on: January 19, 2014, 02:00:46 pm »
I was browsing the other night and came across a ZB forum that had a Registration Popup Image for Guests onlt to Register, this image stay all the time to remind you, and only viewed by the Guest.

So I looked around until I found the code, but it will not work in SMF

I was wondering if the old code could be reworked to work in SMF boards..

<script type="text/javascript">
//<![CDATA[
$(function () {
    var iURL = 'URL_IMAGE';

    if ($.zb.logged_in === false) {
        if ($.zb.get('sIMG') !== 'true') {
            $('#main').append('<a href="' + main_url + 'register/"><img id="sIMG" src="' + iURL + '" alt="Register" style="position: fixed; bottom: 20px; right: 5px" /></a><a href="javascript: void(0);" id="sIMG-close" style="position: fixed; bottom: 5px; right: 5px">Close</a>');
        }

        $('#sIMG-close').click(function () {
            $.zb.set('sIMG', true);
            $('#sIMG, #sIMG-close').hide('slow');
        });
    }
});
//]]>
</script>

Appreciate any help here, I am not a coder and don't have a clue..

Ron..


 

Related Topics

  Subject / Started by Replies Last post
7 Replies
2085 Views
Last post April 28, 2008, 02:08:22 am
by DaveM
8 Replies
2578 Views
Last post April 29, 2008, 03:44:33 pm
by simply sibyl
12 Replies
3277 Views
Last post May 25, 2008, 08:17:47 pm
by -A-
0 Replies
1173 Views
Last post May 13, 2008, 04:41:11 pm
by Purple
3 Replies
1811 Views
Last post June 26, 2009, 08:42:18 pm
by SMF For Free