Ning Developer Docs

IMPORTANT ANNOUNCEMENT Regarding the Dojo Javascript Framework

Hi everyone,

We want to let you know about an important change we'll be making in our next release. We will be transitioning away from using the Dojo JavaScript framework. If you’ve done custom development on your network that touches this code, you will need to make changes.

Currently, we are using version 0.3.1, and we will be replacing it with jQuery 1.2.6. This change is scheduled for September 25, 2008. There are a couple of reasons for this. The primary one is that Dojo 0.3.1 is an older version and, for various backward-compatibility reasons, we had not been able to upgrade to newer versions that include their popular Dojo Widget Library.

At this point, we’ve made the decision to move from Dojo to jQuery. jQuery, along with having a lighter footprint, also has a more extensive community and documentation with a higher amount of plug-ins and extensions.

What this means for Network Creators:
Hopefully nothing. Any of the Ning-authored developer hacks and Javascript tutorials don't use the Dojo libraries, although if you're using a third-party service that actively uses the Dojo-based libraries on Ning, this could be an issue. If you're using a third-party application or non-Ning code, check with the third party application provider to see whether their code will be impacted.

What this means for Developers:
If you've been using Dojo, you should start transitioning your JavaScript to jQuery. That said, we've developed a thin code layer called the Dojo-adapter that maps existing Dojo calls to the corresponding jQuery calls so your applications will still work. Here is the list of most commonly used functions that we have mapped:

  • dojo: byId, provide, require, addOnLoad, declare, render.html.*
  • dojo.event: connect, browser.stopEvent
  • dojo.io: bind
  • dojo.string: trim, escape
  • dojo.lang: filter, forEach, extend, hitch, inArray, isEmpty, map, mixin
  • dojo.html, dojo.style, dojo.dom: a lot of useful methods to work with DOM nodes, CSS classes and browser-specific behavior.
  • dojo.json: evalJson, serialize
  • dojo.lfx: wipeIn, wipeOut, fadeIn, fadeOut, highlight
  • dojo.widget: implemented a light-weight (but fully functional) custom widget engine

In a later Ning release, we will likely remove the Dojo adapter (Dojo-adapter) layer, so we highly encourage everyone to start using jQuery as quickly as possible.

Important note for developers that start using jQuery:
Because we don't want to break existing code that already uses prototype.js or jQuery, so the jQuery library is available thru the "x$" shortcut instead of "$" to avoid any conflicts. If you have a lot of code that is written using "$", just wrap it as follows:

  (function($){    ...  })(jQuery);

Let us know if you have any questions!

[Note: This release has been pushed back a week to September 25th. Please see this note on the Network Creator forums for more details.]

Views: 22

Replies to This Discussion

cool
cool
I was serving my own emotes, using jQuery 1.2.1 - New Wave Javascript, referenced from my smilies.php Jscript. Both files were in my own web host and the emotes I created worked superbly until after last nights update.

Now it's throwing an error,,,

I put this in the Analytics box originally and the emotes worked great before, no errors.

I am now getting an error saying
Line 13
Char. 9
Error 'length' is null or not an object
Code 0

Any ideas? Are the emotes something I can run from my WebDav instead of my own site host?

Is it in the jquery file or the smilies.php jscript file, your thought?
OK,,,

So, I tried this. I created a folder called Emotes. In that folder I put the jquery 1.2.1 and my smilies.php Jscript file. Also in that folder, I placed another folder called smilies, which contains the .gifs of the emotes.

I placed that folder (Emotes) in the webdav folder xn_resources (In my test community, tigermansaga)

I reference the jquery 1.2.1 in the smilies.php as:
jq.src = 'http://static.ning.com/tigermansaga/xn_resources/emotes/jquery.js';


The code I put in the Analytics is as follows:
Edit,, wont let me show the code
Here is a gif showing it
http://www.catman1.com/ningpath.gif


I get no error, I get nothing...

Whats my prob here? Is there a Ning jquery I can reference instead of using the 1.2.1 script I put in there?
The forum didnt show the code for Analytics in my 1st post (serving the emotes in my own webhost), so here is is as a gif of that snippet of script

http://www.catman1.com/ningpathcatman.gif
I tried using the jquery 1.2.6 in the test network, letting it serve from the xn_resources.

No go..

Maybe I posted all this in the wrong place.
Our community just wanted a way to see if anyone else was in-site, so to know whether to stay or go, and a couple dozen simple emotes. We really didn't care if the center table was narrower, or if we had Iphone, whatever that is..

We were pretty darn happy with what we had until last night. Our community is now empty. Maybe thats a good thing. Saves some bandwidth somewhere...
Hi Catman,

So taking a look at your network, it looks like the:
part of your code wasn't being saved in the tracking box, from the looks of your network.
You can edit this file directly via WebDav in the /instances/main/plugins/pageEnd.php file.

All of that said, it looks like http://www.catmat1.com/emotes/smilies.php.js is returning a 404 error. Is this correct? Thanks, Ernie
The emotes were working off of the catman1.com host right up until the moment the changes took effect.

The emotes were running on www.wildlife1.com hosted from catman1.com,
The smilies.php.js is a good file but is not going to show "on-click" as a web page, thus the 404 return. I just checked and the file is there (and was working superbly until the Ning update). You can visit that community and will see the little cat emotes all over the place. LOL
This is one of them..



I will need a little help on running it off of the Ning Network, I am using test site: tigermansaga
for tests.
"So taking a look at your network, it looks like the: can't be seen*
part of your code wasn't being saved in the tracking box, from the looks of your network.
You can edit this file directly via WebDav in the /instances/main/plugins/pageEnd.php file."

Yes, it wont show that *script line in here.. LOL

But,, looking in webdav for http://tigermansaga.ning.com/, in main/plugins/pageEnd.php file,, I examined it and see exactly this
http://www.catman1.com/ningpath.gif
(a gif of the code line so its viewable here)

That should access the jquery and the smilies.php.js files, along with a folder with the emote gifs

I updated the jquery from 1.2.1 to 1.2.6

If I had a way, I could send you the folder Emotes. You might be able to tell at a glance whats wrong. Probably in the smilies.php.js since I am getting the 'length' error when running them from my own host?

At any rate, it's an interesting little folder and you can see what it was doing for me before the update last night.
Hi Catman!

Just as a sanity check, can you upload the static.js.php another place, maybe in your social network, and access it that way? And then replace the file from static.ning.com with that new url? This is just to make sure the issue isn't rooted at the static.ning.com.

Thanks, Ernie
I sure can Ernie.
In the test site, tigermansaga, I have the whole shebang in the xn_resources folder.

If I move the smilies.php.js to another folder, should I place the folder of enote gifs there as well?
What other folder would you recommend as a proper location?
I think I'm having the same problem? I had emotes on my site and now they are gone? I'm not much of a developer but I pretty much know what I'm doing? If that makes any sense lol.

Here's the code I had in my analytics box:
< script type="text/javascript" src="http://davidisourhero.com/JS/diohsmileys.php.js">< /script>
I think there's something in the "diohsmileys.php.js" code, that won't word after the NING updates? Maybe someone with a better knowledge of javascript/php can check it out?

Again I don't know tons about javascript nor am I a developer so I'm not sure exactly what the problem is?

RSS

© 2026   Created by Ning Developer Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service