Quantcast
Viewing all articles
Browse latest Browse all 1619

phpBB Custom Coding • Re: Would it be easy to add the user's From_IP_Address to the Banned Information message?

That said the file and lines you are looking for are around line 1306 in /phpbb/session.php
Something like this, FIND:

Code:

$message .= ($ban_row['ban_give_reason']) ? '<br /><br />' . sprintf($this->lang['BOARD_BAN_REASON'], $ban_row['ban_give_reason']) : '';$message .= '<br /><br /><em>' . $this->lang['BAN_TRIGGERED_BY_' . strtoupper($ban_triggered_by)] . '</em>';
ADD:

Code:

if ($ban_triggered_by == 'ip') {$message .= ' Your banned IP adddress is ' . $this->ip . '.';}
Note I did not test this at all.
Boom! First try. Image may be NSFW.
Clik here to view.
8-)
It worked! Thank you! Thank you! You've saved us and our users so many needless wasted steps.

Using your code logic, I actually injected the message and IP info after the second $message line in session.php, this being the new lines 1303 - 1307:

Code:

if ($ban_triggered_by == 'ip') {$message .= '..providing them your IP address ==> ' . $this->ip . '.';}
The result
Information
You have been permanently banned from this board.

Please contact the Board Administrator for more information...providing them your IP address ==> xxx.xxx.xxx.xxx.

A ban has been issued on your IP address.

Statistics: Posted by SQLnovice — Tue Aug 27, 2024 3:37 am



Viewing all articles
Browse latest Browse all 1619

Trending Articles