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

Forum

NC for Hire

So I made a change to my network this week that I think could be very beneficial to other creators.  I noticed that some of my forum posts have between 5k-7k views but not very many replies, so with a little investigation, i realized that these posts where ones with uploaded attachments such as manuals and guides.

I wrote some javascript to require non-members to be forced to sign up in order to download files from my surveyors network.

Here is the code, which must be placed inside your custom code section at the bottom under all of your other scripts.

<script>
x$('.attachments li a').click(function () {
if (x$('#xn_signout').html() != "Sign Out" || x$('#xn_signout').html() == null) {
x$(window.location).attr('href', 'http://yournetwork.com/main/authorization/signUp');
return false;
}
});
</script>

What happens when yo are not signed in and try to download an attachment is it automatically redirects members to the signup page.  Take a look at this post and try to download the attachment and you'll see what I mean.  Tell me what you think!

By the way my network just crossed the 8200 member mark this week!  Hoo-Ray!  I am very picky about my members...

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

Join Ning Creators Social Network

Email me when people reply –

Replies

    • NC for Hire

      Thank you "Where Women Blog".... if you need any help with your network, just give a shout!

  • NC for Hire

    Should also work with Ning 3.0 when the language editor is running at full speed...

  • NC for Hire

    TJ helped me catch a flaw in the code... should be fixed now.. thanks TJ

  • Hi everyone, I was trying this tip and put the code in my end of page custom code - but I'm still able to dowload attachments. Guess I'm doing something wrong. :/

    <script>
    x$('.attachments li a').click(function () {
    if (x$('#xn_signout').html() != "Sign Out" || x$('#xn_signout').html() == null) {
    x$(window.location).attr('href', 'http://www.community.collengworld.com/main/authorization/signUp');
    return false;
    }
    });
    </script>


    • this is what I use. But it will prompt to login on any page visit but still allows pages to be crawled by search engines unlike using your privacy settings.

       


      • hi David, did you attach something?
        • Yes, but it doesn't seem to recognize the code on the page. Let me try with backtick.

          ```

          <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
          <script type="text/javascript">
          x$(document).ready(function() {
          if (window.location.pathname != "/" && window.location.pathname != "/index.php") {
          if (navigator.userAgent.toLowerCase() == "googlebot"
          || navigator.userAgent.toLowerCase() == "googlebot-image"
          || navigator.userAgent.toLowerCase() == "googlebot-video"
          || navigator.userAgent.toLowerCase() == "yahoo slurp"
          || navigator.userAgent.toLowerCase() == "yahoo! slurp"
          || navigator.userAgent.toLowerCase() == "bingbot"
          || navigator.userAgent.toLowerCase() == "slurp"
          || navigator.userAgent.toLowerCase() == "msnbot") {
          //Do nothing. Open for search engines
          }
          else {
          var lsCookieValue = getCookie('xn_id_eflclassroom');
          if(lsCookieValue == '' || lsCookieValue == 'undefined' || lsCookieValue == null)
          {
          window.location="http://community.eflclassroom.com/main/authorization/signUp?" + "?target=" + window.location;
          }
          }
          }
          });
          function getCookie(name) {
          var value = "; " + document.cookie;
          var parts = value.split("; " + name + "=");
          if (parts.length == 2) return parts.pop().split(";").shift();
          }
          </script>

          ```

          • NC for Hire

            this tip was written 5 years ago... seems to still work fine on my site, but Ning has been having quite a few javascript bugs lately..

            • Thanks, i see. I'll try to figure out a way to make it work.

          • Oh thank you, anyway i'd like to leave the content still viewable, i would only prevent the download action, or link opening (eg. google drive folder) without being a member. 

This reply was deleted.

Search the Creators Network

Latest Activity

Mike Collins replied to Kyryl_Ning_Support's discussion Paid Access demo version
"I'd like to be involved in looking at paid access demo please "
1 hour ago
Harly replied to Ivy Williams's discussion Ning Roleplay Sites
2 hours ago
Kyryl_Ning_Support replied to Dr. Krishna Kumari Challa's discussion I am unable to find discussions on my network when I search. Any solutions?
"Hi there,
We are sorry for this. Previously we have been fixing the search on each network separate…"
4 hours ago
Kyryl_Ning_Support replied to Kyryl_Ning_Support's discussion Paid Access demo version
"Hi there,
We are glad to know that you have been excited with this news. I have sent you the privat…"
5 hours ago
Kyryl_Ning_Support replied to Kyryl_Ning_Support's discussion Paid Access demo version
"Hi Matt,
Yes, this post is regarding 3.0 platform only.
Regards,
Ning team."
5 hours ago
Lj Cange replied to Kyryl_Ning_Support's discussion Paid Access demo version
"Exciting news..... I will be happy to assist!"
7 hours ago
Matt replied to Kyryl_Ning_Support's discussion Paid Access demo version
"So Ning 2 paid access will not be updated?"
7 hours ago
Dr. Krishna Kumari Challa replied to Dr. Krishna Kumari Challa's discussion I am unable to find discussions on my network when I search. Any solutions?
"Still the problem is not resolved!"
8 hours ago
Matt replied to Kyryl_Ning_Support's discussion Paid Access demo version
"Is this only for Ning 3?"
8 hours ago
Hugh replied to Anastasiia_NING support's discussion Ning 2Q 2017 plan!
"I'd like to get some reassurance that support will be upgraded. I can't think of a time recently wh…"
12 hours ago
Kyryl_Ning_Support replied to Kyryl_Ning_Support's discussion Paid Access demo version
"Hi Philip,
We are glad to hear that you are willing to help with the beta test, and it will be the…"
18 hours ago
Kyryl_Ning_Support replied to Kyryl_Ning_Support's discussion Paid Access demo version
"Hi there,
Thanks for your endless support! We have sent you the private message regarding joining t…"
18 hours ago
Kyryl_Ning_Support replied to Aubrey Williams's discussion Paid Access 2017
"Hi there!
We do appreciate your feedback, yes we know that based on our history the people wouldn't…"
19 hours ago
Ning via Facebook

#unitewithNING You`re one click away from the place where all questions about #NING find their…

Kos replied to Kyryl_Ning_Support's discussion Paid Access demo version
"Cannot express how happy I am to see Ning growing and expanding once again. It's been a long three…"
20 hours ago
Philip Voice replied to Aubrey Williams's discussion Paid Access 2017
"Thanks. I've applied to help evaluate and I'll make a decision about how I implement paid access in…"
22 hours ago
Philip Voice replied to Kyryl_Ning_Support's discussion Paid Access demo version
"I'm happy help"
22 hours ago
kevin carrasco is now a member of Ning Creators Social Network
yesterday
Kyryl_Ning_Support replied to Aubrey Williams's discussion Paid Access 2017
"Hi Philip,
It's not an issue if you wish to continue to use the other processor for the payments we…"
yesterday
Ning via Facebook

#inspirewithNING More talks, inspiration and success stories on #NING platform! Create your…

More…