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 Mavros Gatos on
How to remove only "Submitted by " in this text: "Submitted by [username] on Mon, 11/24/2008 - 13:51."
Comments
?q=admin/build/themes/settings
in the admin page ?q=admin/build/themes/settings you can disable these per content type
Alan Davison
www.caignwebs.com.au
Alan Davison
It will remove entire
It will remove entire "Submitted by [username] on Mon, 11/24/2008 - 13:51."
I have to remove only "Submitted by "
Sorry, misread the question
In your theme, override the standard function using (Drupal 6)
Just remember to flush the cache after creating the function. Under admin > settings > site performance
Alan Davison
www.caignwebs.com.au
Alan Davison
I need it for Drupal 5 :-)
I need it for Drupal 5 :-)
Thank you Alan for the code
it worked splendidly.
Also checked out your site, really nice and clean design. And the about us picture of your managing director with different photos of him is quite clever and simple.
Duh, given two options, we'll always choose the wrong one...
Very similar:
Just cut 'n' pasted from Drupal 5 node.module. Change theme to your theme name as per above, and change the text.
Alan Davison
www.caignwebs.com.au
Alan Davison
> Just cut 'n' pasted from
> Just cut 'n' pasted from Drupal 5 node.module
Sorry, I was looking for "Submitted by " in Drupal 5 node.module, but didn't find it.
Sorry my search was on another D6 install.
Are you running phptemplate based engine?
If so, modify the standard garland function in your theme:
I haven't run it but it should be fairly painless...
Alan Davison
www.caignwebs.com.au
Alan Davison
I am using "Zen" theme. So,
I am using "Zen" theme. So, where should this code go?
Maybe it's easier just to find a phrase "Submitted by" and change it? Can you tell where it is?
ZEN uses phptemplate engine
Similar code, just modify zen's version of the same file.
The base variable is defined in phptemplate.engine in themes/phptemplate
Alan Davison
www.caignwebs.com.au
Alan Davison
Thank you. Problem solved.
Thank you. Problem solved.
Which file do I append?
I'm using Drupal 6 and need to implement this code. Which file do I paste the code into?
Template.php
It is theme dependent, but paste the fragment from http://drupal.org/node/338814#comment-1124940 in to your themes template.php file
Alan Davison
www.caignwebs.com.au
Alan Davison
That works perfectly, but...
I actually need to remove "Submitted by user on ".
Thanks!
Slight change in the code
Just modify the code to:
:)
Alan Davison
www.caignwebs.com.au
Alan Davison
Thanks!
I appreciate the help. I've ONE more question (I promise!)
How do I remove the "USER's blog" link?
-Carl.
It is a bit harder
This one requires a hook_link_alter, or a custom module. (Untested code)
Eg:
As such, do a search of the forums to see if there is an easier solution, and if not, it may be time to learn some PHP and get into the core of Drupal and create your own module. The site api.drupal.org has some great example modules, just do a function search on 'example'.
PS: If there is a class or id on the link, you may be able to simply hide it. eg: #user-blog-link { display: none; }
Alan Davison
www.caignwebs.com.au
Alan Davison
Am I looking at the same link?
If that link is in a menu, top/sidebar/etc, then all you may need to do is to look through all of your menus and find the link. Then disable it. Easy.
Eg:
List all menus
index.php?q=admin/build/menu
Configure the Nav menu (likely first place to start)
index.php?q=admin/build/menu-customize/navigation
Alan Davison
www.caignwebs.com.au
Alan Davison
Ok...
The "display:none;" thing worked - I don't know why I didn't think of that myself!
However, for some reason on IE6 "Submitted by USER on " is still displaying. Any idea why this would be? It's not really hugely important but I like to be consistent.
Here's an example: http://catalysto.com/imsta/taxonomy/term/6
Thanks again!
It is showing up everywhere
Have you emptied the cache? On each page I see the old "Submitted by USER on ". If your not seeing this, then it is because you have either a) a different theme or b) seeing non-cached pages as you are logged in (except of the term listing page)
Try flushing this at sites > settings > performance
Cheers
Alan Davison
www.caignwebs.com.au
Alan Davison
For Drupal 5 Zen Subtheme
If you're still using Drupal 5 and have a Zen subtheme, just edit the subthemename_preprocess_node() function so it looks something like this:
what about in your
what about in your node.tpl.php change from something like this:
to something like this:
Because it's a core module ...
... and it's bad practice to mess with core files. You should use overrides instead as explained earlier in this thread ...
EDIT
Sorry - I posted this in the wrong thread! Please ignore this comment ...