This could be a stupid question, and have a very obvious answer I'm sure... But I'll be damned if I can find it anywhere!
Any help would be much appreciated:
Here's the issue...
I wish to have a selection of mp3's available on my ning site. (page created for this)
These mp3's can be listened to by anyone, but only downloadable if you are a member.
So I'm guessing that the download link will have to recognise that you are a signed in member and then somehow allow the download?
Does anyone know how this is done?
Any help on this would be great as it's holding up progress!
Alex
xx
Permalink Reply by Eric Suesz on December 14, 2011 at 4:59pm This sounds like a winner of an idea (assuming there are not copyright concerns, of course), but I'm not sure this is doable. Our current Paid Access system doesn't really account for this type of sale of a product. I'm not sure if anyone has used a shopping cart to do something similar, but I hope they will weigh in if they have.

Permalink Reply by TJ @ jQueryHelp on December 14, 2011 at 6:11pm Hi Alex,
Here's a thought. Give your download links a class of downloadMP3 and style that class with display:none Then display them only for signed in members with this in your custom code box
<script type="javascript/text">
if (ning.CurrentProfile != null) x$('.downloadMP3').show();
</script>
If you are interested in selling your MP3s, let me know because we have a way to sell digital content on Ning sites.
Best wishes!
"TJ"
Permalink Reply by Eric Suesz on December 14, 2011 at 10:58pm Beautiful, TJ! Thank you for providing an alternative!
Thanks for this TJ.
What I was hoping to do was display 2 links next to the title of the mp3. One that that says "Play" and the other "Download".
Everyone can click on play and listen to the mp3, but if a user clicks on "Download" and is not a member, then this pushes them to the sign up page..
Can this be done?
Appreciate your time TJ.
Thanks
Alex
(I may well be interested in selling the mp3's so I would be interested to see how this is done)
Yes , it is almost the same as the script provided by TJ ,
for example your html looks like this:
<p>Song Title <a href="#" id="mp3play">Play</a> <a href="mp3downloadlinkhere" id="mp3download">Download</a></p>
The script should be:
<script type="text/javascript">
if (ning.CurrentProfile != null) {
//this is a member so do nothing
}
else{
//this is not a member
//when mp3download is clicked
x$('#mp3download').click(function(e){
//prevent the download
e.preventDefault();
//redirects them to sign up page
window.location = "http://www.yournetwork.com/main/authorization/signUp?"
});
}
</script>
That's it.
Permalink Reply by Simon Ward on December 20, 2011 at 2:45pm Hi,
Your script Elson, shows everything within the <p></p> if the user is signed IN, and does NOT display content between the <p></p> is the use is signed out.
I think Alex's original post needed to know that the DOWNLOAD link always showing, regardless of being signed in, bu the URL that it's linked too changes depending if the user is signed in.
ie. PLAY will always play a preview .mp3 track, but DOWNLOAD will either let you download an .mp3 (if your a member) or if your NOT a member, push you to sign in /create an account.
Does anyone know how to change the download URL link on the fly?
No , i dont even have hide function for to hide the things in <p></p>
i just set when guest click on download link , it will redirect them to a sign up. and when members click , they can download the file.
x$('#mp3download').click(function(e){
//prevent the download
e.preventDefault();
//redirects them to sign up page
window.location = "http://www.yournetwork.com/main/authorization/signUp?"
});
unless you don't understand the script above.
Michael Goebel replied to Michael Goebel's discussion 'Where have the text boxes on the profile pages gone ?!?!'
Melinda Orr replied to Michael Goebel's discussion 'Where have the text boxes on the profile pages gone ?!?!'
Melinda Orr replied to Michael Goebel's discussion 'Where have the text boxes on the profile pages gone ?!?!'
Melinda Orr replied to Michael Goebel's discussion 'Where have the text boxes on the profile pages gone ?!?!'
Kos replied to soaringeagle's discussion 'killer penguins'
Jordon McGee (Jords) replied to Rafael's discussion 'Multiple Chat rooms for Ning 3.0'© 2013 Created by Ning.
