Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
theme system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Dec 2007 at 17:07 UTC
Updated:
14 Oct 2025 at 23:09 UTC
Jump to comment: Most recent
Comments
Comment #1
gpk commentedIn your node.tpl.php http://drupal.org/node/11816 you could modify $submitted to include $_SERVER['REMOTE_ADDR'].
No new features are being added to Drupal 5.x (or 6.x for that matter). If you think this is an important feature for Drupal core then there is more chance of your suggestion being acted upon if you explain why you think this needs to be included (i.e. why the method I described above, using custom themeing, is not good enough).
Best,
Comment #2
budiw commentedIs there any modules for drupal 5.x ?
Comment #3
gpk commentedThis is crude and untested, but is simple (and should work!):
In your theme's node.tpl.php, change
print $submittedto something like
print str_replace(variable_get('anonymous', t('Anonymous')), variable_get('anonymous', t('Anonymous')) . "($_SERVER['REMOTE_ADDR'])", $submitted)A more elegant way would be to overwrite the theme's $submitted variable using in template.php - see info. here http://drupal.org/node/16383.
I am coming round to the point of view that an option to display Anonymous users' IP address would be of value.
Comment #4
gpk commentedOK well I posted a lot of rubbish at #3. Somehow I forgot that $_SERVER['REMOTE_ADDR'] will be the IP address of the person viewing the post, not the creator. Oops :-P
A standard Drupal installation does not capture the user's IP address when a new page/node is created. However, it *does* capture the IP address of users when they post a "comment" (i.e. a reply to an existing post/page).
You would need to access it in your theme's comment.tpl.php, something like this (this is based on what Garland's comment.tpl.php already has):
Comment #5
effulgentsia commentedSorry. No new features for D7. This is very easy to achieve for comments with a custom module or theme using hook_preprocess_comment() and setting $variables['author']. Nodes still don't track hostname of creator if creator is anonymous, so a more complex module would be needed to add tracking of that.
Comment #6
doktorrr commentedHow can I make IP address of comment posters visible above comment text?
Comment #7
jhedstromComment #23
smustgrave commentedThank you for sharing your idea for improving Drupal.
We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #24
smustgrave commentedSince there's not been a follow up and a feature request going to close out. Can always be re-opened
Thanks!