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

    Bloggerino versione beta.

    Uelą tutto bene e la famiglia .

    Vi informo se interessa qc
    che ho rilasciato la versione beta
    di bloggerino
    The blog that runs with different type of fuel.
    Un 'semplice' blog in Php5 che ha la particolaritą di poter utilizzare come base dati un Db o un file Db.

    Interamente OOP č facilmente customizzabile
    la index č una cosa del genere ad esempio per Db:
    Codice PHP:
    <?php
    $root 
    realpath(dirname(__FILE__));
    $root str_replace('\\''/'$root);
    require_once(
    $root."/admin/config/config.php");
    require_once(
    $root."/classes/class.Exception.php");
    require_once(
    $root."/classes/class.Http.php");
    require_once(
    $root."/classes/class.ToDB.php");
    require_once(
    $root."/classes/class.Rss2.php");
    require_once(
    $root."/classes/class.Cache.php");
    require_once(
    $root."/classes/class.Pager.php");
    require_once(
    $root."/classes/class.Template.php");
    require_once(
    $root."/classes/class.Dt.php");
    require_once(
    $root."/classes/class.BlogData.php");
    require_once(
    $root."/classes/class.BlogContent.php");
    try {
        
    $db= new DB($options);
        
    $to= new ToDB($db,'items');
        
    $rss2= new Rss2($root.'/rss/startUp.xml',$root.'/rss/feed.xml');
        
    $rss2->setHeader(RSS2_TITLE,RSS2_LINK,RSS2_DESCRIPTION);
        
    $rss2->setOptions(array('language'=>RSS2_LANGUAGE,'lastBuildDate'=>Dt::dateTransformRss2(time())));
        
    $rss2Parser$rss2->load();
        
    $bd= new BlogData($to,$rss2Parser,$root);
        
    $pag= new Pager(N_PAGES_USER);
        
    $blog= new BlogContent($bd,$pag);
        
    $contentOutput$blog->display();
        
    $nPosts$blog->getCountData();
        
    $lastPosts$blog->getLastData(0,N_LAST_ARTICLES);
        
    $random$blog->getRandomData();
        
    $breadcrumbTitle$blog->getBreacrumbTitle('Bloggerino');
        
    $breadcrumbContent$blog->getBreacrumbContent('Home');
        
    $db->close(); 
    }
    catch (
    InvalidArgException $e) {
        echo 
    $e;
        
    error_log($e->getMessage()."\n"3$root."/log/error.log");
        exit();
    }
    catch (
    DbException $e) {
        echo 
    $e;
        
    error_log($e->getMessage()."\n"3$root."/log/error.log");
        exit();
    }
    catch (
    FileException $e) {
        echo 
    $e;
        
    error_log($e->getMessage()."\n"3$root."/log/error.log");
        exit();
    }
    catch (
    ArrayException $e) {
        echo 
    $e;
        
    error_log($e->getMessage()."\n"3$root."/log/error.log");
        exit();
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title><?php echo $breadcrumbTitle?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link type="text/css" rel="stylesheet" href="css/main.css" />
    </head>
    <body>
    <div id="container">
        <div id="header"><h1>Bloggerino</h1></div>
        <div id="intro">
            <h2>
            The blog that runs
            with different type of fuel.
            </h2>
        </div>
        <div id="extra">
            <h5><?php echo $nPosts?></h5>
            <ul><?php echo $lastPosts?>[/list]
            <ul id="public">
                [*][url="rss/feed.xml"][img]img/rss_button.png[/img][/url]
            [/list]
        </div>
        <div id="content">
            <h6><?php echo implode("&raquo;",$breadcrumbContent); ?></h6>
            <?php echo $contentOutput?>
            <?php echo $random?>
        </div>
        <div id="footer">

    By Whisher</p></div>
    </div>
    </body>
    </html>
    Con semplici file tpl come questo :
    Codice PHP:
    <div class="article">
    <
    h3>{title}</h3>
    <
    class="author">{author}</p>
    <
    class="pubDate">{pubDate}</p>
    <
    class="preamble">{description}</p>
    </
    div
    Utilizza il caching e una semplice classe
    per la compressione dell'output.

    Che dire come al solito se ne avete voglia
    fatevi un giretto e postate le vs impressioni.

    Questo č il masterpiece

    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  2. #2

    .........

    XML stava brontolando:
    Codice PHP:
    <?php
    $root 
    realpath(dirname(__FILE__));
    $root str_replace('\\''/'$root);
    require_once(
    $root."/admin/config/config.php");
    require_once(
    $root."/classes/class.Exception.php");
    require_once(
    $root."/classes/class.Http.php");
    require_once(
    $root."/classes/class.XML.php");
    require_once(
    $root."/classes/class.ToXML.php");
    require_once(
    $root."/classes/class.Rss2.php");
    require_once(
    $root."/classes/class.Cache.php");
    require_once(
    $root."/classes/class.Pager.php");
    require_once(
    $root."/classes/class.Template.php");
    require_once(
    $root."/classes/class.Dt.php");
    require_once(
    $root."/classes/class.BlogData.php");
    require_once(
    $root."/classes/class.BlogContent.php");
    try {
        
    $xml= new XML($root.'/admin/xml/items.xml',array('item','id','title','author','description','pubDate'));
        
    $to= new ToXML($xml);
        
    $rss2= new Rss2($root.'/rss/startUp.xml',$root.'/rss/feed.xml');
        
    $rss2->setHeader(RSS2_TITLE,RSS2_LINK,RSS2_DESCRIPTION);
        
    $rss2->setOptions(array('language'=>RSS2_LANGUAGE,'lastBuildDate'=>Dt::dateTransformRss2(time())));
        
    $rss2Parser$rss2->load();
        
    $bd= new BlogData($to,$rss2Parser,$root);
        
    $pag= new Pager(N_PAGES_USER);
        
    $blog= new BlogContent($bd,$pag);
        
    $contentOutput$blog->display();
        
    $nPosts$blog->getCountData();
        
    $lastPosts$blog->getLastData(0,N_LAST_ARTICLES);
        
    $random$blog->getRandomData();
        
    $breadcrumbTitle$blog->getBreacrumbTitle('Bloggerino');
        
    $breadcrumbContent$blog->getBreacrumbContent('Home');
    }
    catch (
    InvalidArgException $e) {
        echo 
    $e;
        
    error_log($e->getMessage()."\n"3$root."/log/error.log");
        exit();
    }
    catch (
    DbException $e) {
        echo 
    $e;
        
    error_log($e->getMessage()."\n"3$root."/log/error.log");
        exit();
    }
    catch (
    FileException $e) {
        echo 
    $e;
        
    error_log($e->getMessage()."\n"3$root."/log/error.log");
        exit();
    }
    catch (
    ArrayException $e) {
        echo 
    $e;
        
    error_log($e->getMessage()."\n"3$root."/log/error.log");
        exit();
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title><?php echo $breadcrumbTitle?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link type="text/css" rel="stylesheet" href="css/main.css" />
    </head>
    <body>
    <div id="container">
        <div id="header"><h1>Bloggerino</h1></div>
        <div id="intro">
            <h2>
            The blog that runs
            with different type of fuel.
            </h2>
        </div>
        <div id="extra">
            <h5><?php echo $nPosts?></h5>
            <ul><?php echo $lastPosts?>[/list]
            <ul id="public">
                [*][url="rss/feed.xml"][img]img/rss_button.png[/img][/url]
            [/list]
        </div>
        <div id="content">
            <h6><?php echo implode("&raquo;",$breadcrumbContent); ?></h6>
            <?php echo $contentOutput?>
            <?php echo $random?>
        </div>
        <div id="footer">

    By Whisher</p></div>
    </div>
    </body>
    </html>
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  3. #3
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  4. #4
    Il primo orpello
    Una paginazione solo dei titoli
    in Ajax utilizzando il file xml relativo agli
    items.
    Un grazie a Cristiano del forum di Google
    che mi ha dato la dritta (mettere la request Ajax
    non asincrona false in open per capirsi)

    Lo scrip č ancora migliorabile ogni consiglio
    o critica sarą bene accetta come sempre.


    Fatevi un giretto qui
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

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.