jQueryHelp

Help with jQuery Mods and Hacks for your Ning Network!

Hi Tj,

I figured if anyone would know it would be you.  We've been looking to control the pages that visitors can see and which ones they can't.  Ning has the setting where the front page is public and all others are private, but we want a tad more customization to this.

 

I'd like to make Groups public but Member Profiles private, where a visitor would get the Sign Up prompt.  Do you think this is doable with jquery?

 

Thx,

M

Tags: ning

Views: 179

Reply to This

Replies to This Discussion

I would like to have everything public except for the Forum and Blog posts and of course the Private Profiles...

This would be awesome...

Any ideas ?

Thanks a lot
Jerry
It is doable but since the jQuery loads and runs after the page is already rendered by the browser, you'll see the page briefly then it will disappear. That may not be acceptable! I'll have some code for you to try when I get a chance, so you could see how it would work. In the meantime, I'm talking about something very similar at Creators Forum. Check out what I said here:
http://creators.ning.com/forum/topics/hiding-members-profiles-only
There is some sample code there you can try.

TJ is the Admin of jQueryHelp. :) Visit http://YouTubeStars.com :D
Cool TJ, I'll have a look at the other thread.
Maybe it wouldn't be the end of the world if the page flashed quickly and then disappeared. It would be like a little tease. This could work for me.
M

Looking to learn, and learning to look.
Saw the thread. Works! Thank you so much. I've been looking for this for so long. You rule!


Looking to learn, and learning to look.


Mark said:
Saw the thread. Works! Thank you so much. I've been looking for this for so long. You rule!


Looking to learn, and learning to look.

I'm very glad that you found that thread to be helpful! You're welcome! :)

TJ is the Admin of jQueryHelp. :) Visit http://YouTubeStars.com :D
I'm interested in this too but only for "Pages" that I create (+Add a Page).
Is there a way to hide this for only signed in members to view?
Right now I'm using "Groups" that are private that you can do when setting it up but I don't like that each member has to be manually approved.
Until I can answer further, note that at the Creators Forum ( http://creators.ning.com/forum/topics/hiding-members-profiles-only ) I gave this code to hide profiles for guests:

if ((ning.CurrentProfile == null) && (x$(".xg_widget_profiles_profile_show").length > 0)) x$("#xg_body").html("Sign In to see this Profile!");

to hide pages, try to substitute

window.location.indexOf("page") != -1

for

x$(".xg_widget_profiles_profile_show").length > 0

and see if that does it.


To hide forum, substitute xg_widget_forum_index_index for xg_widget_profiles_profile_show in the code.
To hide blog, substitute xg_widget_profiles_blog_show for xg_widget_profiles_profile_show in the code.

Remember to put the code in the Custom Code box, INSIDE a script tag.


TJ is the Admin of jQueryHelp. :) Visit http://YouTubeStars.com :D
Thanks for your help Tj, but it didn't do anything.
I placed this at the very bottom of my Analytics box:
if ((ning.CurrentProfile == null) && (window.location.indexOf("page") != -1)) x$("#xg_body").html("Sign In to see this Profile!");
Between script type="text/javascript" and /script (with the <&> brackets. Odd... I couldn't just paste that in here.

I also tried to change "Sign in to see this Profile" to "Sign in to see this page" along with "ning.CurrentProfile" to ning.Currenpage", still no worky.


Scott Bishop said:
Thanks for your help Tj, but it didn't do anything.
I placed this at the very bottom of my Analytics box:
if ((ning.CurrentProfile == null) && (window.location.indexOf("page") != -1)) x$("#xg_body").html("Sign In to see this Profile!");
Between script type="text/javascript" and /script (with the <&> brackets. Odd... I couldn't just paste that in here.

I also tried to change "Sign in to see this Profile" to "Sign in to see this page" along with "ning.CurrentProfile" to ning.Currenpage", still no worky.

Hi Scott!

Could you please provide a link to the specific page you want to hide from non-members?

Thanks!

TJ is the Admin of jQueryHelp. :) Visit http://YouTubeStars.com :D
Actually for any new page that I create Tj, but here's is a particular page that I was practicing with:
http://surfershot.ning.com/page/survey-1

TJ James said:


Scott Bishop said:
Thanks for your help Tj, but it didn't do anything.
I placed this at the very bottom of my Analytics box:
if ((ning.CurrentProfile == null) && (window.location.indexOf("page") != -1)) x$("#xg_body").html("Sign In to see this Profile!");
Between script type="text/javascript" and /script (with the <&> brackets. Odd... I couldn't just paste that in here.

I also tried to change "Sign in to see this Profile" to "Sign in to see this page" along with "ning.CurrentProfile" to ning.Currenpage", still no worky.

Hi Scott!

Could you please provide a link to the specific page you want to hide from non-members?

Thanks!

TJ is the Admin of jQueryHelp. Visit http://YouTubeStars.com


Scott Bishop said:
Actually for any new page that I create Tj, but here's is a particular page that I was practicing with:
http://surfershot.ning.com/page/survey-1

Try this instead:

if ((ning.CurrentProfile == null) && (window.location.href.indexOf('/page/') > 0)) x$("#xg_body").html("Sign In to see this Page!")



TJ is the Admin of jQueryHelp. :) Visit http://YouTubeStars.com :D
AWESOME!!! It worked.
This brings up another question; All you see on a created page is "Sing in to see this Page!" (when not signed in).
Is there a way to put html coding in there for a "sign-in or sign-up button"?

Thanks so much.

TJ James said:


Scott Bishop said:
Actually for any new page that I create Tj, but here's is a particular page that I was practicing with:
http://surfershot.ning.com/page/survey-1

Try this instead:

if ((ning.CurrentProfile == null) && (window.location.href.indexOf('/page/') > 0)) x$("#xg_body").html("Sign In to see this Page!")



TJ is the Admin of jQueryHelp. Visit http://YouTubeStars.com

Reply to Discussion

RSS

Notifications

Temporarily Offline

Friends of Friends

© 2013   Created by TJ @ jQueryHelp.

Badges  |  Report an Issue  |  Terms of Service

EOP
EOP2