Title: giraffe2011's Replies | WordPress.org

---

# giraffe2011

  [  ](https://wordpress.org/support/users/giraffe2011/)

 *   [Profile](https://wordpress.org/support/users/giraffe2011/)
 *   [Topics Started](https://wordpress.org/support/users/giraffe2011/topics/)
 *   [Replies Created](https://wordpress.org/support/users/giraffe2011/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/giraffe2011/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/giraffe2011/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/giraffe2011/engagements/)
 *   [Favorites](https://wordpress.org/support/users/giraffe2011/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Imaguard] doesn't work at all](https://wordpress.org/support/topic/doesnt-work-at-all-11/)
 *  Thread Starter [giraffe2011](https://wordpress.org/support/users/giraffe2011/)
 * (@giraffe2011)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/doesnt-work-at-all-11/#post-3467059)
 * 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?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Imaguard] doesn't work at all](https://wordpress.org/support/topic/doesnt-work-at-all-11/)
 *  Thread Starter [giraffe2011](https://wordpress.org/support/users/giraffe2011/)
 * (@giraffe2011)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/doesnt-work-at-all-11/#post-3467055)
 * oh i have now internal server error 😛
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Imaguard] doesn't work at all](https://wordpress.org/support/topic/doesnt-work-at-all-11/)
 *  Thread Starter [giraffe2011](https://wordpress.org/support/users/giraffe2011/)
 * (@giraffe2011)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/doesnt-work-at-all-11/#post-3467054)
 * i think you meant htacess file
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Imaguard] doesn't work at all](https://wordpress.org/support/topic/doesnt-work-at-all-11/)
 *  Thread Starter [giraffe2011](https://wordpress.org/support/users/giraffe2011/)
 * (@giraffe2011)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/doesnt-work-at-all-11/#post-3467047)
 * 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
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Imaguard] doesn't work at all](https://wordpress.org/support/topic/doesnt-work-at-all-11/)
 *  Thread Starter [giraffe2011](https://wordpress.org/support/users/giraffe2011/)
 * (@giraffe2011)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/doesnt-work-at-all-11/#post-3467043)
 * ok reactivated plugin now, still 404 errors and no overlay, sent email with htacess
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Imaguard] doesn't work at all](https://wordpress.org/support/topic/doesnt-work-at-all-11/)
 *  Thread Starter [giraffe2011](https://wordpress.org/support/users/giraffe2011/)
 * (@giraffe2011)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/doesnt-work-at-all-11/#post-3467036)
 * lol i did i realized myself
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Imaguard] doesn't work at all](https://wordpress.org/support/topic/doesnt-work-at-all-11/)
 *  Thread Starter [giraffe2011](https://wordpress.org/support/users/giraffe2011/)
 * (@giraffe2011)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/doesnt-work-at-all-11/#post-3467032)
 * email sent.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Popularity Contest] Unable to activate in WordPress 3.0.2](https://wordpress.org/support/topic/popularity-contest-plugin-in-wordpress-302-is-broken/)
 *  [giraffe2011](https://wordpress.org/support/users/giraffe2011/)
 * (@giraffe2011)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/popularity-contest-plugin-in-wordpress-302-is-broken/page/2/#post-1803640)
 * 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
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Popularity Contest] Unable to activate in WordPress 3.0.2](https://wordpress.org/support/topic/popularity-contest-plugin-in-wordpress-302-is-broken/)
 *  [giraffe2011](https://wordpress.org/support/users/giraffe2011/)
 * (@giraffe2011)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/popularity-contest-plugin-in-wordpress-302-is-broken/page/2/#post-1803639)
 * 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)