Drupal 6 and 7: Author and Date Information
There was one small little feature in Drupal 6 that would routinely drive students in our classes mad. It wasn’t a major feature but it was a major annoynance: controlling the author and date information. Some content on your site simply doesn’t need to display the name of the author and the date the content was written.
Here’s how to find the display settings in Drupal 6 and an explanation of how things have changed for the better in Drupal 7.
Author and Date Information in Drupal 6
The confusing things about these settings in Drupal 6 is that they aren’t in any of the content areas. In fact, it’s a content setting that’s controlled by the theme.
To turn off the author and date information, go to Administer > Site building > Themes > Global setting > Display post information on. That’s not exactly intuitive.
Author and Date Information in Drupal 7
In Drupal 7 the author and date settings have moved. To find them in Drupal 7, you need to look inside the Content types. To get there, click on Structure and then Content types. Then click edit next to the Content type you want to turn off author and date information for.
Scroll down to the bottom of the page and click on the Display settings tab. Here you can uncheck the box and turn off the author and date information.
Unfortunately you can’t get any more specific than this. For example, you can’t turn one on but leave the other off. You also can’t turn these on and off for specific content items. To do that, you’ll need to edit the theme files.
{loadposition drupalnewsletter}
Thanks for your tutorial. I have a special question.
I want to hide the author information and just display the time information.
instead of:
Submitted by criscom on Mon, 06/06/2011 – 11:44
i want:
Submitted on Mon, 06/06/2011 – 11:44
can you give me a hint on how to achieve this?
thanks.
chris
I also would like to know a solution for this problem!
I found it:
“How about if you want to display the date information but not the author information, e.g. you want to see something like:
Posted: February 23, 2011
To accomplish this,
1. Enable Display Settings for the corresponding content type.
2. Edit the node.tpl.php file of the corresponding theme you are using, e.g. themes\bartik\templates\node.tpl.php and located the following command:
print $submitted;
3. Now replace this command with the following code:
// print $submitted;
if ($submitted) {
echo “Posted: ” . date( “F j, Y”,$node->created);
}
4. Save the file and you should see the submitted information in the desired format. Of course, you can use a different date format or add additional node details.”
full article here [url=http://drupal.org/node/1072640]http://drupal.org/node/1072640[/url]
Great job, Kryptonite!!
Kind regards,
Nick
Thanks, couldn’t for the life of me find out how to do this, but your post helped heaps!
You’re welcome, Karla! 🙂
Kind regards,
Nick
Thank you very much sir 🙂
You’re very welcome, Daniel! There’s a lot more available inside to members. Check out [url=http://www.ostraining.com/online/#heading]http://www.ostraining.com/o…[/url] for everything that’s available to you if you become a student at [url=http://ostraining.com]ostraining.com[/url]
Kind regards,
Nick
Thanks for your post above, it’s very helpful.
Is it possible to display the Author and Date information below the text content and not at the top? I have been struggling with this for days. Thank you.
Hi and welcome!
That’s a good question! We would love to get into a discussion with you on this. If you are a student at [url=http://ostraining.com]ostraining.com[/url], please log into the support forum ([url=http://www.ostraining.com/support-forum/)]http://www.ostraining.com/s…[/url] and post the question in there, so that one of our support techs can look into it for you. If you’re not a student, I hope you’ll consider becoming one, so that we can give you the attention you deserve. You can find out more about our online class at [url=http://www.ostraining.com/online]www.ostraining.com/online[/url]
Kind regards,
Nick
I want to change the date (not date format)of comments,
which was previously published by admin or different users in drupal 7.
kindly any help??
Thanks
thanks its proper way….
Gave a quick solution to my long pending issue.)