mappiamo-italiano documentation · mappiamo-italiano documentation, release latest #mappiamo - en...
TRANSCRIPT
mappiamo-italiano DocumentationRelease latest
05 ott 2017
English documentation
1 Introduction 3
2 Installation 521 Using content manager 5
3 Create new content as admin or editor 7
4 About semantic web 9
5 Create automatic meta data by form 11
6 Insert contents to category 13
7 Create pages 15
8 Create custom menus 1781 Widgets on your template 17
9 Address 19
10 Bottom menu 21
11 Allmeta box 23
12 Box 25
13 Collabrators box 27
14 Cookie box 29
15 Distance box 31
16 Events box 33
17 Instagram box 35
18 Onemeta box 37
19 Youtube box 39
i
20 Allmeta 41
21 Slideshow 43
22 Divided menu 45
23 Dropdown menu 47
24 Intro 49
25 Headline 51
26 Flickr 53
27 Form contact 55
28 Gravatar 57
29 Jplayer 59
30 Leaflet panel widget 61
31 Map 63
32 Menu 65
33 Video box 67
34 Lastcontent 69
35 Full featured menu 71
36 Owl image 73
37 Owl video 75
38 Share 77
39 Slider 79
40 Weather 81
41 Disqus 83411 The API module 83
42 Get all places 85
43 Get all routes 87
44 Get all polygons 89
45 Get all markers by 1 km distance from route 91
46 Get all markers within polygon 93
47 Search by field content 95
48 Get category contents by category ID 97
ii
49 Get one content by content ID 99
50 Get marker data by distance from coordinates 101
51 Get marker data by distance from coordinates filter by category ID 103511 Importers 103
52 SHP2GeoJson Importer 105521 New Updates 106
53 M_Module better templates generation 107
54 Admin Panel Widget_List error 109
55 Mappiamo custom content type managment 111
56 Call a model from controller 113
57 Call a view from controller 115
58 Mappiamo 117
59 Introduction 119591 The first italian subtitle 119592 The second italian subtitle 119
iii
iv
mappiamo-italiano Documentation Release latest
mappiamo - EN
This is the mappiamo Ensglish documentation
English documentation 1
mappiamo-italiano Documentation Release latest
2 English documentation
CAPITOLO 1
Introduction
mappiamo is a CMS that allows you to create and leverage content through the use of OpenData the geo-locationand microformats It can be used for processing the data produced by public administrations collecting content(crowdsourcing) civic hacking and providing a basis for the portal of a smart city
3
mappiamo-italiano Documentation Release latest
4 Capitolo 1 Introduction
CAPITOLO 2
Installation
Download mappiamo package from GIT and copy all files to your web host by FTP Copy files to subdirectory ifrequired or to public_html root Login to your control panel or phpMyadmin to create database user with passwordand add database to user Give all access rights to your database user When you copied all files to your host accessto the mappiamo root by your browser by http Setup process will be started Fill all required fields If the processdone without error you can access to the content manager on the URL http[your_host]manager
If something changed later (for example database password) edit settingsphp from the root of installed mappiamo
1 Row 7 Fill or modify your sitename
2 Row 8 Fill or modify your domain
The database access storef from row 14 to 19
1 Row 14 Database name
2 Row 15 Database type
3 Row 16 Database hostname
4 Row 17 Database prefix
5 Row 18 Database username
6 Row 19 Database password
If you need e-mail service setup your SMTP provider
1 Row 21 Your e-mail
2 Row 22 Username for SMTP service
3 Row 23 Password for SMTP service
4 Row 24 Hostname for SMTP service
Using content manager
5
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
English documentation
1 Introduction 3
2 Installation 521 Using content manager 5
3 Create new content as admin or editor 7
4 About semantic web 9
5 Create automatic meta data by form 11
6 Insert contents to category 13
7 Create pages 15
8 Create custom menus 1781 Widgets on your template 17
9 Address 19
10 Bottom menu 21
11 Allmeta box 23
12 Box 25
13 Collabrators box 27
14 Cookie box 29
15 Distance box 31
16 Events box 33
17 Instagram box 35
18 Onemeta box 37
19 Youtube box 39
i
20 Allmeta 41
21 Slideshow 43
22 Divided menu 45
23 Dropdown menu 47
24 Intro 49
25 Headline 51
26 Flickr 53
27 Form contact 55
28 Gravatar 57
29 Jplayer 59
30 Leaflet panel widget 61
31 Map 63
32 Menu 65
33 Video box 67
34 Lastcontent 69
35 Full featured menu 71
36 Owl image 73
37 Owl video 75
38 Share 77
39 Slider 79
40 Weather 81
41 Disqus 83411 The API module 83
42 Get all places 85
43 Get all routes 87
44 Get all polygons 89
45 Get all markers by 1 km distance from route 91
46 Get all markers within polygon 93
47 Search by field content 95
48 Get category contents by category ID 97
ii
49 Get one content by content ID 99
50 Get marker data by distance from coordinates 101
51 Get marker data by distance from coordinates filter by category ID 103511 Importers 103
52 SHP2GeoJson Importer 105521 New Updates 106
53 M_Module better templates generation 107
54 Admin Panel Widget_List error 109
55 Mappiamo custom content type managment 111
56 Call a model from controller 113
57 Call a view from controller 115
58 Mappiamo 117
59 Introduction 119591 The first italian subtitle 119592 The second italian subtitle 119
iii
iv
mappiamo-italiano Documentation Release latest
mappiamo - EN
This is the mappiamo Ensglish documentation
English documentation 1
mappiamo-italiano Documentation Release latest
2 English documentation
CAPITOLO 1
Introduction
mappiamo is a CMS that allows you to create and leverage content through the use of OpenData the geo-locationand microformats It can be used for processing the data produced by public administrations collecting content(crowdsourcing) civic hacking and providing a basis for the portal of a smart city
3
mappiamo-italiano Documentation Release latest
4 Capitolo 1 Introduction
CAPITOLO 2
Installation
Download mappiamo package from GIT and copy all files to your web host by FTP Copy files to subdirectory ifrequired or to public_html root Login to your control panel or phpMyadmin to create database user with passwordand add database to user Give all access rights to your database user When you copied all files to your host accessto the mappiamo root by your browser by http Setup process will be started Fill all required fields If the processdone without error you can access to the content manager on the URL http[your_host]manager
If something changed later (for example database password) edit settingsphp from the root of installed mappiamo
1 Row 7 Fill or modify your sitename
2 Row 8 Fill or modify your domain
The database access storef from row 14 to 19
1 Row 14 Database name
2 Row 15 Database type
3 Row 16 Database hostname
4 Row 17 Database prefix
5 Row 18 Database username
6 Row 19 Database password
If you need e-mail service setup your SMTP provider
1 Row 21 Your e-mail
2 Row 22 Username for SMTP service
3 Row 23 Password for SMTP service
4 Row 24 Hostname for SMTP service
Using content manager
5
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
20 Allmeta 41
21 Slideshow 43
22 Divided menu 45
23 Dropdown menu 47
24 Intro 49
25 Headline 51
26 Flickr 53
27 Form contact 55
28 Gravatar 57
29 Jplayer 59
30 Leaflet panel widget 61
31 Map 63
32 Menu 65
33 Video box 67
34 Lastcontent 69
35 Full featured menu 71
36 Owl image 73
37 Owl video 75
38 Share 77
39 Slider 79
40 Weather 81
41 Disqus 83411 The API module 83
42 Get all places 85
43 Get all routes 87
44 Get all polygons 89
45 Get all markers by 1 km distance from route 91
46 Get all markers within polygon 93
47 Search by field content 95
48 Get category contents by category ID 97
ii
49 Get one content by content ID 99
50 Get marker data by distance from coordinates 101
51 Get marker data by distance from coordinates filter by category ID 103511 Importers 103
52 SHP2GeoJson Importer 105521 New Updates 106
53 M_Module better templates generation 107
54 Admin Panel Widget_List error 109
55 Mappiamo custom content type managment 111
56 Call a model from controller 113
57 Call a view from controller 115
58 Mappiamo 117
59 Introduction 119591 The first italian subtitle 119592 The second italian subtitle 119
iii
iv
mappiamo-italiano Documentation Release latest
mappiamo - EN
This is the mappiamo Ensglish documentation
English documentation 1
mappiamo-italiano Documentation Release latest
2 English documentation
CAPITOLO 1
Introduction
mappiamo is a CMS that allows you to create and leverage content through the use of OpenData the geo-locationand microformats It can be used for processing the data produced by public administrations collecting content(crowdsourcing) civic hacking and providing a basis for the portal of a smart city
3
mappiamo-italiano Documentation Release latest
4 Capitolo 1 Introduction
CAPITOLO 2
Installation
Download mappiamo package from GIT and copy all files to your web host by FTP Copy files to subdirectory ifrequired or to public_html root Login to your control panel or phpMyadmin to create database user with passwordand add database to user Give all access rights to your database user When you copied all files to your host accessto the mappiamo root by your browser by http Setup process will be started Fill all required fields If the processdone without error you can access to the content manager on the URL http[your_host]manager
If something changed later (for example database password) edit settingsphp from the root of installed mappiamo
1 Row 7 Fill or modify your sitename
2 Row 8 Fill or modify your domain
The database access storef from row 14 to 19
1 Row 14 Database name
2 Row 15 Database type
3 Row 16 Database hostname
4 Row 17 Database prefix
5 Row 18 Database username
6 Row 19 Database password
If you need e-mail service setup your SMTP provider
1 Row 21 Your e-mail
2 Row 22 Username for SMTP service
3 Row 23 Password for SMTP service
4 Row 24 Hostname for SMTP service
Using content manager
5
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
49 Get one content by content ID 99
50 Get marker data by distance from coordinates 101
51 Get marker data by distance from coordinates filter by category ID 103511 Importers 103
52 SHP2GeoJson Importer 105521 New Updates 106
53 M_Module better templates generation 107
54 Admin Panel Widget_List error 109
55 Mappiamo custom content type managment 111
56 Call a model from controller 113
57 Call a view from controller 115
58 Mappiamo 117
59 Introduction 119591 The first italian subtitle 119592 The second italian subtitle 119
iii
iv
mappiamo-italiano Documentation Release latest
mappiamo - EN
This is the mappiamo Ensglish documentation
English documentation 1
mappiamo-italiano Documentation Release latest
2 English documentation
CAPITOLO 1
Introduction
mappiamo is a CMS that allows you to create and leverage content through the use of OpenData the geo-locationand microformats It can be used for processing the data produced by public administrations collecting content(crowdsourcing) civic hacking and providing a basis for the portal of a smart city
3
mappiamo-italiano Documentation Release latest
4 Capitolo 1 Introduction
CAPITOLO 2
Installation
Download mappiamo package from GIT and copy all files to your web host by FTP Copy files to subdirectory ifrequired or to public_html root Login to your control panel or phpMyadmin to create database user with passwordand add database to user Give all access rights to your database user When you copied all files to your host accessto the mappiamo root by your browser by http Setup process will be started Fill all required fields If the processdone without error you can access to the content manager on the URL http[your_host]manager
If something changed later (for example database password) edit settingsphp from the root of installed mappiamo
1 Row 7 Fill or modify your sitename
2 Row 8 Fill or modify your domain
The database access storef from row 14 to 19
1 Row 14 Database name
2 Row 15 Database type
3 Row 16 Database hostname
4 Row 17 Database prefix
5 Row 18 Database username
6 Row 19 Database password
If you need e-mail service setup your SMTP provider
1 Row 21 Your e-mail
2 Row 22 Username for SMTP service
3 Row 23 Password for SMTP service
4 Row 24 Hostname for SMTP service
Using content manager
5
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
iv
mappiamo-italiano Documentation Release latest
mappiamo - EN
This is the mappiamo Ensglish documentation
English documentation 1
mappiamo-italiano Documentation Release latest
2 English documentation
CAPITOLO 1
Introduction
mappiamo is a CMS that allows you to create and leverage content through the use of OpenData the geo-locationand microformats It can be used for processing the data produced by public administrations collecting content(crowdsourcing) civic hacking and providing a basis for the portal of a smart city
3
mappiamo-italiano Documentation Release latest
4 Capitolo 1 Introduction
CAPITOLO 2
Installation
Download mappiamo package from GIT and copy all files to your web host by FTP Copy files to subdirectory ifrequired or to public_html root Login to your control panel or phpMyadmin to create database user with passwordand add database to user Give all access rights to your database user When you copied all files to your host accessto the mappiamo root by your browser by http Setup process will be started Fill all required fields If the processdone without error you can access to the content manager on the URL http[your_host]manager
If something changed later (for example database password) edit settingsphp from the root of installed mappiamo
1 Row 7 Fill or modify your sitename
2 Row 8 Fill or modify your domain
The database access storef from row 14 to 19
1 Row 14 Database name
2 Row 15 Database type
3 Row 16 Database hostname
4 Row 17 Database prefix
5 Row 18 Database username
6 Row 19 Database password
If you need e-mail service setup your SMTP provider
1 Row 21 Your e-mail
2 Row 22 Username for SMTP service
3 Row 23 Password for SMTP service
4 Row 24 Hostname for SMTP service
Using content manager
5
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
mappiamo - EN
This is the mappiamo Ensglish documentation
English documentation 1
mappiamo-italiano Documentation Release latest
2 English documentation
CAPITOLO 1
Introduction
mappiamo is a CMS that allows you to create and leverage content through the use of OpenData the geo-locationand microformats It can be used for processing the data produced by public administrations collecting content(crowdsourcing) civic hacking and providing a basis for the portal of a smart city
3
mappiamo-italiano Documentation Release latest
4 Capitolo 1 Introduction
CAPITOLO 2
Installation
Download mappiamo package from GIT and copy all files to your web host by FTP Copy files to subdirectory ifrequired or to public_html root Login to your control panel or phpMyadmin to create database user with passwordand add database to user Give all access rights to your database user When you copied all files to your host accessto the mappiamo root by your browser by http Setup process will be started Fill all required fields If the processdone without error you can access to the content manager on the URL http[your_host]manager
If something changed later (for example database password) edit settingsphp from the root of installed mappiamo
1 Row 7 Fill or modify your sitename
2 Row 8 Fill or modify your domain
The database access storef from row 14 to 19
1 Row 14 Database name
2 Row 15 Database type
3 Row 16 Database hostname
4 Row 17 Database prefix
5 Row 18 Database username
6 Row 19 Database password
If you need e-mail service setup your SMTP provider
1 Row 21 Your e-mail
2 Row 22 Username for SMTP service
3 Row 23 Password for SMTP service
4 Row 24 Hostname for SMTP service
Using content manager
5
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
2 English documentation
CAPITOLO 1
Introduction
mappiamo is a CMS that allows you to create and leverage content through the use of OpenData the geo-locationand microformats It can be used for processing the data produced by public administrations collecting content(crowdsourcing) civic hacking and providing a basis for the portal of a smart city
3
mappiamo-italiano Documentation Release latest
4 Capitolo 1 Introduction
CAPITOLO 2
Installation
Download mappiamo package from GIT and copy all files to your web host by FTP Copy files to subdirectory ifrequired or to public_html root Login to your control panel or phpMyadmin to create database user with passwordand add database to user Give all access rights to your database user When you copied all files to your host accessto the mappiamo root by your browser by http Setup process will be started Fill all required fields If the processdone without error you can access to the content manager on the URL http[your_host]manager
If something changed later (for example database password) edit settingsphp from the root of installed mappiamo
1 Row 7 Fill or modify your sitename
2 Row 8 Fill or modify your domain
The database access storef from row 14 to 19
1 Row 14 Database name
2 Row 15 Database type
3 Row 16 Database hostname
4 Row 17 Database prefix
5 Row 18 Database username
6 Row 19 Database password
If you need e-mail service setup your SMTP provider
1 Row 21 Your e-mail
2 Row 22 Username for SMTP service
3 Row 23 Password for SMTP service
4 Row 24 Hostname for SMTP service
Using content manager
5
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 1
Introduction
mappiamo is a CMS that allows you to create and leverage content through the use of OpenData the geo-locationand microformats It can be used for processing the data produced by public administrations collecting content(crowdsourcing) civic hacking and providing a basis for the portal of a smart city
3
mappiamo-italiano Documentation Release latest
4 Capitolo 1 Introduction
CAPITOLO 2
Installation
Download mappiamo package from GIT and copy all files to your web host by FTP Copy files to subdirectory ifrequired or to public_html root Login to your control panel or phpMyadmin to create database user with passwordand add database to user Give all access rights to your database user When you copied all files to your host accessto the mappiamo root by your browser by http Setup process will be started Fill all required fields If the processdone without error you can access to the content manager on the URL http[your_host]manager
If something changed later (for example database password) edit settingsphp from the root of installed mappiamo
1 Row 7 Fill or modify your sitename
2 Row 8 Fill or modify your domain
The database access storef from row 14 to 19
1 Row 14 Database name
2 Row 15 Database type
3 Row 16 Database hostname
4 Row 17 Database prefix
5 Row 18 Database username
6 Row 19 Database password
If you need e-mail service setup your SMTP provider
1 Row 21 Your e-mail
2 Row 22 Username for SMTP service
3 Row 23 Password for SMTP service
4 Row 24 Hostname for SMTP service
Using content manager
5
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
4 Capitolo 1 Introduction
CAPITOLO 2
Installation
Download mappiamo package from GIT and copy all files to your web host by FTP Copy files to subdirectory ifrequired or to public_html root Login to your control panel or phpMyadmin to create database user with passwordand add database to user Give all access rights to your database user When you copied all files to your host accessto the mappiamo root by your browser by http Setup process will be started Fill all required fields If the processdone without error you can access to the content manager on the URL http[your_host]manager
If something changed later (for example database password) edit settingsphp from the root of installed mappiamo
1 Row 7 Fill or modify your sitename
2 Row 8 Fill or modify your domain
The database access storef from row 14 to 19
1 Row 14 Database name
2 Row 15 Database type
3 Row 16 Database hostname
4 Row 17 Database prefix
5 Row 18 Database username
6 Row 19 Database password
If you need e-mail service setup your SMTP provider
1 Row 21 Your e-mail
2 Row 22 Username for SMTP service
3 Row 23 Password for SMTP service
4 Row 24 Hostname for SMTP service
Using content manager
5
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 2
Installation
Download mappiamo package from GIT and copy all files to your web host by FTP Copy files to subdirectory ifrequired or to public_html root Login to your control panel or phpMyadmin to create database user with passwordand add database to user Give all access rights to your database user When you copied all files to your host accessto the mappiamo root by your browser by http Setup process will be started Fill all required fields If the processdone without error you can access to the content manager on the URL http[your_host]manager
If something changed later (for example database password) edit settingsphp from the root of installed mappiamo
1 Row 7 Fill or modify your sitename
2 Row 8 Fill or modify your domain
The database access storef from row 14 to 19
1 Row 14 Database name
2 Row 15 Database type
3 Row 16 Database hostname
4 Row 17 Database prefix
5 Row 18 Database username
6 Row 19 Database password
If you need e-mail service setup your SMTP provider
1 Row 21 Your e-mail
2 Row 22 Username for SMTP service
3 Row 23 Password for SMTP service
4 Row 24 Hostname for SMTP service
Using content manager
5
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
6 Capitolo 2 Installation
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 3
Create new content as admin or editor
You can create several type of content
1 Post this is a simple text based blog content (with marker on the map if required)
2 Place content for the place selected on the map
3 Event event is like the place but you can define start and end dates on extra fields
4 Route this content contains longer route on the map for long distance travels between cities
All content types can create marker on the map and can be used draw-on-the-map functions excluding route Routecan contains only route plan
7
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
8 Capitolo 3 Create new content as admin or editor
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 4
About semantic web
The Semantic Web is an extension of the Web through standards by the World Wide Web Consortium (W3C) Thestandards promote common data formats and exchange protocols on the Web most fundamentally the ResourceDescription Framework (RDF)
According to the W3C ldquoThe Semantic Web provides a common framework that allows data to be shared and reusedacross application enterprise and community boundariesrdquo The term was coined by Tim Berners-Lee for a web of datathat can be processed by machines While its critics have questioned its feasibility proponents argue that applicationsin industry biology and human sciences research have already proven the validity of the original concept (wikipedia)
Nota Mappiamo automatically support semantic web for better result on google searches by content and meta dataThe standard semantic data generated automatically by the content module
9
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
10 Capitolo 4 About semantic web
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 5
Create automatic meta data by form
Semantic data generated by meta data and content The content editor or administrator can insert metadata whenmodify saved content step-by-step but metadata generator form is available on the frame ldquoUse meta data wizzardrdquo onldquoMetardquo tab Editor can select form theme and the selected form can be filled and savaed These forms are folows thestandard rules of semantic web data
Nota Always read the rules before fill the metadata generator form For example if the content meta assignedto organization the instrictions can be found here httpsschemaorgOrganization Currently we offer four pre-generated form for automatic metadata creation
11
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
12 Capitolo 5 Create automatic meta data by form
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 6
Insert contents to category
Create category and group several types of content to selected category The selected category will group contentsand markers on the map if required The groped contents can be listed on one page and the content markers will bedisplayed at one time on the map
13
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
14 Capitolo 6 Insert contents to category
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 7
Create pages
Create content type ldquopagesrdquo if you want to display the collection of content by menu Pages can contains category(with any contents) one content module generated service or page and events with date filter on the top of page
Nota If you choose ldquoAdd eventrdquo when adding page content you will found a new dialog with several parameters notonly the content selection list Here you can insert more than one events groupped by categories and you can setupthe sort order and filter functions for this page by input fields Only this one type of page the users can re-define eventfilter if enebled on the top
15
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
16 Capitolo 7 Create pages
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 8
Create custom menus
Create menu with name on the content manager When menu named and created use it on ldquoPagerdquo Select managerrsquosmenu ldquoPagerdquo click on previously created page-content (with document category modul or events) and insert selectedpage content to any menu Select more than one times and add if required
Nota Very important that the created menu must be inserted to the template of content type by name or menu ID
Widgets on your template
You can insert several widgets to your own mappiamo template You have to edit tamplete files only with yourfavorite IDE text editor Widgets are the part of ducument front-end with several functions Some of them can beinserted to the content some of then can be inserted to the sidebar on left or right
Nota If the widger name contains word ldquoBoxrdquo the widget primary created for the sidebar not the column of maincontent but because the template can be modified with several tricks these widget can be used under or within themain content text
Nota New widgets required new CSS classes for correct display Check the HTML source code to get widgetrsquos classnames
17
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
18 Capitolo 8 Create custom menus
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 9
Address
bull Usage code example
ltphp M_Templatewidget(address) gt
This widget have no parameters creating search box for map the widget centering map for the search address Thesearch string must be real name (for example city name) to get real latitude and longitude
Nota This widget is the part of Leaflet panel widget this widger required to show address search function
19
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
20 Capitolo 9 Address
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 10
Bottom menu
bull Usage code example
ltphp M_Templatewidget(bottommenu array($ID)) gt
Display bottom menu items This widget have 1 parameter the menu ID
Nota Menu must be created by manager you can insert any menu of them by ID
21
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
22 Capitolo 10 Bottom menu
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 11
Allmeta box
bull Usage code example
ltphp $this-gtwidget(box_allmeta) gt
This widget have no parameters creating list (table) of all meta data of content This widget is ideal for right columnbut van be used unser the main content The disabled meta names is on the row 13 on the code
23
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
24 Capitolo 11 Allmeta box
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 12
Box
bull Usage code example
ltphp M_Templatewidget(box array($image $title $desc $link)) gt
This widget display image box using four parameters
1 $image -gt image path
2 $title -gt title text on image (positioned by customizable CSS)
3 $desc -gt description of image (positioned by customizable CSS)
4 $link -gt link if user click on the image
25
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
26 Capitolo 12 Box
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 13
Collabrators box
bull Usage code example
ltphp $this-gtwidget(box_collabrators array(n)) gt
This widget have one parameters ldquonrdquo what is the maximum number of collabotators article based on the selectedcontent The collaboratorrsquos e-mail must be saved to the meta value with name ldquocollaboratorrdquo
Nota This widget have no parameter about collaborators name ir e-mail because these names depending on thedocument This is the reason why the collaboratorrsquos identifier definied by meta data of selected document not by thetemplate
27
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
28 Capitolo 13 Collabrators box
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 14
Cookie box
bull Usage code example
ltPHP $this-gtwidget(box_cookie) gt
This widget have no parameters creating alert box for cookie usage
29
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
30 Capitolo 14 Cookie box
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 15
Distance box
bull Usage code example
ltPHP $this-gtwidget(box_distance) gt
This widget have no parameters creating list (table) of related articles not far from the current content
Nota The distance is fixed on code the radius is 1 km
31
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
32 Capitolo 15 Distance box
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 16
Events box
bull Usage code example
ltPHP $this-gtwidget(box_events) gt
This widget have no parameters creating list (table) of events not far from the current content
Nota The distance is fixed on code the radius is 1 km
33
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
34 Capitolo 16 Events box
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 17
Instagram box
bull Usage code example
ltPHP $this-gtwidget(box_instagram NULL) gt
This widget have one parameter what is the hashtag for images If this parameter missing or NULL the default hashtagis lsquotourismrsquo With meta name lsquohashtag-instagramrsquo can be overwite the deafult hashtag to anything else
Nota If you use meta to define instagram hashtag instead of template you can get images several hashtags on alldocuments where lsquohashtag-instagramrsquo have value
35
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
36 Capitolo 17 Instagram box
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 18
Onemeta box
bull Usage code example
ltPHP $this-gtwidget(box_onemeta [meta_name]) gt
This widget have one parameter what is the meta name to get the value of only oane meta data
Nota This widget can be used on the column of main content
37
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
38 Capitolo 18 Onemeta box
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 19
Youtube box
bull Usage code example
ltphp $this-gtwidget(box_youtube array([developer key] [channel id]rarr˓[maximum content])) gt
This widget have 3 parameters Developer key youtube channel id and the maximum number of youtube content
Nota This widget can be inserted to the left or right sidebar column and creating scrollable carousel of selectedchannel content
39
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
40 Capitolo 19 Youtube box
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 20
Allmeta
bull Usage code example
ltPHP $this-gtwidget(content_allmeta) gt
This widget have no parameters creating list (table) of meta data from the current content
Nota This widget created for list or table of standard schemantic data if available
41
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
42 Capitolo 20 Allmeta
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 21
Slideshow
bull Usage code example
ltPHP $this-gtwidget(content_slideshow) gt
This widget have no parameters creating slideshow on the content column from all images included to the currentcontent
Nota If more than one images inserted to the content the widget will be show the gallery where you insert The bestplace is under the content column
43
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
44 Capitolo 21 Slideshow
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 22
Divided menu
bull Usage code example
ltphp M_Templatewidget(dividedmenu array($ID)) gt
Display divided menu This widget have 1 parameter the menu ID
45
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
46 Capitolo 22 Divided menu
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 23
Dropdown menu
bull Usage code example
ltphp M_Templatewidget(dropdownmenu array($ID)) gt
Display dropdown menu This widget have 1 parameter the menu ID
47
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
48 Capitolo 23 Dropdown menu
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 24
Intro
bull Usage code example
ltPHP $this-gtwidget(intro) gt
This widget have no parameters display intro image
49
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
50 Capitolo 24 Intro
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 25
Headline
bull Usage code example
ltPHP $this-gtwidget(content_headline) gt
This widget have no parameters creating group of some data and metadata which are rewired on content columnbetween title and content text
51
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
52 Capitolo 25 Headline
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 26
Flickr
bull Usage code example
ltPHP $this-gtwidget(flickr) gt
This widget have no parameters creating flickr image groups on the map by visible box of map
53
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
54 Capitolo 26 Flickr
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 27
Form contact
bull Usage code example
ltPHP $this-gtwidget(form_contact array([registered username])) gt
This widget have one parameter the parameter must be the username of registered Mappiamo user This widgetcreating form with input fields for sending simple message with ajax validation
55
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
56 Capitolo 27 Form contact
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 28
Gravatar
This widget included to the content module cannot use on the template or MVC view The widget fetching gravataricon by the content creatorrsquos e-mail address if the editor registered on this service
57
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
58 Capitolo 28 Gravatar
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 29
Jplayer
bull Usage code example
ltPHP $this-gtwidget(jplayer) gt
This widget have no parameters creating javascript player for audio (or video) content The required meta name islsquoaudiorsquo and the meta value must be the full url of audio or video file
Nota The meta data value is the full URL of audio file but the correct encoding is very important Plase refer to theofficiel JPlayer page to inform about usable audio formats
59
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
60 Capitolo 29 Jplayer
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 30
Leaflet panel widget
bull Usage code example
$Panel_names = array([panel_name_1] [panel_name_2] [[panel_name_n]])$Panel_icons = array([icon_name_1] [icon_name_1] [icon_name_n])$this-gtwidget(leaflet_panel array($Panel_names $Panel_icons))
This widget have two required parameteres booth have to be arrays The array of Panel_names listed the names ofbuttons on will be isplayed on the map On the template directory must be created php files with same name Forexample if the panel_name_1 is ldquoSearchBoxrdquo SearchBoxphp must be created to the template directory This file cancontains any required code for example widgets
bull Usage code example of SearchBoxphp
ltdiv id=SearchBox class=PanelOnTheMAPgtltphp M_Templatewidget(address) gt
ltdivgt
bull Rules
ndash The panel code must be included between ltdivgt
ndash The div ID must be same as the panel name
ndash The class ldquoPanelOnTheMAPrdquo required
ndash Between ltdivgt can be inserted any widget or code
bull The panel icon array contains the name of bootstrap icon For exammple if the bootstrap icon name is
glyphicon-search the panel icon name is only ldquosearchrdquo
61
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
62 Capitolo 30 Leaflet panel widget
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 31
Map
bull Usage code example
ltPHP $this-gtwidget(map array($zoom)) gt
This widget have 1 parameter the default zoom This widget display map anywhere on the content page This widgetdisplay map (with markers draw or route) on the visitorrsquos interface
63
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
64 Capitolo 31 Map
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 32
Menu
bull Usage code example
ltPHP $this-gtwidget(menu array($ID)) gt
This widget have 1 parameter the menu id This widget display menu item
65
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
66 Capitolo 32 Menu
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 33
Video box
bull Usage code example
ltPHP $this-gtwidget(videobox) gt
This widget have no parameters creating embedd iframe player for youtube content by full url The required metaname is lsquovideoboxrsquo and the meta value must be the full url of youtube video
67
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
68 Capitolo 33 Video box
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 34
Lastcontent
bull Usage code examples
ltphp $this-gtwidget(lastcontent array(5)) gtltphp $this-gtwidget(lastcontent array(5 event start from_now)) gtltphp $this-gtwidget(lastcontent array(5 post created)) gt
This widget have parameters The first is the maximum number of content this is required
All other paramteres are optional (not required because default values are available) [content type] [ordering columnname] and if the content type is lsquoeventrsquo the last parameter lsquofrom_nowrsquo shows only current and future events If thelast parameter is ldquonowrdquo for event type the list will be displayed event only if the event currently running
69
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
70 Capitolo 34 Lastcontent
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 35
Full featured menu
bull Usage code example
ltphp M_Templatewidget(menu_full array([category name] [treemenu|popmenu]rarr˓ 09 check)) gt
This widget have parameters Creating custom menu system by Mappiamo ldquopagesrdquo and ldquomenusrdquo and display selectedcategories on the map
bull Parameters
1 The category name
2 Menu type lsquotreemenursquo or lsquopopmenursquo
3 Template number of menu only Menus have 15 templates the menu template number can be 1 to 15
4 How menu display the selected catorgory contents
bull lsquolinkrsquo - the category opens new page with content list
bull lsquocheckrsquo - the category displays as marker on the map
71
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
72 Capitolo 35 Full featured menu
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 36
Owl image
bull Usage code example
ltPHP $this-gtwidget(owl_image array(category 4 60)) gtltPHP $this-gtwidget(owl_image array(path 6 templatessoccorsoimagesrarr˓partners indexphpmodule=categoryampobject=59)) gt
This widget have parameters creating image carousel to the main content column The source images can get fromtwo different source lsquocategoryrsquo or lsquopathrsquo This is the first parameter
If the image source is lsquopathrsquo the 3rd parameter must be the relative path to the directory contains images
If the image source is lsquocategoryrsquo the 3rd parameter must be the id number of category where the widget reads allimages from content This category must be created and filled with grouop of contents
The 2nd parameter is the maximum number of items to show
The 4th parameter is the link to open when user click on image This is optional If the source is lsquocategoryrsquo the linkwill open the document contains clicked image
73
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
74 Capitolo 36 Owl image
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 37
Owl video
bull Usage code example
$TubeID = array(jkovdYV0qm0 dw6wZQkfsn0 CqdSzVXkhmY km3JiaPqWMIrarr˓NyCwOdyhZco YJTxnhjpF3U HOVYTZkvjH8 2Tlou1Vdg6Y 0_rtwI_nUlIrarr˓LCtp7D0uCjA)$this-gtwidget(owl_video array($TubeID 3))
This widget have parameters creating video carousel to the main content column The first parameter must be an arrayon the separated variable contains all youtube video id required for the carousel
The second parameter is how many videos display at once by the scrollable carousel
75
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
76 Capitolo 37 Owl video
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 38
Share
bull Usage code example
ltPHP $this-gtwidget(share array($site_id)) gt
Share content on social networks
77
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
78 Capitolo 38 Share
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 39
Slider
bull Usage code example
ltPHP $this-gtwidget(slider array($content_id)) gt
This widget creating image slider from the content by content ID
79
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
80 Capitolo 39 Slider
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 40
Weather
bull Usage code example
ltPHP $this-gtwidget(weather) gt
This widget have no parameters creating weather report on the map
81
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
82 Capitolo 40 Weather
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 41
Disqus
bull Usage code example
$Types = array(post event)ltphp M_Templatewidget(disqus array($Types)) gt
This widget have parameter as array named $Types Creating comment section on content page Disqus account anddisqus site name required On the parameter lsquo$Typesrsquo must be listed all content types (post event place route) wherethe disqus comment service will be available Insert this widget under the main content page
Nota You must register your installed mappiamo on the Disqus service page as site administrator to get your uniqueDisqus site name If you have this name you must define it on the manager -gt preferences
The API module
By API module you can get data for external application for example mobile app or another mappiamo
Nota If lsquoauthrsquo parameter required to get data by API module the auth key must be storen in the preferences tablewith name lsquoapi_authrsquo
Nota The lsquolangrsquo parameter is always optional Without this parameter API uses internal auto language
83
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
84 Capitolo 41 Disqus
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 42
Get all places
http[site_uri]indexphpmodule=apiamptask=allpoisampauth=[auth_key]amplang=[language]
85
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
86 Capitolo 42 Get all places
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 43
Get all routes
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=routeamplang=[language]
87
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
88 Capitolo 43 Get all routes
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 44
Get all polygons
http[site_uri]indexphpmodule=apiamptask=allroutesampauth=[auth_key]amptype=polygonamplang=[language]
89
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
90 Capitolo 44 Get all polygons
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 45
Get all markers by 1 km distance from route
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[route_name]ampauth=[auth_key]amplang=[language]
Nota The value of lsquoroutersquo parameter must be same as the value of lsquonamersquo column on content table
91
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
92 Capitolo 45 Get all markers by 1 km distance from route
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 46
Get all markers within polygon
http[site_uri]indexphpmodule=apiamptask=poisonrouteamproute=[polygon_name]ampauth=[auth_key]amplang=[language]
Nota The value of route parameter must be same as the value of column name on content table
93
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
94 Capitolo 46 Get all markers within polygon
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 47
Search by field content
http[site_URI]indexphpmodule=apiamptask=searchampauth=[auth_key]ampfield=[col_name]ampdata=[col_value]
95
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
96 Capitolo 47 Search by field content
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 48
Get category contents by category ID
http[site_URI]indexphpmodule=apiamptask=categoryampobject=[category_id]
97
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
98 Capitolo 48 Get category contents by category ID
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 49
Get one content by content ID
http[site_URI]indexphpmodule=apiamptask=contentampobject=[content_id]
99
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
100 Capitolo 49 Get one content by content ID
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 50
Get marker data by distance from coordinates
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
101
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
102 Capitolo 50 Get marker data by distance from coordinates
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 51
Get marker data by distance from coordinates filter by category ID
http[site_URI]indexphpmodule=apiamptask=searchamplat=[latitude]amplng=[longitude]ampradius=[distance_by_km]
Importers
103
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
104 Capitolo 51 Get marker data by distance from coordinates filter by category ID
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 52
SHP2GeoJson Importer
The data importers created to save exteral data set to mappiamo at one step The GeoJson importer can be used forimport data created from SHP source files by QGIS desktop software
For the import process you need geojson file exported from QGIS and you have to create INI file
ini file must be contains rules how to save geojson data to mappiamo The importer can use two labels[database_table_name] and [fixed_data]
Under the optional label [fixed_data] must be listed the database table clumn and the value For example if you needto insert value ldquoplacerdquo to all imported rows on table ldquocontentsrdquo and column ldquotyperdquo the corrent row under this labelcontents[type]=rdquoplacerdquo
The [database_table_name] is required label For example if to the table ldquocontentsrdquo column ldquoaddressrdquo have to beinserted something you have to enter these rows to ini
[contents]address[]=Residenza
The rules of this ini label
[database_table_name]table_column[]=geojson_prperty_name
You can use more than one labels for table name and if you want to store more than one geojson property to thecolumn you can duplicate the row with several values of geojson prperty names
Example of tested ini file
[contents]address[]=Residenzatitle[]=Tipologiatitle[]=Residenza
[fixed_data]contents[type]=place
105
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
New Updates
106 Capitolo 52 SHP2GeoJson Importer
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 53
M_Module better templates generation
The class M_Module generate the html page and implements the pattern MVC Now you can use the same view fileall time you want You can use view files as section of a more complex template
107
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
108 Capitolo 53 M_Module better templates generation
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 54
Admin Panel Widget_List error
If Admin Panel ldquoWidget_listrdquo crash the problem is in the naming of the widget or in the naming of the main widgetfunctions The main function name should be like mwidget_ltwidgetNamegt()
Admin Panel could crash also if the name of other functions of your widget are a duplicate of other widgets functionname So keep attention to the naming of your functions
109
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
110 Capitolo 54 Admin Panel Widget_List error
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 55
Mappiamo custom content type managment
In Mappiamo you can have only 4 content type by default post place route event If you want insert custom type youhave to follow these steps 1 Create the display function for new type in modulescontentmodelscontentphp 2 Addthe new type Manager in modulescontentviewdefaultphp 3 Insert new type in Types array in binmbinobjectphp4 Create a new class with this name classltnewtypegtphp in binclasses (name are case sensitivie) 5 Register thenew class in binariesphp
example of classltnewtypegtphp
ltphpclass M_Newtype extends M_Post protected $type = lsquonewtypersquoprotected $kindprotected $start = NULLprotected $end = NULLpublic function __construct($id = NULL) if ($id) $this-gtread($id) public function get_start() return $this-gtstartpublic function get_end() return $this-gtend public function set_start($value) $this-gtstart = strval($value)public function set_end($value) $this-gtend = strval($value)gt
111
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
112 Capitolo 55 Mappiamo custom content type managment
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 56
Call a model from controller
use this function inside a controller
$this-gt model(name_model $parameters)
$parameters should be an array When you pass the array $parameters Mappiamo split it in a list of parameters for theldquoname_modelrdquo function For example if i have $parameters[abc] when i pass throught $this-gt model(ldquoname_modelrdquo$parameters) the function ldquoname_modelrdquo will be like this
function name_model (a b c)some stuff
The order of data in $parameters array corresponds to the order of function parameters
113
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
114 Capitolo 56 Call a model from controller
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 57
Call a view from controller
use this function inside a controller
$this-gt view(name_view $data)
$data should be an array otherwise data are not passed Itrsquos important that you use the variable name as ldquo$datardquootherwise it doesnrsquot work
115
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
116 Capitolo 57 Call a view from controller
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 58
Mappiamo
This is the Mappiamo documentation
117
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
mappiamo-italiano Documentation Release latest
118 Capitolo 58 Mappiamo
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-
CAPITOLO 59
Introduction
Italian translation required
The first italian subtitle
Italian translation required
The second italian subtitle
119
- Introduction
- Installation
-
- Using content manager
-
- Create new content as admin or editor
- About semantic web
- Create automatic meta data by form
- Insert contents to category
- Create pages
- Create custom menus
-
- Widgets on your template
-
- Address
- Bottom menu
- Allmeta box
- Box
- Collabrators box
- Cookie box
- Distance box
- Events box
- Instagram box
- Onemeta box
- Youtube box
- Allmeta
- Slideshow
- Divided menu
- Dropdown menu
- Intro
- Headline
- Flickr
- Form contact
- Gravatar
- Jplayer
- Leaflet panel widget
- Map
- Menu
- Video box
- Lastcontent
- Full featured menu
- Owl image
- Owl video
- Share
- Slider
- Weather
- Disqus
-
- The API module
-
- Get all places
- Get all routes
- Get all polygons
- Get all markers by 1 km distance from route
- Get all markers within polygon
- Search by field content
- Get category contents by category ID
- Get one content by content ID
- Get marker data by distance from coordinates
- Get marker data by distance from coordinates filter by category ID
-
- Importers
-
- SHP2GeoJson Importer
-
- New Updates
-
- M_Module better templates generation
- Admin Panel Widget_List error
- Mappiamo custom content type managment
- Call a model from controller
- Call a view from controller
- Mappiamo
- Introduction
-
- The first italian subtitle
- The second italian subtitle
-