WordPress.org

Ready to get started?Download WordPress

Forums

Refer + WordPress WORKING (2 posts)

  1. Anonymous
    Unregistered
    Posted 9 years ago #

    I feel like a martyr, but I sledgehammered Dean Allen's refer to work with WordPress 1.3 Alpha 4. The patch is ugly as sin, but functional:
    diff -c refer-orig/refer.php refer/refer.php
    *** refer-orig/refer.php Thu Nov 27 09:45:02 2003
    --- refer/refer.php Sat Oct 9 20:26:54 2004
    ***************
    *** 97,105 ****
    --- 97,127 ----
    // END CONFIGURATION ---------------------------------------- //
    + $wpdbbackup = $wpdb;
    + $oldusr = $usr;
    + $oldpw = $pw;
    + $oldhost = $host;
    + $olddb = $db;
    + $oldtable = $table;
    +
    refer();
    + $usr = $oldusr;
    + $pw = $oldpw;
    + $host = $oldhost;
    + $db = $olddb;
    + $table = $oldtable;
    +
    + mysql_close();
    +
    + if (isset($wp_version)) {
    + $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
    + $wpdb = $wpdbbackup;
    + }
    +
    + unset($oldusr, $oldpw, $oldhost, $olddb, $oldtable, $wpdbbackup);
    +
    function refer()
    {
    extract(rcfg());
    ***************
    *** 110,116 ****
    $uri = dbPrep('REQUEST_URI');
    $ip = ipPrep('REMOTE_ADDR');
    $ref = dbPrep('HTTP_REFERER');
    ! $ref = (preg_match("/^http:\/\/[^\.]*\.?$mydomain/", $ref))?'':$ref;
    $ref = str_replace("www.","", $ref);
    --- 132,138 ----
    $uri = dbPrep('REQUEST_URI');
    $ip = ipPrep('REMOTE_ADDR');
    $ref = dbPrep('HTTP_REFERER');
    ! $ref = (preg_match('/'.$mydomain.'/', $ref))?'':$ref;
    $ref = str_replace("www.","", $ref);

  2. OperaManiac
    Member
    Posted 9 years ago #

    i dont understand this. i use refer and just use HTA file to include the required files with wordpress files... what this code is supposed to do?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.