Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Fusion news: include

  1. #1
    Utente di HTML.it L'avatar di taba93
    Registrato dal
    Oct 2007
    Messaggi
    83

    Fusion news: include

    Ciao a tutti, ho uno script in php x gestire le news che non necessita di db mysql ke si chiama appunto fusion news.
    Allora...per includere le news nella parte del sito dove desidero metterle devo inserire il seguente codice:

    Codice PHP:
    <?php include"news/news.php"?>
    Me le fa vedere ma c'è un piccolo problema...infatti dopo un tot di news in fondo alla pagina vengono messi dei numeri dove cliccandoci teoricamente dovrei poter visualizzare le news vekkie...ma se clikko su quei link mi fa visualizzare sempre le prime news...dato k nn credo di essere stato molto kiaro vi mando il link della pagina dove potete vederlo: http://www.rainerum.it/media/news0708.php

    Sapreste dirmi qual'è il problema???

  2. #2
    Se non ci fai vedere un pò di codice come facciamo ad aiutarti

  3. #3
    Utente di HTML.it L'avatar di taba93
    Registrato dal
    Oct 2007
    Messaggi
    83
    la pagina inclusa è questa:

    Codice PHP:
    <?php

    /*
    ||==========================================================
    ||        Fusion News 3.x
    ||----------------------------------------------------------
    || File Version    : $Id: news.php 233 2008-07-09 15:43:06Z xycaleth $
    || Contact    : [email]xycaleth@gmail.com[/email]
    || Copyright:    : (c) 2006 - 2008, FusionNews.net
    || License Info    : [url]http://www.gnu.org/copyleft/gpl.html[/url]
    ||==========================================================
    */

    # Edit the line below to align the page list (left, center, right)
    $fn_page_align 'center';

    // Hackish fix
    global $fsnw$wfpost$ht$cbwordwrap$smilies$bb$stfpop$compop,
            
    $furl$fullnewsh$fullnewsw$fullnewss$fullnewsz$fslink$datefor,
            
    $stflink$stfheight$stfwidth$stfscrolls$stfresize$pclink$datefor,
            
    $link_headline_fullstory$hurl$wwwidth$comheight$comwidth$comscrolls,
            
    $comresize;

    if ( !
    defined ('FNEWS_ROOT_PATH') )
    {
        
    define ('FNEWS_ROOT_PATH'str_replace ('\\''/'dirname (__FILE__)) . '/');
        include_once 
    FNEWS_ROOT_PATH 'common.php';
    }

    // For singling out which news inclusion should be changing.
    $fn_incl = ( isset ($VARS['fn_incl']) ) ? (int)$VARS['fn_incl'] : 0;
    $fn_category = ( isset ($fn_category) ) ? (int)$fn_category 0;
    $fn_mode '';
    if ( isset (
    $VARS['fn_mode']) )
    {
        if ( 
    $fn_incl == $fn_category )
        {
            
    $fn_mode $VARS['fn_mode'];
        }
    }

    switch ( 
    $fn_mode )
    {
        case 
    'comments':
        case 
    'fullnews':
        case 
    'send':
            include 
    FNEWS_ROOT_PATH $fn_mode '.php';
            
            unset (
    $fn_mode$fn_page$fn_category$next_page$prev_page$pagination);
            return;
        break;
    }

    $fn_page 1;
    if ( 
    $news_pagination )
    {
        
    $fn_page = ( isset ($_GET['fn_page']) ) ? intval ($VARS['fn_page']) : $fn_page;
        
    $fn_page = ( $fn_page ) ? $fn_page;
    }

    $file arrange_by_date();

    $total_posts sizeof ($file);
    if ( 
    $total_posts <= )
    {
        unset (
    $fn_mode$fn_page$fn_category$next_page$prev_page$pagination);
        return;
    }

    $valid_posts = array();
    for ( 
    $i 0$i $total_posts$i++ )
    {
        
    $toc get_line_data ('news_toc'$file[$i]);
        
        
    $categories explode (','$toc['categories']);
        if ( 
    $fn_category === || in_array ($fn_category$categories) )
        {
            if ( 
    file_exists (FNEWS_ROOT_PATH 'news/news.' $toc['news_id'] . '.php') )
            {
                
    $news_file file (FNEWS_ROOT_PATH 'news/news.' $toc['news_id'] . '.php');            
                
    $valid_posts[] = get_line_data ('news'$news_file[1]);
            }
        }
    }

    if ( 
    sizeof ($valid_posts) > )
    {
        if ( 
    $flip_news )
        {
            
    $valid_posts array_reverse ($valid_posts);
        }

        if ( 
    $news_pagination )
        {
            
    $total_posts sizeof ($valid_posts);

            
    $pagination '';
            
    $max_pages ceil ($total_posts $numofposts);
            if ( 
    $max_pages )
            {
                
    $fn_page = ( $fn_page $max_pages ) ? $max_pages $fn_page;
                
                
    $other_qs clean_query_string();
                
    $other_qs .= '&amp;fn_incl=' $fn_category;
                
                if ( 
    $news_pagination_arrows )
                {
                    if ( (
    $fn_page 1) >= )
                    {
                        
    $pagination .= '[url="?fn_page=' . ($fn_page 1) . $other_qs '"]' $news_pagination_prv '[/url]';
                    }
                    else
                    {
                        
    $pagination .= $news_pagination_prv '';
                    }
                }

                if ( 
    $news_pagination_numbers || (!$news_pagination_numbers && !$news_pagination_arrows))
                {
                    for ( 
    $i 1$i <= $max_pages$i++ )
                    {        
                        if ( 
    $i )
                        {
                            
    $pagination .= '';
                        }

                        if ( 
    $fn_page == $i )
                        {
                            
    $pagination .= '[b]' $i '[/b]';
                        }
                        else
                        {
                            
    $pagination .= '[url="?fn_page=' $i $other_qs '"]' $i '[/url]';
                        }
                    }
                }
                
                if ( 
    $news_pagination_arrows )
                {
                    if ( (
    $fn_page 1) <= $max_pages )
                    {
                        
    $pagination .= '[url="?fn_page=' . ($fn_page 1) . $other_qs '"]' $news_pagination_nxt '[/url]';
                    }
                    else
                    {
                        
    $pagination .= '' $news_pagination_nxt;
                    }
                }
            }
        }

        
    $end $fn_page $numofposts;

        if ( 
    $news_pagination && $max_pages )
        {
            
    $pagination '<div style="text-align:' $fn_page_align '">' $pagination '</div>';
            echo 
    $pagination;
        }
        
        if ( 
    $post_per_day )
        {
            
    $posts = array();
        }

        for ( 
    $i $end $numofposts$i $end$i++ )
        {
            if ( !isset (
    $valid_posts[$i]) )
            {
                continue;
            }
            
            if ( 
    $post_per_day )
            {
                
    $posts[mktime (000date ('n'$valid_posts[$i]['timestamp']), date ('j'$valid_posts[$i]['timestamp']), date ('Y'$valid_posts[$i]['timestamp']))][] = $valid_posts[$i];
            }
            else
            {
                
    $news_info parse_news_to_view ($valid_posts[$i], $fn_category);
                echo 
    $news_info['display'];
            }
        }
        
        if ( 
    $post_per_day )
        {
            
    $temp get_template ('news_a_day_temp.php'false);
            foreach ( 
    $posts as $key => $value )
            {
                
    $news_display '';
                
    $display replace_masks ($temp, array ('date' => date ($ppp_date$key)));
                
                foreach ( 
    $value as $post )
                {
                    
    $news parse_news_to_view ($post$fn_category);
                    
    $news_display .= $news['display'];
                }
                echo 
    replace_masks ($display, array ('news_a_day' => $news_display));
            }
        }

        if ( 
    $news_pagination && $max_pages )
        {
            echo 
    $pagination;
        }
    }

    // Now remove the variables
    unset ($fn_mode$fn_page$fn_category$next_page$prev_page$pagination$fn_incl);

    ?>

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.