I have a PHP page inside an iFrame on a page I have created on my network. I would like to pass information from the member profile (unique ID and name) to my page. Any ideas how I can do this?
Tags:
Hi Saville,
I think you'll need some javascript in your page that constructs the iFrame for you, and builds the scr attribute based on the ning.CurrentProfile.fullname variables etc.
Permalink Reply by Saville Kaufman on December 7, 2012 at 11:19am Thanks Phil. Can you give me an example of the Javascript I would need to, let's say, display the users fullname. Once I have this I think I can go from there.
Hi Saville,
If you view source on a page when you're signed in, you'll see we create a javascript object called ning.CurrentProfile that has a few different variables in it. ning.CurrentProfile.fullName will give you the name of the currently signed in user. If it's null, then that's a signed out pageview, and you should not generate your iFrame or do something else.
Thanks,
Phil
Permalink Reply by Saville Kaufman on December 7, 2012 at 3:30pm Thanks Phil. I will take a look and see if I can get this sorted.
Here's a very simple example:
<script type="text/javascript">
alert(ning.CurrentProfile.fullName);
alert(ning.CurrentProfile.photoUrl);
</script>
Kos replied to SweetPotato's discussion 'Simple, Responsive Slider for Ning 3.0'
Kos replied to Kos's discussion 'What's The Best Width When Designing A Header in 3.0?' in the group The Sandbox
Kos replied to Joao Fernandes's discussion 'Easy Slider For Ning 2.0'
Kos replied to Allison Leahy's discussion 'Facebook App Updates'
Peter Matthews replied to Peter Matthews's discussion 'Will I be able to merge my 2.0 site with a 3.0 site that I am building now?'
Allison Leahy replied to soaringeagle's discussion '3.0 feature request'
Kos replied to SweetPotato's discussion 'Simple, Responsive Slider for Ning 3.0'© 2013 Created by Ning.
