README.md 9.86 KB
Newer Older
Clément Damiens's avatar
   
Clément Damiens committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# COSTUM YOUR COMMUNECTER
This module permits to modulate and use communecter as a specific application like organized your group, exchange ressources localy or/and map wealthy of a territory or even on a thematic.<br/>
It give you multiple choices:<br/>
	- Configuration which application you want<br/>
	- Set your own style and graphical chart<br/>
	- Have a unique interface<br/>
	- Give the message define by your projects<br/>
Only one rule :**Be open and you will openly surprised**<br/>

Enjoy and contribute to the OCDB (open and collective database)

# ROADMAP

The conception of costum based on of communecter's parameters is a basic version. Also we need contribution and improve each part of settings we can do with community to fit actors expectations or local group

	
	[] Automatic settings of your json costum
	[] Instance of costum on other server
	[] Implement activityPub
	[] Decentralized using of costum and communecter

# How does it work

### Initialize a costum
**Follow this few steps in order to prepare your environement**<br/>
1- Create on communecter an entity who will define your slug, the name of your costum, the meta data<br/>
	- It could be a project or an organization<br/>
	- Don't forget the profil image for a better render<br/>
	**[!!Slug : have to be the name of each files like home or folder you will create]**<br/>
2- Create in the module all folder and file you will call in the json<br/>
	- images folder in costum/assets/images/{slug}/<br/>
	- font folder in costum/assets/font/{slug}/ (if you need to call specific font files)<br/>
	- ico folder in costum/assets/ico/{slug}/favicon.ico<br/>
	- Your home page /costum/views/custom/home/{slug}.php<br/>
3- Construct your json costum [follow the list of params under this section]<br/>
	- Stock your json costum on folder costum/data/{slug}.json<br/>
	- Put your json in your dataBase in the collection "costum"<br/>
4- Try your local url : "localhost/costum/co/index/id/{slug}"<br/>

### Construct your json

[get json example](/data/collectifEssArrageois.json)

**List of json params**

| <span style="color:blue">**htmlConstruct**</span> | Value in the json refering to the html structure of the costum. It will filters and modify the entry @htmlConstruct in the params.json of communecter |
| ------ | ------ |
| appRendering | string 'vertical' or 'horizontal' configure your app with the app menu on the left or the top |
| header | object configuration of the costum's header   |
| header.**menuTop** | set all entry in nav menu left and nav menu right<br/>You can rename and remove button you don't want to use|
| header.menuTop.**navLeft** | - logo : can set (int)height params <br/>-searchBar : boolean to have search bar in menu<br/>-useFilter : boolean with scopeFilter & showFilter button|
| header.menuTop.**navRight** | Set 2 entry when user is connected [co] & disconnected [disco] with a list of settings :<br/>- dropdown.languages [co]<br/>- dropdown.statistics [co]<br/>- dropdown.documentations [co]<br/>- dropdown.donate [co]<br/>- dropdown.admin [co]<br/>- dropdown.settings [co]<br/>- dropdown.logout [co]<br/>- dropdown.statistics [co]<br/>- userProfil.img [co]<br/>- userProfil.name [co]<br/>- networkFloop [co]<br/>- notifications [co]<br/>- dda [co]<br/>- chat [co]<br/>- home [co]<br/>- app [co]<br/>- languages [disco]<br/>- login [disco] |
| subMenu | correspond maily to the app menu on top for horizontal disposition and on the left for vertical rendering : <br/>- app, _boolean_<br/>- button, _boolean_    |
| footer | [**Must be refactor**] corresponds currently to the button of creation of element and donation in co: <br/>- add, _boolean_<br/>- donate, _boolean_    |
| adminPanel | permits to configure menu and access for administrator of the costum site: <br/>- add : get button acces to dynform, _boolean_<br/>- statistic, specific stats for custom admin _boolean_<br/>- directory, lists of persons registration on the costum _boolean_<br/>- reference, specific functionnality for costum working on slug point in order to show data from common open database in the costum _object_ with array initType|
| directory | is a object of settings in order to render the directory render like in app #search, #event, etc <br/><br/>- viewMode, _string_ "block" or "list"<br/><br/>- header, _object_ to set button in directory header:<br/> -- header.map _boolean_ to show hide button<br/>
-- header.viewMode _boolean_ to show/hide buttons<br/>-- header.add _boolean_ to show/hide button<br/><br/>- results, _object_ to set type and defaultImg:<br/> - results.proposals.defaultImg _string_ given url of custom defautl image<br/><br/>- footer, _object_ to set button in directory footer:<br/> -- footer.add _boolean_ to show hide button<br/>|
| element | object configuration of element configuration   |
| element.**initType** | will initialized view started in element page (details or newspaper or gallery|
| element.**menuLeft** | Object of configuration for menu left of element<br>- detail _boolean_<br/>- gallery _boolean_<br>- community _boolean_<br>- agenda _boolean_<br>- projects _boolean_<br>- classifieds _boolean_<br>- cv _boolean_<br>- collection _boolean_|
| element.**menuTop** | Object of configuration for menu on top of element<br>- news _boolean_<br/>- cospace _boolean_<br>- chat _boolean_<br>- share _boolean_<br>- params _object_<br>-- params.history _boolean_<br>- params.slug _boolean_<br>- params.delete _boolean_|
| **redirect** | Set the initial view when redirection on costum is mandatory:<br>- redirect.logged _string_ [welcome, search, home, etc]<br/>- redirect.unlogged _string_ [welcome, search, home, etc] |
| **app** | Set the app object who is used app.#dda, app.#search, app.#live, app.#agenda, app.#annonces with few params:<br>- subdomainName _string_<br/>- placeholderMainSearch _string_<br/>- icon _string_ |
<br/><br/>        
| <span style="color:blue">**headerParams**</span> | object of params for elements available in communecter who will permits to influence object |
| ------ | ------ |
| proposals | set object : <br/>- color _string_<br/>- name _string_<br/>- label _string_ |
| organizations | idem |
| projects | idem |
| etc | etc |
<br/><br/>        
| <span style="color:blue">**add**</span> | define which element could be created in the costum |
| ------ | ------ |
| proposals | _boolean_ |
| organizations | idem |
| projects | idem |
| events | idem |
| etc | etc |
<br/><br/>        
|<span style="color:blue">**css**</span> | object to set lot of style on dom element of the costum  allow a panel of style update [background / border / borderBottom / box / boxShadow / fontSize / color / paddingTop / height / width / top / bottom / right / left / borderWidth / borderColor / borderRadius / lineHeight / padding / display] |
| ------ | ------ |
| font | style of font expect an object with url value _string_ font.url |
| loader | first view when refresh<br/>- loader.ring1 : first ring around logo<br/>- loader.ring2 : second ring around logo |
| progress | refers to the bar on the top when loading view<br/>- progress.value<br/>- progress.bar|
| menuTop | the top menu and can influence its children button with the entry object<br/>- menuTop.button<br/>- menuTop.scopeBtn<br/>- menuTop.filterBtn<br/>- menuTop.badge<br/>- menuTop.connectBtn|
| menuApp | the menu containing the app button (left or top) <br/>- menuApp.button<br/>- menuApp.button.hover|
| button | List of buttom [to refactor] <br/>- footer.add<br/>- footer.toolbarAdds|
| color | set the panel of color initialized in co2-color.css [purple, orange, red, dark, yellow, vine, brown, green, green-k, etc] expect string with color encode|
<br/><br/>        
|<span style="color:blue">**filters**</span> | is object of params in order to forced filters in app and directly filtering by scope or context |
| ------ | ------ |
| app | _object_ who will forced an app filtering with type [all / events / classifieds / proposals / classifieds]: <br/> filters.app.classifieds.types getting array with value only "ressources" will show the module with only ressources part|
| sourceKey | _boolean_ to get only data in the context of costum |
| scopes | _object_ with entry cities or zones to be focus on specific geographical area |
<br/>
Tibor Katelbach's avatar
Tibor Katelbach committed
96

Tibor Katelbach's avatar
Tibor Katelbach committed
97

98
# generic COstum (templates) : reusable by many elements
Tibor Katelbach's avatar
Tibor Katelbach committed
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Imagine having created a costum (templateSlug)
and you want to reuse exactly the same in a different context
This is possible with *generic costums* with a parent element(elementSlug) 
we can then use specific things from the parent element 

The process means reusing a costum json file by many elements(organization, project, event ...) while using a costum attribute in the element's data map.
on any element data, minimum : 
```
_id : "xxxxxelementID",
slug : "elementSlug",
costum : { 
	//this is the parent costum , that can be overloaded
	slug : "templateSlug" 
}
```
all attributes inside this costum attribute will be identical to the parent
```
_id : "xxxxxelementID",
slug : "elementSlug",
costum : { 
	slug : "templateSlug",
	css : {
		"font" : {
            "url" : "/font/mayenneDemain/yourChosenfont.ttf"
        },
	}

}
```
To see the costum we use the slug of the element 
http://127.0.0.1/ph/costum/co/index/slug/xxxxSlugOfElement
This loads the costum based on the parent costum slug 
and in this process overloads any existing identical attributes 



Tibor Katelbach's avatar
Tibor Katelbach committed
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Features 

- build you own `personnalised interface`
- a costum can be used and shared `as a template`, all configs are added onto an element that points to a give costum template 
```
http://127.0.0.1/ph/costum/co/index/slug/cocampagne
```
- use Poi.cms elements from the parent element inside à costum as CMS editing
- template blocks can be reused 
	+ costum/views/tpls/wizard use it in a costum 
	```
<div class="col-xs-12 margin-top-20">
<?php 
$params = array(
    "poiList"=>$poiList,
    "listSteps" => array("one","two","three","four","five","six"),
    "listDone" => array("one","two")
);
153
echo $this->renderPartial("../tpls/wizard",$params); ?>
Tibor Katelbach's avatar
Tibor Katelbach committed
154
155
156
157
158
</div>
	```

# TODO