Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:syces:selfserviceportal:custom_templates [2014/04/24 09:51] co created |
en:syces:selfserviceportal:custom_templates [2016/09/27 13:00] (current) co |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Types of custom templates ====== | ||
+ | ====== Custom Templates (not for Default Free Service) ====== | ||
- | There are 2 types of custom templates: | + | ===== Types of custom templates |
- | * those that use the normal Template (hotspot.tpl) and its functionalities, | + | |
- | * those that may provide even more flexibility and also supply the complete functionality for the sending of the required forms | + | |
- | Whereas the first type can be used for all kinds of walled garden registration methods, the second | + | |
+ | There are 4 types of custom templates: | ||
+ | |||
+ | * **index.html**: | ||
+ | * **hotspot.tpl**: | ||
+ | * **custom_anonym.tpl**: | ||
+ | |||
+ | Whereas the hotspot.tpl | ||
* custom_oneclick.tpl | * custom_oneclick.tpl | ||
* custom_paypal.tpl | * custom_paypal.tpl | ||
Line 14: | Line 19: | ||
At the moment we only support custom_anonym.tpl. | At the moment we only support custom_anonym.tpl. | ||
- | ====== Process for the installing of custom templates ====== | + | * **custom_token.tpl**: |
+ | |||
+ | |||
+ | ===== Process for the installing of custom templates ===== | ||
+ | |||
+ | You need to create a template (use one of the examples below) and edit it according to your needs. Choose .html instead of .tpl if the file cannot be edited. | ||
+ | |||
+ | Certain elements may not be removed: | ||
+ | |||
+ | - the 4 lines of comment, <!-- BEGIN HEAD --> etc. | ||
+ | - the template variable {SCRIPTS} in the head part | ||
+ | - the body tag containing the onload-function-call <body onload=" | ||
+ | - the template variables {LOGIN} and {REGISTER} | ||
+ | |||
+ | You may add text, html, css. Of course you can use an existing html and just add the required elements. | ||
+ | There are some extra template variables that you may use, if you want: | ||
+ | |||
+ | {TITLE} : default title \\ | ||
+ | {CSS} : link to a stylesheet called ticketstyle.css \\ | ||
+ | if you name your stylesheet ticketstyle.css it will be found by this variable, but of course you may add other stylesheets or use another name \\ | ||
+ | {DATE} : current date / time \\ | ||
+ | {VERSION}: Software Version\\ | ||
+ | {LANGSWITCH}: | ||
+ | {LOGO} : | ||
+ | {ERROR} : display of error and status messages \\ | ||
+ | {LOGINTITLE}: | ||
+ | {REGISTERTITLE} title for registration form\\ | ||
+ | {AGB}: link to agb.html, a file containing your Terms and Conditions; you may have agb.html files for different locations and different languages. Please check what the [[en: | ||
+ | |||
+ | Any files you use (images, CSS etc.) should have a {TPLDIR} as a prefix to get the right path to your template folder, e.g. <img src=" | ||
+ | |||
+ | If you want to offer templates in several languages you must create one subfolder for each language and place the templates in the subfolders: {TPLDIR}< | ||
+ | |||
+ | For uploading your files please use the [[en: | ||
+ | |||
+ | To finally activate the custom template you have to choose " | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== hotspot.tpl (default) ===== | ||
+ | This is the template currently used for the default layout. Anything in brackets {} will be replaced by real values. | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <!-- BEGIN HEAD --> | ||
+ | < | ||
+ | < | ||
+ | <meta name=" | ||
+ | <meta http-equiv=" | ||
+ | {CSS} | ||
+ | <link rel=" | ||
+ | <meta name=" | ||
+ | {SCRIPTS} | ||
+ | </ | ||
+ | <!-- END HEAD --> | ||
+ | <!-- BEGIN BODY --> | ||
+ | <body onload=" | ||
+ | <div id = " | ||
+ | <div id =" | ||
+ | <div id =" | ||
+ | <div id = " | ||
+ | <div id = " | ||
+ | <div id = " | ||
+ | <p class=" | ||
+ | {LOGIN}</ | ||
+ | <div id = " | ||
+ | <p class=" | ||
+ | {REGISTER} | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | <!-- END BODY --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== basic template (minimum requirements) | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <!-- BEGIN HEAD --> | ||
+ | < | ||
+ | {SCRIPTS} | ||
+ | </ | ||
+ | <!-- END HEAD --> | ||
+ | <!-- BEGIN BODY --> | ||
+ | <body onload=" | ||
+ | |||
+ | {LOGIN} | ||
+ | {REGISTER} | ||
+ | |||
+ | </ | ||
+ | <!-- END BODY --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== custom_anonym.tpl (minimum requirements) | ||
+ | This template can be used for the most flexible custom layout. You need to provide a form with a field named " | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <!-- BEGIN HEAD --> | ||
+ | < | ||
+ | {SCRIPTS} | ||
+ | </ | ||
+ | <!-- END HEAD --> | ||
+ | <!-- BEGIN BODY --> | ||
+ | <body onload=" | ||
+ | {LOGIN} | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | <!-- END BODY --> | ||
+ | </ | ||
+ | </ | ||
+ | Please be aware that any template variables need to be placed within either the head or the body section. The example above needs at least one more template variable e.g. {DATE} within the body section in order to get the body section displayed. | ||
+ | Else use the following code if you only have the {LOGIN} variable: | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <!-- BEGIN HEAD --> | ||
+ | < | ||
+ | {SCRIPTS} | ||
+ | </ | ||
+ | <!-- END HEAD --> | ||
+ | |||
+ | <body onload=" | ||
+ | |||
+ | < | ||
+ | {LOGIN} | ||
+ | < | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== css example | ||
+ | |||
+ | This is an example of a very basic CSS file. You may adapt it to your needs, e.g. add media queries to make it responsive, add your own styles add your own images and so on. | ||
+ | |||
+ | < | ||
+ | /* ticketstyle.css very simple */ | ||
+ | |||
+ | body {padding:0; margin:0; border: | ||
+ | height: | ||
+ | |||
+ | # | ||
+ | { | ||
+ | position: | ||
+ | width: 100%; | ||
+ | height: 100%; | ||
+ | margin-left: | ||
+ | margin-right: | ||
+ | text-align: | ||
+ | |||
+ | } | ||
+ | |||
+ | .title | ||
+ | { | ||
+ | text-align: | ||
+ | font-weight: | ||
+ | margin:0 0em 1em 0em ; | ||
+ | background: | ||
+ | color: | ||
+ | } | ||
+ | |||
+ | /* styles for non-default Pear Quickform */ | ||
+ | .formclass{} | ||
+ | .formlabel{text-align: | ||
+ | .formelement{text-align: | ||
+ | .formrequired{position: | ||
+ | |||
+ | #register, #login | ||
+ | { | ||
+ | position: | ||
+ | margin-top: | ||
+ | margin-bottom: | ||
+ | margin-left: | ||
+ | margin-right: | ||
+ | padding:1em 2em 2em 2em; | ||
+ | width: 30em; | ||
+ | background: | ||
+ | color: | ||
+ | border: 1px solid gray; | ||
+ | |||
+ | } | ||
+ | ol, ul {list-style: | ||
+ | table {border-collapse: | ||
+ | |||
+ | a: | ||
+ | a: | ||
+ | a: | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== How to install user provided custom templates (done by Synergy Systems GmbH) ===== | ||
+ | |||
+ | You need to be logged in to see this information. | ||
+ | < | ||
+ | We should always test on our development system before installing on the live system. When everything is okay we can copy the whole testfolder contents to the custom folder on the live system. This is either | ||
+ | / | ||
+ | |||
+ | Possible subfolder structure to / | ||
+ | |||
+ | / | ||
+ | |||
+ | /lang | ||
+ | |||
+ | / | ||
+ | |||
+ | It may be necessary to add a .htaccess file to the captiveportal folder, e.g. when there is a download link to a terms-and-condition.pdf, | ||
+ | |||
+ | Howto' | ||
+ | |||
+ | - copy the unzipped files into the captiveportal test folder, this is currently custom/ | ||
+ | - rename the template file to hotspot.tpl (check against minimum requirements) or custom_xx.tpl (also check form field names, add hidden vars..), depending on the type of custom template | ||
+ | - control all paths, add {TPLDIR} whereever necessary | ||
+ | - change rights e.g. for pictures if necessary | ||
+ | - try to register and to login using the custom template (change layout to custom, choose correct registration type) | ||
+ | - if autologin fails it is probably, because {LOGIN} is missing | ||
+ | - move files to appropriate custom folder on live system, create .htaccess for this folder if necessary | ||
+ | - test at least the display (in location open new tab using walled garden link) | ||
- | The customer sends a zip file containing all required files like images, the template, the css-file. Synergysystems does some basic security and functionality checks, renames the template if necessary (either hotspot.tpl or custom_anonym.tpl) and uploads them in the appropriate custom directory. | ||
- | It is possible to use the template for all locations of that customer or specific ones. | + | Example |
+ | < | ||
+ | < | ||
+ | Order Allow, | ||
+ | Allow from All | ||
+ | </ | ||
+ | </ | ||
+ | </ |