How do I remove "posted by" and "date" info?

wack0 - October 30, 2005 - 17:37

Hello!

I just installed Drupal. I am trying to customize my pages so that they do not display the Posted by and Date info.

For example, I want to create static pages that display my contact info or something, so I create a new page, and it shows that I posted it and at what time. This is annoying because I do not want my Drupal site to look like a blog. I want it to look like a regular website.

Is there a way to create static pages differently? With Nuke, I could make my own modules and create a link to them, with Drupal, when I create a menu item it asks for a link within drupal, so it wont let me link to my own customized php page. HELP!

Removing "posted by" and "date" info under adminster -> themes

nevets - October 30, 2005 - 17:56

To remove the "posted by" and "date" info goto admininister -> themes -> configure (tab). Scroll down to the section labeled 'Display post information on' and uncheck the content types under it that you do not want the information displayed for.

thanks!

wack0 - October 30, 2005 - 18:13

o wow thank you so much! you are the best!

how is it done "Removing Post by and date"

goldy736 - June 27, 2009 - 13:05

hi wacko,

am a newbie i follow the post for removing the post and date information i try to uncheck the the page and story in global settings in themes but i cant make it , it still displays ..... i have no clue with with

node.tpl.php and please can u explain me in elaborate what shoul be done in it .....

thank you

remove author but leave the date

nylink - October 30, 2005 - 19:25

is this possible ?

if phptemplate yup possib

sangamreddi - October 30, 2005 - 19:40

Hi,

If you are using phptemplate U can customize the node.

http://drupal.org/node/30628#comment-52664

Check this link and modify to your needs. Remove the author print call from ther and leave the date print.

Sunny
www.gleez.com

i'm using the bluemarine theme that came with it

nylink - November 2, 2005 - 00:27

does anyone know which file and which line should I modify in order to remove just the author ? (i need the date)

which version of drupal?

sangamreddi - November 2, 2005 - 00:47

Hi,
Drupal version?

Sunny
www.gleez.com

i just downloaded yesterday

nylink - November 2, 2005 - 23:33

so i guess is 4.6.3

where should I look to make sure this is the right version ?

thanks

I was wondering the same.

Juanzo - November 2, 2005 - 06:29

I was wondering the same. PHPtemplate based theme, and Drupal 4.6.2. Is it possible?
--
Hospedaje de Páginas Web

$submitted

yelvington - November 3, 2005 - 01:37

In a phptemplate theme, the file node.tpl.php will invoke the variable $submitted, which contains a string. If there is no such file, copy the one from ../engines/phptemplate/ into the theme's directory and make your changes there. Sangamretti posted a link above to a more elaborate explanation.

In an xtemplate theme such as bluemarine, it's all in one xtpl file. Find the theme's file and look for a line like this:

    <span class="submitted">{submitted}</span>

this line replaces both date

nylink - November 3, 2005 - 08:00

this line replaces both date and author.
I'd like to replace only the author.
how can i do that.

I found a clue

Juanzo - November 5, 2005 - 20:42

Editing the node.tpl, and adding:
<?php print format_date($node->created) ?> prints the creation date of the node. Now i'm only need to print the date only on certain kind of nodes, like article nodes only and not pages.
--
Hospedaje de Páginas Web

Amazing!

Juanzo - November 7, 2005 - 11:20

Thanks a lot Sunny
--
Hospedaje de Páginas Web

Welcome

sangamreddi - November 7, 2005 - 18:08

Curious huh

Albion_Arg - July 23, 2006 - 05:12

It seems as though we searched for the same thing, Jolachabaletzk wey. ;)

date only on certain kinds of nodes

spudart - February 16, 2006 - 21:55

Juanzo, the code to specify what type of node can be found at http://drupal.org/node/12930#comment-20388

Further customizing the date

spudart - February 16, 2006 - 22:11

Instead of using the code you mentioned:
<?php print format_date($node->created) ?>

You can further customize how the date appears by using this:
<?php print format_date($node->created,'custom','F n, Y',$timezone = NULL) ?>

Table 1 on http://us3.php.net/date has a chart showing all the different types of formats that dates can be in. i.e. include day of week, have month as a number or as text.

oops, typo in my date

spudart - February 17, 2006 - 16:42

minor typo. Instead of:
   <?php print format_date($node->created,'custom','F n, Y',$timezone = NULL)

Try this:
   <?php print format_date($node->created,'custom','F j, Y',$timezone = NULL)

You rock!

TerrenceLP - April 19, 2006 - 22:46

Spent a hour on that wacky number format,

format_date($node->created,'custom','F j, Y',$timezone = NULL)

rock!

date format for "posted by"

kkkk - May 26, 2007 - 21:59

Certain themes still use English specific custom date format for "posted by", and I think a better idea is to use ($node->created,'small') which uses the short date format as you can setup under Administration.

Not my idea, found it in the node.tpl.php for the Chameleon theme...

Thank you!

wwwoliondorcom - October 21, 2006 - 08:06

Just thank you!

http://www.oliondor.com

add 'date modified' info

djax80 - May 16, 2007 - 11:31

Hi

Slightly different question, but relevant to the post i think

How do you ADD a 'date modified' element to the page/node...so that you could show when the original content was 'date created' but also the date it was most recently 'date modified'

hope this makes sense? can you do it with 'views'?

Thank you

Djax

Post modified date or changed date

jugglerpm - July 30, 2008 - 18:49

Use $node-changed, to change the submitted by date to last modified date.

<?php
print t('!date - !username', array('!username' => theme('username', $node), '!date' => format_date($node->changed)));
?>

 
 

Drupal is a registered trademark of Dries Buytaert.