Allmänt meddelande

Collapse
No announcement yet.

phpBB2 and ipv6

Collapse
X
  • Filter
  • Klockan
  • Show
Clear All
new posts

  • [phpBB] phpBB2 and ipv6

    Did someone forget to add ipv6-support for phpBB2?
    Well, here we go!


    Please note this is untested code, and a very simple solution to make it work...

    Alter database:

    ALTER TABLE phpbb_sessions MODIFY COLUMN `session_ip` VARCHAR(40);
    ALTER TABLE phpbb_privmsgs MODIFY COLUMN `privmsgs_ip` VARCHAR(40);
    ALTER TABLE phpbb_banlist MODIFY COLUMN `ban_ip` VARCHAR(40);
    ALTER TABLE phpbb_posts MODIFY COLUMN `poster_ip` VARCHAR(40);

    Edit: includes/functions.php

    Find:

    Kod:
    function encode_ip($dotquad_ip)
    {
            $ip_sep = explode('.', $dotquad_ip);
    After, add:

    Kod:
            if (preg_match("[\:]", $dotquad_ip, $ipv6match))
            {
                    return($_SERVER['REMOTE_ADDR']);
            }
    Find:

    Kod:
    function decode_ip($int_ip)
    {
    After, add:

    Kod:
            if (preg_match("[\:]", $int_ip, $ipv6match))
            {
                    return($int_ip);
            }
    Result:

    -
Working...
X