Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:syces:selfserviceportal:custom_templates [2014/04/24 09:55] co |
en:syces:selfserviceportal:custom_templates [2016/09/27 13:00] (current) co |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Custom Templates ====== | + | ====== Custom Templates |
===== Types of custom templates ===== | ===== Types of custom templates ===== | ||
- | There are 2 types of custom templates: | + | There are 4 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 | + | * **index.html**: |
+ | * **hotspot.tpl**: | ||
+ | * **custom_anonym.tpl**: | ||
+ | |||
+ | Whereas the hotspot.tpl | ||
* custom_oneclick.tpl | * custom_oneclick.tpl | ||
* custom_paypal.tpl | * custom_paypal.tpl | ||
Line 16: | Line 18: | ||
At the moment we only support custom_anonym.tpl. | At the moment we only support custom_anonym.tpl. | ||
+ | |||
+ | * **custom_token.tpl**: | ||
+ | |||
===== Process for the installing of custom templates ===== | ===== Process for the installing of custom templates ===== | ||
- | The customer sends a zip file containing | + | You need to create |
+ | |||
+ | 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 template variables {LOGIN} and {REGISTER} | ||
+ | |||
+ | You may add text, html, css. Of course you can use an existing html and just add the required | ||
+ | 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 | ||
+ | |||
+ | Any files you use (images, | ||
+ | |||
+ | 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 | ||
+ | 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 | ||
+ | - control all paths, add {TPLDIR} whereever necessary | ||
+ | - change rights e.g. for pictures if necessary | ||
+ | - try to register | ||
+ | - if autologin fails it is probably, because {LOGIN} is missing | ||
+ | - move files to appropriate custom | ||
+ | - test at least the display (in location open new tab using walled garden link) | ||
- | It is possible to use the template for all locations of that customer or specific ones. | + | Example |
+ | < | ||
+ | < | ||
+ | Order Allow, | ||
+ | Allow from All | ||
+ | </ | ||
+ | </ | ||
+ | </ |