Plugin Directory

Changeset 1064065


Ignore:
Timestamp:
01/09/2015 05:07:38 PM (11 years ago)
Author:
MikelP
Message:

Minor bug corrections to the previous version

Location:
wp-internal-links-lite/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-internal-links-lite/trunk/inter-links.php

    r1063883 r1064065  
    44Plugin URI: http://nosweatplugins.com/get-no-sweat-wp-internal-links-pro/?utm_source=plugin&utm_medium=link&utm_campaign=description
    55Description: No Sweat WP Internal Links allows you to easily create (and change on the fly) powerful internal linking structures within your site, that both Google and your visitors love.
    6 Version: 2.4
     6Version: 2.4.1
    77Author: Mikel Perez, Inaki Ramirez & Tony Shepherd
    88Author URI:  http://nosweatplugins.com/get-no-sweat-wp-internal-links-pro/?utm_source=plugin&utm_medium=link&utm_campaign=description
     
    1313define( INLPLNDIR, dirname(__FILE__) );
    1414define( INLPLN_AFFILIATE_SETTINGS, 'INLPLN_AFFILIATE_SETTINGS' );
    15 $wpdb->inl_link_structures = 'inl_link_structures';
    16 $wpdb->inl_link_struct_to_links = 'inl_link_struct_to_links';
    17 
     15define ( 'INLPLN_VERSION', '2.4.1' );
    1816register_activation_hook(__FILE__,'il_pln_activation');
    1917
    2018add_action( 'admin_menu', 'adminMenuNL' );
     19add_action( 'init', 'inl_plugin_init' );
     20function inl_plugin_init(){
     21if ( is_admin() ) {
     22   
     23    if(INLPLN_VERSION=='2.4.1' && get_option('INLPLN_ACTIVATED')==''){
     24        update_option( 'INLPLN_ACTIVATED', date('Y-m-d') );
     25    }
     26}
     27}
    2128
    2229function il_pln_activation(){
    23 
    2430inlpln_lite_create_tables();
    25 update_option( 'INLPLN_ACTIVATED', date('Y-m-d') );
    26 inlpln_activate_affiliate();
    2731}
    2832function inlpln_lite_scripts_method() {
  • wp-internal-links-lite/trunk/operations.php

    r1063883 r1064065  
    44 
    55   global $wpdb;
     6       $current_user = wp_get_current_user();
    67       $modby = $current_user->user_login;
    78 
     
    1112             $id = $data['inl_link_id'];
    1213          // print_r($data);
    13             $wpdb->query("DELETE FROM $wpdb->inl_link_structures WHERE id=$id");
    14             $wpdb->query("DELETE FROM $wpdb->inl_link_struct_to_links WHERE link_struct_id=$id");
     14            $wpdb->query("DELETE FROM inl_link_structures WHERE id=$id");
     15            $wpdb->query("DELETE FROM inl_link_struct_to_links WHERE link_struct_id=$id");
    1516            return true;
    1617           
     
    2324                // print_r($data);
    2425       
    25             $sql="UPDATE  $wpdb->inl_link_structures SET name='$inl_str_name',type='$inl_type',nodes=$nofnodes WHERE id=".$id;       
     26            $sql="UPDATE  inl_link_structures SET name='$inl_str_name',type='$inl_type',nodes=$nofnodes WHERE id=".$id;       
    2627         
    2728            $wpdb->query($sql);
    28             $wpdb->query("DELETE FROM $wpdb->inl_link_struct_to_links WHERE link_struct_id=$id");
     29            $wpdb->query("DELETE FROM inl_link_struct_to_links WHERE link_struct_id=$id");
    2930             for($i=1;$i<=$nofnodes;$i++){
    3031                $source = $data['source_'.$i];
     
    4243             
    4344                }
    44                 $sql = "INSERT INTO $wpdb->inl_link_struct_to_links (source,target1,target2,anchor_text1,anchor_text2,link_struct_id,
     45                $sql = "INSERT INTO inl_link_struct_to_links (source,target1,target2,anchor_text1,anchor_text2,link_struct_id,
    4546               create_date,created_by,mod_date,Introductory_text1) VALUES ($source,$target1,$target2,'$anchor_text1', '$anchor_text2', $id,'$curdate','$modby','$curdate','$Introductorytext1')";
    4647               
     
    6263                if(($inl_str_name==''))
    6364                return 'Please fill all the fields';
    64                 $wpdb->query("INSERT INTO $wpdb->inl_link_structures (name,type,nodes,create_date,mod_date,mod_by) VALUES ('$inl_str_name', '$inl_type', $nofnodes,'$curdate','$curdate','$modby')");
     65                $wpdb->query("INSERT INTO inl_link_structures (name,type,nodes,create_date,mod_date,mod_by) VALUES ('$inl_str_name', '$inl_type', $nofnodes,'$curdate','$curdate','$modby')");
    6566               $link_struct_id = mysql_insert_id();
    6667           
     
    8283             
    8384                }
    84                 $sql = "INSERT INTO $wpdb->inl_link_struct_to_links (source,target1,target2,anchor_text1,anchor_text2,link_struct_id,
     85                $sql = "INSERT INTO inl_link_struct_to_links (source,target1,target2,anchor_text1,anchor_text2,link_struct_id,
    8586               create_date,created_by,mod_date,Introductory_text1) VALUES ($source,$target1,$target2,'$anchor_text1', '$anchor_text2', $link_struct_id,'$curdate','$modby','$curdate','$Introductorytext1')";
    8687               
     
    9697        case 'list':
    9798             
    98             $sql = "SELECT * FROM $wpdb->inl_link_structures " ;
     99            $sql = "SELECT * FROM inl_link_structures " ;
    99100            $found = 0;
    100101            $data = Array();
     
    119120   case 'getinlpost':
    120121                $postid =  $data['source'];
    121               $sql = "SELECT * FROM $wpdb->inl_link_struct_to_links WHERE  source=". $postid;
     122              $sql = "SELECT * FROM inl_link_struct_to_links WHERE  source=". $postid;
    122123            $found = 0;
    123124            $data = Array();
  • wp-internal-links-lite/trunk/readme.txt

    r1063914 r1064065  
    55Requires at least: 3.2
    66Tested up to: 4.1
    7 Stable tag: 2.4
     7Stable tag: 2.4.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7171== Changelog ==
    7272
     73= 2.4.1 =
     74
     75* Minor bug correction to the previous version
     76
    7377= 2.4 =
    7478
  • wp-internal-links-lite/trunk/sql-scripts.php

    r958249 r1064065  
    22function inlpln_lite_create_tables()
    33{ global $wpdb;
    4     if ($wpdb->get_var("SHOW TABLES LIKE '$wpdb->inl_link_structures'") != $wpdb->inl_link_structures)
     4    if ($wpdb->get_var("SHOW TABLES LIKE 'inl_link_structures'") != 'inl_link_structures')
    55    {
    66        $sql = "CREATE  TABLE IF NOT EXISTS `inl_link_structures` (
     
    1414  PRIMARY KEY (`id`) )
    1515ENGINE = InnoDB;";
    16         mysql_query($sql);
     16        $wpdb->query($sql);
    1717    }
    18      if ($wpdb->get_var("SHOW TABLES LIKE '$wpdb->inl_link_struct_to_links'") != $wpdb->inl_link_struct_to_links)
     18     if ($wpdb->get_var("SHOW TABLES LIKE 'inl_link_struct_to_links'") != 'inl_link_struct_to_links')
    1919    {
    2020        $sql = "CREATE  TABLE IF NOT EXISTS `inl_link_struct_to_links` (
     
    3131  PRIMARY KEY (`links_id`) )
    3232ENGINE = InnoDB;";
    33         mysql_query($sql);
     33        $wpdb->query($sql);
    3434    }
    35     if ($wpdb->get_var("SHOW TABLES LIKE '$wpdb->inl_link_struct_to_links'") == 'inl_link_struct_to_links')
     35    if ($wpdb->get_var("SHOW TABLES LIKE 'inl_link_struct_to_links'") == 'inl_link_struct_to_links')
    3636    {
    3737    $sql = "ALTER TABLE inl_link_struct_to_links ADD COLUMN `Introductory_text1` VARCHAR(200) NULL ";
    38     mysql_query($sql);
     38    $wpdb->query($sql);
    3939  }
    4040 
Note: See TracChangeset for help on using the changeset viewer.