Warning: The author of this contribution does not provide support for it anymore.

Print A Post Mod

Print a post mod with IP adress? - Print A Post Mod

Print a post mod with IP adress?

by Anonymous » Sat May 15, 2010 12:20 pm

Hello
I've installed your mod "Print a post mod".
I was wondering if it is possible to add the posters IP on the print view page.
So that the IP is also printed?
Thanks!
Anonymous
I am too lazy to register
Posts: 3222
Joined: Thu Mar 15, 2007 6:50 am
Contact:

Re: Print a post mod with IP adress?

by RMcGirr83 » Sun May 16, 2010 1:24 am

Please try this

OPEN

print_post.php

FIND

Code: Select all

   $post_id = (int) $row['post_id'];


AFTER ADD (as in on a new line add)

Code: Select all

   $poster_ip = '';
   if ($auth->acl_gets('a_', 'm_'))
   {
      $poster_ip = $row['poster_ip'];
   }


FIND

Code: Select all

      'POST_AUTHOR'         => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),


AFTER ADD

Code: Select all

      'POSTER_IP'            => (!empty($poster_ip)) ? $poster_ip : '',


OPEN

styles/xxx/template/viewtopic_print_post.html

FIND

Code: Select all

{POST_AUTHOR}</strong>


IN LINE, AFTER ADD

Code: Select all

<!-- IF POSTER_IP --><br />{L_IP}: {POSTER_IP}<!-- ENDIF -->


refresh the style in the ACP and that should do it.
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
User avatar
RMcGirr83
Former Team Member
Posts: 21615
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact: