collapse

Author Topic: Code Conversion  (Read 962 times)

0 Members and 1 Guest are viewing this topic.

Offline Oldcrow

  • DS User
  • Sr. Member
  • *
  • Posts: 293
  • Attack: 85
    Defense: 93
    Attack Member
  • Gender: Male
  • One foot in the grave!
    • Seniors Worldwide
Code Conversion
« on: January 19, 2014, 02:09:14 PM »
I was browsing the Internet the other night and came across a Zeta Board that had a Registration Popup Image.

So I looked around and found the code, but it will not work on SMF, I made some changes and tried different things, still will not work.

Have a look at the Code and see if maybe we can somehow change it so it'll work on SMF.

<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" />[/url]<a href="javascript: void(0);" id="sIMG-close" style="position: fixed; bottom: 5px; right: 5px">Close[/url]');
        }

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

Thanks Ron..

Offline Skhilled

  • Administrator
  • Hero Member
  • *
  • Posts: 2642
  • Attack: 3025
    Defense: 2963
    Attack Member
  • Gender: Male
  • Retro Gamer!
    • Doc Skillz!
Re: Code Conversion
« Reply #1 on: January 19, 2014, 03:02:22 PM »
Hmmm, I'm no coder but believe the problem is with the following variables: zb, iURL and sIMG.

I have never seen those in SMF before and assume that they are local to the board you are referring to and used in it somehow. You would have to change those vars to whatever the SMF equivelant is...

OR, initialize them in SMF somehow so they will work but that is beyond my knowledge.


Offline Oldcrow

  • DS User
  • Sr. Member
  • *
  • Posts: 293
  • Attack: 85
    Defense: 93
    Attack Member
  • Gender: Male
  • One foot in the grave!
    • Seniors Worldwide
Re: Code Conversion
« Reply #2 on: January 19, 2014, 04:23:39 PM »
Agent Moose made this code, he does codes for ZB and SMF. His two boards are closed and they refer you to SMF free forum support board, but AgentMoose hasn't posted they in over a year.  So I figure he has moved on being a young kid..

I Registered there and made one post but the board looks as dead as a door nail.

Thanks Steve..

Ron..
« Last Edit: January 19, 2014, 09:47:28 PM by Oldcrow »

Offline beast

  • Vietnam Veteran
  • DS VIP
  • Sr. Member
  • *
  • Posts: 363
  • Attack: 0
    Defense: 0
    Attack Member
  • Gender: Male
  • So What
    • stumpburner
Re: Code Conversion
« Reply #3 on: January 20, 2014, 08:47:31 AM »


  I don't know any thing about code. Well, I take that back. I know enough to brake ever thing. I would like to know where to put it and then try it with out the i, s, and zb. I wonder if it would work then?

   :taz:
thank [you] for reading my post





Offline Skhilled

  • Administrator
  • Hero Member
  • *
  • Posts: 2642
  • Attack: 3025
    Defense: 2963
    Attack Member
  • Gender: Male
  • Retro Gamer!
    • Doc Skillz!
Re: Code Conversion
« Reply #4 on: January 20, 2014, 09:22:26 AM »
Those are variables that hold specific information. This part:

var iURL = 'URL_IMAGE';

is telling iURL to hold the url of an image but it is not globally initialized yet. The other 2 vars are not initialized at all and I've never seen them in SMF so I'm not sure what they relate to originally.


 

ordinary
ordinary
ordinary
ordinary