1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[HELP] with Wordpress and PHP File

Discussion in 'Blogging' started by lastkiss, Sep 25, 2009.

  1. lastkiss

    lastkiss Newbie

    Joined:
    Apr 29, 2009
    Messages:
    31
    Likes Received:
    5
    Help me please...

    Software : wordpress 2.8.4

    I want to show IP Commenter in comment list
    like this :

    [​IMG]

    How to do that??

    I can put PHP code in commentlist, but i don't know, how to write php code

    Help me please..

    Thanks
     
  2. leprakhauns

    leprakhauns Registered Member

    Joined:
    Sep 8, 2009
    Messages:
    84
    Likes Received:
    15
    Occupation:
    PHP Programmer
    Location:
    New York
    Home Page:
    Put this code where you want the IP to go:

    Code:
    <?php echo $_SERVER['REMOTE_ADDR'];?>
    
     
    • Thanks Thanks x 1
  3. ericsson

    ericsson Elite Member Premium Member

    Joined:
    Apr 25, 2009
    Messages:
    2,642
    Likes Received:
    8,132
    Occupation:
    www
    Location:
    Swe
    Home Page:

    Maybe a plugin?

    Code:
    http://cinnamonthoughts.org/wordpress/commenter-spy/
     
    • Thanks Thanks x 1
  4. lastkiss

    lastkiss Newbie

    Joined:
    Apr 29, 2009
    Messages:
    31
    Likes Received:
    5
    This code only show visitor.. :(

    I want every comment ( below post ) have IP.. :confused: :confused:

    Like this :
    [​IMG]

    Please..
     
  5. leprakhauns

    leprakhauns Registered Member

    Joined:
    Sep 8, 2009
    Messages:
    84
    Likes Received:
    15
    Occupation:
    PHP Programmer
    Location:
    New York
    Home Page:
    Oh sorry, what about that plugin that ericsson said? I'd think there would be a plugin for this, if not, I could probably write one this weekend and possibly release it by Monday, it seems like one that would be useful for people.
     
  6. kijkij

    kijkij Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    254
    Likes Received:
    110
    Occupation:
    Teacher
    Location:
    Pandora
    Home Page:
    yes, this need a new plugin to program.
    [​IMG]
     
  7. lastkiss

    lastkiss Newbie

    Joined:
    Apr 29, 2009
    Messages:
    31
    Likes Received:
    5
    We will waiting your script Guy's..
    This is will be great release..
     
  8. leprakhauns

    leprakhauns Registered Member

    Joined:
    Sep 8, 2009
    Messages:
    84
    Likes Received:
    15
    Occupation:
    PHP Programmer
    Location:
    New York
    Home Page:
    Sorry, this is already worked into Wordpress, the usage is this:

    Code:
    <?php comment_author_IP(); ?>
    Just put that in the comment loop.
     
    • Thanks Thanks x 1
  9. lastkiss

    lastkiss Newbie

    Joined:
    Apr 29, 2009
    Messages:
    31
    Likes Received:
    5
    working :)
    Just go to comment.php, a little edit and done

    Thanks