Current status of the Ning Platform is always available on the Ning Status Blog.

Forum

NC for Hire

Hi all,

UPDATED 10th Jan 2015 and now compatible with v2 themes, and supported here.

Inspired by the conversation going on over here, I have spent today writing a hack so that members of your Ning 3.0 network can include YouTube, Vimeo, ReverbNation, SoundCloud etc embeds on their profile pages (like they can in text boxes on Ning 2.0).

This places an embed below the member profile cover area, like so:

The script assumes that the embed code is iFrame based, as those eagle-eyed in the code stakes will soon see, and works by asking members to insert the embed code into a profile question.

Here is a step-by-step guide:

1) Add a Profile Question to your Ning 3.0 site. Make it a "Website Address" answer and you MUST include the word 'embed' in your question. In this instance the question is

Include a video or music player on your profile page by inserting embed code below

You might want to change the wording but make sure that embed is in there.

2) Go to the Custom Code section of your Ning 3.0 site and add the following script to the End of Page Code box.


<!-- PROFILE PAGE EMBED www.SweetPotato.me.uk -->
<script>
x$(document).ready(function() {
if (x$('.aboutTab-question:contains("embed")').length > 0) {
x$('.module-body.aboutMember').append('<div class="SP_Profile_Embed_Wrap"><div class="SP_Profile_Embed"></div></div>');
}
x$('.aboutTab-question:contains("embed")').remove();
var embed = x$('.aboutTab-questionAndAnswer:contains("iframe")').text();
x$('.SP_Profile_Embed').html(embed);
x$('.SP_Profile_Embed').contents().filter(function(){ return this.nodeType != 1; }).remove();
x$('.aboutTab-questionAndAnswer:contains("iframe")').remove();
});

</script>


3) Now add this css to the Design Studio:

.SP_Profile_Embed {
text-align: center;
width: 100%;
margin-top:20px;
}


Members will now be able to add embeddable vids and music players via their profile update screen.

Here is a working example.

All seem to be responsive if you select the right embed options.

The css ninjas among you will want to tweak the look and feel of the .SP_Profile_Embed wrap, so by all means go ahead.

For now I've gone for simplicity. The embed is below the cover area but it can of course be modified to sit anywhere on the page, just drop me a PM.

Enjoy!

SP

More Tips Here

You need to be a member of Ning Creators Network to add comments!

Join Ning Creators Network

Replies

  • Hi SP,

    Very nice tip!  That was a good idea to use Ning to store the embed in the form of a Profile Question, so nothing external is needed. 

    And I love that you used SP in the class name so we know its your work.  Maybe use SP in the js variables too, i.e. SP_embed.  I use jQH prefixes to "watermark" my code these days.  Makes it easy to find when helping someone who has your code and you are viewing their source to help them debug it.

    Keep up the good work, and best wishes!

    "TJ"

    • NC for Hire
      Thanks TJ and Jen,
      I used your watermarking idea TJ from a while back, although its not second nature which is why I missed the variable. Will change that!
      Hopefully some of those who need third party music players on profile pages will find this of particular use.

      TJ, will reply to your pm soon.

      SP
      • Yep, would be good if we all use a code watermark.  Then when someone shares something here that they found but do not remember where it came from, we can know who it was originally from, just looking at the code! :-)

        I'm sure many people will find your tip useful!

        Best wishes!

    • That was a good idea to use Ning to store the embed in the form of a Profile Question, so nothing external is needed.

      This is a great tip! And I agree, storing it with the profile question was a very outside of the box way of thinking for implementation. Major kudos.

      On a side-note, I don't think many NC's realize and take the time to appreciate the premium resources other creators offer on this forum. Places like WordPress, Tumblr, etc. often require plugin purchases for snippets of code to enhance one's site, whereas, here they are found commonly free. Many thanks for this free premium level tip!

      Fantastic Job,
      -Jords

  • NC for Hire

    SP, Impressive!

    =)

  • I am not using the 3.0 platform yet.. But this was an excellent idea! very cool!

    • NC for Hire
      Lol. I don't think anyone that is griping about absence text boxes (and therefore lack of embeds on profile ages) is actually on Ning 3.0 yet, so I dare say that not many people will use this yet.
      But it's out there for the odd few who need it right now.
      Glad you like it
      SP
      • No, your right.. but look as someone who deals with finding creative ways to manipulate the ning environment... It's stuff like this that I can use to spark perhaps another idea... I like that a lot.

        • NC for Hire
          Cool, let me know what you come up with.
          • I just recently applied to the sand box group. I am not sure that I will be accepted I haven't exactly been labeled here as someone who is helpful sadly. However, this did give me an idea for something else :D ... good stuff hon! Of course if I can pull something off cool I will share it with you. That's the least I can do! :D

This reply was deleted.

Search the Creators Network

Latest Activity

Kos replied to Anastasiia_NING support's discussion Ning 2Q 2017 plan!
"What, in 2.0 themes, do you want Tony?  Most can be replicated with simple CSS.  Can you be more sp…"
2 hours ago
Kos replied to Bizz ( John )'s discussion Ning: Is it possible to enable the comments form on posted videos like we can for photos in activity feed.
""
2 hours ago
Bizz ( John ) replied to Bizz ( John )'s discussion Videos Playing In Activity Feed, check it out on my site, Now shows photos to ( Updated: 27-04-17 )
"Added some more updates on this so it works with photos now also."
3 hours ago
Tim Frank replied to Anastasiia_NING support's discussion Ning 2Q 2017 plan!
"Thank you for the answer. My only regret is that it took just short of a month to get an empathetic…"
6 hours ago
Kyryl_Ning_Support replied to Bizz ( John )'s discussion Ning- Your design studio widget images are not loading
"Thanks, John,
I have posted the info about the fix of the embedded videos under more appropriate po…"
7 hours ago
Bizz ( John ) replied to Bizz ( John )'s discussion Video Issues Again For Embed Videos Showing Blank Box
"Yes I noticed that but I don't think that's a big issue as at least the embeds are working now and…"
8 hours ago
Kyryl_Ning_Support replied to Bizz ( John )'s discussion Video Issues Again For Embed Videos Showing Blank Box
"Hi John,
Yes you are right the issue with embedded videos has been fixed, however, it's only workin…"
8 hours ago
Bizz ( John ) replied to Bizz ( John )'s discussion Ning- Your design studio widget images are not loading
"Thanks for the update Kyryl, and I also see the embed videos images have also been fixed up. Nice w…"
9 hours ago
Tony Rosa replied to Anastasiia_NING support's discussion Ning 2Q 2017 plan!
"Hi, i like it because some Ning 2 themes are very useful to some networks like for example Urban Te…"
9 hours ago
Kyryl_Ning_Support replied to Anastasiia_NING support's discussion Ning 2Q 2017 plan!
"Hi, Tony!
As I know the new themes are not in the plan in Q2, but I'll post the suggestion to creat…"
9 hours ago
Kyryl_Ning_Support replied to Anastasiia_NING support's discussion Ning 2Q 2017 plan!
"Hi, Tim!
We do apologise for the misunderstanding, unfortunately, our ticket system could have clos…"
10 hours ago
Kyryl_Ning_Support replied to Bizz ( John )'s discussion Ning- Your design studio widget images are not loading
"Hi, John!
The issue with the picture on the buttons in widgets in the design studio has been resolv…"
10 hours ago
Sarah Kerkman and Max G joined Ning Creators Network
10 hours ago
Ning via Facebook

#unitewithNING #social Facebook and Twitter popularity is the well-known fact. Nothing keeps…

Tim Frank replied to Anastasiia_NING support's discussion Ning 2Q 2017 plan!
"I am really happy that Ning is moving forward again. I hope that some of the improvement will focus…"
21 hours ago
Tony Rosa replied to Anastasiia_NING support's discussion Ning 2Q 2017 plan!
"Hi,
In Q2 will there be the opportunity to choose between old themes similar to Ning 2 or similar?"
yesterday
Lizbeeth Yariela Santiago is now a member of Ning Creators Network
yesterday
Erika Hoff Holmgren replied to Erika Hoff Holmgren's discussion How do I edit my opening posts on the forum? Sticky options?
"OH, I finally realized what my problem was. I had managed to hide the buttons under my menu =u=; It…"
yesterday
Bizz ( John ) replied to Bizz ( John )'s discussion Video Issues Again For Embed Videos Showing Blank Box
"Well I do believe this has been fixed now. Just added a video via an embed from youtube and the ima…"
yesterday
Bizz ( John ) replied to Bizz ( John )'s discussion Videos Playing In Activity Feed, check it out on my site, Now shows photos to ( Updated: 27-04-17 )
"Thanks, will share it once I get a few little options finished like adding it's own comment contain…"
yesterday
More…