Last Update: 2018-10-17

Files

With a sweepstake template, two distinct pages can be designed, one for the overview of all sweepstakes, and a detail page, for participation.
For single sweepstake campaigns only sweepstake_detail.php is necessary.

sweepstake_index.php Overview
sweepstake_detail.php Participation Page

Sweepstake Tags

Usable in both sweepstake_index.php and sweepstake_detail.php.

<!--FEEDBACK//--> Will be replaced with success and error messages, when applicable.
<!--SWEEPSTAKE_TITLE//--> Will be replaced with the title of the sweepstake.
<!--SWEEPSTAKE_OPENER//--> Will be replaces with the teaser text of the sweepstake.
<!--SWEEPSTAKE_DETAIL//--> Will be replaces with the detail text of the sweepstake.
<!--SWEEPSTAKE_PICTURE//--> Will be replaced with the URL for the sweepstake image.

Sweepstake Index

The participation page for sweepstakes is defined in sweepstake_index.php. It displays all sweepstakes defined in eyepin tool.

Tags usable in sweepstake_index.php

<!--SWEEPSTAKE_BEGIN:pagesize:colums//--> Defines the begin and end of a sweepstake article.
pagesize … number of sweepstakes per page (0 deactivates paging)
columns … number of columns per page
<!--SWEEPSTAKE_END//-->
<!---SWEEPSTAKE_CTR//--> Will be replaced with the URL of the detail page.
<!--SWEEPSTAKE_CTRNAME//--> Will be replaced with the name of the landing page link.
<!--SWEEPSTAKE_CUSTOM_CTR_LINK:"url"//--> A custom URL for the click through link can be defined. It is necessary, if the overview page is in an Iframe, but the detail page is not shown in this IFrame.
url … url of the custom page
<!--PAGE_FIRST//--> Will be replaced with the URL for the first page.
<!--PAGE_PREV//--> Will be replaced with the URL for the previous page.
<!--PAGE_NEXT//--> Will be replaced with the URL for the next page.
<!--PAGE_LAST//--> Will be replaced with the URL for the last page.
<!--PAGE_INDEX//--> Will be replaced with the current page number.
<!--PAGE_COUNT//--> Will be replaced with the number of pages.

Example sweepstake_index.php

<div class="container pagination">
  <!--IF:PAGE_PREV//-->
  <a href="<!--PAGE_FIRST//-->" class="page-back page-first">◀◀</a>
  <a href="<!--PAGE_PREV//-->" class="page-back">◀</a>
  <!--ENDIF:PAGE_PREV//-->
  <span class="page-current"><!--PAGE_INDEX//--> / <!--PAGE_COUNT//--></span>
  <!--IF:PAGE_NEXT//-->
  <a href="<!--PAGE_NEXT//-->" class="page-next">▶</a>
  <a href="<!--PAGE_LAST//-->" class="page-next page-last">▶▶</a>
  <!--ENDIF:PAGE_NEXT//-->
</div>

<div class="container">

  <!--IF:FEEDBACK//--><div class="feedback"><!--FEEDBACK//--></div><!--ENDIF:FEEDBACK//-->

  <div class="sweep-content">
    <!--SWEEPSTAKE_BEGIN:6:2//-->
    <div class="sweep-box">
      <!--IF:SWEEPSTAKE_PICTURE//-->
      <div class="sweep-image">
        <a href="<!--SWEEPSTAKE_CTR//-->" target="_blank">
          <img src="<!--SWEEPSTAKE_PICTURE//-->" border="0" />
        </a>
      </div>
      <!--ENDIF:SWEEPSTAKE_PICTURE//-->

      <!--IF:SWEEPSTAKE_TITLE//-->
      <h4 class="sweep-title">
        <a href="<!--SWEEPSTAKE_CTR//-->" target="_blank"><!--SWEEPSTAKE_TITLE//--></a>
      </h4>
      <!--ENDIF:SWEEPSTAKE_TITLE//-->

      <!--IF:SWEEPSTAKE_OPENER//-->
      <p class="sweep-text"><!--SWEEPSTAKE_OPENER//--></p>
      <!--ENDIF:SWEEPSTAKE_OPENER//-->

      <a class="button" href="<!--SWEEPSTAKE_CTR//-->" target="_blank"><!--SWEEPSTAKE_CTRNAME//--></a>

    </div>
    <!--SWEEPSTAKE_END//-->
  </div>

</div>

Sweepstake Detail

The participation page of a sweepstake is defined in sweepstake_detail.php.

<!--SWEEPSTAKE_FORM_BEGIN//--> Defines begin and end of the HTML-Code for the participation form. Everything between these tags will not be shown, after successful participation.
<!--SWEEPSTAKE_FORM_END//-->
<!--SWEEPSTAKE_FORM//--> Will be replaced with the sweepstake form.
<!--CUSTOM:num//--> Up to 10 custom fields can be defined (sweepstake custom fields are setup in sweepstake_config.xml).

Example sweepstake_detail.php

<div class="container">

  <!--IF:SWEEPSTAKE_PICTURE//-->
  <div class="sweep-image">
    <a href="<!--SWEEPSTAKE_CTR//-->" target="_blank">
      <img src="<!--SWEEPSTAKE_PICTURE//-->" border="0" />
    </a>
  </div>
  <!--ENDIF:SWEEPSTAKE_PICTURE//-->

  <!--IF:SWEEPSTAKE_TITLE//-->
  <h4 class="sweep-title">
    <a href="<!--SWEEPSTAKE_CTR//-->" target="_blank"><!--SWEEPSTAKE_TITLE//--></a>
  </h4>
  <!--ENDIF:SWEEPSTAKE_TITLE//-->

  <!--IF:SWEEPSTAKE_DETAIL//-->
  <p class="sweep-text"><!--SWEEPSTAKE_DETAIL//--></p>
  <!--ENDIF:SWEEPSTAKE_DETAIL//-->

  <!--IF:FEEDBACK//--><div class="feedback"><!--FEEDBACK//--></div><!--ENDIF:FEEDBACK//-->

  <!--SWEEPSTAKE_FORM_BEGIN//-->
    <div class="ep-sweep-form">
      <!--SWEEPSTAKE_FORM//-->
    </div>
  <!--SWEEPSTAKE_FORM_END//-->

</div>

Sweepstake Config XML

Sweepstake custom fields and snipplets are defined in sweepstake_config.xml.

Info: You can use customfield and snipplet options from config XML

Sweepstake CSS Classes

The following classes can be used to style generated form elements in event subscription form.

CSS Class used for
Layout:  
.form_item_template_1 wrapper table of a vertical element
.form_item_template_3 wrapper table of a horizontal element
.title container of headline and title of fields
.text container of text and fields
.col column of table
Form elements:
.feld form all input fields
.mod_formitem_field single line text input (not address data field)
.mod_formitem_textarea multi line text input
.mod_formitem_select dropdown input
.mod_formitem_textarea multi line text input
.mod_formitem_option container of radio/checkbox
.ep-radio-container container of radio input
.ep-checkbox-container container of checkbox input
.ep-checkbox-single container of single checkbox input
.mod_form_button form button
.mod_formitem_title title of input fields
.mod_formitem_description desctiption text for fields
.mod_formitem_text text elements
.ep-file-upload file input field
.ep-label label of radio/checkbox
.ep-conditions container of conditions checkbox
.gallery container of gallery
.readonly disabled input
Prices:
.ep-sweepstake-price container of one selectable price
.ep-sweepstake-price-select container of radio
.ep-sweepstake-price-picture container of price picture
.ep-sweepstake-price-title container of price title
.ep-sweepstake-price-description container of price description
Für Rückfragen stehen wir Ihnen jederzeit gerne unter support@eyepin.com zur Verfügung.