Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By surajsapkota on
When I View Profile I always see History (Member for .. days ..hours). I don't like it and I would like to remove it. But How? Please help me?
Comments
Please help!!!
Please GIve me suggations on how to remove the History ( lying in the profile).
Please! Please!! please!!! help!!!!
customize it
You would have to check http://drupal.org/node/35728
I wouldn't know any other simpler way. Am trying to edit them myself too.
Re: Please help!!!
I went and opened the user.module file in word pad, searched for history, and deleted that whole line of code. That seems to have worked for me.
Editing core code is a bad
Editing core code is a bad idea. Your changes will get wiped out on an upgrade.
edit the user-profile-category.tpl.php
For Drupal 6, copy this file from your /sites/modules/user directory:
user-profile-category.tpl.php
put the copy into your custom theme directory and within that file, replace this code
with:
reference url: http://network.acquia.com/node/1112624#comment-20421
Maybe a bit late, but it
Maybe a bit late, but it does work that way!
Open the user.module file in the Module>>user folder and comment out line 458 to 466 (including the '}')
(tested with Durpal 5.2)
Help me please
Hi. I am also looking to remove the history from the views in profile. Do I actually have to count the lines?!!? How do I know which lines are are 458 to 466, a how do I comment something out?
Thanks!
Insane Fisher
www.insanefishingclub.com
I am the building. I am the tree. I am God, for God's in me.
Just saw your post.. Well I
Just saw your post..
Well I don't know any other way of doing it. Just get some basic code editor which is capable of counting the lines. (I use "proton", which is really nothing fancy)
There are some really powerful tools out there for free as well, for example Eclipse. Instead of deleting the relevant code, you could also just comment it out,
i am correct 1 line (num
i am correct 1 line (num 474) in this block code:
instead return array(t('History') => $items);
write this return array();
correct way
this is correct way http://drupal.org/node/35728
(use profile module in core)
1) create in template.php function phptemplate_user_profile
2) create file user_profile.tpl.php and output what you want,
test:
Correct way - module level
You should not correct drupal's output by changing drupal's code.
If you want to change functionality instead of appearance, you should choose to modify drupal's output in a custom module. In the example, you would have a module called mywebsite. Into the file mywebsite.module you put the following code:
Put the file into /sites/all/modules/custom/mywebsite directory. Put an according mywebsite.info into the directory, too. Activate the module as usual. More information in module developer guide.
I'm having the same issue,
I'm having the same issue, and i tought it would be as easy as you say MarcoR, in theory that should do it, but it doesn't :S, have you tried it? or you just came up with it and suggested it without trying?
Even better would be to use $user
Your code can be improved by using the already known $user variable and just empty the arrays you don't want to be outputted. For instance:
Baris Wanschers (@BarisW)
Drupal specialist
MyAccount_alter module?
There appears to be a module that can do this: http://drupal.org/project/myaccount_alter
"Gets rid of unwanted sections on the 'My Account' page such as the 'History' section or anything added there by a contributed module.
"Install, then go to the myaccount_alter settings page and check off the sections you would like to disable."
I haven't used it, but was searching site on similar keywords and thought this might be a good lead for you. I note the module was updated 2008-Feb-16 (rel. 5.x-1.2), which indicates its a living project.
How does that history data
How does that history data get there?
?
?
=-=
its part of core.
hook_profile_alter
There is a hook_profile_alter to modify this, just implement it in a module:
don't forget about t() function
If you using other language then default English, don't forget about t() function other wise above code will not work.
I've change 'History' > t('History')
how would be this code for
how would be this code for Drupal6?
In Drupal6, create a file in
In Drupal6, create a file in your theme's directory called: user-profile.tpl.php
Give that file the following contents:
That's all I did to remove that section. Hope this helps!
Web Developer, Iowa State University College of Veterinary Medicine
try the code but nothing
try the code but nothing happened, could you give any detail missing please?
Clear Cache...
Clear your drupal cache under: www.example.com/admin/settings/performance in order for this change to take effect.
Adding the
Adding the user-profile.tpl.php file solved it in 30 seconds, no need for an extra module, thanks!
Removing History
4 years later - and this solution came in very handy - many thanks! We had changed our theme, and the person doing it hadn't realised that there was a user-profile.tpl.php file in the original theme folder that contained this modification. I just copied it into the new theme folder and - hey presto! "History" disappeared - fantastic.
...or make a custom module
...or make a custom module and put this inside:
Remove Profile history "Member for" for Drupal 6
Write your own custom module and put this code in it:
This is right on --- but to be more explicit...
In the example above from @AdAstra , the custom module's name is "custom." Lets say you named your module, "sitecustomizations." So then the code would look like:
In other words; you prepend "_profile_alter" with your module name.
Continuing with this example, you create a directory called: sitecustomizations
You place that directory in sites/all/modules
That directory would contain two files: sitecustomizations.info and sitecustomizations.module
The code snippet above goes in sitecustomizations.module
In sitecustomizations.info you would put:
Once you enable the module on the modules admin page, your "History" section will disappear from user profiles.
content2zero.com
If you just want to hide the history
If you just want to hide the history, it might be easiest just to hide the tab with http://drupal.org/project/tabtamer
Awesome
This worked like a charm, thanks!
Other noobs (like myself) who are reading this might want to remember to add your php delimiters so your .module file will actually contain:
I ended up with code printed into my header on my first try. :|
Can anyone tell me how to edit this to also get rid of the "view recent blog entries?"
Hi, Here's another way of
Hi,
Here's another way of removing member since using hook_user
Regards
Sagar
Acquia certified Developer, Back end and Front specialist
Need help? Please use my contact form
Note that you shouldn't
Note that you shouldn't actually use the php close tag, unless you are going to reopen the php tags later in the file, as per the drupal coding standards:
http://drupal.org/node/318#phptags
module remove_history (D6)
http://drupal.org/project/remove_history
Drupal 7
I accomplished it by doing this:
1. Move the file user-profile-category.tpl.php from modules/user to your sites theme folder.
2. Edit the file that is now in your theme folder and comment out everything using the
<!-- -->
html tags.3. Clear your cache.
If there is a better way for doing this in D7 please let me know.
=-=
in D7 history is a field on the user entity
goto admin/config/people/accounts/display
set the format of the history field to 'hidden'
Thank you
@vm Thank you!
content2zero.com
hiding history
in D7 history is a field on the user entity
goto admin/config/people/accounts/display set the format of the history field to 'hidden'
=-=
http://drupal.org/node/138127#comment-5256332 ; )
Just the header
If you want to just hide the header ("History"), this will do:
Of course, make sure that you don't have any other h3's in there.
its pretty simple Go to Home
its pretty simple Go to Home » Administration » Configuration » People » Account settings » Manage Display , History -> Format chose hidden.
=-=
The above suggestion applies only to Drupal 7.x and was already stated above 2 years ago @ https://drupal.org/comment/5256332#comment-5256332
This is the best way to hide
This is the best way to hide history related information. This helped me.
Raj Pawan G
Thanks a lot :)
Thanks a lot :)
In D7 you can use hook_user_view_alter
In Drupal 7 it can also be removed through code using hook_user_view_alter (in a similar fashion as the hook_profile_alter implementations that are explained above).
In a custom module add:
I tried to hide the History section using Features (exporting the User view mode) but that doesnt work.
Hide (Member for .. days ..hours) - History from profile
There is no need to manipulate the Drupal core code or to add anothe code. Just go to following path of your site and set the History field's dispaly setting from "Visible" to "Hidden". That's it!
/admin/config/people/accounts/display
=-=
The advice you've provided wasn't possible in Drupal 5.x Please don't resurrect old posts for EOL versions of Drupal core. Thank you.