Ignore:
Timestamp:
May 3, 2014, 11:39:07 AM (10 years ago)
Author:
mistic100
Message:

add $confcontact_form_show_ip option

Location:
extensions/ContactForm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/include/functions.inc.php

    r26850 r28324  
    159159    array(
    160160      'ip' => $_SERVER['REMOTE_ADDR'],
    161       'agent' => $_SERVER['HTTP_USER_AGENT']
     161      'agent' => $_SERVER['HTTP_USER_AGENT'],
     162      'show_ip' => isset($conf['contact_form_show_ip']) && $conf['contact_form_show_ip'],
    162163    )
    163164   );
  • extensions/ContactForm/main.inc.php

    r25872 r28324  
    88Author URI: http://piwigo.org
    99*/
     10
     11/*
     12 * $conf['contact_form_show_ip'] = true;
     13 */
    1014
    1115if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
  • extensions/ContactForm/template/text/html/mail.tpl

    r25872 r28324  
    66  <b>{'Name'|translate}:</b> {$CONTACT.author}<br>
    77  <b>{'Email address'|translate}:</b> {$CONTACT.email}
    8   {if $CONTACT.show_ip}<br>{'IP: %s'|translate:$CONTACT.ip}{/if}
     8  {if $CONTACT.show_ip}
     9    <br>{'IP: %s'|translate:$CONTACT.ip}
     10    <br>{'Browser: %s'|translate:$CONTACT.agent}
     11  {/if}
    912</p>
    1013
  • extensions/ContactForm/template/text/plain/mail.tpl

    r25872 r28324  
    11{'Name'|translate}: {$CONTACT.author}
    22{'Email address'|translate}: {$CONTACT.email}
    3 {if $CONTACT.show_ip}{'IP: %s'|translate:$CONTACT.ip}{/if}
     3{if $CONTACT.show_ip}{'IP: %s'|translate:$CONTACT.ip}
     4{'Browser: %s'|translate:$CONTACT.agent}{/if}
    45
    56--------------------
Note: See TracChangeset for help on using the changeset viewer.