goldenfont 39 ارسال شده در مرداد 92 گزارش بازنشر ارسال شده در مرداد 92 سلاماین پنل تنظیماتی هست که برای پوستم نوشتمرو یه سایت دیگم همین هست و آپلود میکنهولی رو یه سایت دیگم کار نمیکنهرو اون سایت اول که بود دقیقا همونو منتقل کردم رو سایت دوم هایعنی پوشه پوسته رو زیپ کردم و دانلود کردم و رو سایت جدید نصب کردمقبلا هم همین کارو میکردم مشکلی نداشت پنل تنظیماتش ولی حالادکمه ذخیره رو میزنی هیچی رو سیو نگه نمیدارهنه چیزی که زدی آپلود بشه و نه چیزی که تایپ کردیمشکلش چیه ؟<?php/*** @package WordPress* @subpackage Showcaser Theme*///register settingsfunction showcaser_theme_settings_init(){ register_setting( 'showcaser_theme_settings', 'showcaser_theme_settings' );}//menufunction showcaser_add_settings_page() {add_menu_page( __( 'Showcaser' ), __( 'تنظيمات پوسته' ), 'manage_options', 'showcaser-settings', 'showcaser_theme_settings_page');}add_action( 'admin_init', 'showcaser_theme_settings_init' );add_action( 'admin_menu', 'showcaser_add_settings_page' );//start settings pagefunction showcaser_theme_settings_page() {global $slider_effects;if ( ! isset( $_REQUEST['updated'] ) )$_REQUEST['updated'] = false;if(isset($_REQUEST['submit'])){if (is_uploaded_file($_FILES['favicon']['tmp_name'])) { $upload = wp_upload_bits($_FILES["favicon"]["name"], null, file_get_contents($_FILES["favicon"]["tmp_name"])); $_REQUEST['showcaser_theme_settings']['favicon']= $upload['url'];}if (is_uploaded_file($_FILES['logo']['tmp_name'])) { $upload = wp_upload_bits($_FILES["logo"]["name"], null, file_get_contents($_FILES["logo"]["tmp_name"])); $_REQUEST['showcaser_theme_settings']['logo']= $upload['url'];}$showcaser_theme_settings = $_REQUEST['showcaser_theme_settings'];$showcaser_theme_settings = $_REQUEST['showcaser_theme_settings'];$options = get_option( 'showcaser_theme_settings' );$showcaser_theme_settings = array_merge($options,$showcaser_theme_settings);update_option( 'showcaser_theme_settings' , $showcaser_theme_settings);}?><div class="wrap"><div id="icon-options-general" class="icon32"></div><h2><?php _e( 'تنظيمات پوسته' ) ?></h2><?php if ( false !== $_REQUEST['updated'] ) : ?><div class="updated fade"><p><strong><?php _e( 'Options saved' ); ?></strong></p></div><?php endif; ?><form method="post" action="" enctype="multipart/form-data"><?php settings_fields( 'showcaser_theme_settings' ); ?><?php $options = get_option( 'showcaser_theme_settings' ); ?><table class="form-table"><tr valign="top"><th scope="row"><?php _e( ' (favicon)' ); ?></th><td><input id="showcaser_theme_settings[favicon]" class="regular-text" type="file" size="36" name="favicon" /> <?php esc_attr_e( $options['favicon'] ); ?><br /><label class="description abouttxtdescription" for="showcaser_theme_settings[favicon]"><?php _e( 'آپلود کنید یا آدرس ایکون را وارد کنید.' ); ?></label><br /><img src="<?php esc_attr_e( $options['favicon'] ); ?>" /></td></tr><tr valign="top"><th scope="row"><?php _e( 'Logo' ); ?></th><td><input id="showcaser_theme_settings[logo]" class="regular-text" type="file" size="36" name="logo" /> <?php esc_attr_e( $options['logo'] ); ?><br /><label class="description abouttxtdescription" for="showcaser_theme_settings[logo]"><?php _e( 'آپلود کنید یا آدرس تصویر لوگو را وارد کنید.' ); ?></label><br /><img src="<?php esc_attr_e( $options['logo'] ); ?>" /></td></tr><tr valign="top"><th scope="row">About-Me:</th><td><input id="showcaser_theme_settings[About-Me]" class="regular-text" type="text" size="36" name="showcaser_theme_settings[About-Me]" value="<?php esc_attr_e( $options['About-Me'] ); ?>" /></td></tr></table><p class="submit-changes"><input name="submit" type="submit" class="button-primary" value="<?php _e( 'ذخیره تغییرات' ); ?>" /></p></form></div><!-- END wrap --><?php}//sanitize and validatefunction showcaser_options_validate( $input ) { global $select_options, $radio_options; if ( ! isset( $input['option1'] ) ) $input['option1'] = null; $input['option1'] = ( $input['option1'] == 1 ? 1 : 0 ); $input['sometext'] = wp_filter_nohtml_kses( $input['sometext'] ); if ( ! isset( $input['radioinput'] ) ) $input['radioinput'] = null; if ( ! array_key_exists( $input['radioinput'], $radio_options ) ) $input['radioinput'] = null; $input['sometextarea'] = wp_filter_post_kses( $input['sometextarea'] ); return $input;}?> نقل قول لینک به ارسال
Morteza 34190 ارسال شده در مرداد 92 گزارش بازنشر ارسال شده در مرداد 92 خطایی نمیده؟ عکس العملی نداره؟ 2 نقل قول لینک به ارسال
goldenfont 39 ارسال شده در مرداد 92 مالک گزارش بازنشر ارسال شده در مرداد 92 نهفقط صفحه رفرش میشه همین نقل قول لینک به ارسال
goldenfont 39 ارسال شده در مرداد 92 مالک گزارش بازنشر ارسال شده در مرداد 92 اگ مشکل از همین کدها باشه پس باید رو یه سایت دیگه هم همینطور باشهپس چرا فقط رو این سایت مشکل داره ؟ نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در مرداد 92 گزارش بازنشر ارسال شده در مرداد 92 این رو تست کنید <?php/*** @package WordPress* @subpackage Showcaser Theme*///register settingsfunction showcaser_theme_settings_init(){ register_setting( 'showcaser_theme_settings', 'showcaser_theme_settings' );}//menufunction showcaser_add_settings_page() {add_menu_page( 'Showcaser', 'تنظيمات پوسته', 'manage_options', 'showcaser-settings', 'showcaser_theme_settings_page');}add_action( 'admin_init', 'showcaser_theme_settings_init' );add_action( 'admin_menu', 'showcaser_add_settings_page' );//start settings pagefunction showcaser_theme_settings_page() {global $slider_effects;if ( ! isset( $_REQUEST['updated'] ) )$_REQUEST['updated'] = false;if(isset($_REQUEST['submit'])){if (is_uploaded_file($_FILES['favicon']['tmp_name'])) { $upload = wp_upload_bits($_FILES["favicon"]["name"], null, file_get_contents($_FILES["favicon"]["tmp_name"])); $_REQUEST['showcaser_theme_settings']['favicon']= $upload['url'];}if (is_uploaded_file($_FILES['logo']['tmp_name'])) { $upload = wp_upload_bits($_FILES["logo"]["name"], null, file_get_contents($_FILES["logo"]["tmp_name"])); $_REQUEST['showcaser_theme_settings']['logo']= $upload['url'];}$showcaser_theme_settings = $_REQUEST['showcaser_theme_settings'];$showcaser_theme_settings = $_REQUEST['showcaser_theme_settings'];$options = get_option( 'showcaser_theme_settings' );$showcaser_theme_settings = array_merge($options,$showcaser_theme_settings);update_option( 'showcaser_theme_settings' , $showcaser_theme_settings);}?><div class="wrap"><div id="icon-options-general" class="icon32"></div><h2>تنظيمات پوسته</h2><?php if ( false !== $_REQUEST['updated'] ) : ?><div class="updated fade"><p><strong>Options saved</strong></p></div><?php endif; ?><form method="post" action="" enctype="multipart/form-data"><?php settings_fields( 'showcaser_theme_settings' ); ?><?php $options = get_option( 'showcaser_theme_settings' ); ?><table class="form-table"><tr valign="top"><th scope="row"> (favicon)</th><td><input id="showcaser_theme_settings[favicon]" class="regular-text" type="file" size="36" name="favicon" /> <?php esc_attr_e( $options['favicon'] ); ?><br /><label class="description abouttxtdescription" for="showcaser_theme_settings[favicon]">آپلود کنید یا آدرس ایکون را وارد کنید.</label><br /><img src="<?php esc_attr_e( $options['favicon'] ); ?>" /></td></tr><tr valign="top"><th scope="row">Logo</th><td><input id="showcaser_theme_settings[logo]" class="regular-text" type="file" size="36" name="logo" /> <?php esc_attr_e( $options['logo'] ); ?><br /><label class="description abouttxtdescription" for="showcaser_theme_settings[logo]">آپلود کنید یا آدرس تصویر لوگو را وارد کنید.</label><br /><img src="<?php esc_attr_e( $options['logo'] ); ?>" /></td></tr><tr valign="top"><th scope="row">About-Me:</th><td><input id="showcaser_theme_settings[About-Me]" class="regular-text" type="text" size="36" name="showcaser_theme_settings[About-Me]" value="<?php esc_attr_e( $options['About-Me'] ); ?>" /></td></tr></table><p class="submit-changes"><input name="submit" type="submit" class="button-primary" value="ذخیره تغییرات" /></p></form></div><!-- END wrap --><?php}//sanitize and validatefunction showcaser_options_validate( $input ) { global $select_options, $radio_options; if ( ! isset( $input['option1'] ) ) $input['option1'] = null; $input['option1'] = ( $input['option1'] == 1 ? 1 : 0 ); $input['sometext'] = wp_filter_nohtml_kses( $input['sometext'] ); if ( ! isset( $input['radioinput'] ) ) $input['radioinput'] = null; if ( ! array_key_exists( $input['radioinput'], $radio_options ) ) $input['radioinput'] = null; $input['sometextarea'] = wp_filter_post_kses( $input['sometextarea'] ); return $input;}?> 2 نقل قول لینک به ارسال
goldenfont 39 ارسال شده در تیر 93 مالک گزارش بازنشر ارسال شده در تیر 93 (ویرایش شده) ممنون آقای فخاروقتی میخوام آپلود کنم خط 34 یعنی :$showcaser_theme_settings = array_merge($options,$showcaser_theme_settings);ارور میدهWarning: array_merge(): Argument #1 is not an array in /home2/user/domains/test.com/public_html/wp-content/themes/theme-fa/admin/theme-admin.php on line 34کار این خط چیه ؟ پاکش کردم درست شد مشکلی پیش نمیاد ؟$showcaser_theme_settings = array_merge($options,$showcaser_theme_settings); ویرایش شده تیر 93 توسط goldenfont نقل قول لینک به ارسال
goldenfont 39 ارسال شده در تیر 93 مالک گزارش بازنشر ارسال شده در تیر 93 آپ . . . بعد از بیش از 24 ساعت نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در تیر 93 گزارش بازنشر ارسال شده در تیر 93 این کد رو من پارسال دادم شما بعد از یک سال ارورش رو می گی من یادم نیست دیشب خوابیدم یا نه!! باید از اول کدها را بخونم بعد از یک سال ارور رو مطرح کردن ده روز انتظار انصافه نه؟ 1 نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در تیر 93 گزارش بازنشر ارسال شده در تیر 93 اون اکشن اجراست حذفش یعنی کار نکردن فرماین دو خط را$showcaser_theme_settings = $_REQUEST['showcaser_theme_settings'];$showcaser_theme_settings = $_REQUEST['showcaser_theme_settings'];به$showcaser_theme_settings = $_REQUEST['showcaser_theme_settings'];$showcaser_theme_settings = $showcaser_theme_settings[0];تغییر بدید و تست کنید (لطفا قبل از یکسال نتیجه را بگید) 1 نقل قول لینک به ارسال
goldenfont 39 ارسال شده در مرداد 93 مالک گزارش بازنشر ارسال شده در مرداد 93 ممنونولی بازم افاقه نکردباز هم وقتی دکمه ذخیره رو میزنم فقط صفحه رفرش میشه ! نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در مرداد 93 گزارش بازنشر ارسال شده در مرداد 93 شرمنده من نمی تونم هر وقت شما فرصت داشتید کدهاتون رو از اول مرور کنم 1 نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .