Drupal 6 and 7: Author and Date Information

tutuploadsmedia_1303498012675.png

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.

tutuploadsmedia_1303498012675.png

Author and Date Information in Drupal 7

tutuploadsmedia_1303496993470.png

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.

tutuploadsmedia_1303497024607.png

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.

tutuploadsmedia_1303497059722.png

{loadposition drupalnewsletter}

Instructor

  • Robbie started her career in corporate training until starting her own custom training and media company almost seventeen years ago. In 2010, she began doing classroom training for OSTraining while running Media A-Team. She is often presenting about various tech topics such as Joomla, Fabrik, Web Development, Social Media, and Augmented Reality. She loves seeing that "ah-ha" moment in peoples eyes in her sessions and workshops. She lives in Houston, Texas, but enjoys all the travel for client work and speaking gigs.

0 0 votes
Blog Rating
Subscribe
Notify of
13 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
criscom

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

kryptonite

I also would like to know a solution for this problem!

kryptonite

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]

Nick

Great job, Kryptonite!!

Kind regards,

Nick

Karla

Thanks, couldn’t for the life of me find out how to do this, but your post helped heaps!

Nick

You’re welcome, Karla! 🙂

Kind regards,

Nick

daniel

Thank you very much sir 🙂

Nick

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

fuuu

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.

Nick

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

jmdpk

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

Sai Saswade

thanks its proper way….

PJ

Gave a quick solution to my long pending issue.) 

13
0
Would love your thoughts, please comment.x
()
x