
I have a quick question.. How do I make the photos on my main page invisible. I still want it visible to members but would like to have it invisible to guests.. I have researched and found this code...
<script type="text/javascript">
if ((ning.CurrentProfile == null) && ((x$(".xg_widget_profiles_profile_show").length > 0) ||
(x$(".xg_widget_photo .xg_widget_photo_photo .xg_widget_photo_photo_show").length > 0) ||
(x$(".xg_widget_photo").length > 0) ||
(x$(".xg_widget_profiles_comment_list").length > 0) ||
(x$(".xg_widget_profiles_members_index").length > 0))) x$("#xg_body").html('<div id="country1">Please <a href="http://www.noname.net/main/authorization/signIn">Sign In</a> or <a href="http://www.noname.net/main/authorization/signUp? ">Sign Up</a> to see this page!</div>');
</script>
<style type="text/css">
#country1 {
padding: 2em;
background-color: #eceff6;
color: #dd3c10;
font-size: 200%;
}
</style>
I put it into my custom code and it is not working. Any help would be appreciated.=) Thanks
Permalink Reply by Aaron on August 14, 2012 at 12:04pm Hey Mystical Star,
If you're just trying to hide the Photos widget on your main page, there's a much easier way: set it to display "0" items. This way, it will only appear for you and any administrators on your network, but not signed in members.
Best,
Aaron
Permalink Reply by Aaron on August 14, 2012 at 1:16pm Hi Mystical Star,
Thanks for clarifying that. I'm not familiar with that, so I hope some fellow Network Creators will be able to help out!
Cheers,
Aaron

Permalink Reply by TJ @ jQueryHelp on August 14, 2012 at 9:20pm There is probably a better way to do tihs with CSS, but I am the jQuery guy :)
Try this code in your custom code box. I tried it on a client's site and it worked for me. I don't have the photo module on the Main page of my own site. (Just checked my Features Layout, no Photos module on there, maybe that's the solution! I still have a photos page on my site so they are there...)
<script type="text/javascript">
//remove photo module from Main page:
if (x$('.xg_widget_main_index_index').length > 0) x$('.module_photo').remove();
</script>
Best wishes!
"TJ"

Permalink Reply by TJ @ jQueryHelp on August 15, 2012 at 2:05am Hi Mystical Star,
I'm glad this helped! And sorry I didn't notice you had mentioned you wanted it just invisible for guests. If you still want that, here's the code:
<script type="text/javascript">
//remove photo module from Main page for guests:
if ((x$('.xg_widget_main_index_index').length > 0) && (ning.CurrentProfile == null)) x$('.module_photo').remove();
</script>
Many blessings to you as well!
"TJ"

Permalink Reply by soaringeagle on August 15, 2012 at 9:52am i gi=ot a suggestion\grab the slideshow code
next get the div id for the module
1st try removing the module from main page in features layoiut i think that will either remove the photos feature from the network (not what u want) or just remove it from the main page
if it removes the whole feature pu=ut it back and in css use the div id and display:none to hide it from all
next you add a tab photo slideshow make a new page embed the slideshow code you should also have photos as a tab
set both photos and photo slideshow tabs to members only
havent tested it but seems like it should work im all for simpe solutions haha
Larry Matthews replied to Larry Matthews's discussion 'Photos'
Fabio replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'

Riccardo Rossini replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
Dustin Craig replied to John Bizley's discussion 'Show Your Ning 3.0 Sites'

© 2013 Created by Ning.
