qu-modules/qu-plupload

ZF2 Module for Plupload, PhpThumb and included Database

Installs: 14 466

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 2

Forks: 3

Open Issues: 1

Type:module

dev-master 2013-04-27 14:30 UTC

This package is not auto-updated.

Last update: 2024-04-13 12:43:14 UTC


README

ZF2 Module for Plupload, PhpThumb and included Database 0.0.1-dev

Screen Shots

QuDemo example screenshot

Requirements

Installation by Composer

cd YourFolderProject/
php composer.phar require "qu-modules/qu-plupload":"dev-master"

Installation Drag and Drop

  • Drag a folder into modules folder or vendor folder

Next

  • QuAdminCompleteApp provider assets
  • Enable modules (QuPlupload/WebinoImageThumb) application.config.php and configure the routes module.config.php
  • Folder permissions to upload

Integration

  • Instance
<div class="PluploadLoad">
    echo $this->PluploadHelpLoad($id);
</div>
<div id="uploader"></div>
 echo $this->PluploadHelp('uploader');
  • Add table in your database
CREATE TABLE IF NOT EXISTS `qu-plupload` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `id_parent` int(11) NOT NULL,
  `model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tmp_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `error` int(255) NOT NULL,
  `size` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

Installation all application

cd my/project/dir
git clone git://github.com/zendframework/ZendSkeletonApplication.git
cd ZendSkeletonApplication
php composer.phar self-update
php composer.phar install
php composer.phar require "zf-commons/zfc-base":"dev-master"
php composer.phar require "webino/webino-image-thumb":"dev-master"
php composer.phar require "qu-modules/qu-plupload":"dev-master"

Config

  • In global.php
return array(
    'db' => array(
        'driver' => 'Pdo',
        'dsn'            => 'mysql:dbname=qu-modules;hostname=localhost',
        'username'       => 'root',
        'password'       => '',
        'driver_options' => array(
            PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
        ),
    ),
    'service_manager' => array(
        'factories' => array(
            'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory',
        ),

    ),

);
  • Enable modules (QuPlupload/WebinoImageThumb) application.config.php and configure the routes module.config.php

  • Add database

CREATE DATABASE IF NOT EXISTS `qu-modules`;
use `qu-modules`;
CREATE TABLE IF NOT EXISTS `qu-plupload` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `id_parent` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tmp_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `error` int(255) NOT NULL,
  `size` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;

Virtual Host

Afterwards, set up a virtual host to point to the public/ directory of the project and you should be ready to go!