Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter giraffe2011

    (@giraffe2011)

    Thank you for your help
    i managed to edit htacess manually,
    seems to work now but it takes a while to put overlay over image why is that ?
    Also i know it is going a bit too far but could you give me a general idea how to make a dynamic redirection as you mentioned?

    Thread Starter giraffe2011

    (@giraffe2011)

    oh i have now internal server error 😛

    Thread Starter giraffe2011

    (@giraffe2011)

    i think you meant htacess file

    Thread Starter giraffe2011

    (@giraffe2011)

    ok that code is exactly same as i have in my htacess i think linebreaks got eaten in email
    w3total cache is disabled my htacess looks now like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    # END WordPress
    
    # BEGIN imaguard
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)? [NC]
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?youtube\.com [NC]
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?facebook\.com [NC]
    RewriteCond %{HTTP_REFERER} !^http://(.+\.)?twitter\.com [NC]
    RewriteRule ^(.*)\.(jpg|png|jpeg|gif)$ /show-image/?img=/$1.$2 [R=302,NC,L]
    # END imaguard
    Thread Starter giraffe2011

    (@giraffe2011)

    ok reactivated plugin now, still 404 errors and no overlay, sent email with htacess

    Thread Starter giraffe2011

    (@giraffe2011)

    lol i did i realized myself

    Thread Starter giraffe2011

    (@giraffe2011)

    email sent.

    actually the code above is messed up and instead of
    ‘ there are < code > and < /code >
    it should look like this
    First change:
    where it says:

    $result = mysql_query("
    CREATE TABLE '$wpdb->ak_popularity_options' (
    'option_name' VARCHAR( 50 ) NOT NULL,
    'option_value' VARCHAR( 50 ) NOT NULL
    )

    Should be:

    $result = mysql_query("
    CREATE TABLE '".$wpdb->prefix."ak_popularity_options' (
    'option_name' VARCHAR( 50 ) NOT NULL,
    'option_value' VARCHAR( 50 ) NOT NULL
    )

    and
    second change:
    where it says:

    $result = mysql_query("
    CREATE TABLE '$wpdb->ak_popularity' (

    should be:

    $result = mysql_query("
    CREATE TABLE '".$wpdb->prefix."ak_popularity' (

    Sorry for that i haven’t noticed after pasting from PhpED
    that my straight ticks were converted into backticks.

    The very first change of function check install from the post above is correct so no point of pasting it again here.

    cheers

    I had a go at the plugin and i think there is mistake in
    the way plugin calls the table prefix just find line
    below function check_install() that says this

    $result = mysql_query("SHOW TABLES LIKE '{$wpdb->prefix}ak_popularity%'", $wpdb->dbh);

    and change it into

    $result = mysql_query("SHOW TABLES LIKE '".$wpdb->prefix."ak_popularity%'", $wpdb->dbh);

    that fixes activate reactivate as i discovered every time you reactivete this plugin it tries to create tables that are already there

    now problem eith error on lines 250-255
    actualy it is the way mysql_query is made passing $wpdb variable as part of a string is not a good idea wordpress codex gave me solution to that.
    find the line that says

    $result = mysql_query("
    CREATE TABLE <code>$wpdb->ak_popularity_options</code> (
    <code>option_name</code> VARCHAR( 50 ) NOT NULL,
    <code>option_value</code> VARCHAR( 50 ) NOT NULL
    )
    ", $wpdb->dbh) or die(mysql_error().' on line: '.__LINE__);

    and change it to:

    CREATE TABLE <code>".$wpdb->prefix."ak_popularity_options</code> (
    <code>option_name</code> VARCHAR( 50 ) NOT NULL,
    <code>option_value</code> VARCHAR( 50 ) NOT NULL
    )
    ", $wpdb->dbh) or die(mysql_error().' on line: '.__LINE__);

    and again couple of lines below find ones that say :

    $result = mysql_query("
    CREATE TABLE <code>$wpdb->ak_popularity</code> (

    change them to

    $result = mysql_query("
    CREATE TABLE <code>".$wpdb->prefix."ak_popularity</code> (

    Hope that helps it definately helped me … im using latest wordpress on my server.
    I will look into other issues a bit later as it is 6 am and i need to catch some sleep LOL

Viewing 9 replies - 1 through 9 (of 9 total)