Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:syces:selfserviceportal:custom_templates [2014/04/30 12:09]
co
en:syces:selfserviceportal:custom_templates [2016/09/27 13:00] (current)
co
Line 5: Line 5:
  
  
-There are types of custom templates:  +There are types of custom templates:
-  * those that use the normal Template (hotspot.tpl) and its functionalities, but has its own layout +
-  * 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 type is only valid for a specific registration method. Internally we distinguish between+  * **index.html**: for the walled garden option "static web pages" that has no self service functionality you may provide any index.html page that will be uploaded to your hotspot location; if you need to reference pictures (.jpg, .gif, .png) or css-files you need to prepend the name with the {PATH} variable 
 +  * **hotspot.tpl**: for all other walled garden options you can use the normal Template (hotspot.tpl) to make use of all its functionalities, but with your own layout 
 +  * **custom_anonym.tpl**: if you need even more flexibility you may supply the complete functionality for the sending of the required forms 
 + 
 +Whereas the hotspot.tpl can be used for all kinds of walled garden registration methods, the third type is only valid for a specific registration method. Internally we distinguish between
   * 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**: As of version 1.32.3 we also support token based authentication, i.e. we provide links in SMS and emails and QR Codes on bon printer printouts that contain information about user credentials to faciliate authentication. In all cases where Terms And Conditions have to be accepted first, you may provide a custom_token.tpl instead of the standard template containing only a link to your Terms And conditions.
 +
  
 ===== Process for the installing of custom templates ===== ===== Process for the installing of custom templates =====
Line 31: Line 36:
 There are some extra template variables that you may use, if you want: There are some extra template variables that you may use, if you want:
  
-{TITLE} : default title +{TITLE} : default title \\ 
-{CSS} : Verweis auf ein Stylesheet namens ticketstyle.css  +{CSS} : link to a stylesheet called ticketstyle.css \\ 
-              Sie können natürlich andere Stylesheet(s) einbinden +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} : aktuelles Datum Zeit +{DATE} : current date time \\ 
-{VERSION} : Software-Version +{VERSION}: Software Version\\ 
-{LANGSWITCH}: Sprachlinks (div id="langswitch"+{LANGSWITCH}: language links (div id="langswitch")\\ 
-{LOGO} : derzeit nicht verwendet +{LOGO} :  not used currently\\ 
-{ERROR} : Anzeige Fehler-und Statusmeldungen +{ERROR} : display of error and status messages \\ 
-{LOGINTITLE}: Überschrift für Login-Formular +{LOGINTITLE}: title for Login form\\ 
-{REGISTERTITLE} Überschrift für Registrierungsformular+{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:syces:frontend:location:uploadmanager#directory_structure_for_terms_and_conditions| Directory Structure for 'Terms and Conditions']] implies.
  
 +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="{TPLDIR}yourimage.jpg">.
  
-The customer sends a zip file containing all required files like images, the template, the css-fileSynergysystems does some basic security and functionality checksrenames the template if necessary (either hotspot.tpl or custom_anonym.tpl) and uploads them in the appropriate custom directory.+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}<language>/The language shortcuts are small letters as of ISO 3166egde,en,it.
  
-It is possible to use the template for all locations of that customer or specific ones.+For uploading your files please use the [[en:syces:frontend:location:uploadmanager|Upload Manager]] . An explanation to where to place your files you'll find there.
  
 To finally activate the custom template you have to choose "Custom Layout" for all locations concerned (Admin Frontend, Location, Walled Garden Options). This can be reset to default layout any time. To finally activate the custom template you have to choose "Custom Layout" for all locations concerned (Admin Frontend, Location, Walled Garden Options). This can be reset to default layout any time.
Line 109: Line 116:
  
 ===== custom_anonym.tpl (minimum requirements)  ===== ===== 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 "reg_accept" and a hidden field "state". Please ensure that the form is sent only after accepting the "Terms and conditions". You may add any html, css, javascript that you need. This type of template without {login} and {register} can be used only for the registration type "anonymous login". +This template can be used for the most flexible custom layout. You need to provide a form with a field named "reg_accept" and a hidden field "state". Please ensure that the form is sent only after accepting the "Terms and conditions". You may add any html, css, javascript that you need. This type of template without {register} can be used only for the registration type "anonymous login"
 <code> <code>
 <!DOCTYPE HTML> <!DOCTYPE HTML>
Line 130: Line 136:
  </body>  </body>
  <!-- END BODY -->  <!-- END BODY -->
 +</html>
 +</code>
 +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:
 +<code>
 +<!DOCTYPE HTML>
 +<html>
 + <!-- BEGIN HEAD -->
 + <head>
 + {SCRIPTS}
 + </head>
 + <!-- END HEAD -->
 +
 + <body onload="init();">
 +
 +             <!-- BEGIN BODY -->
 +                  {LOGIN}
 +             <!-- END BODY -->
 +             
 +      <form>
 +                   <input  name="reg_accept" type="checkbox"/>
 +                   <input name="state" type="hidden" value="ay" />
 +                   <input id="sb" type="submit" />
 +             </form>
 +
 + </body>
 +
 </html> </html>
 </code> </code>
Line 190: Line 223:
 a:link,a:visited{color:#000;text-decoration:underline; a:link,a:visited{color:#000;text-decoration:underline;
 </code> </code>
 +
 +
 +
 +===== How to install user provided custom templates (done by Synergy Systems GmbH)  =====
 +
 +You need to be logged in to see this information.
 +<nodisp>
 +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
 +/var/www/html/syces/custom/mandantid/captiveportal or a subfolder to this.
 +
 +Possible subfolder structure to /var/www/html/syces/custom/<mandantid>/captiveportal:
 +
 +/locationid
 +
 +/lang
 + 
 +/lang/locationid
 +
 +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, because the download of csv und pdf files in the syces/custom folder is prohibited to prevent the illicit download of user credentials.  
 +
 +Howto's
 +
 +  - copy the unzipped files into the captiveportal test folder, this is currently custom/27/captiveportal for bintec-elmeg
 +  - 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)
 +
 +
 +Example .htaccess:
 +<code>
 +<FilesMatch "\.(pdf)$">
 +   Order Allow,Deny
 +   Allow from All
 +</FilesMatch>
 +</code> 
 +</nodisp>
QR Code
QR Code Custom Templates (not for Default Free Service) (generated for current page)