نمایش نتایج 1 تا 15 از 15

نام تاپیک: دلیل اجرا نشدن این بخش از کد چیست؟

  1. #1

    دلیل اجرا نشدن این بخش از کد چیست؟

    سلام ببخشید در این قسمتی که علامت ؟؟؟؟؟؟ گذاشتم هیچ کدی اجرا نمیشه حتی php و جاوا اسکریپ
    مشکل از کجاست چیکار کنم؟

     * Quick Preview tapestry callback function.
    * @since 1.4.3
    */
    if (!function_exists('arras_tapestry_quick')) {
    function arras_tapestry_quick($dep = '', $taxonomy) {
    ?>
    <li <?php arras_post_class() ?>>
    <?php echo apply_filters('arras_tapestry_quick_postheader', arras_generic_postheader('quick-preview') ) ?>
    <div class="entry-summary">
    ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ ؟؟؟؟؟؟؟؟؟؟؟
    </div>
    </li>
    <?php
    }
    arras_add_tapestry( 'quick', __('Quick Preview', 'arras'), 'arras_tapestry_quick', array(
    'before' => '<ul class="hfeed posts-quick clearfix">',
    'after' => '</ul><!-- .posts-quick -->'
    ) );

    function arras_add_tapestry_quick_thumbs() {
    arras_add_image_size( 'quick-preview-thumb', __('Tapestry: Quick Preview', 'arras'), 115, 115 );
    }
    add_action('arras_add_default_thumbnails', 'arras_add_tapestry_quick_thumbs');

    function arras_style_tapestry_quick() {
    $quick_preview_size = arras_get_image_size('quick-preview-thumb');
    $quick_preview_w = $quick_preview_size['w'];
    $quick_preview_h = $quick_preview_size['h'];

    ?>
    .posts-quick .entry-thumbnails img { width: <?php echo $quick_preview_w ?>px; height: <?php echo $quick_preview_h ?>px; }
    .posts-quick .entry-meta { width: <?php echo $quick_preview_w ?>px; }
    <?php
    }
    add_action('arras_custom_styles', 'arras_style_tapestry_quick');
    }


  2. #2
    کاربر دائمی آواتار binyaft
    تاریخ عضویت
    خرداد 1388
    محل زندگی
    سیم مسی
    پست
    1,761

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    در پی اچ پی اخر هر دستور باید یک ; بزارید اونجایی که کد اجرا نمیشه خط بالاییش با ; پایان نیافته
    و خطا از همینجاست
    اگر باز هم کار نکرد حد اقل خطا رو بزارید

  3. #3

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    یعنی کجا بزارم

    این کل فایل

    <?php

    /**
    * Container for storing tapestries and their hook to render them.
    * @since 1.4.3
    */
    $arras_tapestries = array();

    /**
    * Function to add posts views into the system.
    * @since 1.4.3
    */
    function arras_add_tapestry( $id, $name, $callback, $args = array() ) {
    global $arras_tapestries;

    if ( !is_callable($callback) ) return false;

    $defaults = array(
    'before' => '<div class="hfeed clearfix">',
    'after' => '</div>',
    'allow_duplicates' => true,
    'taxonomy' => 'category'
    );
    $args = wp_parse_args($args, $defaults);

    $args['name'] = $name;
    $args['callback'] = $callback;

    $arras_tapestries[$id] = (object) $args;
    }

    /**
    * Function to remove posts views from the system.
    * @since 1.4.3
    */
    function arras_remove_tapestry($id) {
    global $arras_tapestries;

    unset($arras_tapestries[$id]);
    }

    /**
    * Removes all posts display types from the system.
    * @since 1.4.3
    */
    function arras_remove_all_tapestries() {
    global $arras_tapestries;

    $arras_tapestries = array();
    }

    /**
    * Gets tapestry callback function
    * @since 1.4.4
    */
    function arras_get_tapestry_callback($type, $query, $taxonomy = 'category') {
    global $arras_tapestries;

    if ( count($arras_tapestries) == 0 ) return false;

    if ( $arras_tapestries[$type] ) {
    $tapestry = $arras_tapestries[$type];
    } else {
    $arr = array_values($arras_tapestries);
    $tapestry = $arr[0];
    }

    echo $tapestry->before;
    while ($query->have_posts()) {
    $query->the_post();
    call_user_func_array( $tapestry->callback, array($dep = '', $taxonomy) );
    if ($tapestry->allow_duplicates) arras_blacklist_duplicates();
    }
    echo $tapestry->after;
    }

    /**
    * Traditional tapestry callback function.
    * @since 1.4.3
    */
    if (!function_exists('arras_tapestry_traditional')) {
    function arras_tapestry_traditional($dep = '', $taxonomy) {
    ?>
    <div <?php arras_single_post_class() ?>>
    <?php arras_postheader() ?>
    <div class="entry-content clearfix"><?php the_content( __('<p>Read the rest of this entry &raquo;</p>', 'arras') ); ?></div>
    <?php arras_postfooter() ?>
    </div>
    <?php
    }
    arras_add_tapestry( 'traditional', __('Traditional', 'arras'), 'arras_tapestry_traditional', array(
    'before' => '<div class="traditional hfeed">',
    'after' => '</div><!-- traditional -->'
    ) );
    }

    /**
    * Per Line tapestry callback function.
    * @since 1.4.3
    */
    if (!function_exists('arras_tapestry_line')) {
    function arras_tapestry_line($dep = '', $taxonomy) {
    ?>
    <li <?php arras_post_class() ?>>

    <span class="entry-cat">
    <?php
    $terms = get_the_terms( get_the_ID(), $taxonomy );
    if ( !is_wp_error($terms) ) {
    $terms = array_values($terms);
    if (arras_get_option('news_cat') && isset($terms[1])) echo $terms[1]->name;
    else echo $terms[0]->name;
    }
    ?>
    </span>

    <h3 class="entry-title"><a rel="bookmark" href="<?php the_permalink() ?>" title="<?php printf( __('Permalink to %s', 'arras'), get_the_title() ) ?>"><?php the_title() ?></a></h3>
    <span class="entry-comments"><?php comments_number() ?></span>
    </li>
    <?php
    }
    arras_add_tapestry( 'line', __('Per Line', 'arras'), 'arras_tapestry_line', array(
    'before' => '<ul class="hfeed posts-line clearfix">',
    'after' => '</ul><!-- .posts-line -->'
    ) );
    }

    /**
    * Node Based tapestry callback function.
    * @since 1.4.3
    */
    if (!function_exists('arras_tapestry_default')) {
    function arras_tapestry_default($dep = '', $taxonomy) {
    $tapestry_settings = get_option('arras_tapestry_default');
    if (!is_array($tapestry_settings) ) {
    $tapestry_settings = arras_defaults_tapestry_default();
    }
    ?>
    <li <?php arras_post_class() ?>>
    <?php echo apply_filters('arras_tapestry_default_postheader', arras_generic_postheader('node-based', true) ) ?>
    <?php if ($tapestry_settings['excerpt']) : ?>
    <?php endif ?>
    </li>
    <?php
    }
    arras_add_tapestry( 'default', __('Node Based', 'arras'), 'arras_tapestry_default', array(
    'before' => '<ul class="hfeed posts-default clearfix">',
    'after' => '</ul><!-- .posts-default -->'
    ) );

    add_action('arras_add_default_thumbnails', 'arras_add_tapestry_default_thumbs');
    add_action('arras_admin_settings-layout', 'arras_admin_tapestry_default');
    add_action('arras_admin_save', 'arras_save_tapestry_default');
    add_action('arras_options_defaults', 'arras_defaults_tapestry_default');
    add_action('arras_custom_styles', 'arras_style_tapestry_default');
    }

    function arras_add_tapestry_default_thumbs() {
    $layout = arras_get_option('layout');

    if ( strpos($layout, '1c') !== false ) {
    $size = array(215, 120);
    } else if ( strpos($layout, '3c') !== false ) {
    $size = array(230, 130);
    } else {
    $size = array(195, 110);
    }

    arras_add_image_size( 'node-based-thumb', __('Tapestry: Node-Based', 'arras'), $size[0], $size[1] );
    }

    function arras_admin_tapestry_default() {
    $tapestry_settings = get_option('arras_tapestry_default');
    if (!is_array($tapestry_settings) ) {
    $tapestry_settings = arras_defaults_tapestry_default();
    }
    ?>
    <h3><?php _e('Tapestry: Node Based', 'arras') ?></h3>
    <table class="form-table">

    <tr valign="top">
    <th scope="row"><label for="arras-tapestry-default-excerpt"><?php _e('Show Excerpt?', 'arras') ?></label></th>
    <td>
    <?php echo arras_form_checkbox('arras-tapestry-default-excerpt', 'show', $tapestry_settings['excerpt'], 'id="arras-tapestry-default-excerpt"') ?>
    </td>
    </tr>
    <tr valign="top">
    <th scope="row"><label for="arras-tapestry-default-height"><?php _e('Maximum Node Height', 'arras') ?></label></th>
    <td>
    <?php echo arras_form_input(array('name' => 'arras-tapestry-default-height', 'id' => 'arras-tapestry-default-height', 'size' => '5', 'value' => $tapestry_settings['height'], 'maxlength' => 3 )) ?>
    <?php ' ' . _e('pixels', 'arras') ?>
    </td>
    </tr>

    </table>
    <?php
    }

    function arras_save_tapestry_default() {
    $_tapestry_default_settings = array(
    'height' => (int)$_POST['arras-tapestry-default-height'],
    'excerpt' => isset($_POST['arras-tapestry-default-excerpt'])
    );

    update_option('arras_tapestry_default', $_tapestry_default_settings);
    }

    function arras_defaults_tapestry_default() {
    $_tapestry_default_settings = array(
    'height' => 225,
    'excerpt' => true
    );
    add_option('arras_tapestry_default', $_tapestry_default_settings, '', 'yes');

    return $_tapestry_default_settings;
    }

    function arras_style_tapestry_default() {
    $tapestry_settings = get_option('arras_tapestry_default');
    $height = (!isset($tapestry_settings['height']) ) ? 225 : $tapestry_settings['height'];

    $node_based_size = arras_get_image_size('node-based-thumb');
    $node_based_w = $node_based_size['w'];
    $node_based_h = $node_based_size['h'];

    ?>
    .posts-default li { width: <?php echo $node_based_w + 10 ?>px; height: <?php echo $height ?>px; }
    .posts-default img, .posts-default .entry-thumbnails-link { width: <?php echo $node_based_w ?>px; height: <?php echo $node_based_h ?>px; }
    .posts-default .entry-meta { width: <?php echo $node_based_w ?>px; }
    .posts-default .entry-thumbnails { width: <?php echo $node_based_w + 10 ?>px; height: <?php echo $node_based_h + 10 ?>px; }
    <?php
    }

    /**
    * Quick Preview tapestry callback function.
    * @since 1.4.3
    */
    if (!function_exists('arras_tapestry_quick')) {
    function arras_tapestry_quick($dep = '', $taxonomy) {
    ?>
    <li <?php arras_post_class() ?>>
    <?php echo apply_filters('arras_tapestry_quick_postheader', arras_generic_postheader('quick-preview') ); ?>
    <div class="entry-summary">
    ?????????????????????????????????????????????????? ??????????????
    </div>
    </li>
    <?php
    }
    arras_add_tapestry( 'quick', __('Quick Preview', 'arras'), 'arras_tapestry_quick', array(
    'before' => '<ul class="hfeed posts-quick clearfix">',
    'after' => '</ul><!-- .posts-quick -->'
    ) );

    function arras_add_tapestry_quick_thumbs() {
    arras_add_image_size( 'quick-preview-thumb', __('Tapestry: Quick Preview', 'arras'), 115, 115 );
    }
    add_action('arras_add_default_thumbnails', 'arras_add_tapestry_quick_thumbs');

    function arras_style_tapestry_quick() {
    $quick_preview_size = arras_get_image_size('quick-preview-thumb');
    $quick_preview_w = $quick_preview_size['w'];
    $quick_preview_h = $quick_preview_size['h'];

    ?>
    .posts-quick .entry-thumbnails img { width: <?php echo $quick_preview_w ?>px; height: <?php echo $quick_preview_h ?>px; }
    .posts-quick .entry-meta { width: <?php echo $quick_preview_w ?>px; }
    <?php
    }
    add_action('arras_custom_styles', 'arras_style_tapestry_quick');
    }

    /**
    * Helper function to display headers for certain tapestries.
    * @since 1.4.3
    */
    function arras_generic_postheader($tapestry, $show_meta = false) {
    global $post;

    $postheader = '<div class="entry-thumbnails">';
    $postheader .= '<a class="entry-thumbnails-link" href="' . get_permalink() . '">';
    $postheader .= arras_get_thumbnail($tapestry . '-thumb');

    if ($show_meta) {
    $postheader .= '<span class="entry-meta"><span class="entry-comments">' . get_comments_number() . '</span>';
    $postheader .= '<abbr class="published" title="' . get_the_time('c') . '">' . get_the_time( get_option('date_format') ) . '</abbr></span>';
    }

    $postheader .= '</a>';

    $postheader .= '</div>';

    $postheader .= '<h3 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">' . get_the_title() . '</a></h3>';

    return $postheader;
    }

    /* End of file tapestries.php */
    /* Location: ./library/tapestries.php */

  4. #4
    کاربر دائمی آواتار binyaft
    تاریخ عضویت
    خرداد 1388
    محل زندگی
    سیم مسی
    پست
    1,761

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    کد زیر
    <li <?php arras_post_class() ?>>

    به صورت زیر
    <li <?php arras_post_class(); ?>>


    اگر باز هم کار نکرد ، خطایی را که میدهد اینجا بگذارید

  5. #5

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    اجرا نکرد

    خطا نمیدهد ولی جای خالی میاد هیچ کدی را قبول نمیکند

  6. #6

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    نقل قول نوشته شده توسط binyaft مشاهده تاپیک
    کد زیر
    <li <?php arras_post_class() ?>>

    به صورت زیر
    <li <?php arras_post_class(); ?>>


    اگر باز هم کار نکرد ، خطایی را که میدهد اینجا بگذارید
    عزیز خطا مربوط به این ; نمیشه چون یک بلاک از دستورات تک خطی ; هم نباشه ایرادی ندارد

  7. #7

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    نقل قول نوشته شده توسط funpatogh مشاهده تاپیک
    عزیز خطا مربوط به این ; نمیشه چون یک بلاک از دستورات تک خطی ; هم نباشه ایرادی ندارد

    پس از کجاست چطوری حل میشه؟

  8. #8
    کاربر دائمی آواتار binyaft
    تاریخ عضویت
    خرداد 1388
    محل زندگی
    سیم مسی
    پست
    1,761

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    error_reporting(E_ALL);

    کد بالا رو در فایل مورد نظر کپی کنید ، ببینید چه خطایی میده ، خطا رو اینجا بزارید

  9. #9

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    هیچ خطایی نمیده! تا حالا همچنین چیزی ندیده بودم

  10. #10
    کاربر دائمی آواتار binyaft
    تاریخ عضویت
    خرداد 1388
    محل زندگی
    سیم مسی
    پست
    1,761

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    کد رو چطور میزارید که اجرا نمیشه؟؟؟

  11. #11

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    نقل قول نوشته شده توسط binyaft مشاهده تاپیک
    کد رو چطور میزارید که اجرا نمیشه؟؟؟
    کد را میزارم اروری نمیده

  12. #12
    کاربر دائمی آواتار binyaft
    تاریخ عضویت
    خرداد 1388
    محل زندگی
    سیم مسی
    پست
    1,761

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    مطمئن هستید که کد هارو در ؟؟؟؟؟؟؟ درست میزارید؟
    اون توابعی که استفاده میکنید ، داخل برنامه هست ؟

  13. #13

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    نقل قول نوشته شده توسط binyaft مشاهده تاپیک
    مطمئن هستید که کد هارو در ؟؟؟؟؟؟؟ درست میزارید؟
    اون توابعی که استفاده میکنید ، داخل برنامه هست ؟
    100% مطمئن هستم!

    ولی کد جاوا نه ! آخه حتما این قسمت نباید که کد خود برنامه باشه !حتی کد عکس هم جواب نمیده

  14. #14

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    سلام
    دوست عزیز فکز نمیکنی این تابع یه جا باید فراخوانی بشه تا خروجی بده ؟
    arras_tapestry_quick();

    البته اگه اشتباه میگم به دل نگیرید

  15. #15

    نقل قول: دلیل اجرا نشدن این بخش از کد چیست؟

    اصلا ! کد ها درست است هیچ مشکلی نداره ولی اجازه اجرا در اون قسمت را نمیده!

    لطفا کمکم کنید!

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •