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...
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>');
I put it into my custom code and it is not working. Any help would be appreciated.=) Thanks
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.
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!
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...)
//remove photo module from Main page:
if (x$('.xg_widget_main_index_index').length > 0) x$('.module_photo').remove();
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:
//remove photo module from Main page for guests:
if ((x$('.xg_widget_main_index_index').length > 0) && (ning.CurrentProfile == null)) x$('.module_photo').remove();
Many blessings to you as well!
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