BeTheme

Viendo 13 entradas - de la 1 a la 13 (de un total de 13)
  • Autor
    Entradas
  • #17724 Karma: 0
    David Cuesta
    Superadministrador
    153

    Cómo funciona:

    BeTheme es un tema multi propósito de estos que permiten hacer webs con un montón de funcionalidades.

    Por lo general los desarrolladores e implementadores huimos de este tipo de temas porque incluyen demasiadas cosas, no son rápidos y encima tampoco demasiado seguros. Pero a veces algún cliente o alguien de nuestro entorno se encapricha con algo así… y bueno, puede ser necesario.

    Además fue votado por la dictadura de la mayoría en votación mensual y en esta comunidad seguimos las normas de la civilización humana xD.

    A tener en cuenta:

    • Es posible que no se instale directamente sino que se deba descomprimir primero y subir el child a parte.
    • No necesita activar la licencia para funcionar al 100%.

    Posibles errores y sus soluciones:

    • No me deja instalarlo: Revisa si hace falta descomprimirlo y subirlo por partes.

    Enlaces de interés:

    #18025 Karma: 0
    MediFlow
    Participante
    3

    Hola,
    Alguien lo ha probado. Estoy intentando instalarlo pero nada. Cada vez que lo activo me da error. He probado con subir las características de PHP y aun así nada.

    #18032 Karma: 0
    David Cuesta
    Superadministrador
    153

    Hola, está dando error y no sabemos por qué, hoy quería subir una update a ver si era eso, pero no habían actualizado… así que no pude

    No sé qué puede ser la verdad, si quieres abre ticket y lo miro el lunes-martes

    Un saludo!

    #18033 Karma: 0
    MediFlow
    Participante
    3

    He probado a instalarlo de diferentes formas. Efectivamente hay algo mal. Esperaremos a que se corrija.

    Gracias David.

    #18086 Karma: 1
    kerta
    Participante
    41

    Hola

    He encontrado el error en el betheme, lo he corrigido y todo funciona de maravilla. Para corregir el tema teneis que ir a
    wp-content\themes\betheme\functions\admin\class-mfn-dashboard.php abrir el class-mfn-dashboard.php en un editor de codigo
    Despues tienes que ir a la function que se llama ‘ public function admin_notices ()’ . function que va de la linea 219 a la linea de codigo 250. En esta function les falta una ‘{‘ os dejo el codigo para copiar y pegar . Mi contribution esta en la linea 244 con kerta al lado como commentario

    
    public function admin_notices()
    	{
    
    		// Current screen is not always available, most notably on the customizer screen.
    		if ( ! function_exists( 'get_current_screen' ) ) {
    			return false;
    		}
    
    		$current_screen = get_current_screen();
    		$current_screen = $current_screen->base;
    
    		$whitelist = array(
    			'toplevel_page_betheme',
    			'betheme_page_be-plugins',
    			'betheme_page_be-websites',
    			'betheme_page_be-status',
    			'betheme_page_be-support',
    		);
    
    		if ( in_array( $current_screen, $whitelist ) ) {
    			return false;
    		}
    
    		if ( mfn_is_registered() && ( 36 !== mfn_is_registered() ) ) {
    			return false;
    		} // Kerta Kerta ha añadido esto
    		if ( mfn_is_registered() || $this->is_localhost() ) {
    			return false;
    		}
    
    		include_once get_theme_file_path( '/functions/admin/templates/notice-register.php' );
    	}
    

    si preferios todo el archivo lo dajo aqui

    
    <?php
    if (! defined('ABSPATH')) {
    	exit; // Exit if accessed directly
    }
    
    class Mfn_Dashboard extends Mfn_API
    {
    	public $notices = array(
    
    		'no_purchase_code' => 'Please enter purchase code.',
    		'code_format' => 'Invalid purchase code format.',
    		'no_connection' => 'Could not connect to the Envato (ThemeForest) server to verify purchase. Please try again later.',
    
    		'registered' => 'Thank you for registration.',
    		'deregistered' => 'Theme deregistered.',
    	);
    
    	public $error = '';
    	public $version = '';
    
    	/**
    	 * Mfn_Dashboard constructor
    	 */
    
    	public function __construct()
    	{
    		parent::__construct();
    
    		// after_switch_theme is triggered on the request immediately following a theme switch.
    		add_action('after_switch_theme', array( $this, 'after_switch_theme' ));
    
    		// switch_theme is triggered when the blog's theme is changed. Specifically, it fires after the theme has been switched but before the next request.
    		add_action('switch_theme', array( $this, 'switch_theme' ));
    
    		// Notices displayed near the top of admin pages. The hook function should echo a message to be displayed.
    		add_action('admin_notices', array( $this, 'admin_notices' ), 1);
    
    		// It runs after the basic admin panel menu structure is in place.
    		add_action('admin_menu', array( $this, 'init' ));
    
    		// admin_init is triggered before any other hook when a user accesses the admin area.
    		add_action('admin_init', array( $this, 'register_setting' ));
    
    		// Filters a specific network option before its value is updated.
    		add_filter('pre_update_site_option_envato_purchase_code_7758048', array( $this, 'is_code_empty' ), 10, 2);
    
    		// Load all necessary admin bar items.
    		add_action('admin_bar_menu', array( $this, 'add_menu' ), 1000); // group theme settings is allowed
    
    		// bundled plugins
    		add_filter( 'admin_body_class', array( $this, 'bundled_plugins' ) );
    	}
    
    	/**
    	 * Under Construction active | Admin notice
    	 */
    
    	public function add_menu()
    	{
    		if (mfn_opts_get('construction')) {
    			global $wp_admin_bar;
    
    			$wp_admin_bar->add_menu(array(
    				'id' => 'mfn-notice-construction',
    				'href' => 'admin.php?page=be-options#pages-under',
    				'parent' => 'top-secondary',
    				'title' => __('Under Construction active', 'mfn-opts'),
    				'meta' => array( 'class' => 'mfn-notice' ),
    			));
    		}
    	}
    
    	/**
    	 * Check if purchase code is empty
    	 */
    
    	public function is_code_empty($new = false, $old = false)
    	{
    		if (isset($_POST['register'])) {
    
    			$new = trim($new);
    
    			if (! $new){
    				add_settings_error('betheme_registration', 'registration_error', $this->notices['no_purchase_code'], 'error inline mfn-dashboard-error');
    				return false;
    			}
    
    			$pattern = '/^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$/';
    			if (! preg_match($pattern, $new)){
    				add_settings_error('betheme_registration', 'registration_error', $this->notices['code_format'], 'error inline mfn-dashboard-error');
    				return false;
    			}
    
    		}
    
    		return $new;
    	}
    
    	/**
    	 * Add admin page & enqueue styles
    	 */
    
    	public function init()
    	{
    		$title = array(
    			'betheme'	=> 'Betheme',
    			'dashboard'	=> __('Dashboard', 'mfn-opts'),
    		);
    
    		$icon = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMC4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2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0wLjYtMS4yLTEuNC0xLjUtMi40Yy0wLjQtMC45LTAuNi0yLTAuNi0zLjNjMC0wLjksMC4yLTEuOCwwLjUtMi43DQoJCWMwLjMtMC44LDAuOC0xLjYsMS40LTIuMkMxOC4zLDYuOSwxOSw2LjQsMTkuOSw2QzIwLjcsNS43LDIxLjcsNS41LDIyLjgsNS41eiBNMjIuOCw4LjRjLTAuOCwwLTEuNCwwLjItMS45LDAuNw0KCQljLTAuNSwwLjUtMC44LDEuMS0wLjksMmg1LjNjMC0wLjMsMC0wLjctMC4xLTFjLTAuMS0wLjMtMC4yLTAuNi0wLjQtMC44QzI0LjYsOSwyNC4zLDguOCwyNCw4LjZDMjMuNyw4LjUsMjMuMyw4LjQsMjIuOCw4LjR6Ii8+DQo8L2c+DQo8L3N2Zz4=';
    
    		if (WHITE_LABEL) {
    			$title['betheme'] = 'Theme';
    			$icon = false;
    		}
    
    		$this->page = add_menu_page(
    			$title['betheme'],
    			$title['betheme'],
    			'edit_theme_options',
    			'betheme',
    			array( $this, 'template' ),
    			$icon,
    			3
    		);
    
    		add_submenu_page(
    			'betheme',
    			$title['dashboard'],
    			$title['dashboard'],
    			'edit_theme_options',
    			'betheme',
    			array( $this, 'template' )
    		);
    
    		// Deregister theme if any errors after switch theme
    		if( get_transient('betheme_deregistered') ){
    			$this->error = get_transient('betheme_deregistered');
    			delete_transient('betheme_deregistered');
    		}
    
    		// Runs when an administration menu page is loaded.
    		add_action('load-'. $this->page, array( $this, 'on_load' ));
    
    		// Fires when styles are printed for a specific admin page based on $hook_suffix.
    		add_action('admin_print_styles-'. $this->page, array( $this, 'enqueue' ));
    	}
    
    	/**
    	 * Dashboard template
    	 */
    
    	public function template()
    	{
    		include_once get_theme_file_path('/functions/admin/templates/dashboard.php');
    	}
    
    	/**
    	 * Enqueue styles and scripts
    	 */
    
    	public function enqueue()
    	{
    		wp_enqueue_style('mfn-dashboard', get_theme_file_uri('/functions/admin/assets/dashboard.css'), array(), MFN_THEME_VERSION);
    		wp_enqueue_script('mfn-dashboard', get_theme_file_uri('/functions/admin/assets/dashboard.js'), false, MFN_THEME_VERSION, true);
    	}
    
    	/**
    	 * Redirect after switch theme
    	 */
    
    	public function after_switch_theme()
    	{
    		if (mfn_is_registered()) {
    
    			$error = false;
    
    			$args = array(
    				'user-agent' => 'WordPress/'. get_bloginfo('version') .'; '. network_site_url(),
    				'timeout' => 30,
    				'body' => array(
    					'code' => urlencode(mfn_get_purchase_code()),
    					'register' => 1,
    				),
    			);
    
    			$response = $this->remote_post('register', $args);
    
    			if (is_wp_error($response)) {
    				$error = $response->get_error_message();
    			} elseif (empty($response['success'])) {
    				$error = $this->notices['no_connection'];
    			}
    
    			if( $error ){
    				set_transient('betheme_deregistered', $error, 30);
    				delete_site_option('envato_purchase_code_7758048');
    			}
    		}
    
    		wp_safe_redirect(admin_url('admin.php?page=betheme'));
    	}
    
    	/**
    	 * Theme deactivation - deactivate all theme related plugins
    	 */
    
    	public function switch_theme()
    	{
    		if (class_exists('Mfn_HB_Admin')) {
    			deactivate_plugins('mfn-header-builder/mfn-header-builder.php');
    		}
    	}
    
    	/**
    	 * Admin notice - plase register
    	 */
    
    	public function admin_notices()
    	{
    
    		// Current screen is not always available, most notably on the customizer screen.
    		if ( ! function_exists( 'get_current_screen' ) ) {
    			return false;
    		}
    
    		$current_screen = get_current_screen();
    		$current_screen = $current_screen->base;
    
    		$whitelist = array(
    			'toplevel_page_betheme',
    			'betheme_page_be-plugins',
    			'betheme_page_be-websites',
    			'betheme_page_be-status',
    			'betheme_page_be-support',
    		);
    
    		if ( in_array( $current_screen, $whitelist ) ) {
    			return false;
    		}
    
    		if ( mfn_is_registered() && ( 36 !== mfn_is_registered() ) ) {
    			return false;
    		} // Kerta KERTA  estoy aqui****
    		if ( mfn_is_registered() || $this->is_localhost() ) {
    			return false;
    		}
    
    		include_once get_theme_file_path( '/functions/admin/templates/notice-register.php' );
    	}
    
    	/**
    	 * Bundled plugins | Hide intrusive notices
    	 */
    
    	function bundled_plugins( $classes ){
    		if (! mfn_opts_get('plugin-rev')) {
    			$classes .= ' bundled-rev ';
    		}
    
    		if (! mfn_opts_get('plugin-layer')) {
    			$classes .= ' bundled-ls ';
    		}
    
    		if (! mfn_opts_get('plugin-visual')) {
    			$classes .= ' bundled-wpb ';
    		}
    
    		return $classes;
    	}
    
    	/**
    	 * Refresh site transients
    	 */
    
    	public function refresh_transients()
    	{
    		delete_site_transient('betheme_update_plugins');
    		delete_site_transient('betheme_plugins');
    
    		delete_site_transient('update_themes');
    		do_action('wp_update_themes');
    	}
    
    	/**
    	 * Register a setting and its data
    	 */
    
    	public function register_setting()
    	{
    		register_setting('betheme_registration', 'envato_purchase_code_7758048', array( $this, 'registration' ));
    	}
    
    	/**
    	 * A callback function that sanitizes the option's value
    	 */
    
    	public function registration($code)
    	{
    		$code = trim($code);
    
    		if (isset($_POST['register'])) {
    			$code = $this->register($code);
    		} elseif ($_POST['deregister']) {
    			$code = $this->deregister();
    		}
    
    		return $code;
    	}
    
    	/**
    	 * Register theme
    	 */
    
    	protected function register($code)
    	{
    		if (! $code) {
    			return false;
    		}
    
    		$args = array(
    			'user-agent' => 'WordPress/'. get_bloginfo('version') .'; '. network_site_url(),
    			'timeout' => 30,
    			'body' => array(
    				'code' => urlencode($code),
    				'register' => 1,
    			),
    		);
    
    		$response = $this->remote_post('register', $args);
    		if (is_wp_error($response)) {
    			add_settings_error('betheme_registration', 'registration_error', $response->get_error_message(), 'error inline mfn-dashboard-error');
    			return false;
    		}
    
    		if (empty($response['success'])) {
    			add_settings_error('betheme_registration', 'registration_error', $this->notices[ 'no_connection' ], 'error inline mfn-dashboard-error');
    			return false;
    		}
    
    		add_settings_error('betheme_registration', 'registration_success', $this->notices[ 'registered' ], 'updated inline mfn-dashboard-error');
    
    		$this->refresh_transients();
    
    		return $code;
    	}
    
    	/**
    	 * Deregister theme
    	 */
    
    	protected function deregister()
    	{
    		$code = mfn_get_purchase_code();
    
    		if ( ! $code ) {
    			return false;
    		}
    
    		$args = array(
    			'user-agent' => 'WordPress/'. get_bloginfo('version') .'; '. network_site_url(),
    			'timeout' => 30,
    			'body' => array(
    				'code' => urlencode($code),
    				'deregister' => 1,
    			),
    		);
    
    		/*
    
    		$response = $this->remote_post('register', $args);
    		if (is_wp_error($response)) {
    			add_settings_error('betheme_registration', 'registration_error', $response->get_error_message(), 'error inline mfn-dashboard-error');
    			return $code;
    		}
    
    		if (empty($response['success'])) {
    			add_settings_error('betheme_registration', 'registration_error', $this->notices[ 'no_connection' ], 'error inline mfn-dashboard-error');
    			return $code;
    		}
    
    		*/
    
    		add_settings_error('betheme_registration', 'registration_success', $this->notices[ 'deregistered' ], 'updated inline mfn-dashboard-error');
    
    		$this->refresh_transients();
    
    		return false;
    	}
    
    	/**
    	 * Update the value of an option that was already added for the current network
    	 */
    
    	public function on_load()
    	{
    		if (! isset($_POST['option_page']) || $_POST['option_page'] !== 'betheme_registration') {
    			return false;
    		}
    
    		check_admin_referer('betheme_registration-options');
    
    		if( isset($_POST['envato_purchase_code_7758048']) ){
    			$code = htmlspecialchars(trim($_POST['envato_purchase_code_7758048']));
    			update_site_option('envato_purchase_code_7758048', $code);
    		} else {
    			delete_site_option('envato_purchase_code_7758048');
    		}
    
    		set_transient('settings_errors', get_settings_errors(), 30);
    
    		$location = add_query_arg('settings-updated', 'true', wp_get_referer());
    		wp_safe_redirect($location);
    		exit;
    	}
    }
    
    

    Espero haber ayudado.

    Hasta el infinito

    #18087 Karma: 0
    MediFlow
    Participante
    3

    Kerta, eres lo más. Vamos a probarlo.

    #18090 Karma: 0
    David Cuesta
    Superadministrador
    153

    Kerta, eres lo más. Vamos a probarlo.

    +1 Kerta <3

    #18097 Karma: 0
    MediFlow
    Participante
    3

    Las plantillas se pueden descargar? Otra cosa, el child tampoco funciona.

    #18098 Karma: 0
    kerta
    Participante
    41

    Si si el child theme funciona bien. Yo he instalado el betheme despues de activarlo he instalado el child theme ( betheme-child.zip).

    Ojo en el archivo que descragas aqui en el chorri ( betheme.zip) incluye otros archivos en formato zip . El archivo padre betheme.zip incluye :
    – betheme-child.zip
    -betheme.zip
    -psd.zip
    – documentation
    -slider-revolution-demo
    -Licensing
    Por eso es mejor dezipar el betheme.zip para tener una carpeta con el betheme-child.zip y el betheme.zip

    Los plugins necesarios estan pre-instalados en el tema

    Las plantillas se pueden descargar si tienen el symbolo del mufin encima

    Hasta el infinito

    #18101 Karma: 1
    David Cuesta
    Superadministrador
    153

    Muchas gracias Kerta, eres lo máximo

    Creo que la culpa es mía por haceros caso y traeros este tipo de plantillas que no son nada recomendables… si ya da fallos antes de instalarla, imagínate la lotería cada vez que actualizas el tema o algún plugin

    Un saludo!

    #18104 Karma: 2
    kerta
    Participante
    41

    Estos temas de wordpress son una fabrica de gaz ( complicados y pesados), cada vez que tocas un buton matas a 3 osos polares. Muchos chorris piden la misma cosa ( elementor, beaver, divi …), yo seria mas para traer herramientas para mejorar las funciones de wordpress ( como el permalink…) en vista del seo. Pero estamos en democratia ….:)

    Hasta el infinito

    #25978 Karma: 1
    Usuario-Chorri
    Participante
    250

    Hola,
    cuando descomprimo el fichero .zip, en el interior de la carpeta no me aparece ningún otro fichero para descomprimir.
    ¿A qué puede ser debido?

    Un par de preguntas más:
    – Arriba se indica que sólo se pueden descargar las plantillas donde aparece el icono Mufin. Una vez descargado, ¿se puede utilizar Elementor con ella?
    – El tema Beonepage ¿está incluido aquí o es otro totalmente distinto?

    Gracias por adelantado y saludos

    #25994 Karma: 0
    David Cuesta
    Superadministrador
    153

    Buenas Carlos,
    El tema está ya listo para subir, no hace falta descomprimir nada.
    Las plantillas no sé si se pueden usar la verdad.

    Si necesitas el child theme o algo que no viene, hoy me toca actualizar, es posible que mañana ya puedas descargar la carpeta con todo dentro.

    Un saludo!

Viendo 13 entradas - de la 1 a la 13 (de un total de 13)
  • Debes estar registrado para responder a este debate.