PHP Classes

Simple PHP Blog without a Database: Display blog articles on Web pages

Recommend this page to a friend!
  Info   View files Example   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 101 This week: 1All time: 9,774 This week: 560Up
Version License PHP version Categories
simple_blog 1.0GNU Lesser Genera...5PHP 5, Graphics, Blogs
Description 

Author

This package can display blog articles on Web pages.

It provides an article class that can generate HTML to display a blog article on a Web page.

Blog article pages may also display images using a separate class.

Picture of Guillermina Gonjon
Name: Guillermina Gonjon <contact>
Classes: 4 packages by
Country: United States United States
Age: ???
All time rank: 3419460 in United States United States
Week rank: 416 Up46 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

Example

<?php
require_once("./images.class.php");
require_once(
"./article.class.php");

class
blog extends article{
   
    public
$article;
    public
$blog;
   
    function
createBlog($titles, $images, $contents, $authors, $dates)
    {
       
$counter = 0; // Start a counter
       
       
foreach($titles as $title)
        {
           
$this->blog[$counter] = parent::buildArticle($title, $images[$counter], $contents[$counter], $authors[$counter], $dates[$counter]);
           
           
$counter++; // Increment
       
}
       
        return
$this->blog;

    }
   
}
$titles = array("first Title","Second Title","Third Title");
$images = array(array("position"=>"center","image"=>"myimage.jpg","location"=>"img","caption"=>"myimage"),
        array(
"position"=>"myimage","image"=>"myimage.jpg","location"=>"img","caption"=>"myimage"),
        array(
"position"=>"myimage","image"=>"myimage.jpg","location"=>"img","caption"=>"myimage"));
$contents = array("Content this is the contentContent this is the contentContent this is the contentContent this is the content",
       
"Second Content this is the contentContent this is the contentContent this is the content",
       
"Third Content this is the contentContent this is the content");
$authors = array("Guillermina Gonjon","Guillermina Manon","Third Author");
$dates = array(date("Y,d,m"),date("Y,d,m"),date("Y,d,m"),date("Y,d,m"));

$newblog = new blog();
$blog = $newblog->createBlog($titles, $images, $contents, $authors, $dates);
echo
'<pre>';print_r($newblog);print_r($blog);echo '</pre>';

?>


Details

simple_blog

Simple article blog

gmanon


  Files folder image Files  
File Role Description
Files folder imageimg (1 file)
Files folder imageincludes (2 files)
Files folder imagelibrary (4 files)
Files folder imagetemplate (1 file, 2 directories)
Accessible without login Plain text file index.php Aux. Auxiliary script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Data Documentation

  Files folder image Files  /  img  
File Role Description
  Accessible without login Image file myimage.jpg Photo Icon image

  Files folder image Files  /  includes  
File Role Description
  Accessible without login Plain text file functions.inc.php Aux. Auxiliary script
  Accessible without login Plain text file init.inc.php Aux. Auxiliary script

  Files folder image Files  /  library  
File Role Description
  Plain text file article.class.php Class Class source
  Accessible without login Plain text file blog.class.php Example Create a blog using a class that extends the article class
  Plain text file images.class.php Class Class source
  Plain text file template.class.php Class Class source

  Files folder image Files  /  template  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (1 file)
  Accessible without login Plain text file template.html Data HTML template

  Files folder image Files  /  template  /  css  
File Role Description
  Accessible without login Plain text file style.css Data Auxiliary data

  Files folder image Files  /  template  /  js  
File Role Description
  Accessible without login Plain text file application.js Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:101
This week:1
All time:9,774
This week:560Up