The start of my effort to bring sme kind of tracking mode into play for the spam problem. The data is now inserted into the database, I've got it displayed in a couple of places for my (and my Modrators') use ... at least now have a starting point for figuring out where to go next with it ... We're playing around with some of the "Group" mods now trying to see if this is really viable on this tool for doing a Ban action ....

Baseline: Latest stable release: Wikka-1.1.6.1.tar.gz Released on December 23, 2005 is the version available for download, yet .... the version in use at 'Home Base' shows as; Powered by Wikka Wakka Wiki 1.1.6.0 (enhanced with some Beta features) ...

Other than the movement of some file locations, the 'changes' work with 1.1.6.2

http://wikkawiki.org/UserRegistration 2005-07-11 09:48:05 NilsLindenberg
http://wikkawiki.org/RegisterAction 2005-07-19 18:09:53 DarTar
http://wikkawiki.org/RegisterUserIpAddress 2005-07-19 22:15:02 JavaWoman
http://wikkawiki.org/ExpandedAdminBackupTool 2006-02-10 00:37:07 GmBowen
http://wikkawiki.org/PageAdminAction 2006-02-18 06:27:27 DarTar

None of these pages are up to date, content is questionable, status is unknown
However, these are the routines I'm working with, some of them needed work to get running on my install (and some of these need yet other mods installed)

I went with IPv4 (15 digits) for now, hoping that if/when the next release makes it out, IPv6 will be accounted for elsewhere.

I changed the 'ipaddress' variable to 'regipaddress' for the user table .... 'postipaddress' for the page and comment tables.

Quick (?) listing of changes made;
SHOW TABLES;
+--------------------------+
| wikka_acls               |
| wikka_comments           |
| wikka_links              |
| wikka_pages              |
| wikka_referrer_blacklist |
| wikka_referrers          |
| wikka_resetpasswords     |
| wikka_users              |
| wikka_wikkaforum         |
+--------------------------+
9 ROWS IN SET (0.00 sec)

mysql> ALTER TABLE wikka_users ADD regipaddress varchar(15) DEFAULT NULL AFTER signuptime;
Query OK, 15 rows affected (0.03 sec)
Records: 15 Duplicates: 0 Warnings: 0

mysql> ALTER TABLE wikka_comments ADD postipaddress varchar(15) DEFAULT NULL;
Query OK, 22 rows affected (0.01 sec)
Records: 22 Duplicates: 0 Warnings: 0

mysql> ALTER TABLE wikka_pages ADD postipaddress varchar(15) DEFAULT NULL AFTER user;
Query OK, 554 rows affected (0.73 sec)
Records: 554 Duplicates: 0 Warnings: 0

DESCRIBE wikka_users;
+-----------------+------------------+------+-----+---------------------+-------+
| FIELD           | TYPE             | NULL | KEY | DEFAULT             | Extra |
+-----------------+------------------+------+-----+---------------------+-------+
| name            | VARCHAR(75)      |      | PRI |                     |       |
| password        | VARCHAR(32)      |      |     |                     |       |
| email           | VARCHAR(50)      |      |     |                     |       |
| revisioncount   | INT(10) UNSIGNED |      |     | 20                  |       |
| changescount    | INT(10) UNSIGNED |      |     | 50                  |       |
| doubleclickedit | enum('Y','N')    |      |     | Y                   |       |
| signuptime      | datetime         |      | MUL | 0000-00-00 00:00:00 |       |
| regipaddress    | VARCHAR(15)      | YES  |     | NULL                |       |
| show_comments   | enum('Y','N')    |      |     | N                   |       |
+-----------------+------------------+------+-----+---------------------+-------+
9 ROWS IN SET (0.00 sec)

DESCRIBE wikka_comments;
+---------------+------------------+------+-----+---------------------+----------------+
| FIELD         | TYPE             | NULL | KEY | DEFAULT             | Extra          |
+---------------+------------------+------+-----+---------------------+----------------+
| id            | INT(10) UNSIGNED |      | PRI | NULL                | AUTO_INCREMENT |
| page_tag      | VARCHAR(75)      |      | MUL |                     |                |
| TIME          | datetime         |      | MUL | 0000-00-00 00:00:00 |                |
| comment       | text             |      |     |                     |                |
| USER          | VARCHAR(75)      |      |     |                     |                |
| postipaddress | VARCHAR(15)      | YES  |     | NULL                |                |
+---------------+------------------+------+-----+---------------------+----------------+
6 ROWS IN SET (0.01 sec)

mysql> DESCRIBE wikka_pages;
+---------------+-----------------------+------+-----+---------------------+----------------+
| FIELD         | TYPE                  | NULL | KEY | DEFAULT             | Extra          |
+---------------+-----------------------+------+-----+---------------------+----------------+
| id            | INT(10) UNSIGNED      |      | PRI | NULL                | AUTO_INCREMENT |
| tag           | VARCHAR(75)           |      | MUL |                     |                |
| TIME          | datetime              |      | MUL | 0000-00-00 00:00:00 |                |
| body          | mediumtext            |      | MUL |                     |                |
| owner         | VARCHAR(75)           |      |     |                     |                |
| USER          | VARCHAR(75)           |      |     |                     |                |
| postipaddress | VARCHAR(15)           | YES  |     | NULL                |                |
| latest        | enum('Y','N','H','V') |      | MUL | N                   |                |
| note          | VARCHAR(100)          |      |     |                     |                |
| handler       | VARCHAR(30)           |      |     | page                |                |
+---------------+-----------------------+------+-----+---------------------+----------------+
10 ROWS IN SET (0.00 sec)

....../actions/useradmin.php

        if ($userdata) {

            /*$ipheader = '<a href="'.$this->Href('','', (($sort == 'ipaddress' && $d == 'desc')? 'l='.$l.'&amp;sort=ipaddress&amp;d=asc' : 'l='.$l.'&amp;sort=ipaddress&amp;d=desc')).'" title="'.TABLE_HEADING_SIGNUPIP_TITLE.'">'.TABLE_HEADING_SIGNUPIP.'</a>'; # installed as beta feature at wikka.jsnx.com  */
            $ipheader = '<a href="'.$this->Href('','', (($sort == 'regipaddress' && $d == 'desc')? 'l='.$l.'&amp;sort=regipaddress&amp;d=asc' : 'l='.$l.'&amp;sort=regipaddress&amp;d=desc')).'" title="'.TABLE_HEADING_SIGNUPIP_TITLE.'">'.TABLE_HEADING_SIGNUPIP.'</a>'; # per modifications here

            // build table headers
                /* "    <th>".$ipheader."</th>\n". # installed as beta feature at wikka.jsnx.com */
                "    <th>".$ipheader."</th>\n". # definite quesrion mark here ...?????

                // build table body
                $htmlout .= "<tbody>\n";
                if ($r_color == 1) {
                    $htmlout .= "<tr ".(($r%2)? '' : 'class="alt"').">\n"; #enable alternate row color
                } else {
                    $htmlout .= "<tr>\n"; #disable alternate row color
                }
                $htmlout .= "    <td><input type=\"checkbox\" id=\"".$user['id']."\"".$checked." title=\"".sprintf(SELECT_RECORD_TITLE,$user['name'])."\"/></td>\n".    
                "    <td>".(($this->ExistsPage($user['name']))? $this->Link($user['name']) : $user['name'])."</td>\n". #check if userpage exists
                "    <td>".$user['email']."</td>\n".
                "    <td class=\"time\">".$user['signuptime']."</td>\n".
                /* "    <td>".$user['ipaddress']."</td>\n". # installed as beta feature at wikka.jsnx.com */
                "    <td>".$user['regipaddress']."</td>\n". # per modofied files here
                "    <td class=\"number".(($c_color == 1)? ' c1' : '')."\">".$ownedlink."</td>\n".  #set column color
                "    <td class=\"number".(($c_color == 1)? ' c2' : '')."\">".$changeslink."</td>\n". #set column color
                "    <td class=\"number".(($c_color == 1)? ' c3' : '')."\">".$commentslink."</td>\n".   #set column color
                "    <td class=\"center\">".$deleteuser." :: ".$feedbackuser."</td>\n";
                $htmlout .= "  </tr>\n</tbody>\n";

......./actions/usersettings.php

    // is user trying to log in or register?

                $this->Query("insert into ".$this->config["table_prefix"]."users set ".
                    "signuptime = now(), ".
                    "name = '".mysql_real_escape_string($name)."', ".
                    "email = '".mysql_real_escape_string($email)."', ".
                    "regipaddress = '".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."', ".
                    "password = md5('".mysql_real_escape_string($_POST["password"])."')");

........./wikka.php (1.1.6.1)
........./libs/Wakka.class.php (1.1.6.2)
    function SavePage($tag, $body, $note)

            // add new revision
  // added the postipaddress line per IP address Tracking mod 10 Apr 2006
            $this->Query("insert into ".$this->config["table_prefix"]."pages set ".
                "tag = '".mysql_real_escape_string($tag)."', ".
                "time = now(), ".
                "owner = '".mysql_real_escape_string($owner)."', ".
                "user = '".mysql_real_escape_string($user)."', ".
                "postipaddress = '".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."', ".
                "note = '".mysql_real_escape_string($note)."', ".
                "latest = 'Y', ".
                "body = '".mysql_real_escape_string($body)."'");


 /* Code section below modified per a IP address tracking mod applied 10 Apr 2006
    function SaveComment($page_tag, $comment)
    {
        // get current user
        $user = $this->GetUserName();

        // add new comment
        $this->Query("INSERT INTO ".$this->config["table_prefix"]."comments SET ".
            "page_tag = '".mysql_real_escape_string($page_tag)."', ".
            "time = now(), ".
            "comment = '".mysql_real_escape_string($comment)."', ".
            "user = '".mysql_real_escape_string($user)."'");
    }  */


    function SaveComment($page_tag, $comment)
    {
        // get current user
        $user = $this->GetUserName();

        // add new comment
        $this->Query("INSERT INTO ".$this->config["table_prefix"]."comments SET ".
            "page_tag = '".mysql_real_escape_string($page_tag)."', ".
            "time = now(), ".
            "comment = '".mysql_real_escape_string($comment)."', ".
            "user = '".mysql_real_escape_string($user)."', ".
            "postipaddress = '".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."'");
    }
 // Code section above modified per a IP address tracking mod applied 10 Apr 2006


........../actions/wikkamanagement.php
// Modified below with postipaddress stuff for IP address tracking
                $revisions = $this->LoadAll("SELECT `id`,`tag`,`time`,`user`,`latest`,`postipaddress` FROM `$t_pages` WHERE `tag`='$show_page' ORDER BY `time` DESC");
                echo
                    '<H4>Manage Revisions: '.$show_page.'</H4>'.
                    '<a href="'.$this_link4.'"><=Back</a>'.
                    '<form action="'.$this_link3.'" method="POST">'.
                    '<table border="0" callspacing="0" cellpadding="0">'.
                    '<tr bgcolor="#DDDDDD">'.
                        '<th nowrap>&nbsp;Time:&nbsp;</th>'.
                        '<th nowrap>&nbsp;User:&nbsp;</th>'.
                        '<th nowrap>&nbsp;PostingIP:&nbsp;</th>'.
                        '<th nowrap>&nbsp;&nbsp;</th>'.
                        '<th nowrap>&nbsp;Delete:&nbsp;</th>'.
                        '<th nowrap>&nbsp;Hide:&nbsp;</th>'.
                    '</tr>';
               
                $i = 0;
                foreach ($revisions as $revision) {
                    $id            = &$revision['id'];
                    $tag           = &$revision['tag'];
                    $time          = &$revision['time'];
                    $user          = &$revision['user'];
                    $postip        = &$revision['postipaddress'];
                    $latest        = &$revision['latest'];
                    $current_rev   = ($latest == 'Y');
                    $hidden_rev    = ($latest == 'V');
                   
                    $color = ($i%2)?"#ffffff":"#f5f6f7";
                    echo
                        '<tr bgcolor="'.$color.'">';
                       
                    if ($current_rev) {
                        echo    '<td nowrap>&nbsp;<a href="'.$this->Href('show',$tag).'"><b>'.$time.'</b></a>&nbsp;</td>'.
                            '<td nowrap>&nbsp;<b>'.$user.'</b>&nbsp;</td>';
                    } else if ($hidden_rev) {
                        echo    '<td nowrap>&nbsp;<font color="gray">'.$time.'</font>&nbsp;</td>'.
                            '<td nowrap>&nbsp;<font color="gray">'.$user.'</font>&nbsp;</td>';
                    } else {
                        echo    '<td nowrap>&nbsp;<a href="'.$this->Href('show',$tag,'time=').urlencode($time).'">'.$time.'</a>&nbsp;</td>'.
                            '<td nowrap>&nbsp;'.$user.'&nbsp;</td>';
                    }
                    echo    '<td nowrap>&nbsp;'.$postip.'&nbsp;</td>';
                    echo
                            '<td align="center">'.
                                '<input type="hidden" name="id['.$i.']"    value="'.$id.'" />'.
                                '<input type="radio"  name="action['.$i.']" value="restore_revision" '.($current_rev?'disabled':'').' '.(!$hidden_rev?'checked':'').'/>'.
                            '</td>'.
                            '<td align="center">'.
                                '<input type="radio"  name="action['.$i.']" value="delete_revision" '.($current_rev?'disabled':'').'/>'.
                            '</td>'.
                            '<td align="center">'.
                                '<input type="radio"  name="action['.$i.']" value="hide_revision"    '.($current_rev?'disabled':'').'  '.($hidden_rev?'checked':'').'/>'.
                            '</td>'.
                        '</tr>';
                    $i++;
                }
//end of mod


CategoryDevelopmentSecurity
CategoryDevelopmentAntiSpam
CategoryUserContributions

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki