Drupal 6 and 7: Author and Date Information |
| April 22, 2011 |
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 6The 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. ![]() |
Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.
Copyright © 2012 Open Source Training, LLC. All rights reserved.
Comments
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
"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\t emplates\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 drupal.org/node/1072640
Kind regards,
Nick
Kind regards,
Nick
Kind regards,
Nick
RSS feed for comments to this post