Social Web Directory :: Social Network Directory :: Ning Tips and Ning Support
This is a cool tip I picked here on JenSocial to add content at the bottom of every forum post.
<!-- Special Ad or Content Bottom of All Forum Discussions/ Code Provided by JenSocial.com. Do not remove credit. -->
<div id="tmp_insideforum" style="display:none;">
<img>
</div>
<script type="text/javascript">
if (typeof(x$) != 'undefined') {
x$(".xg_widget_forum_topic_show div.discussion div.description").after('<div id="insideforum"></div>');
var t_insideforumCode = document.getElementById('tmp_insideforum');
var insideforumCode = document.getElementById('insideforum');
insideforumCode.style.backgroundImage="url('http://storage.ning.com/topology/rest/1.0/file/get/1212722114?profile=original')";
insideforumCode.style.backgroundRepeat="no-repeat";
insideforumCode.innerHTML = t_insideforumCode.innerHTML;
}
</script>
<!-- End Special Ad or Content Bottom of All Forums / Code Provided by JenSocial.com -->
I've modified it to add a simple red line in view of eventually putting short site-wide messages when needed. It worked great except that...
It took us two weeks with the help of Mayra from Ning support to figure out that it was that bit of code that caused our Advanced panel to give us weird intermittent LESS compile errors when just hitting Preview, that without making any change to either LESS or CSS, just Preview!
Chrome was unusable, Safari and Firefox barely, only Opera could be used to make any CSS change.
Ning said they couldn't reproduce the problem and that it was up to me to figure it out by elimination. It took me a while, going through my CSS, LESS and Custom Code to find out which bit was causing the Advanced panel to malfunction.
Now I know a little bit of JavaScript, jQuery and the Ning API, and I've been staring at that bit of code for a few days and can't figure how in the world it can screw up so weirdly the Developer Mode's Advanced Panel for some browsers, sometimes while displaying a perfectly valid webpage.
Ning works in mysterious ways!
Anyone has a clue?
Tags:
hmmm, maybe you should remove the credits. =) That stinks. I can't imagine how the code would mess up the Dev Mode. I'll try to take a closer look with fresh eyes. One thing that stands out for me on quick look, the img tag with no image:
<img>
Still, very surprised this code could cause the dev mode to malfunction. But you're right. Ning can be a mystery. Sorry this happened to you. Always remove all Custom Code when any problem arises. And add the blocks of code back, one at a time.
Best,
Jen
The error was a "URL:match" error. Other admins on the network had the same problem, so it was not a matter of browser cache. The most puzzling aspect was its intermittence: I could make one or two changes on any given day, no more.
Yeah, Custom Code and extra CSS, one by one... Major pain in the butt, if you ask me.
I'll experiment some more with this and let you know if something comes up.
It's a great tip and I'd love to make it work: I want to add a "Jump to the latest reply" link at the bottom of each post. It should have been a piece of cake but...
BTW - Your tip works flawlessly on my test network =/
Update:
It seems to have been the empty <img> tag that was crashing the Dev Mode.
For what reason? Search me!
Welcome to
JenSocial: Social Web Directory and Ning Tips
Posted by JenSocial on May 7, 2018 at 8:35pm 9 Comments 1 Favorite
Posted by JenSocial on January 6, 2017 at 4:00pm 10 Comments 1 Favorite
Posted by JenSocial on October 22, 2016 at 1:05am 0 Comments 0 Favorites
Posted by JenSocial on September 17, 2016 at 12:00am 26 Comments 1 Favorite
Posted by JenSocial on August 31, 2016 at 3:30pm 13 Comments 0 Favorites
Ning 3.0 Tip - Add Buttons/Links Below Status Update (Quick Links to Add Photos, Posts, Discussions)
Started by Ning.spruz.com in Ning 3.0 Feb 19. 0 Replies 0 Favorites
Started by Evelina in Ning 3.0 Aug 30, 2023. 0 Replies 0 Favorites
Started by Ning.spruz.com in Ning 3.0 Jan 15, 2022. 0 Replies 0 Favorites
© 2024 Created by JenSocial. Powered by
© Copyright JenSocial.