Hi, I made my home page available to public but I wish to have a different view for public then logged in users.

How would i go about removing latest activity feed on home page if user is not logged in?

Also, would it be possible to remove network description and replace it with different message for those who are not logged in?

Network: ccnapier.ning.com

 

*edit*

I have found on these forums something that could help me, just not sure how to structure the code correctly. Could anyone help? I would like the module heading to stay, just below it custom html to appear.

The classes and ids that I am not sure about are highlighted in bold.

<script type="text/javascript">
if ((ning.CurrentProfile == null) && (x$(".xg_module_activity").length > 0)) x$("#xg_module_body activity-feed-skinny").html("Sign In to view the latest activity on Creative Computing!");
</script>

#xg_module_body activity-feed-skinny I am pretty sure it doesn't work because this is id and class together... would it be possible to have this sort of condition?

 

*edit*

Figured it out. I'll leave it here for anyone who might need it. (It hides latest activity on home page in right small column, as well as displays different network description to guests.) Add to custom code.

 

<script type="text/javascript">
  if (ning.CurrentProfile == null) {
     x$("div.xg_module_activity").remove();
     x$("div.xg_module_network_description").html("Welcome Guest!");
  }
</script>

 

 

 

Tags: latest activity, remove

Views: 419

Reply to This

Replies to This Discussion

Please let me know if you notice it effects feeds to facebook and twitter.  I will try it myself but I'm not very saavy technically so I'm sure there is a lot I might miss.

It shouldn't affect the feed to facebook or twitter because this script doesn't exactly "remove" the latest activity, but rather hides it from guests. (I am guessing as I cannot test this right now).

"right small column" being the network description module.

Replacing bold part x$("div.xg_module_network_description").html("Welcome Guest!"); with different module name will result in custom message appearing in a different module.

You are AWESOME!  Thank you so much! I've been trying to figure out how to do this forever :)

Fascinating idea. Please tell us how this benefits you? I like for the general public to learn about homeopathy as a viable alternative to drugs and medicine. My NING is open only to professional homeopaths, physicians and those in the health fields. So, the general public cannot post comments or post forums, etc. 

Having the activity open to only members might encourage members to sign in and participate more or maybe not? Wondering your thoughts?

For me, we are a network of mothers.  Some of the information is not a big deal and there are no issues in it being public, and some of it, of a more private nature.  Only the main page of the site is public, the rest is private.  I leave it so that the main page features/highlights the important aspects of the sites and gives titles of discussions and blogs.  If anyone wants to explore further, I like them to be a member, and they are required to sign in.  As such, they are bound to our policies and code of conduct.  People might want to post pictures of their children or discuss a sensitive topic without having everyone who browses the site see it.  Even with the other aspects of the site being private, you could still see everything in the "Latest Activity" module, and all you needed to do was keep pressing the "more" button  So essentially you saw everything everyone did.  I think it helps make my members more comfortable posting and engaging, which helps create a sense of community for us.

Your site sounds wonderful btw!  I have a lot of admiration for homeopaths.

It worked! So awesome. Now we will see what happens. ♥

Hi Tomas,

I need your help: your script doesn't work for me. There simply is no change. Could you please explain your script step-by-step? 

For example your script has the following:

x$("div.xg_module_activity").remove();
     x$("div.xg_module_network_description").html("Welcome Guest!");

The "Latest Activity" module is represented by this "x$("div.xg_module_activity").remove();", right? So if I write "x$("div.xg_module_video").remove();" then the video module should be hidden, right?

What does x$("div.xg_module_network_description").html("Welcome Guest!"); stand for?

Please help me because I am a bit lost... .

Many thanks,

Tomek

Hi,

First of all, you need to ensure that there is a module name .xg_module_video (it could be called something else). I would try to find out for you, but i don't have an active ning site atm.

The x$("div.xg_module_network_description").html("Welcome Guest!"); is to change network description module into custom text (if user is not logged in, providing your web page is public and has network description module enabled.)

I find this code much better:

<script type="text/javascript">
if (ning.CurrentProfile == null) {
x$("div.xg_module_activity").html("You should register to get all functionalities");
}
</script>

RSS

Latest Activity

Margie replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"That's really good to hear about groups.  That's our site's main…"
21 minutes ago
soaringeagle replied to Alex's discussion 'More styling in the Design Studio'
"sweet awesom e job tho im using text badges and have a feeling that wont look so sweet im gonna go…"
29 minutes ago
Margie replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"AGREE 100% on groups.  We are not interested in blogs.  Our groups are the main…"
33 minutes ago
Thiago Santos de Moraes replied to John Bizley's discussion 'Show Your Ning 3.0 Sites'
"The green background is not good to read."
1 hour ago
Strumelia replied to Shannon's discussion 'VOTE - NING 2.0 or NING 3.0'
"Huh??  Can you elaborate on this please?  or point us to where this is stated or shown?"
3 hours ago
Cindy replied to Allison Leahy's discussion 'What is your Ning 3.0 URL?' in the group The Sandbox
"I coppied all the stuff you posted and I'll check a bit later when the head feels clearer. I…"
6 hours ago
Kos replied to Allison Leahy's discussion 'What is your Ning 3.0 URL?' in the group The Sandbox
"Sorry for that.  Sometimes they fall between the cracks during the week b/c so many have full…"
6 hours ago
Kos replied to Allison Leahy's discussion 'What is your Ning 3.0 URL?' in the group The Sandbox
"Yes sometimes we need to step back and let it all sink in as 3.0 is quite different from the 2.0 we…"
6 hours ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service