Changing the Profile Page

Permalink 1 user found helpful
We have set up the login function for one of our clients with access to their profile page, however we dont want them to have access to their Avatar, Messages, and Friends pages that automatically appear on the left column when you go to a profile page. I have tried deleting those pages throughout the site as a something quick to see if it work. But like I thought it didn't and I dont know were to go to take those pages out or hide them.

My questions would be how can I take out the Avatar, Messages and Friends pages and keep the edit page of the user profile?

 
olliephillips replied on at Permalink Reply
olliephillips
If you copy the profile folder to the root/single_pages folder they will be used by c5 instead and you can remove all the functionality you don't need from the files there.

Hope that helps.
scsadmin replied on at Permalink Reply
Yeah i already had the profile folder in the single_pages directory in the root. I deleted the Avatar, Friends and Messages pages and it is still showing them. I deleted this strip of code and the whole sidebar disappeared:

<?php Loader::element('profile/sidebar', array('profile'=> $profile)); ?>

I just cant find the location of profile/sidebar anywhere so I can edit it. I want to keep everything that appears on the left except those 3 pages.
olliephillips replied on at Permalink Reply
olliephillips
That is in concrete5/elements/profile/sidebar.php

Do the same for that file and copy it to elements/profile/sidebar.php

I'm guessing that will work for you.
scsadmin replied on at Permalink Reply
Still not working!
olliephillips replied on at Permalink Reply
olliephillips
Works for me with just the elements/profile/sidebar.php

I just removed the hard coded autonav and those links disappeared.

<?php  
   if($u->getUserID() == $profile->getUserID()) {
      $nc = Page::getByPath('/profile');
      $bt = BlockType::getByHandle('autonav');
      $bt->controller->displayPages = 'custom';
      $bt->controller->displayPagesCID = $nc->getCollectionID();
      $bt->controller->orderBy = 'display_asc';
      $bt->controller->displaySubPages = 'all';
      $bt->controller->displaySubPageLevels = '1';
      $bt->controller->displaySystemPages = true;
      $bt->render('view');
   }
   ?>
olliephillips replied on at Permalink Reply
olliephillips
Just seen your PM - sorry late with my reply. Recommend you keep threads in the forums. There's some very clued up people in here, that might be able to jump in and help too.

The code snippet I posted in my last post, and which I could see in your PM message's sidebar.php extract, is what you need to remove.

When I tested all I needed to do was copy the file I mentioned to the root path i.e elements/profile/sidebar.php, and remove that embedded block (the code snippet)

All worked fine for me.

It sounds like you're testing - so if you're still having problems, and have hacked about with core files I'd be tempted to start with a fresh install.

Hope that helps.
arnorotti replied on at Permalink Reply
I have a similar problem.

Unfortunately, removing that block of code you're talking about removes all of the links.

Currently I get these links:

Edit
Avatar
Messages
Friends
Order History

(I have the eCommerce add-on)

I'd like to remove the Avatar, Messages and Friends links but not remove Edit and Order History.

Possible?
creativesolutions replied on at Permalink Reply
creativesolutions
This is possible! If you go the CSS ( the main.css for your theme) and add the following to it somewhere, preferably at the bottom:

#page #central #body img.u-avatar { display:none; }

This line in the CSS will hide the Avatar from view and keep it from being seen. Please note that this will also make any hard coded alt and/or title tags not display in Google or other search engines due to your adding the "display:none" in the CSS. This will keep you from having to access the PHP to adjust the code so long as you haven't already added any special classes or id's to the source code.

Hope this helps!
arnorotti replied on at Permalink Reply
I hadn't thought of using the CSS to hide the links. That's a good idea - thank you. For the time being I have just hard-coded the links, but your idea is the more elegant solution.
annar replied on at Permalink Reply
I just did this to get rid of the search on the profile page...but it didn't work until I found out you have to go to System & Settings in the Dashboard and clear your cache! Until I did this I did not see any of the changes made from overrides. Found this info in a thread here:http://www.concrete5.org/community/forums/themes/warning-include/#3...
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
I know that its a very old post but still I thought to share the answer. Here it is discussed!
http://www.concrete5.org/community/forums/usage/editing-the-my-prof...

Rony