• Been using this for some time and all of a sudden it’s adding forward slashes after saving the ads.

    This:
    <a href="http://s14.photobucket.com/albums/a312/triplemoons/banners/?action=view&current=tme-mini.jpg" target="_blank\"><img src="http://i14.photobucket.com/albums/a312/triplemoons/banners/tme-mini.jpg" border="0" alt="Photobucket"></a>

    Is turning into this:
    <a href=\"http://s14.photobucket.com/albums/a312/triplemoons/banners/?action=view&current=tme-mini.jpg\" target=\"_blank\"><img src=\"http://i14.photobucket.com/albums/a312/triplemoons/banners/tme-mini.jpg\" border=\"0\" alt=\"Photobucket\"></a>

    The 2.9 upgrade might be at fault?

Viewing 7 replies - 1 through 7 (of 7 total)
  • I have the same problem, does anoyone know a solution for this one?

    Thread Starter triplemoons

    (@triplemoons)

    Well, at least I am not alone! 😉

    I posted on the creaters blog notifying him of the problem. You might want to go on as well and reiterate it.

    I am getting the same problem too!

    Has there been any word on this? Any fix or work-around in the interim?
    I am desperate to get my ads back up.

    I have same problem too. Anyone has solution?

    The problem is that the plugin relies on PHP having “magic quotes” turned on. If you turn magic quotes on in your PHP.ini, WPads starts working again.

    The problem is that magic quotes are a depreciated feature which are to be removed from PHP, as a result, the latests version of wordpres seem to be coded to eliminate dependence on that fearture, so turning magic quotes on, actually breaks some wordpress core features.

    So either the author has to come back from the dead and fix his plugin, someone else has to fix his plugin, or we need a new plugin.

    Anybody know how to do it?

    hi, i think i fix the “magic quotes” thing. thanks jtimar.

    what i did is i edit the wpads-class.php file of the plugin and removed the escape function both in update and add new banner. i know this may be risky but you are the only one using the add or edit banner form. so, check what you are putting in 1st.

    /**
        * Update data for a banner
        */
        function updateBanner( $banner ) {
            global $wpdb;
    
            if( $banner["banner_active"] != "Y" ) {
                $banner["banner_active"] = "N";
            }
            $banner["banner_zones"] = $this->zonesUserToDB( $banner["banner_zones"] );
            $sql = "UPDATE " . $this->banners_table . " SET "
                ." banner_description = '" . $wpdb->escape( $banner["banner_description"] ) . "', "
                ." banner_html = '" . $wpdb->escape( $banner["banner_html"] ) . "', "
                ." banner_zones = '" . $banner["banner_zones"] . "', "
                ." banner_active = '" . $banner["banner_active"] . "', "
                ." banner_weight = '" . $banner["banner_weight"] . "', "
                ." banner_maxviews = '" . $banner["banner_maxviews"] . "' "
                ." WHERE banner_id = '" . $banner["banner_id"] . "' ";
            $wpdb->query( $sql );
        }

    that is the original update function code. i changed it to:

    /**
        * Update data for a banner
        */
        function updateBanner( $banner ) {
            global $wpdb;
    
            if( $banner["banner_active"] != "Y" ) {
                $banner["banner_active"] = "N";
            }
            $banner["banner_zones"] = $this->zonesUserToDB( $banner["banner_zones"] );
            $sql = "UPDATE " . $this->banners_table . " SET "
                ." banner_description = '" . $wpdb->escape( $banner["banner_description"] ) . "', "
                ." banner_html = '" .   $banner["banner_html"]   . "', "
                ." banner_zones = '" . $banner["banner_zones"] . "', "
                ." banner_active = '" . $banner["banner_active"] . "', "
                ." banner_weight = '" . $banner["banner_weight"] . "', "
                ." banner_maxviews = '" . $banner["banner_maxviews"] . "' "
                ." WHERE banner_id = '" . $banner["banner_id"] . "' ";
            $wpdb->query( $sql );
        }

    also, the add banner function

    /**
        * Add a new banner to the database
        */
        function addBanner( $banner ) {
            global $wpdb;
    
            if( $banner["banner_active"] != "Y" ) {
                $banner["banner_active"] = "N";
            }
            $banner["banner_zones"] = $this->zonesUserToDB( $banner["banner_zones"] );
            $sql = "INSERT INTO " . $this->banners_table . " SET "
                ." banner_description = '" . $wpdb->escape( $banner["banner_description"] ) . "', "
                ." banner_html = '" . $wpdb->escape( $banner["banner_html"] ). "', "
                ." banner_zones = '" . $banner["banner_zones"] . "', "
                ." banner_active = '" . $banner["banner_active"] . "', "
                ." banner_weight = '" . $banner["banner_weight"] . "', "
                ." banner_maxviews = '" . $banner["banner_maxviews"] . "' ";
            $wpdb->query( $sql );
        }

    this is the original add new banner function. i changed it into :

    /**
        * Add a new banner to the database
        */
        function addBanner( $banner ) {
            global $wpdb;
    
            if( $banner["banner_active"] != "Y" ) {
                $banner["banner_active"] = "N";
            }
            $banner["banner_zones"] = $this->zonesUserToDB( $banner["banner_zones"] );
            $sql = "INSERT INTO " . $this->banners_table . " SET "
                ." banner_description = '" . $banner["banner_description"]   . "', "
                ." banner_html = '" . $wpdb->escape( $banner["banner_html"] ). "', "
                ." banner_zones = '" . $banner["banner_zones"] . "', "
                ." banner_active = '" . $banner["banner_active"] . "', "
                ." banner_weight = '" . $banner["banner_weight"] . "', "
                ." banner_maxviews = '" . $banner["banner_maxviews"] . "' ";
            $wpdb->query( $sql );
        }

    i hope this works for you too. it did for me. and i hope a php developer look into this.

    thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[WPads Plugin] Adding forward slashes in html code?’ is closed to new replies.