Commit ea451821 authored by Clément Damiens's avatar Clément Damiens

up costum module

parent eb444f25
Pipeline #3329 failed with stages
in 21 seconds
<?php
/**
* Communect Module
*
* @author Tibor Katelbach <oceatoon@mail.com>
* @version 0.0.3
*
*/
class CostumModule extends CWebModule {
private $_assetsUrl;
private $_version = "v0.1.0";
private $_versionDate = "17/01/2019";
private $_keywords = "economy, collaborative, classifieds, ressources, needs, services, competence, exchange, module,opensource,CO,communecter";
private $_description = "Create your community tool";
private $_pageTitle = "Costumate your size suitcase";
private $_image = "Create your community tool";
private $_favicon = "Costumate your size suitcase";
public function getVersion(){return $this->_version;}
public function getVersionDate(){return $this->_versionDate;}
public function getKeywords(){return $this->_keywords;}
public function getDescription(){return $this->_description;}
public function getPageTitle(){return $this->_pageTitle;}
public function getImage(){return $this->_image;}
public function getFavicon(){return $this->_favicon;}
public function setPageTitle($title){ $this->_pageTitle = $title; }
public function setDescription($desc){ $this->_description = $desc; }
public function setImage($image){ $this->_image = $image; }
public function setKeywords($keywords){ $this->_keywords = $keywords; }
public function setFavicon($favicon){ $this->_favicon = $favicon; }
public function init()
{
// this method is called when the module is being created
// you may place code here to customize the module or the application
Yii::app()->setComponents(array(
'errorHandler'=>array(
'errorAction'=>'/'.$this->id.'/error'
)
));
Yii::app()->homeUrl = Yii::app()->createUrl($this->id);
//sudo ln -s co2 network
Yii::app()->theme = "CO2";
Yii::app()->session["theme"] == "CO2";
// Yii::app()->params['customParams'] = ( @Yii::app()->session["customParams"] ) ? Yii::app()->session["customParams"] : @$_GET["custom"];
if(@Yii::app()->request->cookies['lang'] && !empty(Yii::app()->request->cookies['lang']->value))
Yii::app()->language = (string)Yii::app()->request->cookies['lang'];
else
Yii::app()->language = (isset(Yii::app()->session["lang"])) ? Yii::app()->session["lang"] : 'fr';
//Yii::app()->language = (isset(Yii::app()->session["lang"])) ? Yii::app()->session["lang"] : 'fr';
Yii::app()->params["module"] = array(
"name" => self::getPageTitle(),
"parent" => "co2",
"costumId"=>"",
"overwrite" => array(
"views" => array(),
"assets" => array(),
"controllers" => array(),
));
// import the module-level models and components
$this->setImport(array(
'citizenToolKit.models.*',
'map.models.*',
'news.models.*',
'dda.models.*',
'eco.models.*',
'places.models.*',
'chat.models.*',
'interop.models.*',
'survey.models.*',
Yii::app()->params["module"]["parent"].'.models.*',
Yii::app()->params["module"]["parent"].'.components.*',
$this->id.'.models.*',
$this->id.'.components.*',
$this->id.'.messages.*'
));
/*$this->components = array(
'class'=>'CPhpMessageSource',
'basePath'=>'/messages'
);*/
}
public function beforeControllerAction($controller, $action)
{
if (parent::beforeControllerAction($controller, $action))
{
// this method is called before any module controller action is performed
// you may place customized code here
return true;
}
else
return false;
}
//private $_assetsUrl;
public function getAssetsUrl()
{
if ($this->_assetsUrl === null)
$this->_assetsUrl = Yii::app()->getAssetManager()->publish(
Yii::getPathOfAlias($this->id.'.assets') );
return $this->_assetsUrl;
}
public function getParentAssetsUrl()
{
return ( @Yii::app()->params["module"]["parent"] ) ? Yii::app()->getModule( Yii::app()->params["module"]["parent"] )->getAssetsUrl() : self::getAssetsUrl();
}
/**
* Retourne le theme d'affichage de communecter.
* Si option "theme" dans paramsConfig.php :
* Si aucune option n'est précisée, le thème par défaut est "ph-dori"
* Si option 'tpl' fixée dans l'URL avec la valeur "iframesig" => le theme devient iframesig
* Si option "network" fixée dans l'URL : theme est à network et la valeur du parametres fixe les filtres d'affichage
* @return type
*/
public function getTheme() {
//$theme = "network";
$theme = (@Yii::app()->session["theme"]) ? Yii::app()->session["theme"] : "CO2";
//$theme = "notragora";
if (!empty(Yii::app()->params['theme'])) {
$theme = Yii::app()->params['theme'];
} else if (empty(Yii::app()->theme)) {
$theme = (@Yii::app()->session["theme"]) ? Yii::app()->session["theme"] : "CO2";
//$theme = "network";
//$theme = "notragora";
}
if(@$_GET["tpl"] == "iframesig"){ $theme = $_GET["tpl"]; }
if(@$_GET["custom"]) {
$theme = "CO2";
//Yii::app()->params['customParams'] = $_GET["network"];
}
Yii::app()->session["theme"] = $theme;
return $theme;
}
}
costum
### APplications
- **[TOUS](https://doc.co.tools/books/2---utiliser-loutil/page/moteur-de-recherche)** : retrouver les acteurs d'un territoire
- **[ACTUALITÉ](https://doc.co.tools/books/2---utiliser-loutil/page/agenda)** : calendrier des actions locales
- **[ÉVÈNEMENTS](https://framaslides.org/share/59ca4fb47906b0.73386068)** : actualité localisée
- **ANNONCES** : vendez des biens et des services, proposez et recherchez des ressources humaines ou matérielles
### Outils
- **[ESPACE COOPÉRATIF](https://doc.co.tools/books/2---utiliser-loutil/page/espace-coop%C3%A9ratif)** : outil de gouvernance pour les projets et les organisations
- **[NETWORK](https://doc.co.tools/books/2---utiliser-loutil/page/cr%C3%A9er-un-network)** : création de cartes personnalisées
- **[MESSAGERIE](https://doc.co.tools/books/2---utiliser-loutil/page/chat-de-discussions)** : outil de discussions instantanées
- **[GESTIONNAIRE DE FICHIERS ET D'URL](https://doc.co.tools/books/2---utiliser-loutil/page/librairie)** : agréger de la connaissance et partage de listes de liens
- **CUSTOM** : créer un réseau personnalisé ré-utilisant toutes les fonctionnalités de la plateforme
- **FORMULAIRE** : récoltez et analysez de l'information par questionnaire
### Fonctionnalités supplémentaires
- **[Cartographie interne](https://doc.co.tools/books/2---utiliser-loutil/page/les-cartes)**
: tous les éléments étant géolocalisés on peut afficher une
cartographie interactive des données de la page affichée (résultat de
recherche, agenda d'une ville, liste des projets d'une organisation,
...)
- **[Sondages](https://doc.co.tools/books/2---utiliser-loutil/page/sondages)** : questionnaire à choix multiple diffusable dans le live
- **Tags** : permet de classer les éléments par thème
- **Alertes** : soyez notifié d'une nouvelle publication d'annonce
- **S'abonner** : pour retrouver l'actualité de n'importe élément dans l'accueil
- **Inviter** : pour ajouter des membres sur un élément,
possibilité d'inviter par mail et de créer des rôles (ex : organisateur,
partenaires, ...)
- **Publier** : pour afficher un message sur le journal d'un
élément, possibilité de choisir l'audience de la publication et de
mentionner des citoyens et organisations
- **Internationalisation** : pour changer de pays (langue de l'interface et lieux proposés)
- **Espaces commentaires**
- **Exporter** : récupérer son profil en JSON
- **Visualisation en graphes** : un graphe interactif des écosystèmes présents dans Communecter
#doc h1,#doc h2,#doc h3 {
padding:10px;
border:3px solid #ccc;
}
#doc h1 {
background-color: rgb(69, 96, 116);
color : white;
text-align: center;
}
#doc h2 {
background-color: #EA405C;
color : white;
margin-left: 20px;
}
#doc h3 {
background-color: #ccc;
margin-left: 40px;
}
#doc h4 {
background-color: #bbb;
margin-left: 60px;
}
#doc {
margin: 30px;
}
\ No newline at end of file
{
"sections" : {
"competition": {
"label":"Competition",
"key" : "competition",
"icon" : "trophy",
"section":2,
"color":"azure"
},
"concert": {
"label":"Concert",
"key" : "concert",
"icon" : "microphone",
"section":2,
"color":"azure"
},
"concours": {
"label":"Contest",
"key" : "concours",
"icon" : "graduation-cap",
"section":3,
"color":"azure"
},
"exposition": {
"label":"Exhibition",
"key" : "exposition",
"icon" : "universal-access",
"section":3,
"color":"azure"
},
"festival" : {
"label":"Festival",
"key" : "festival",
"icon" : "beer",
"section":4,
"color":"azure"
},
"getTogether": {
"label":"Get together",
"key" : "getTogether",
"icon" : "group",
"section":5,
"color":"azure"
},
"market": {
"label":"Market",
"key" : "market",
"icon" : "shopping-basket",
"section":5,
"color":"azure"
},
"meeting": {
"label":"Meeting",
"key" : "meeting",
"icon" : "handshake-o",
"section":5,
"color":"azure"
},
"course": {
"label":"Course",
"key" : "course",
"icon" : "handshake-o",
"section":5,
"color":"azure"
},
"workshop": {
"label":"Workshop",
"key" : "workshop",
"icon" : "handshake-o",
"section":5,
"color":"azure"
},
"conference": {
"label":"Conference",
"key" : "conference",
"icon" : "handshake-o",
"section":5,
"color":"azure"
},
"film": {
"label":"Film",
"key" : "film",
"icon" : "handshake-o",
"section":5,
"color":"azure"
},
"debate": {
"label":"Debate",
"key" : "debate",
"icon" : "handshake-o",
"section":5,
"color":"azure"
}
}
}
\ No newline at end of file
{
"food": {
"name" : "Food",
"icon" : "fa-cutlery",
"tags" : ["agriculture","food", "nutrition", "AMAP"]
},
"health": {
"name" : "Health",
"icon" : "fa-heart-o",
"tags" : ["health"]
},
"waste": {
"name" : "Waste",
"icon" : "fa-trash-o ",
"tags" : ["waste"]
},
"transport": {
"name" : "Transport",
"icon" : "fa-bus",
"tags" : ["urbanism","transport","construction","development"]
},
"education": {
"name" : "Education",
"icon" : "fa-book",
"tags" : ["education","childhood"]
},
"citizen": {
"name" : "Citizenship",
"icon" : "fa-user-circle-o",
"tags" : ["society", "citizen", "citizenship"]
},
"economy": {
"name" : "Economy",
"icon" : "fa-money",
"tags" : [ "ess","social solidarity economy" ]
},
"energy": {
"name" : "Energy",
"icon" : "fa-sun-o",
"tags" : ["energy" ,"climat"]
},
"culture": {
"name" : "Culture",
"icon" : "fa-universal-access",
"tags" : ["culture" ,"animation"]
},
"environnement": {
"name" : "Environnement",
"icon" : "fa-tree",
"tags" : ["environment", "biodiversity", "ecology"]
},
"numeric": {
"name" : "Numeric",
"icon" : "fa-laptop",
"tags" : ["numeric","itc","internet"]
},
"sport" : {
"name" : "Sport",
"icon" : "fa-futbol-o",
"tags" : ["sport"]
}
}
{
"title" : "app",
"domaineName" : "communecter.org",
"metaImg" : "/assets/img/bg_pixeltree2.jpg",
"metaTitle" : "Réseau sociétal citoyen",
"metaDesc" : "Communecter : Connecter à sa commune, inter connecter les communs, un réseau sociétal pour un citoyen connecté et acteur au centre de sa société.",
"devises" : {
"all":"All",
"€" : "€",
"Ğ1" : "Ğ1",
"£" : "£",
"$" : "$",
"CFP" : "CFP",
"FC" : "FC"},
"deviseDefault" : "€",
"nbAdminModeration" : 3,
"nbReportCoModeration" : 3,
"appRendering":"vertical",
"onepageKey" : [ "co", "net" ],
"urlKey":{
"eco":"annonces",
"search":"search",
"live":"live",
"page":"page",
"agenda":"agenda",
"index":"index"
},
"pages" : {
"#app.index": {
"redirect": {
"logged":"home",
"unlogged":"welcome"
}
},
"#welcome": {
"inMenu" : false,
"useHeader" : true,
"useFilter" : false,
"open" : true,
"subdomain" : "welcome",
"subdomainName" : "About",
"hash" : "#app.welcome",
"icon" : "",
"mainTitle" : "Réseau sociétal <span class='text-red'>territorial</span>",
"placeholderMainSearch" : "what are you looking for ?",
"lblBtnCreate" : "Create something",
"colorBtnCreate" : "green"
},
"#myhome": {
"inMenu" : false,
"useHeader" : true,
"useFilter" : false,
"open" : true,
"subdomain" : "home",
"subdomainName" : "My home",
"hash" : "#app.home",
"icon" : "",
"mainTitle" : "My citizen network",
"placeholderMainSearch" : "what are you looking for ?",
"lblBtnCreate" : "Create something",
"colorBtnCreate" : "green"
},
"#docs": {
"inMenu" : false,
"useHeader" : false,
"open" : true,
"subdomain" : "docs",
"subdomainName" : "Documentation",
"hash" : "#app.docs",
"icon" : "",
"mainTitle" : "Réseau sociétal <span class='text-red'>territorial</span>",
"placeholderMainSearch" : "search something ...",
"lblBtnCreate" : "Create something",
"colorBtnCreate" : "green"
},
"#search": {
"inMenu" : true,
"useHeader" : true,
"useFilter" : true,
"open" : true,
"subdomain" : "search",
"subdomainName" : "Search",
"hash" : "#app.search",
"icon" : "search",
"type" : "all",
"mainTitle" : "<span class='text-red'>Territorial</span> search engine",
"placeholderMainSearch" : "what are you looking for ?",
"lblBtnCreate" : "Create a page",
"colorBtnCreate" : "green",
"initFilters":[
"text",
"tags",
"locality",
"types",
"countType",
"page",
"initType",
"count"
]
},
"#web":
{ "inMenu" : true,
"useHeader" : true,
"useFilter" : false,
"open" : false,
"subdomain" : "web",
"subdomainName" : "Web",
"hash" : "#app.web",
"icon" : "globe",
"mainTitle" : "Moteur de recherche",
"placeholderMainSearch" : "Que recherchez-vous ?"},
"#referencement":
{ "inMenu" : false,
"useHeader" : true,
"open" : true,
"subdomain" : "referencement",
"subdomainName" : "Referencement",
"hash" : "#app.referencement",
"icon" : "search",
"mainTitle" : "Référencer une page",
"placeholderMainSearch" : ""},
"#live": {
"inMenu" : true,
"useHeader" : true,
"useFilter" : true,
"open" : true,
"subdomain" : "live",
"subdomainName" : "Live",
"hash":"#app.live",
"type" : "news",
"icon" : "newspaper-o",
"mainTitle" : "<span class='text-red'>CO</span>mmon live",
"placeholderMainSearch" : "search in live ...",
"initFilters":[
"text",
"tags",
"locality"
]
},
"#agenda": {
"inMenu" : true,
"useHeader" : true,
"useFilter" : true,
"open" : true,
"subdomain" : "agenda",
"subdomainName" : "Events",
"hash":"#app.agenda",
"icon" : "calendar",
"type" : "events",
"mainTitle" : "<span class='text-red'>C</span>Ommon agenda",
"placeholderMainSearch" : "search an event ...",
"lblBtnCreate" : "Create an event",
"colorBtnCreate" : "orange",
"initFilters":[
"text",
"tags",
"locality",
"searchSType"
]
},
"#annonces": {
"inMenu" : true,
"useHeader" : true,
"useFilter" : true,
"open" : true,
"subdomain" : "annonces",
"subdomainName" : "Classifieds",
"hash" : "#eco",
"module":"eco",
"icon" : "bullhorn",
"type" : "classifieds",
"mainTitle" : "Classified ads",
"placeholderMainSearch" : "search among classifieds ...",
"lblBtnCreate" : "Create a classified ad",
"colorBtnCreate" : "azure",
"initFilters":[
"text",
"tags",
"locality",
"searchSType",
"section",
"subType",
"devise",
"priceMin",
"priceMax"
]
},
"#dda": {
"inMenu" : true,
"useHeader" : true,