رفتن به مطلب

خطا در نقشه سایت


iran1404

پست های پیشنهاد شده

با سلام

من جدید یه کدهای وارد فایل فانکشن قالب کردم نقشه سایت خطا میده! و نمیتونم این کدها رو هم حذف کنم!

کسی از اساتید میتونه مشکل رو حل کنه!؟

<?php

// ## trendwp - trendoyun

// ## author: fatih sari (betik)

$tema = get_bloginfo('template_url'). '/';

function fs_get_option($key) {

global $fs_options;

$fs_options = get_option('fs_options');

$fs_defaults = array(

'fs_logo' => get_bloginfo('template_url').'/images/logo.png'

);

foreach($fs_defaults as $k=>$v) {

if (!$fs_options[$k])

$fs_options[$k] = $fs_defaults[$k];

}

return $fs_options[$key];

}

// PANEL ENTEGRE ++

require_once( TEMPLATEPATH . '/admin/theme-options.php');

require_once ( TEMPLATEPATH . '/includes/tinymce/information.php');

require_once ( TEMPLATEPATH . '/includes/tinymce/warning.php');

require_once ( TEMPLATEPATH . '/includes/tinymce/note.php');

require_once ( TEMPLATEPATH . '/includes/shortcodes.php');

// özel alanlar entegre //

include(TEMPLATEPATH . '/admin/panel-ek.php');

// PANEL ENTERGE --

define('INC', STYLESHEETPATH . '/includes/');

// SCRIPTS & CSS

include(INC . 'scripts.php');

// INCLUDES ++

include(INC . 'wp-pagenavi.php');

include(INC . 'breadcrumbs.php');

add_theme_support( 'nav-menus' );

register_nav_menu('menu1', 'منوبالا');

register_nav_menu('menu2', 'منو پایین');

register_nav_menu('menu3', 'منو پایین 2');

add_theme_support( 'post-thumbnails' );if ( function_exists( 'add_image_size' ) ) {

add_image_size( 'slider1', 54, 58, true );

add_image_size( 'slider2', 340, 250, true );

add_image_size( 'post1', 63, 48, true );

add_image_size( 'post2', 70, 125, true );

add_image_size( 'sinema', 82, 122, true );

add_image_size( 'arsiv', 100, 76, true );

add_image_size( 'icsayfa', 300, 228, true );

add_image_size( 'galeri', 157, 88, true );

add_image_size( 'sinema2', 157, 230, true );

}

remove_filter( 'the_excerpt', 'wpautop' );

/*kisaltma*/function yaziyi_kisalt($max_char, $more_link_text = '(devam...)', $stripteaser = 0, $more_file = '') { $content = get_the_excerpt($more_link_text, $stripteaser, $more_file); $content = apply_filters('the_excerpt', $content); $content = str_replace(']]>', ']]>', $content); if (strlen($_GET['p']) > 0) { echo $content; } else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) { $content = substr($content, 0, $espacio); $content = $content; echo $content; echo '...';} else { echo $content; }}

// YORUMLAR ++

function fs_yorumlar($comment, $args, $depth) {

$GLOBALS['comment'] = $comment;

echo '<li id="comment-'; comment_ID(); echo'">

<h1><span class="kullaniciAdi">'; comment_author(); echo '</span> <span class="zaman">'; comment_time('d M Y '); echo '</span></h1>

<div class="temizle"></div>

<div class="yorumlar">'; comment_text(); echo '</div>

</li>';

}

if (isset($_GET['activated']) && is_admin()){

$sayfalar =

array(

"yazarlar"=> array("tip"=>"page", "adi" => "نویسندها", "icerik" => "", "template" => "page_yazarlar.php")

);

foreach($sayfalar as $sayfa) {

$new_page = array( 'post_type' => $sayfa['tip'], 'post_title' => $sayfa['adi'], 'post_content' => $sayfa['icerik'], 'post_status' => 'publish', 'post_author' => 1, );

$page_check = get_page_by_title($sayfa['adi']);

if(!isset($page_check->ID)){

$new_page_id = wp_insert_post($new_page);

if(!empty($sayfa['template'])){

update_post_meta($new_page_id, '_wp_page_template', $sayfa['template']);

}

}

}

}

function kur($text) {

$ara=array("<ALIS>", "</ALIS>", "<SATIS>","</SATIS>");

$degis=array("","","","");

return str_replace($ara,$degis,$text);

}

// ### BILESENLER ###

if (function_exists('register_sidebar')) :

register_sidebar(array(

'name' => 'سایدبار صفحه اصلی',

'id' => 'anasayfa',

'description' => __('سمت راست پایین', 'fors'),

'before_widget' => '<div class="kenarlik oval3pxUst alt2px ust10px widgett">',

'after_widget' => '</div>',

'before_title' => '<div class="widbas oval3pxUst"><h1>',

'after_title' => '</h1></div><div class="temizle"></div>'

));

register_sidebar(array(

'name' => 'سایدبار ادامه مطلب بخش سینما',

'id' => 'sinema',

'description' => __('سمت راست پایین', 'fors'),

'before_widget' => '<div class="kenarlik oval3pxUst alt2px ust10px widgett">',

'after_widget' => '</div>',

'before_title' => '<div class="widbas oval3pxUst"><h1>',

'after_title' => '</h1></div><div class="temizle"></div>'

));

register_sidebar(array(

'name' => 'سایدبار ادامه مطلب سایر دسته ها',

'id' => 'diger',

'description' => __('سمت راست پایین', 'fors'),

'before_widget' => '<div class="kenarlik oval3pxUst alt2px ust10px widgett">',

'after_widget' => '</div>',

'before_title' => '<div class="widbas oval3pxUst"><h1>',

'after_title' => '</h1></div><div class="temizle"></div>'

));

endif;

function betik_sayfalar( $args = '' ) {

$defaults = array(

'before' => '<p id="post-pagination">' . __( '' ),

'after' => '</p>',

'text_before' => '',

'text_after' => '',

'next_or_number' => 'number',

'nextpagelink' => (''),

'previouspagelink' => (''),

'pagelink' => '%',

'echo' => 1

);

$r = wp_parse_args( $args, $defaults );

$r = apply_filters( 'wp_link_pages_args', $r );

extract( $r, EXTR_SKIP );

global $page, $numpages, $multipage, $more, $pagenow;

$output = '';

if ( $multipage ) {

if ( 'number' == $next_or_number ) {

$output .= $before;

for ( $i = 1; $i < ( $numpages + 1 ); $i = $i + 1 ) {

$j = str_replace( '%', $i, $pagelink );

$output .= ' ';

if ( $i != $page || ( ( ! $more ) && ( $page == 1 ) ) )

$output .= _wp_link_page( $i );

else

$output .= '<span class="current">';

$output .= $text_before . $j . $text_after;

if ( $i != $page || ( ( ! $more ) && ( $page == 1 ) ) )

$output .= '</a>';

else

$output .= '</span>';

}

$output .= $after;

} else {

if ( $more ) {

$output .= $before;

$i = $page - 1;

if ( $i && $more ) {

$output .= _wp_link_page( $i );

$output .= $text_before . $previouspagelink . $text_after . '</a>';

}

$i = $page + 1;

if ( $i <= $numpages && $more ) {

$output .= _wp_link_page( $i );

$output .= $text_before . $nextpagelink . $text_after . '</a>';

}

$output .= $after;

}

}

}

if ( $echo )

echo $output;

return $output;

}

function gelismisSayfalama()

{

$sayfaVerileri = wp_link_pages( array( 'echo' => '0', 'link_before' => 'x', 'link_after' => 'x', 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) );

echo '<p id="post-pagination">';

global $post;

$permalink = get_permalink($post->ID);

$permalink_structure = get_option('permalink_structure');

$ayarYapildiMi = empty($permalink_structure) ? 0 : 1;

preg_match_all('#x([0-9]+)x#si',$sayfaVerileri,$sayfalar);

$sayfalar = $sayfalar[1];

$toplamSayfa = $sayfalar[count($sayfalar)-1];

$limit = 3;

if($toplamSayfa > 1)

{

if($_GET['p']) $sayfa = (int) $_GET['page'];

if(!$_GET['p'])

{

$link = $_SERVER["REQUEST_URI"];

$kes = explode('/',$link);

$sayfa = (int) $kes[count($kes)-1];

}

if(empty($sayfa)) $sayfa = 1;

if($sayfa > 1)

{

echo $_GET['p'] ? '<a class="gelismisSayfa" href="'.$permalink.'&page=1">اول</a> ' : '<a class="gelismisSayfa" href="'.$permalink.'/1">اول</a> ';

echo $_GET['p'] ? '<a class="gelismisSayfa" href="'.$permalink.'&page='.($sayfa-1).'">قبلی</a> ' : '<a class="gelismisSayfa" href="'.$permalink.'/'.($sayfa-1).'">قبلی</a> ';

}

if($sayfa == 1 || $sayfa == $toplamSayfa) $limit = 7;

for($basla = $sayfa - $limit;$basla <= $sayfa + $limit; $basla++)

{

if($basla >= 1 && $basla <= $toplamSayfa && $basla != $sayfa)

{

echo $_GET['p'] ? '<a class="gelismisSayfa" href="'.$permalink.'&page='.$basla.'">'.$basla.'</a> ' : '<a class="gelismisSayfa" href="'.$permalink.'/'.$basla.'">'.$basla.'</a> ';

}

if($basla == $sayfa)

{

echo '<span class="current">'.$basla.'</span>';

}

}

if($sayfa < $toplamSayfa)

{

echo $_GET['p'] ? '<a class="gelismisSayfa" href="'.$permalink.'&page='.($sayfa+1).'">بعدی</a> ' : '<a class="gelismisSayfa" href="'.$permalink.'/'.($sayfa+1).'">بعدی</a> ';

echo $_GET['p'] ? '<a class="gelismisSayfa" href="'.$permalink.'&page='.$toplamSayfa.'">آخر</a> ' : '<a class="gelismisSayfa" href="'.$permalink.'/'.$toplamSayfa.'">آخر</a> ';

}

echo '</p>';

}

}

?>

<?php

function get_first_image_url($html)

{

if (preg_match('/<img.+?src="(.+?)"/', $html, $matches)) {

return $matches[1];

}

}

?>

<?php

function getrss($address,$tedad)

{

include_once( ABSPATH . WPINC . '/feed.php' );

$rss = fetch_feed( $address );

if ( is_wp_error( $rss ) ) {

echo $rss->get_error_message();

} else {

$maxitems = $rss->get_item_quantity( $tedad );

$rss_items = $rss->get_items( 0, $maxitems );

}

echo "<ul>";

if ( $maxitems == 0 ) {

echo"<li>"; echo"پیدا نشد"; echo"</li>";

}

else {

foreach ( $rss_items as $item ) :

echo "<li>";

echo "<a href=";echo bloginfo('template_url'); echo "/head.php?u="; echo esc_url( $item->get_permalink()); echo''; echo ">";

echo "<div class='rss-title'>"; echo esc_html( $item->get_title() ); echo"</div>";

echo '<img class="rss-box-img" alt="عکس مطلب" src="' .get_first_image_url($item->get_content()). '"/>';

echo "</a>";

echo"</li>";

endforeach;

echo"</ul>";

}

}

?>

<?php add_filter( 'wp_feed_cache_transient_lifetime', create_function('$a', 'return 10;') ); ?>

لینک به ارسال

بعد از اضافه کردن کدوم قطعه کد خطا میده؟ الان داره به خط 4 گیر میده. احتمال زیاد خطای دستوری هست..

لینک به ارسال

فایل اصلی بدون تغییر

<?php

// ## trendwp - trendoyun

// ## author: fatih sari (betik)

$tema = get_bloginfo('template_url'). '/';

function fs_get_option($key) {

global $fs_options;

$fs_options = get_option('fs_options');

$fs_defaults = array(

'fs_logo' => get_bloginfo('template_url').'/images/logo.png'

);

foreach($fs_defaults as $k=>$v) {

if (!$fs_options[$k])

$fs_options[$k] = $fs_defaults[$k];

}

return $fs_options[$key];

}

// PANEL ENTEGRE ++

require_once( TEMPLATEPATH . '/admin/theme-options.php');

require_once ( TEMPLATEPATH . '/includes/tinymce/information.php');

require_once ( TEMPLATEPATH . '/includes/tinymce/warning.php');

require_once ( TEMPLATEPATH . '/includes/tinymce/note.php');

require_once ( TEMPLATEPATH . '/includes/shortcodes.php');

// özel alanlar entegre //

include(TEMPLATEPATH . '/admin/panel-ek.php');

// PANEL ENTERGE --

define('INC', STYLESHEETPATH . '/includes/');

// SCRIPTS & CSS

include(INC . 'scripts.php');

// INCLUDES ++

include(INC . 'wp-pagenavi.php');

include(INC . 'breadcrumbs.php');

add_theme_support( 'nav-menus' );

register_nav_menu('menu1', 'منوبالا');

register_nav_menu('menu2', 'منو پایین');

register_nav_menu('menu3', 'منو پایین 2');

add_theme_support( 'post-thumbnails' );if ( function_exists( 'add_image_size' ) ) {

add_image_size( 'slider1', 54, 58, true );

add_image_size( 'slider2', 340, 250, true );

add_image_size( 'post1', 63, 48, true );

add_image_size( 'post2', 70, 125, true );

add_image_size( 'sinema', 82, 122, true );

add_image_size( 'arsiv', 100, 76, true );

add_image_size( 'icsayfa', 300, 228, true );

add_image_size( 'galeri', 157, 88, true );

add_image_size( 'sinema2', 157, 230, true );

}

remove_filter( 'the_excerpt', 'wpautop' );

/*kisaltma*/function yaziyi_kisalt($max_char, $more_link_text = '(devam...)', $stripteaser = 0, $more_file = '') { $content = get_the_excerpt($more_link_text, $stripteaser, $more_file); $content = apply_filters('the_excerpt', $content); $content = str_replace(']]>', ']]>', $content); if (strlen($_GET['p']) > 0) { echo $content; } else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) { $content = substr($content, 0, $espacio); $content = $content; echo $content; echo '...';} else { echo $content; }}

// YORUMLAR ++

function fs_yorumlar($comment, $args, $depth) {

$GLOBALS['comment'] = $comment;

echo '<li id="comment-'; comment_ID(); echo'">

<h1><span class="kullaniciAdi">'; comment_author(); echo '</span> <span class="zaman">'; comment_time('d M Y '); echo '</span></h1>

<div class="temizle"></div>

<div class="yorumlar">'; comment_text(); echo '</div>

</li>';

}

if (isset($_GET['activated']) && is_admin()){

$sayfalar =

array(

"yazarlar"=> array("tip"=>"page", "adi" => "نویسندها", "icerik" => "", "template" => "page_yazarlar.php")

);

foreach($sayfalar as $sayfa) {

$new_page = array( 'post_type' => $sayfa['tip'], 'post_title' => $sayfa['adi'], 'post_content' => $sayfa['icerik'], 'post_status' => 'publish', 'post_author' => 1, );

$page_check = get_page_by_title($sayfa['adi']);

if(!isset($page_check->ID)){

$new_page_id = wp_insert_post($new_page);

if(!empty($sayfa['template'])){

update_post_meta($new_page_id, '_wp_page_template', $sayfa['template']);

}

}

}

}

function kur($text) {

$ara=array("<ALIS>", "</ALIS>", "<SATIS>","</SATIS>");

$degis=array("","","","");

return str_replace($ara,$degis,$text);

}

// ### BILESENLER ###

if (function_exists('register_sidebar')) :

register_sidebar(array(

'name' => 'سایدبار صفحه اصلی',

'id' => 'anasayfa',

'description' => __('سمت راست پایین', 'fors'),

'before_widget' => '<div class="kenarlik oval3pxUst alt2px ust10px widgett">',

'after_widget' => '</div>',

'before_title' => '<div class="widbas oval3pxUst"><h1>',

'after_title' => '</h1></div><div class="temizle"></div>'

));

register_sidebar(array(

'name' => 'سایدبار ادامه مطلب بخش سینما',

'id' => 'sinema',

'description' => __('سمت راست پایین', 'fors'),

'before_widget' => '<div class="kenarlik oval3pxUst alt2px ust10px widgett">',

'after_widget' => '</div>',

'before_title' => '<div class="widbas oval3pxUst"><h1>',

'after_title' => '</h1></div><div class="temizle"></div>'

));

register_sidebar(array(

'name' => 'سایدبار ادامه مطلب سایر دسته ها',

'id' => 'diger',

'description' => __('سمت راست پایین', 'fors'),

'before_widget' => '<div class="kenarlik oval3pxUst alt2px ust10px widgett">',

'after_widget' => '</div>',

'before_title' => '<div class="widbas oval3pxUst"><h1>',

'after_title' => '</h1></div><div class="temizle"></div>'

));

endif;

function betik_sayfalar( $args = '' ) {

$defaults = array(

'before' => '<p id="post-pagination">' . __( '' ),

'after' => '</p>',

'text_before' => '',

'text_after' => '',

'next_or_number' => 'number',

'nextpagelink' => (''),

'previouspagelink' => (''),

'pagelink' => '%',

'echo' => 1

);

$r = wp_parse_args( $args, $defaults );

$r = apply_filters( 'wp_link_pages_args', $r );

extract( $r, EXTR_SKIP );

global $page, $numpages, $multipage, $more, $pagenow;

$output = '';

if ( $multipage ) {

if ( 'number' == $next_or_number ) {

$output .= $before;

for ( $i = 1; $i < ( $numpages + 1 ); $i = $i + 1 ) {

$j = str_replace( '%', $i, $pagelink );

$output .= ' ';

if ( $i != $page || ( ( ! $more ) && ( $page == 1 ) ) )

$output .= _wp_link_page( $i );

else

$output .= '<span class="current">';

$output .= $text_before . $j . $text_after;

if ( $i != $page || ( ( ! $more ) && ( $page == 1 ) ) )

$output .= '</a>';

else

$output .= '</span>';

}

$output .= $after;

} else {

if ( $more ) {

$output .= $before;

$i = $page - 1;

if ( $i && $more ) {

$output .= _wp_link_page( $i );

$output .= $text_before . $previouspagelink . $text_after . '</a>';

}

$i = $page + 1;

if ( $i <= $numpages && $more ) {

$output .= _wp_link_page( $i );

$output .= $text_before . $nextpagelink . $text_after . '</a>';

}

$output .= $after;

}

}

}

if ( $echo )

echo $output;

return $output;

}

function gelismisSayfalama()

{

$sayfaVerileri = wp_link_pages( array( 'echo' => '0', 'link_before' => 'x', 'link_after' => 'x', 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) );

echo '<p id="post-pagination">';

global $post;

$permalink = get_permalink($post->ID);

$permalink_structure = get_option('permalink_structure');

$ayarYapildiMi = empty($permalink_structure) ? 0 : 1;

preg_match_all('#x([0-9]+)x#si',$sayfaVerileri,$sayfalar);

$sayfalar = $sayfalar[1];

$toplamSayfa = $sayfalar[count($sayfalar)-1];

$limit = 3;

if($toplamSayfa > 1)

{

if($_GET['p']) $sayfa = (int) $_GET['page'];

if(!$_GET['p'])

{

$link = $_SERVER["REQUEST_URI"];

$kes = explode('/',$link);

$sayfa = (int) $kes[count($kes)-1];

}

if(empty($sayfa)) $sayfa = 1;

if($sayfa > 1)

{

echo $_GET['p'] ? '<a class="gelismisSayfa" href="'.$permalink.'&page=1">اول</a> ' : '<a class="gelismisSayfa" href="'.$permalink.'/1">اول</a> ';

echo $_GET['p'] ? '<a class="gelismisSayfa" href="'.$permalink.'&page='.($sayfa-1).'">قبلی</a> ' : '<a class="gelismisSayfa" href="'.$permalink.'/'.($sayfa-1).'">قبلی</a> ';

}

if($sayfa == 1 || $sayfa == $toplamSayfa) $limit = 7;

for($basla = $sayfa - $limit;$basla <= $sayfa + $limit; $basla++)

{

if($basla >= 1 && $basla <= $toplamSayfa && $basla != $sayfa)

{

echo $_GET['p'] ? '<a class="gelismisSayfa" href="'.$permalink.'&page='.$basla.'">'.$basla.'</a> ' : '<a class="gelismisSayfa" href="'.$permalink.'/'.$basla.'">'.$basla.'</a> ';

}

if($basla == $sayfa)

{

echo '<span class="current">'.$basla.'</span>';

}

}

if($sayfa < $toplamSayfa)

{

echo $_GET['p'] ? '<a class="gelismisSayfa" href="'.$permalink.'&page='.($sayfa+1).'">بعدی</a> ' : '<a class="gelismisSayfa" href="'.$permalink.'/'.($sayfa+1).'">بعدی</a> ';

echo $_GET['p'] ? '<a class="gelismisSayfa" href="'.$permalink.'&page='.$toplamSayfa.'">آخر</a> ' : '<a class="gelismisSayfa" href="'.$permalink.'/'.$toplamSayfa.'">آخر</a> ';

}

echo '</p>';

}

}

?>

این کدها رو اضافه کردن

<?php

function get_first_image_url($html)

{

if (preg_match('/<img.+?src="(.+?)"/', $html, $matches)) {

return $matches[1];

}

}

?>

<?php

function getrss($address,$tedad)

{

include_once( ABSPATH . WPINC . '/feed.php' );

$rss = fetch_feed( $address );

if ( is_wp_error( $rss ) ) {

echo $rss->get_error_message();

} else {

$maxitems = $rss->get_item_quantity( $tedad );

$rss_items = $rss->get_items( 0, $maxitems );

}

echo "<ul>";

if ( $maxitems == 0 ) {

echo"<li>"; echo"پیدا نشد"; echo"</li>";

}

else {

foreach ( $rss_items as $item ) :

echo "<li>";

echo "<a href=";echo bloginfo('template_url'); echo "/head.php?u="; echo esc_url( $item->get_permalink()); echo''; echo ">";

echo "<div class='rss-title'>"; echo esc_html( $item->get_title() ); echo"</div>";

echo '<img class="rss-box-img" alt="عکس مطلب" src="' .get_first_image_url($item->get_content()). '"/>';

echo "</a>";

echo"</li>";

endforeach;

echo"</ul>";

}

}

?>

<?php add_filter( 'wp_feed_cache_transient_lifetime', create_function('$a', 'return 10;') ); ?>

اما وقتی کدهای فایل اصلی رو وارد میکنم نقشه درست میشه

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...