Generic Link for "My Friends" and Menu Tab - Ning 3

Hello everyone!

If you want to add a menu item to your main menu that will take a member directly to their "My Friends" list, this is how you can do it.

1. Go to the Social Site Manager, first icon in the set of icons on the top left of your page if you are the site's NC.

2. Click "Site & Pages"

3. Click "Add a Page"

4. For Page type, choose Link.  For Status, choose Published.  For Tab title, choose "My Friends" or "Your Friends" or whatever you want to call this new menu item.  For URL, enter

http://YourSite.com/members?friends=

but change YourSite.com to whatever the main URL is for your site.  Then click Save.

5. Add this code to your Custom Code, End of Page Code box:

<script type="text/javascript">

x$(document).ready(function() {

if (ning.CurrentProfile) x$('a[href="http://YourSite.com/members?friends="]').attr('href', 'http://YourSite.com/members?friends=' + ning.CurrentProfile.id);

});

</script>

Again, change YourSite.com to the main URL for your site, i.e. for here, it would be jensocial.com.

Save the Custom Code by clicking Save.

If you want, you can go back to Site & Pages and make your new menu item a subtab by clicking "Make this a sub-tab" under the Tab title.  If you do that, click Save.

If a non-Member clicks this Menu choice, they will see All Members, unless that page is not Public, then they will be asked to Sign Up or Sign In.

That's it.  I tried this out on my Ning 3 site and it works fine.  I hope it works for you all as well.

Best wishes!

"TJ"

Views: 955

Reply to This

Replies to This Discussion

Excellent tip, thanks TJ! =)

Works good TJ. Thanks for sharing :)

And, if you want to make a little user menu on the right hand side like you had an account box in Ning 2.0, here's the invite link. http://www.yourning.ning.com/main/invitation/new anything under/main still works including old URLS if you are curious and that I found, was also true for an invite link. Ning didn't include one but there it is. The settings and my profile link you could find under the top bar, I bet it would be as simple as replicating the my profile link with a static URL hack also, and the settings link is static anyways. God Ning 3 is complicated, a the wrong mix of hybrid jquery and ajax manipulation.

Thanks TJ, this along with your profile link code has helped complete my new 3.0 account menu :) Thanks again

Thanks, TJ and Jen; helpful!

~ Holly

RSS

Members

© 2024   Created by JenSocial.   Powered by

Badges  |  Report an Issue  |  Terms of Service

Home
VIP Ning Tips