Viewing 1 replies (of 1 total)
  • Thread Starter sk8darr

    (@sk8darr)

    Resolved!!!!
    Sorry! i don’t speak much english ?? ?? ?? i hope somebody can translate this.

    Primera caso:
    1. Con tu cliente ftp conectate a tu servidor.
    2. Busca en tus plugins instalados wp-content/plugins/https-ssl-free
    3. Edita el archivo https_ssl_free.php
    verás algo así =

    <?php
    /*
    Plugin Name: Https SSL Free
    Plugin URI: https://mediusproject.org
    Description: This plugin allows you to log into your wordpress using the free https service from intosecure inc.
    Version: 1.0.1
    Author: Medius Project
    Coded by: Leandro D. Pompeo (lp at mediusproject.org)
    Idea by: Andrés Meggiotto (am at mediusproject.org)
    Author URI: https://mediusproject.org
    License: GPLv3
    */
    
    /*
    Copyright (C) 2012 Medius Project
    
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
    */
    
    /**
     * Convert an url to https 1.com.ar format and revert it
     *
     * @param string $scheme protocol (http or https)
     */
    function convert ($scheme) {
        // Get url from the database and then parse it
        $pURL = parse_url(get_option('siteurl'));
    
        if (strcmp($scheme, 'https') == 0) {
            // Convert to https 1.com.ar format
            $host = str_replace('.', '_', $pURL['host']);
            $converted_host = 'https://'.$host.'.1.com.ar'.$pURL['path'];
        } else {
            // Convert to original format
            $host_uno = explode('.', $pURL['host']);
            $host = str_replace('_', '.', $host_uno[0]);
    
            $converted_host = 'https://'.$host.$pURL['path'];
        }
    
        // Update the db with the url converted
        update_option('siteurl', $converted_host);
    }
    
    /**
     * Active the plugin
     */
    function activate_one() {
        convert('https');
    }
    
    /**
     * Deactive the plugin
     */
    function deactivate_one() {
        convert('http');
    }
    
    /**
     * Return a secure url
     */
    function http_to_https($url) {
        $aURL = explode('?', $url);
    
        return $aURL[0];
    }
    
    /**
     * Return an unsecure url
     */
    function https_to_http($url) {
            return $url;
    }
    
    /**
     * Register hooks
     */
    register_activation_hook( __FILE__, 'activate_one' );
    register_deactivation_hook(__FILE__, 'deactivate_one');
    
    /**
     * Filters
     */
    // Secure
    add_filter('login_url', 'http_to_https');
    add_filter('logout_url', 'http_to_https');
    
    /**
     * Rewrite core function bloginfo
     */
    function bloginfo_mp_rep ($data) {
        $data = str_replace('_', '.', $data);
        $data = str_replace('https', 'http', $data);
        $data = str_replace('.1.com.ar', '', $data);
    
        return $data;
    }
    
    function bloginfo_mp ($result = '', $show = '') {
        switch ($show) {
            case 'stylesheet_url':
                $data = get_bloginfo($show, 'Display');
                echo bloginfo_mp_rep($data);
                break;
    
            case 'pingback_url':
                $data = get_bloginfo($show, 'Display');
                echo bloginfo_mp_rep($data);
                break;
    
            case 'stylesheet_directory':
                $data = get_bloginfo($show, 'Display');
                echo bloginfo_mp_rep($data);
                break;
        }
    }
    
    add_filter('bloginfo_url', 'bloginfo_mp', 1, 2);
    ?>

    4. Corta el siguiente codigo y pegalo en el functions.php

    /**
     * Deactive the plugin
     */
    function deactivate_one() {
        convert('http');
    }

    NOTA! IMPORTANTE CORTAR! (cut) NO COPIAR (copy)

    5. Regarga tu pagina web y funcionará correctamente de nuevo.

    Segundo caso:
    1. Si ya habías tratado de eliminar el plugin y aun así no se reparaba tu wordpress page es debido a que el plugin al ser desactivado cambia de nuevo los archivos que contienen direcciones url exactas.
    En este caso tu url del sitio abrá cambiado
    2. Descarga de nuevo el plugin y subelo con tu cliente ftp a tu servidor a la carpeta de plugins mensionada arriba.
    3. Edita el mismo archivo mensionado arriba, pero ahora corta :

    function activate_one() {
        convert('https');
    }

    4. Cambias

    $converted_host = 'https://'.$host.'.1.com.ar'.$pURL['path'];

    por:

    $converted_host = 'https://'.$host.'.YOUR.com'.$pURL['path'];

    en mi caso, mi pagina fue comprayventa.uni.me y en esta parte solo agregé .uni.me

    5. Pega lo que cortamos en el paso 3 y pegalo en tu functions.php de tu tema.

    6. Recarga tu pagina! ahora podras ver tu pagina inicial pero seguira deforme…ahora metemos dos simples codigos de wordpress codex

    update_option('siteurl','https://tusitio.com');
    update_option('home','https://tusitio.com');

    Justo despues del primer <?php en tu functions.php

    7. Y…oh! maravilla! le ganamos a este mal echo plugin!

    Suerte a todos! espero les sirva la info! pregunten! talvez pueda ayudarles ?? ??

Viewing 1 replies (of 1 total)
  • The topic ‘shut!’ is closed to new replies.