Updated 5/3/12: Refined member profile options (custom sorting and placement, hiding, etc)

What does it do?
You can hide, sort, or move modules between the left and right columns of all member profile pages. This script disables the user's ability to move modules around on their own, because you will have complete control on where they show up! This script is the answer to the features requested by several people.

Notes:
   *  This script has three lists. The first is a list of modules to hide, the second is a list of modules for the left column, and the third is a list of modules for the right column.
   *  You can move any module to the left column or the right column. It might look weird to put something like Photos into the left column, but it does work! Just move the module you want (the whole line) to the appropriate list.
   *  The options for each column will be listed IN ORDER. If you put Photos at the top of the list of modules for the right column, it will show at the top of the page in that column.
   *  You cannot have multiple modules in multiple lists. You should only have each module in only one list. You cannot place Photos in the "hide" list as well as the "right" list.
   *  The value in green is the text which will show up by default for the headline of the "Text Box." If you don't want to use this feature, remove this whole line and it will be ignored. Just note that it won't work with multilingual sites.
   *  This goes in your Custom Code box. Not in Developer Mode or CSS areas.
   *  It is wise to place this script at the bottom of all your custom code (outside of all other script tags, as well), just in case you have other things modifying the modules on this page.

<script>(function($){if(window.location.href.indexOf('/profile/')>0){
// REFINED MEMBER PROFILE OPTIONS v1.5 by erikwoods.com
// USAGE GUIDE: http://bit.ly/refinedprofileoptions

// FORCED HEADLINE FOR TEXT BOX
var forceHeadlineForTextBox = 'About Me';

// MODULES TO HIDE
var modulesToHide = new Array(
    '.module_feed', // RSS
    '.xg_module_comment_wall', // Comment Wall
'');

// MODULES (IN ORDER) FOR LEFT COLUMN
var modulesLeftCol = new Array(
    '.module_members', // Friends
    '.module_groups', // Groups
    '.module_forum', // Discussions
    '.module_gift', // Gifts
'');

// MODULES (IN ORDER) FOR RIGHT COLUMN
var modulesRightCol = new Array(
    '.xg_module_activity', // Latest Activity
    '.module_about_user', // Profile Information/Questions
    '.module_text', // Text Box
    '.module_blog', // Blog
    '.module_photo', // Photos
    '.module_video', // Videos
'');

// DO NOT EDIT BELOW THIS LINE
var moduleSelector = $('#xg_layout_column_1 div, #xg_layout_column_2 div');if (typeof forceHeadlineForTextBox !== 'undefined') {if ($('#xg_layout_column_2 .module_text h2').length) {$('#xg_layout_column_2 .module_text h2').html(forceHeadlineForTextBox);}else {$('#xg_layout_column_2 .module_text').prepend('<div class="xg_module_head"><h2>'+forceHeadlineForTextBox+'</h2></div>');$('#xg_layout_column_2 .module_text .xg_module_body').removeClass('nopad');} }$.each(modulesToHide,function(i){$(moduleSelector).filter(modulesToHide[i]).remove();});$.each(modulesLeftCol,function(i){$(moduleSelector).filter(modulesLeftCol[i]).appendTo('#xg_layout_column_1');});$.each(modulesRightCol,function(i){$(moduleSelector).filter(modulesRightCol[i]).appendTo('#xg_layout_column_2');});if($('.draggable, .movable, .sortable').length){$('*').removeClass('draggable, movable, sortable');$('.xg_handle').remove();}
}})(jQuery);</script>

Enjoy, and please let me know if you have any issues or additional features you'd like to see added.

Views: 1758

Reply to This

Replies to This Discussion

i was realy hopo9ing this got rid of thaft annoying extra collumn in 2 collumn layout i hate hate hate that middle collumn  thats too narrow to be useable

what i want is a way to move everything out of thsat collumn and  get rid of it completely

Mr. Eagle,

Let's talk via private message, and I'll get things sorted out for you. Send me a message with examples of the type of page/layout you are referring to (links are even a greater thing for me to look at). We'll hammer it out privately and then I can add it as a tip to the forum.

Yes Erik, when I saw this tip I was on the same page as Eagle. MOVING THE UGLY MIDDLE COLUMN. I want the site to all be 2-Column.

Eagle and Ceddy,

Once I get a spare moment I'll look into a solution for you guys. I've been busy lately, I worked 70+ hours last week. We're in the middle of relaunching navy.com and navyreserve.com.

Once I get the time, I'll dig into it. Promise. :)

Nearly spit up my rum! Yeah, this is a problem. Can't believe I didn't notice when I chose the layout, and can't believe it didn't occur to Ning it would be a problem.

Great stuff Erik, would there be anyway that people could still move the boxes around after?

I edited your code so the music player is at the top / middle of the page by default and it works great :)

- Futurednb

Futurednb,

Unfortunately this script runs every time the page is loaded. It does not save anything - it modifies the layout on page-load. So no, at this point it is not possible to set a default with my script but then allow users to move their modules around afterwards.

One thing you could do, however, is use ONLY the HIDE list and then remove the bit in my code which disables dragging/sorting/moving/etc. But that doesn't totally help - you won't be able to control the order of the modules for the default. In this scenario, you would only be able to control which modules would be hidden.

This script isn't meant to be a total solution, but just to tide over the users who want some more control - at least until they add this feature to the Ning platform.

As for your addition - I checked it out and that is great. I encourage people to make the script work with their own situations, as long as it works or as long as they remove my name from the credits. If someone were to edit it and not realize that their edits made it unusable elsewhere, I wouldn't want anyone to copy the code to their own site and then say "what the heck? This Erik guy wrote such a crappy script!" - LOL.

Anyways, I really like the fact that it can be easily modified like that to accommodate other user's needs. It was certainly a goal of mine to make it easy for technical and non-technical people to use and understand/modify to their own needs. Glad you like it! :)

:) Erik = Top bloke

Hi Erik

Wow you have no idea for how long I've been wanting a solution to this :-)

Only thing is: I pasted your code at the bottom of the custom code box but... it doesn't change anything...

Any idea what the problem could be?

Thanks a lot

Bruno

www.directoreel.com

Bruno,

I've looked at your site. Thanks for the link. Unfortunately I cannot see member profile pages until you approve my membership. Once you do that, I can dig into this further. But at a glance, I'm not getting any JS errors, so it's looking good so far. Chances are that another script is unknowingly interfering. I can see more once I get to a profile page.

The problem is removing the forced headlines. I saw this issue in my own testing two weeks ago and fixed it. I guess I never updated the script on this site, though. My mistake! Please use the updated code. It only updates the last portion, to check to see if forced headlines are used. Sorry for your troubles.

It works and it's awesome!!

Thank you so much!

RSS

Latest Activity

Aaron replied to Aaron's discussion 'Ning Spring Cleaning Begins This Week'
"Hi everyone, Just a quick note to let you know that this spam cleanup is complete. That said, you…"
1 hour ago

NC for Hire
Jen replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"Check it out. I hovered both images, made 2 screen shots (just to capture the hover tip) and placed…"
1 hour ago

NC for Hire
Jen replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"I'm thinking it has something to do with caching. I just inspected the header, and I see 2…"
1 hour ago

NC for Hire
Jen replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"Fire-Tech, You guys have given me major relief, just to know it's not something unique on my…"
2 hours ago
Fire-Tech replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"Same thing here. All of the same issues...in FF and Chrome, but not as bad in Chrome."
3 hours ago
Kos replied to Kos's discussion '3.0 My Thoughts From A Non-Coder (edited 5/20/13)' in the group The Sandbox
"Edited to add a menu layer suggestion [used the Galaxy SIII]"
3 hours ago
Allison Leahy replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"Sure does. Thanks for capturing this."
4 hours ago
Profile IconAndre Lacerda, solo and 2 other members joined Allison Leahy's group
Thumbnail

The Sandbox

Join The Sandbox to experiment with Ning 3.0 now!The Ning Team will be triaging bug reports and…See More
4 hours ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service