Location based landing page. IAC-BOX IAC-BOX
Anuncio
Anuncio
IAC-BOX Documentation, Release 1.0
Configuration Key enabled-services
Since
17.0
Enable which service should be possible for a client twitter-name
17.0
Name of the Twitter account which should be followed twitter-show-screen-
17.0
name
Show the name of the twitter account twitter-show-count
17.0
Show the count of your twitter followers fb-like-url 17.0
Url to the page the user should like/ recommend fb-action 17.0
You can choose between like or recommend fb-layout 17.0
Choose the layout of your button fb-data-show-faces 17.0
User should see the faces of friends who liked the page fb-data-share 17.0
Add a share button to the like or recommend google-type 17.0
Choose if you want a share or follow button google-url 17.0
Url to the page the user should follow/share google-annotation 17.0
Determine the layout of your button google-data-rel 17.0
You can choose between author and publisher google17.0
recommendations
Enable the Recommendations of google
Mandatory
Yes
Yes
No
No
No
Yes
Yes
No
No
No
Yes
Yes
No
No
Default true false like button false false share true author false
7.5 Location based landing page
Since version 2 it is possible to make different configurations and styling for different location or VLANs.
We differntiate between two types of location based configuration. The first is to show different templates and the second is to define different configurations per location. You can mix this two types as you like. The location based functionality has to be enabled in conf/main.cofig.
Configuration key location-based
Default false
Activates the location based functionality location-id-fields iacbox
Data fields which will be used. Currently available are iacbox which is the registration number and vlan for the VLAN-ID (or Route-ID in routing mode)
Please note that the IACBOX has to send the needed data for the location.
Check your settings in Modules/Interface/Login API/Custom Logon Page. The following parameters have to be present in the field First call data fields with placeholders when using location based: vl=$VLAN (location per vlan), iac=$REGNR
(location per registration number).
Possible location-id-fields configurations location-id-fields Configuration vlan iacbox iacbox, vlan
Example v10
2001010101
2001010101-v10
7.5. Location based landing page 188
IAC-BOX Documentation, Release 1.0
7.5.1 Show different templates per location
After you enabled the location based functionality switch to the file htdocs/index.php. Comment in the following code part at the end of the file and comment out the last two lines of the code like the example below. Customize the different cases for your needs. Please note that when using VLANs it is necessary to add the letter v before the VLAN-Id.
Listing 7.13: htdocs/index.php
<?php
12
13
14
15
16
10
11
8
9
3
4
1
2
5
6
7
17
18
19
20
21
22
23
28
29
30
31
32
24
25
26
27
switch
( $loginApi -> getLocationId ()) {
// The location ID can be the Reg-Nr or the VLAN-ID or a combination - define that in conf/main.config
case
'v10' :
// only VLAN matching
include_once
( 'index_view_XXX.php' );
break
;
case
'2001010101' : /* intentional fall-through */
case
'2001010102' : /* intentional fall-through */
case
'2001010103' :
// only a registration number (of course only useful if more than one system connects to this Login-API instance)
include_once
( 'index_view_YYY.php' );
break
;
case
'2001010101-v12' :
// a combination of reg-nr and VLAN-ID
default
:
include_once
( 'index_view_ZZZ.php' );
break
;
// There are cases where clients without cookie support (or proper redirect) end up here without the
// needed informations (ip, mac, vlan) so we don't have a location ID - this template here is a fallback
// that should provide at least the "restore session" button for humans - most of the time this will
// be hit by apps.
$template = $loginApi -> getTemplateFile ();
include_once
( $template );
break
;
}
// --- This needs to be out commentet if you want to work location-based
//$template = $loginApi->getTemplateFile();
//include_once($template);
// ---
7.5.2 Show different configurations per location
Location based configurations can be made in all .config files by grouping config values with so called sections which are location IDs in square brackets like [my-location-id].
Attention: Place sections for location based settings always at the bottom of config files because all following config values after an location ID belong only to this location. You should always have a default section at the top without any section header.
Example: languages = de, en, fr, it
4
5
6
7
8
1
2
3
# ... leave all present configs above and add at the end of the file!
[your-location-id]
languages = es, pt, en
# Example location-id-fields = vlan
7.5. Location based landing page 189
Descargar
Anuncio