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

Tags: code, custom, photos

Views: 238

Reply to This

Replies to This Discussion

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

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

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"

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"

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

RSS

Latest Activity

Larry Matthews replied to Larry Matthews's discussion 'Photos'
"www.dismyhood.com I need to enlarge images on mouseover, on the activity feeds. There is a feed for…"
43 minutes ago
Fabio replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"F A N T A S T I C !!!!! well done guys"
51 minutes ago

NC for Hire
Jen replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"Hi Allison, I have a Client who needs the Search feature. Any updates? I don't see any Search…"
58 minutes ago

NC for Hire
SweetPotato replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"not consistently for all browsers, think SE tried it with mixed results. SP"
1 hour ago
Riccardo Rossini replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
"Sp, can I style also the scroll bar of the browser?"
1 hour ago
Dustin Craig replied to John Bizley's discussion 'Show Your Ning 3.0 Sites'
"Appreciate the tip! I probably won't add this to my current site, but it might be a nice touch…"
2 hours ago

NC for Hire
Bernard Lama replied to Alexander's discussion 'Text Ticker in Ning Bar'
"You are welcome Alex. I'm glad to help you..."
2 hours ago

NC for Hire
Bernard Lama replied to Larry Matthews's discussion 'Photos'
"Can you show me your site and point me to what exactly you want to change?"
2 hours ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service