PHP Classes

YACS PHP Comment System: Manage user comments published on Web site pages

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 49 All time: 10,738 This week: 44Up
Version License PHP version Categories
yacs 1.0GNU General Publi...5Content management, Design Patterns
Description 

Author

This package can manage user comments published on Web site pages.

It implements an application that provides a Web interface to allow Web site users to submit comments about posts published on the site pages.

The application allows the users to perform several types of operations on the comments that they submit to the site.

Currently, it can:

- Display a list of posts on a Web page

- Display the comments submitted by a user about a post

Picture of Virgilio lino
  Performance   Level  
Name: Virgilio lino <contact>
Classes: 8 packages by
Country: Italy Italy
Innovation award
Innovation award
Nominee: 5x

Winner: 2x

Example

<?php
/**
 * todos in order of importance:
 * 0. composer.json. MyApp is one project and Core is the framework. Both projects should be separated
 * 1. ajax security
 * 2. dependency injection -> symfony(ok i know i don't want to use frameworks)
 * 3. postEngine -> when we have dependency injection
 * 4. autoloader -> register namespaces
 * 5. extract viewModel concern from View
 * 6. handle subviews, property to say its a subview and not let app be rendered directly
 * just as a subcall
 * 7. posts and comments templates share a lot of functionalities, boths templates should extend
 * from a generic one
 * 8. model should be comunicated from backend to js.
 * 9. And on js there should be an mvc architecture. at the moment it's everything mixed on class
 * ajaxMaster. this is not good
 * 10. most browsers implement json_parse functionality. for the others i should use some library
 * to add this functionality
 * 11. use less for css
 * 12. avoid double submitting of addpost form
 * 13. email obfuscator
 * 14. validation errors near to the field with error, at the moment, all messages
 * error and success are beign displayed on the pot. having several comments, the user
 * will not see the messages.
 * 15. on every new comment i'm updating all the posts and comments. we should just update this comment
 *
 */
use Lino\Yacs\Core\Request\HttpRequest;
use
Lino\Yacs\Core\Response\HttpResponse;
use
Lino\Yacs\Core\Application\ApplicationFactory;
use
Lino\Yacs\Core\Application\Config\WebConfig;
require
'../src/Lino/Yacs/Autoloader.php';
try {
   
$autoloader = new \Lino\Yacs\Autoloader();
   
$responseHandler = new HttpResponse();
   
$applicationFactory = new ApplicationFactory(
        new
WebConfig(), $responseHandler, ApplicationFactory::VAL_WEB_ENVIRONMENT,
       
$autoloader->getAppDir(), $autoloader->getAppPrefix(), 'MyApp'
   
);
   
$myWebApplication = $applicationFactory->create();
   
$myWebApplication->run(new HttpRequest());

} catch (
Exception $e) {
    echo
$e->getMessage();
}




Details

Instructions - Yacs 0.1 - Yet Another Comments System 1. create database 2. import the file dbimport.sql 3. configurate db settings in src/Lino/Yacs/MyApp/application.conf 4. point the browser to /Public/index.php Please take a look at /Public/index.php comment for the list of todos in order of importance. The code have been tested just with Linux/Chrome and Linux/Firefox. Many thanks, Virgilio Lino virgilio@mail.de

  Files folder image Files (62)  
File Role Description
Files folder imagePublic (1 file, 1 directory)
Files folder imagesrc (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file dbimport.sql Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README Doc. Documentation

  Files folder image Files (62)  /  Public  
File Role Description
Files folder imageassets (2 directories)
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files (62)  /  Public  /  assets  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (2 files)

  Files folder image Files (62)  /  Public  /  assets  /  css  
File Role Description
  Accessible without login Plain text file yacs.css Data Auxiliary data

  Files folder image Files (62)  /  Public  /  assets  /  js  
File Role Description
  Accessible without login Plain text file ajaxMaster.js Data Auxiliary data
  Accessible without login Plain text file posts.js Data Auxiliary data

  Files folder image Files (62)  /  src  
File Role Description
Files folder imageLino (1 directory)

  Files folder image Files (62)  /  src  /  Lino  
File Role Description
Files folder imageYacs (1 file, 2 directories)

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  
File Role Description
Files folder imageCore (1 file, 8 directories)
Files folder imageMyApp (1 file, 3 directories)
  Plain text file Autoloader.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  
File Role Description
Files folder imageApplication (4 files, 1 directory)
Files folder imageController (1 file)
Files folder imageException (3 directories)
Files folder imageLibs (2 files)
Files folder imageModel (3 files, 2 directories)
Files folder imageRequest (3 files)
Files folder imageResponse (2 files)
Files folder imageView (2 files)
  Plain text file YacsException.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Application  
File Role Description
Files folder imageConfig (1 file)
  Plain text file AbstractApplication.php Class Class source
  Plain text file ApplicationFactory.php Class Class source
  Plain text file Config.php Class Class source
  Plain text file WebApplication.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Application  /  Config  
File Role Description
  Plain text file WebConfig.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Controller  
File Role Description
  Plain text file AbstractController.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Exception  
File Role Description
Files folder imageApplication (4 files, 1 directory)
Files folder imageBag (3 files)
Files folder imageModel (2 files, 1 directory)

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Exception  /  Application  
File Role Description
Files folder imageConfig (1 file)
  Plain text file ApplicationEnvironmentUnknown.php Class Class source
  Plain text file ApplicationNotFoundException.php Class Class source
  Plain text file FunctionalityNotImplementedException.php Class Class source
  Plain text file RequestIncompatibleException.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Exception  /  Application  /  Config  
File Role Description
  Plain text file InvalidConfigException.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Exception  /  Bag  
File Role Description
  Plain text file ElementNotFoundException.php Class Class source
  Plain text file InvalidKeyException.php Class Class source
  Plain text file PropertyNotFoundException.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Exception  /  Model  
File Role Description
Files folder imageFieldType (1 file)
  Plain text file DBMSInconpatibleException.php Class Class source
  Plain text file InvalidModelDefinitionException.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Exception  /  Model  /  FieldType  
File Role Description
  Plain text file ValidationException.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Libs  
File Role Description
  Plain text file Answer.php Class Class source
  Plain text file Bag.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Model  
File Role Description
Files folder imageFieldType (3 files)
Files folder imagePersistence (3 files)
  Plain text file AbstractFieldType.php Class Class source
  Plain text file AbstractModel.php Class Class source
  Plain text file WebModel.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Model  /  FieldType  
File Role Description
  Plain text file EmailFieldType.php Class Class source
  Plain text file IntegerFieldType.php Class Class source
  Plain text file StringFieldType.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Model  /  Persistence  
File Role Description
  Plain text file MysqlAdapter.php Class Class source
  Plain text file PdoAdapter.php Class Class source
  Plain text file PersistenceInterface.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Request  
File Role Description
  Plain text file AbstractRequest.php Class Class source
  Plain text file HttpRequest.php Class Class source
  Plain text file View.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  Response  
File Role Description
  Plain text file HttpResponse.php Class Class source
  Plain text file ViewModel.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  Core  /  View  
File Role Description
  Plain text file AbstractView.php Class Class source
  Plain text file AbstractWebView.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  MyApp  
File Role Description
Files folder imageController (2 files)
Files folder imageModel (2 files, 1 directory)
Files folder imageView (2 files, 1 directory)
  Accessible without login Plain text file application.conf Data Auxiliary data

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  MyApp  /  Controller  
File Role Description
  Plain text file CommentsController.php Class Class source
  Plain text file PostsController.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  MyApp  /  Model  
File Role Description
Files folder imageFieldType (2 files)
  Plain text file CommentsModel.php Class Class source
  Plain text file PostsModel.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  MyApp  /  Model  /  FieldType  
File Role Description
  Plain text file CommentFieldType.php Class Class source
  Plain text file NameFieldType.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  MyApp  /  View  
File Role Description
Files folder imageTemplates (8 files)
  Plain text file CommentsView.php Class Class source
  Plain text file PostsView.php Class Class source

  Files folder image Files (62)  /  src  /  Lino  /  Yacs  /  MyApp  /  View  /  Templates  
File Role Description
  Accessible without login HTML file Posts.html Doc. Documentation
  Accessible without login HTML file _addComment.html Doc. Documentation
  Accessible without login HTML file _addPost.html Doc. Documentation
  Accessible without login HTML file _comment.html Doc. Documentation
  Accessible without login HTML file _comments.html Doc. Documentation
  Accessible without login HTML file _post.html Doc. Documentation
  Accessible without login HTML file _posts.html Doc. Documentation
  Accessible without login HTML file __comments.html Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:49
This week:0
All time:10,738
This week:44Up