GithubHelp home page GithubHelp logo

pixelhumain / cotools Goto Github PK

View Code? Open in Web Editor NEW
5.0 10.0 4.0 392 KB

Collection of Open Source Tools For Communities

Home Page: http://co.tools/

PHP 75.83% CSS 0.81% JavaScript 23.36%
collaboration tools collaborative assembled changelog society opensource

cotools's Introduction

Pixel Humain

Requierement

Php version : 5.4.X (minimum) MongoDB : 2.6.X (tested version - minimum) Mongo Driver : 1.4.5 (tested version - minimum)

##Installation ####Configure your php Verify your php configuration is right done lauching the command line

php --ini

The php.ini specified in the "Loaded Configuration File" option should be the right one. Check in this php.ini file the openssl extension is activated.

####must install a Php webserver Choose your favorite webserver (apache) or package (easyPhp, Wamp...) Edit the httpd.conf file and activate the line

LoadModule rewrite_module modules/mod_rewrite.so

On Unix like OS : Linux Ubuntu, Debian :

Otherwise

On Windows OS :

if (X<5)
 php_mongo-1.4.5-5.X-vc9.dll
else
 php_mongo-1.4.5-5.X-vc11.dll
  • Important : if you'are running with a 64bits platform choose the file with 'x86_64' in it.
  • Copy the dll file in your directory : %php_dir%/ext
  • In the php.ini add (the name of the dll file depends on your php install version) :
for php 5.5
extension=php_mongo-1.4.5-5.5-vc11.dll
or
for php 5.3
extension=php_mongo-1.4.1-5.3-vc9.dll

On Mac

If you are on mac OSX, read this readme first : Specific readme_macOS.md for Mac OSX

####install a mongo Database instance and admin tool

mongod --dbpath data/db
  • inside your favorite mongo administration tool :
  • create a database called pixelhumain
  • create a user for the db : pixelhumain
  • you can do this the simple mongo
  • use pixelhumain
  • db.addUser( "pixelhumain","pixelhumain" )

####Composer installation PixelHumain is set with composer in order to manage dependencies and libraries.

  • Clone the repository in order to recover the files
  • If you don't have it get the composer (https://getcomposer.org/)
  • Create the file /ph/protected/config/dbconfig.php with your database name and URL.
$dbconfig = array(
    'class' => 'mongoYii.EMongoClient',
    'server' => 'mongodb://127.0.0.1:27017/',
    'db' => 'pixelhumain',
);

You can find an example of dbconfig in the file /ph/protected/config/dbconfig.example.php

  • Launch following commands to initiate the application : in cd path/to/pixelhumain/ph where you'll find composer.json
composer update
...
composer install

####Add the module citizenToolKit

To launch the application, you need to install the module citizenToolKit. See below to see how to install modules.

####Launch the application

  • Launch you http webserver

  • depending on how you webservers alias is configured here the alias is called ''ph'' and pointing to the folder you cloned test this url : http://localhost:8080/ph/index.php/test

  • All the first line should be green.

right now you can access the application like 127.0.0.1/ph/index.php/anyModule to remove the index.php you'll need to configure your http.conf like this

Alias "/ph" "pathToProjectFolder/pixelhumain/ph"
<Directory "pathToProjectFolder/pixelhumain/ph">
Options FollowSymLinks Indexes
AllowOverride none
Order deny,allow
Allow from 127.0.0.1
deny from all
<IfModule mod_rewrite.c>
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|assets|robots\.txt)
RewriteRule ^(.*)$ /ph/index.php/$1 [L]
</IfModule>
</Directory>

####Adding a Module

  • at the same level of the /pixelhumain folder , create a folder called /modules
/pixelhumain
 /ph
 /doc ...
/modules

Init Data Base

Change to the folder modules/communecter/data is run the following commands:

  • mongoimport --db pixelhumain --collection cities cities.json --jsonArray;
  • mongoimport --db pixelhumain --collection lists lists.json --jsonArray ;

YOU SUCCEED ! READY TO CODE NOW !

####Understanding the structure and Yii Now you can follow urls to understand and dive into the code, which is a fairly standard and simple MVC ex : 127.0.0.1/ph/communecter/person/profile

  • "communecter" is the module
  • "person" is the controller file called PersonController.php
  • "profile" is the action foun called actionProfile found in the above controller file

Valuing States Structure

  • page region : List all Counties with minimal descritption
  • city page : List local actors(directory), local Places
  • people page :

##Roadmap short term

  • add a person/citizen
  • add and Association, Company
  • add a State entity (city, county...)

##Document before coding Make a good habit of writing a doc or a doc corrected before embarking in the code. This avoids a tedious task of writing a doc after hit.

##More info






Help keep this project alive

contribute or Join the NGO on Hello Asso

##Version 0.002 L'homme qui déplace une montagne commence par déplacer les petites pierres.- Confucius Man who wants to move a mountain starts by moving pebbles

cotools's People

Contributors

clement59 avatar drakone avatar marc-farre avatar oceatoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.