Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    Limite eventi fullcalendar

    Mi pare che abbia un limite massimo di pagine che si possono inserire in ogni mese pari a 10. Sapete come posso aumentarlo?
    Ultima modifica di laugher; 25-11-2013 a 22:15

  2. #2
    Ho trovato la soluzione ma non ci ho capito nulla. Il post della domanda fa riferimento al mio problema. E la risposta dice...

    --------------------------------------------------------------------------------------------
    For some reason the calendar is using the same posts per page limit as the main loop. So if you want to change so that the calendar is showing all events per month, change the number to 999, or whatever in settings > reading.
    --------------------------------------------------------------------------------------------

    Che devo modificare per cambiare questa impostazione?

  3. #3
    Ho aperto i files php ed ho trovato solo questo:

    codice:
        function wpfc_temp_filter_where( $where = '' ) {
                $where .= " AND post_date >= '".date("Y-m-d", $_REQUEST['start'])."' AND post_date < '".date("Y-m-d", $_REQUEST['end'])."'";
                return $where;
            }
            add_filter( 'posts_where', 'wpfc_temp_filter_where' );
            $the_query = new WP_Query( $args );
            remove_filter( 'posts_where', 'wpfc_temp_filter_where' );
            //loop through each post and slot them into the array of posts to return to browser
            while ( $the_query->have_posts() ) { $the_query->the_post();
                $color = "#a8d144";
                $post_date = substr($post->post_date, 0, 10);
                $post_timestamp = strtotime($post->post_date);
                if( empty($item_date_counts[$post_date]) || $item_date_counts[$post_date] < $limit ){
                    $title = $post->post_title;
                    $item = array ("title" => $title, "color" => $color, "start" => date('Y-m-d\TH:i:s', $post_timestamp), "end" => date('Y-m-d\TH:i:s', $post_timestamp), "url" => get_permalink($post->ID), 'post_id' => $post->ID );
                    $items[] = apply_filters('wpfc_ajax_post', $item, $post);
                    $item_date_counts[$post_date] = (!empty($item_date_counts[$post_date]) ) ? $item_date_counts[$post_date]+1:1;
                }elseif( empty($item_dates_more[$post_date]) ){
                    $item_dates_more[$post_date] = 1;
                    $day_ending = $post_date."T23:59:59";
                    //TODO archives not necesarrily working
                    $more_array = array ("title" => get_option('wpfc_limit_txt','more ...'), "color" => get_option('wpfc_limit_color','#fbbe30'), "start" => $day_ending, 'post_id' => 0, 'allDay' => true);
                    global $wp_rewrite;
                    $archive_url = get_post_type_archive_link($post_type);
                    if( !empty($archive_url) || $post_type == 'post' ){ //posts do have archives
                        $archive_url = trailingslashit($archive_url);
                        $archive_url .= $wp_rewrite->using_permalinks() ? date('Y/m/', $post_timestamp):'?m='.date('Ym', $post_timestamp);
                        $more_array['url'] = $archive_url;
                    }
                    $items[] = apply_filters('wpfc_ajax_more', $more_array, $post_date);
                }
            }
            echo json_encode(apply_filters('wpfc_ajax', $items));
            die(); //normally we'd wp_reset_postdata();
        }
    Dovrei cambiare questo per caso? Boh.
    Ultima modifica di laugher; 26-11-2013 a 00:16

  4. #4
    Ho controllato ed il limite dei 10 eventi č proprio del codice. E non rientra nelle opzioni di settaggio. Dovrei cambiare il codice PHP ma non sono esperto quindi non so nč dove nč come cambiarlo. Ora giro un po' e ne cerco un altro e mando a quel paese 'sto fullcalendar.

    Potevano scrivercelo nelle istruzioni almeno che ce so' impazzito due giorni a cercare i settaggi de 'sta cosa.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.