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

FORUM

NC for Hire

Are you sick of right-clickers?  Me too.  I'm gonna show you the short and sweet of how to disable right click on your ning using a jquery code. You can also use this code to add a custom context menu to your site, but we won't go into that here at this time.  This code detects right-clickers.

 

x$(document).bind("contextmenu",function(e){
    //you can enter your code here, e.g a menu list
         
    //cancel the default context menu
    return false;
});

 

add this to your custom code box and exterminate right clickers

 

You may want to roll over to homey TJ's site jqueryhelp.ning.com for a beginners guide to jquery, if you're lost..

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

  • Thanks J. But is the code supposed to be vertical like how you have it here? Doesn't seem to work. 

  • Hi J!

    Thanks for the link! :-)

    I haven't tried the code but it looks about right.  Maybe should be x$ though, for here at Ning, right?  And needs to be inside script tags, as my Beginners Guide explains. http://jqueryhelp.ning.com/forum/topics/beginners-guide-to-jquery-and

    This should do the job; very nice!!!

    Best wishes!

    "TJ"

     

    • Not working here. Shouldn't be surprised since G Mail is giving me a 502 Error. Seems to be the day for these things.

  • This reply was deleted.
    • I don't have this code on my site.  Is that what you meant?  LoL sorry if I misunderstood!

      I was just saying that Ning uses x$ for jQuery, not the normal $ alone that most other sites use for jQuery code.  So for this to work on a Ning site, maybe it needs to be:

       

      <script type="text/javascript">

      x$(document).bind("contextmenu",function(e){
          //you can enter your code here, e.g a menu list
              
          //cancel the default context menu
          return false;
      });

      </script>

       

      Best wishes!

      "TJ"

       

       

      • Ha! It works! Thanks once again TJ!

         

        Happy time!

      • @Kris Oh Okay, I understand now!

         

        @Flint  Ning still uses x$.  Maybe the site you mention calls another version of the jQuery library.

         

        If you View Source on any Ning site, you'll find a line near the bottom:

         

        <script type="text/javascript" src="https://static.ning.com/socialnetworkmain/widgets/lib/core.min.js?v=201109221813"></script>

        If you take a look at that core.min.js you will see:

        /* This file is auto-generated. Do not edit it directly. What's inside: jquery (as x$()), jquery.json, dojo-adapter */ if(window.bzplcm)window.bzplcm.ts('js');
        /*!
        * jQuery JavaScript Library v1.6.2
        * http://jquery.com/
        *

        So we still need to use x$ here. I just tried a little code on my site using $ rather than x$ and in the FireFox Error console, I saw:
        $ is not a function

        So maybe you bring in the jQuery library with a line like this:
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

        Then the code with $ alone will work fine.
        Best wishes!
        "TJ"

      • Thanks TJ...this one worked and thank you JFarrow for the great idea! This just solved a big problem I was having with another site creator "grabbing" my images and gifs without asking....Geez...whatever happened to "can I use that please?" and we all know what the answer would have been...-yes

      • Hi TJ!

        Where exactly would I need to place this code to prevent someone from right clicking on my Network background and/or my main page?  Would this affect Groups as well (not wanting it to). 

        Also, would I need to place this separately on my personal page as well?

        Thanks For Your Time,

        Cautious

        • Hi Cautious,

          This code, which should go in your Custom Code box (also known as Analytics box), should work anywhere on your site.  But I haven't used it on my site so I can't say for sure.  If you want it to not work on Groups, this might work:

          <script type="text/javascript">

          var curloc = window.location.href + '';

          if (curloc.indexOf('/group/') == -1) {

          x$(document).bind("contextmenu",function(e){
              return false;
          });

          }

          </script>

          Best wishes!

          "TJ"

           

          • I apologize for not responding sooner but I've been really working hard revamping before reopening my network.  I've learned more in the past three days then I have the entire time I've been on Creators.  The 2nd time around will be awesome. 

            I have copied this code TJ and will indeed, try it out soon.

            Thanks For Your Help! (you too JFarrow)

            Cautious

This reply was deleted.

Announcements

 

Some interesting articles related to community management, digital marketing etc. could be found in our digest. Don't hesitate to leave a feedback so we would know that we should continue :-)

Latest Activity

J.Ayvar replied to ⚡JFarrow⌁'s discussion
Yet Another Time Saver: Code for Finding Members Anywhere in US
"Thanks for share! By the way, It Is possible make something similar with the gender option or both…"
10 hours ago
Catherine Grenfell updated their profile
10 hours ago
Rhonda updated their profile photo
11 hours ago
Rhonda replied to ⚡JFarrow⌁'s discussion
Yet Another Time Saver: Code for Finding Members Anywhere in US
"Hi JFarrow,I would like to obtain this code that you have created for finding members via location.…"
11 hours ago
Stan is now a member of Ning Creators Social Network
18 hours ago
Tyler Durbin replied to ⚡JFarrow⌁'s discussion
Yet Another Time Saver: Code for Finding Members Anywhere in US
"Whoa!  Awesome!!"
yesterday
⚡JFarrow⌁ replied to Bernard Lama's discussion
Tip: (Ning 2.0 and 3.0) How to add multiple custom navigation menus in Ning?
"I was thinking about this just the other day... wondering if there might be a way to collapse the s…"
yesterday
Sir Gissachance replied to marie b's discussion
Landing page : won't save ... fragile, slow and buggy
"Hi marie b,
I had the same problem and the only way mine worked was to open the landing page from t…"
yesterday
9jabook Abi John replied to Anastasia_Ning_Support's discussion
Why should I migrate?
"ning 3.0 is probably the biggest mistake ning has made imo . i ahve been on ning 2.0 for 10yrs ! a…"
yesterday
Anastasia_Ning_Support replied to Ana Massien's discussion
Leaderboards and Points
"Hi there!
This feature was launched as a way of encouraging members to be active and generate conte…"
yesterday
Anastasia_Ning_Support replied to Ana Massien's discussion
Emoji, @mentions and tags?
"Hello Ana!
These updates have been requested for a long time now, but unfortunately, they will not…"
yesterday
Anastasia_Ning_Support replied to Anastasia_Ning_Support's discussion
Step-by-step migration guide
"Hello Fred!

You can check the list via the link - https://www.ning.com/ning3help/content-that-cann&hellip;"
yesterday
More…

Meanwhile, you can check our social media channels