Plugin code fails - need to see plugin examples in action/live
The example code snippets are helpful but it's difficult when there is no place to actually see the example code in action, a simple sandbox to see what it looks like live would be of great help? My latest issue is with filter "comment_text_load" - my appointed function does not seem to ever get triggered?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?I'm not sure I follow exactly what you mean. You can try adding custom plugin code to any site you're an admin on by going to the plugin editor (http://intensedebate.com/pluginEditor). Is this what you're looking for or have I misunderstood the question?
Thanks. -
Jon, thanks for your very quick reply. I'm writing a plugin of my own and I find it a little bit difficult to get it working. Some parts work and others don't (can't get the comment_text_load filter to work). It's great that you have put up example code of other Plugins at your website, however, it would be very helpful to not only see the code but see it in action somewhere; have a page where the plugin is actually in use (then it's easier to see when you can initiate filters). The "AddToAny Share Button for Comments" example code is for example incomplete (try adding it and you will get syntax error). -
Sorry for the confusion. You can activate any of those example plugins (or any of our plugins) by going to our plugins directory (http://intensedebate.com/plugins). This will allow you to add any of them to your site so that you can see them in action. It will also include all the plugin JS in our script so that you can take a look at the raw source.
I'll try to take a look and see if I can tell where the plugin you mentioned is out of sync with the actual plugin code. Do you happen to know where the syntax error is? That might be helpful...it's probably just an error in converting it to the documentation.
Sorry for the trouble -
Inappropriate?Thanks for pointing me in the right direction (activating the plugins). I have one question in regards to technical design. What is the best way (using intensedebate framework) of including external scripts (i.e. http://www.google.com/jsapi); how do I make sure the external scripts has loaded before accessing them? My current solution is to include the scripts in the <head> section of my own page (outside of the IntenseDebate framework), this makes sure they are loaded before accessed by the plugin code, it would of course be much better to include the "includes" it in the plugin code itself. Any suggestions?</head>
I’m Thankful. Hoping for advice
-
Inappropriate?Sure. We offer an IntenseDebate function to help with loading external scripts that isn't yet in the documentation (trying to catch it up, but not there yet).
IDC.load_js('http://domain.com/script.js');
This will simplify the loading a little bit.
As for making sure it's loaded, you have a couple possible options. If you control the external JS then you can add a callback function to the end of the remote JS to trigger whatever JS you want to run when it has loaded.
You could also define a variable in the external JS and then have the dependent JS check for that variable before running (setting a timeout function to recheck later if it's not fully loaded).
Or, one last possibility would be to just put the initial load in an earlier event (the first load event loads JS and the second funcs one calls it for example). This last approach doesn't guarantee successful load, but will probably work in 99% of all cases anyways.
Hope this helps.
Loading Profile...


