Şimdi Ara

Parse error: syntax error, unexpected hatası

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
3 Misafir - 3 Masaüstü
5 sn
6
Cevap
0
Favori
926
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
Öne Çıkar
0 oy
Sayfa: 1
Giriş
Mesaj
  • Arkadaşlar site açılışında

    Parse error: syntax error, unexpected '{' in /home/a4567045/public_html/wp-content/themes/blackfyre/themeOptions/functions.php on line 1

    hatası alıyorum .

    acaba ne yapmam gerekiyo



    < Bu mesaj bu kişi tarafından değiştirildi RossecK -- 9 Ocak 2016; 13:47:14 >



    _____________________________
  • Kardeşim

    bu yoldaki -> home/a4567045/public_html/wp-content/themes/blackfyre/themeOptions/functions.php

    functions.php kodunu paylaşırmısın?
    _____________________________
  • quote:

    Orijinalden alıntı: __LaBeNs__

    Kardeşim

    bu yoldaki -> home/a4567045/public_html/wp-content/themes/blackfyre/themeOptions/functions.php

    functions.php kodunu paylaşırmısın?


    tabi buyur


    <?php
    if ( !function_exists( 'optionsframework_init' ) ) {
    /*-----------------------------------------------------------------------------------*/
    /* Options Framework Theme
    /*-----------------------------------------------------------------------------------*/
    /* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */

    define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/themeOptions/admin/');
    define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/themeOptions/admin/');

    require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
    }
    /*
    * This is an example of how to add custom scripts to the options panel.
    * This one shows/hides the an option when a checkbox is clicked.
    */
    add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
    function optionsframework_custom_scripts() { ?>
    <script type="text/javascript">
    jQuery(document).ready(function() {
    jQuery('#example_showhidden').click(function() {
    jQuery('#section-example_text_hidden').fadeToggle(400);
    });
    if (jQuery('#example_showhidden:checked').val() !== undefined) {
    jQuery('#section-example_text_hidden').show();
    }
    });
    </script>
    <?php
    }
    /*
    * Turns off the default options panel from Twenty Eleven
    */
    add_action('after_setup_theme','remove_twentyeleven_options', 100);
    function remove_twentyeleven_options() {
    remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
    }
    ?>
    _____________________________




  • şunu dene bakalım

    <?php
    if ( !function_exists( 'optionsframework_init' ) ) {
    /*-----------------------------------------------------------------------------------*/
    /* Options Framework Theme
    /*-----------------------------------------------------------------------------------*/
    /* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */

    define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/themeOptions/admin/');
    define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/themeOptions/admin/');

    require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
    } ?>
    /*
    * This is an example of how to add custom scripts to the options panel.
    * This one shows/hides the an option when a checkbox is clicked.
    */
    add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
    function optionsframework_custom_scripts() {
    <script type="text/javascript">
    jQuery(document).ready(function() {
    jQuery('#example_showhidden').click(function() {
    jQuery('#section-example_text_hidden').fadeToggle(400);
    });
    if (jQuery('#example_showhidden:checked').val() !== undefined) {
    jQuery('#section-example_text_hidden').show();
    }
    });
    </script>
    }
    <?php

    /*
    * Turns off the default options panel from Twenty Eleven
    */
    add_action('after_setup_theme','remove_twentyeleven_options', 100);
    function remove_twentyeleven_options() {
    remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
    }
    ?>



    < Bu mesaj bu kişi tarafından değiştirildi __LaBeNs__ -- 9 Ocak 2016; 14:33:08 >
    _____________________________




  • quote:

    Orijinalden alıntı: __LaBeNs__

    şunu dene bakalım

    <?php
    if ( !function_exists( 'optionsframework_init' ) ) {
    /*-----------------------------------------------------------------------------------*/
    /* Options Framework Theme
    /*-----------------------------------------------------------------------------------*/
    /* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */

    define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/themeOptions/admin/');
    define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/themeOptions/admin/');

    require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
    } ?>
    /*
    * This is an example of how to add custom scripts to the options panel.
    * This one shows/hides the an option when a checkbox is clicked.
    */
    add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
    function optionsframework_custom_scripts() {
    <script type="text/javascript">
    jQuery(document).ready(function() {
    jQuery('#example_showhidden').click(function() {
    jQuery('#section-example_text_hidden').fadeToggle(400);
    });
    if (jQuery('#example_showhidden:checked').val() !== undefined) {
    jQuery('#section-example_text_hidden').show();
    }
    });
    </script>
    }
    <?php

    /*
    * Turns off the default options panel from Twenty Eleven
    */
    add_action('after_setup_theme','remove_twentyeleven_options', 100);
    function remove_twentyeleven_options() {
    remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
    }
    ?>


    Parse error: syntax error, unexpected T_STRING in /home/a4567045/public_html/wp-content/themes/blackfyre/themeOptions/admin/options-framework.php on line 1

    bu seferde bu hatayı aldık hocam

    <?php/*Plugin Name: Options FrameworkPlugin URI:http://www.wptheming.comDescription: A framework for building theme options.Version: 0.8Author: Devin PriceAuthor URI:http://www.wptheming.comLicense: GPLv2*//*This program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of 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 ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*//* Basic plugin definitions */define('OPTIONS_FRAMEWORK_VERSION', '0.9');/* Make sure we don't expose any info if called directly */if ( !function_exists( 'add_action' ) ) { echo "Hi there! I'm just a little plugin, don't mind me."; exit;}/* If the user can't edit theme options, no use running this plugin */add_action('init', 'optionsframework_rolescheck' );function optionsframework_rolescheck () { if ( current_user_can( 'edit_theme_options' ) ) { // If the user can edit theme options, let the fun begin! add_action( 'admin_menu', 'optionsframework_add_page'); add_action( 'admin_init', 'optionsframework_init' ); //add_action( 'admin_head', 'optionsframework_mlu_css' ); //add_action( 'admin_head', 'optionsframework_mlu_js' ); }}/* Loads the file for option sanitization */add_action('init', 'optionsframework_load_sanitization' );function optionsframework_load_sanitization() { require_once dirname( __FILE__ ) . '/options-sanitize.php';}/* * Creates the settings in the database by looping through the array * we supplied in options.php. This is a neat way to do it since * we won't have to save settings for headers, descriptions, or arguments. * * Read more about the Settings API in the WordPress codex: *http://codex.wordpress.org/Settings_API * */function optionsframework_init() { // Include the required files require_once dirname( __FILE__ ) . '/options-interface.php'; require_once dirname( __FILE__ ) . '/options-medialibrary-uploader.php'; // Loads the options array from the theme **This is for the BioSphere theme if ( $optionsfile = locate_template( array('themeOptions/options.php') ) ) { require_once($optionsfile); } else if (file_exists( dirname( __FILE__ ) . '/options.php' ) ) { require_once dirname( __FILE__ ) . '/options.php'; } $optionsframework_settings = get_option('optionsframework' ); // Updates the unique option id in the database if it has changed optionsframework_option_name(); // Gets the unique id, returning a default if it isn't defined if ( isset($optionsframework_settings['id']) ) { $option_name = $optionsframework_settings['id']; } else { $option_name = 'optionsframework'; } // If the option has no saved data, load the defaults if ( ! get_option($option_name) ) { optionsframework_setdefaults(); } // Registers the settings fields and callback register_setting( 'optionsframework', $option_name, 'optionsframework_validate' );}/* * Adds default options to the database if they aren't already present. * May update this later to load only on plugin activation, or theme * activation since most people won't be editing the options.php * on a regular basis. * *http://codex.wordpress.org/Function_Reference/add_option * */function optionsframework_setdefaults() { $optionsframework_settings = get_option('optionsframework'); // Gets the unique option id $option_name = $optionsframework_settings['id']; /* * Each theme will hopefully have a unique id, and all of its options saved * as a separate option set. We need to track all of these option sets so * it can be easily deleted if someone wishes to remove the plugin and * its associated data. No need to clutter the database. * */ if ( isset($optionsframework_settings['knownoptions']) ) { $knownoptions = $optionsframework_settings['knownoptions']; if ( !in_array($option_name, $knownoptions) ) { array_push( $knownoptions, $option_name ); $optionsframework_settings['knownoptions'] = $knownoptions; update_option('optionsframework', $optionsframework_settings); } } else { $newoptionname = array($option_name); $optionsframework_settings['knownoptions'] = $newoptionname; update_option('optionsframework', $optionsframework_settings); } // Gets the default options data from the array in options.php $options = optionsframework_options(); // If the options haven't been added to the database yet, they are added now $values = of_get_default_values(); if ( isset($values) ) { add_option( $option_name, $values ); // Add option with default settings }}/* Add a subpage called "Theme Options" to the appearance menu. */if ( !function_exists( 'optionsframework_add_page' ) ) {function optionsframework_add_page() { $of_page = add_theme_page('Theme Options', '', 'edit_theme_options', 'options-framework','optionsframework_page'); // Adds actions to hook in the required css and javascript add_action("admin_print_styles-$of_page",'optionsframework_load_styles'); add_action("admin_print_scripts-$of_page", 'optionsframework_load_scripts');}}/* Loads the CSS */function optionsframework_load_styles() { wp_enqueue_style('admin-style', OPTIONS_FRAMEWORK_DIRECTORY.'css/admin-style.css'); wp_enqueue_style('color-picker', OPTIONS_FRAMEWORK_DIRECTORY.'css/colorpicker.css'); wp_enqueue_style('engage.itoggle', OPTIONS_FRAMEWORK_DIRECTORY.'css/engage.itoggle.css'); $_html = ''; $_html .= '<link rel="stylesheet" href="' . site_url() . '/' . WPINC . '/js/thickbox/thickbox.css" type="text/css" media="screen" />' . "\n"; $_html .= '<script type="text/javascript"> var tb_pathToImage = "' . site_url() . '/' . WPINC . '/js/thickbox/loadingAnimation.gif"; var tb_closeImage = "' . site_url() . '/' . WPINC . '/js/thickbox/tb-close.png"; </script>' . "\n"; echo $_html;}/* Loads the javascript */function optionsframework_load_scripts() { // Inline scripts from options-interface.php add_action('admin_head', 'of_admin_head'); // Enqueued scripts wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('color-picker', OPTIONS_FRAMEWORK_DIRECTORY.'js/colorpicker.js', array('jquery')); wp_enqueue_script('options-custom', OPTIONS_FRAMEWORK_DIRECTORY.'js/options-custom.js', array('jquery')); wp_enqueue_script('engage.itoggle', OPTIONS_FRAMEWORK_DIRECTORY.'js/engage.itoggle.js', array('jquery')); wp_enqueue_script('easing', OPTIONS_FRAMEWORK_DIRECTORY.'js/easing.js', array('jquery')); wp_enqueue_script('of-medialibrary-uploader', OPTIONS_FRAMEWORK_DIRECTORY .'js/of-medialibrary-uploader.js', array( 'jquery', 'thickbox' )); wp_enqueue_script( 'media-upload' );}function of_admin_head() { // Hook to add custom scripts do_action( 'optionsframework_custom_scripts' );}/* * Builds out the options panel. * * If we were using the Settings API as it was likely intended we would use * do_settings_sections here. But as we don't want the settings wrapped in a table, * we'll call our own custom optionsframework_fields. See options-interface.php * for specifics on how each individual field is generated. * * Nonces are provided using the settings_fields() * */if ( !function_exists( 'optionsframework_page' ) ) {function optionsframework_page() { $return = optionsframework_fields(); // izbrisano zbog slidera settings_errors(); ?><div id="wrap"><form action="options.php" method="post"> <div id="main"> <div class="admin-header"> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=113430806&url=http://www.skywarriorthemes.com" target="_blank" data-href="http://www.skywarriorthemes.com" target="_blank"><img alt="img" id="logo-img" src="<?php echo get_template_directory_uri(); ?>/themeOptions/admin/images/logo.png"> </a> <input type="submit" class="button-primary" name="update" value="<?php esc_attr_e( 'Save All Changes', 'blackfyre'); ?>" /> </div> <div class="nav-tab-wrapper"><?php echo $return[1]; ?> </div> <div class="metabox-holder"> <div id="optionsframework" class="postbox"> <!--<div id="theme_header"> <div class="theme_logo"> <h2><?php// _e("Hey there admin!", 'blackfyre') ?></h2> </div> <div class="visit"> <p style="margin:13px 0 0 15px;">Visit our profile!</p> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=113430806&url=http://themeforest.net/user/Skywarrior" target="_blank" data-href="http://themeforest.net/user/Skywarrior" target="_blank"></a> </div> <div class="need_help"> <p><?php //_e("Need help?", 'blackfyre') ?></p> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=113430806&url=http://skywarriorthemes.com/lust/instructions/instructions.html" target="_blank" data-href="http://skywarriorthemes.com/lust/instructions/instructions.html" target="_blank"></a> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=113430806&url=http://support.skywarriorthemes.com" target="_blank" data-href="http://support.skywarriorthemes.com" target="_blank"></a> </div> <div class="icon-option"> </div> <div class="clear"></div> </div>--> <?php settings_fields('optionsframework'); ?> <?php echo $return[0]; /* Settings */ ?> </div> <!-- / #container --> <div class="clear"></div> </div> <div class="clear"></div> </div> <!-- / #main --> <div class="save_bar_top"> <div id="optionsframework-submit"> <input type="submit" class="button-primary" name="update" value="<?php esc_attr_e( 'Save All Changes', 'blackfyre'); ?>" /> <input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e( 'Restore Defaults Options', 'blackfyre' ); ?>" onclick="return confirm( '<?php print esc_js( __( 'Click OK to reset. Any theme settings will be lost!' , 'blackfyre') ); ?>' );" /> <div class="clear"></div> </div> </div> </form></div><!-- / #wrap --><?php}}/** * Validate Options. * * This runs after the submit/reset button has been clicked and * validates the inputs. * * @uses $_POST['reset'] * @uses $_POST['update'] */function optionsframework_validate( $input ) { /* * Restore Defaults. * * In the event that the user clicked the "Restore Defaults" * button, the options defined in the theme's options.php * file will be added to the option for the active theme. */ if ( isset( $_POST['reset'] ) ) { add_settings_error( 'options-framework', 'restore_defaults', __( 'Default options restored.', 'blackfyre' ), 'updated fade' ); return of_get_default_values(); } /* * Udpdate Settings. */ if ( isset( $_POST['update'] ) ) { $clean = array(); $options = optionsframework_options(); foreach ( $options as $option ) { if ( ! isset( $option['id'] ) ) { continue; } if ( ! isset( $option['type'] ) ) { continue; } $id = preg_replace( '/[^a-zA-Z0-9._\-]/', '', strtolower( $option['id'] ) ); // Set checkbox to false if it wasn't sent in the $_POST if ( 'checkbox' == $option['type'] && ! isset( $input[$id] ) ) { $input[$id] = '0'; } if ( 'jqueryselect' == $option['type'] && ! isset( $input[$id] ) ) { $input[$id] = '0'; } // Set each item in the multicheck to false if it wasn't sent in the $_POST if ( 'multicheck' == $option['type'] && ! isset( $input[$id] ) ) { foreach ( $option['options'] as $key => $value ) { $input[$id][$key] = '0'; } } // For a value to be submitted to database it must pass through a sanitization filter if ( has_filter( 'of_sanitize_' . $option['type'] ) ) { $clean[$id] = apply_filters( 'of_sanitize_' . $option['type'], $input[$id], $option ); } } add_settings_error( 'options-framework', 'save_options', __( 'Options saved.', 'blackfyre' ), 'updated fade' ); return $clean; } /* * Request Not Recognized. */ return of_get_default_values();}/** * Format Configuration Array. * * Get an array of all default values as set in * options.php. The 'id','std' and 'type' keys need * to be defined in the configuration array. In the * event that these keys are not present the option * will not be included in this function's output. * * @return array Rey-keyed options configuration array. * * @access private */function of_get_default_values() { $output = array(); $config = optionsframework_options(); foreach ( (array) $config as $option ) { if ( ! isset( $option['id'] ) ) { continue; } if ( ! isset( $option['std'] ) ) { continue; } if ( ! isset( $option['type'] ) ) { continue; } if ( has_filter( 'of_sanitize_' . $option['type'] ) ) { $output[$option['id']] = apply_filters( 'of_sanitize_' . $option['type'], $option['std'], $option ); } } return $output;}/** * Add Theme Options menu item to Admin Bar. */add_action( 'wp_before_admin_bar_render', 'optionsframework_adminbar' );function optionsframework_adminbar() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'of_theme_options', 'title' => __( 'Theme Options' , 'blackfyre'), 'href' => admin_url( 'themes.php?page=options-framework' ) ));}if ( ! function_exists( 'of_get_option' ) ) { /** * Get Option. * * Helper function to return the theme option value. * If no value has been saved, it returns $default. * Needed because options are saved as serialized strings. */ function of_get_option( $name, $default = false ) { $config = get_option( 'optionsframework' ); if ( ! isset( $config['id'] ) ) { return $default; } $options = get_option( $config['id'] ); if ( isset( $options[$name] ) ) { return $options[$name]; } return $default; }}
    _____________________________




  • Normal olarak kodlamada hata gözükmüyor. Muhtemelen bu dosyayı çağıran sayfalardan birinde olan hata. Denemek için bazı kodlar silinip ne sonuç çıkıyor, ona da bakılabilir. Tabi bu durumda tüm işlevler kusursuz çalışmayabilir. Sadece denemek için. Deneye deneye asıl problem kaynağı bulunabilir.

    Ciddi bir hata değil. Kodlama hatası var bir yerlerde.

    < Bu ileti tablet sürüm kullanılarak atıldı >
    _____________________________

    İstikbal
  • Yapay Zeka’dan İlgili Konular
    DirectX Error / HATASI !
    2 yıl önce açıldı
    Daha Fazla Göster
    
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.