Newzware E-Pass Installation
The Newzware parameter EPASS_ENABLED must be defined and set to "Y". This will be set by an ICANON engineer prior to installation.
The following is the code snippet that is inserted directly after the document's head tag for WEB applications. The <newzware server> should be
replaced with the newzware server's domain name where the E-Pass application is installed. The /site/ should be replaced with the correct site name, which
will be provided by an ICANON engineer. Customized style sheets may also be uploaded via the SSM Admin Console and included here. See Customizing under the E-Pass menu
for more information about customizing the E-Pass module. If sites desire to customize the login, purchase and registration panels, CSS classes can be given to
the customized HTML elements, as long as those classes are included in a style sheet included on the page. The Administrator can then load the necessary CSS
depending on the device/browser. The included styles should be loaded before the below statements are included.
<!-- START NEWZWARE INSERT -->
<noscript><meta http-equiv='REFRESH' content='0;url=https://<newzware server>/e-pass/site/nojavascript.jsp?page=undefined'></noscript>
<script type="text/javascript" src="https://<newzware server >/e-pass/site/js/config.js"></script>
<script type="text/javascript" src="https://<newzware server >/e-pass/site/js/site.js"></script>
<script type="text/javascript" src="https://<newzware server >/newzlib/js/jquery/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="https://<newzware server >/newzlib/js/jquery/jquery-ui-themes-1.8.18/js/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="https://<newzware server >/newzlib/js/jquery/jquery-ui-themes-1.8.18/js/jquery-ui.min.js"></script>
<script type='text/javascript'>var nwJQuery = jQuery.noConflict();</script>
<script type="text/javascript" src="https://<newzware server>/e-pass/common/js/e-pass.js"></script>
<script type="text/javascript">newzware_epassInit();</script>
<!-- END NEWZWARE INSERT -->
Mobile applications have their own javascript site file by default that condenses the arrangement of the fields and elements for presentation on a mobile device.
Notice the site-mobile.js in the below include statements. The below may NOT be necessary if the login, registration and purchase panels are customized with a
responsive design. This is recommended for sites that do not have HTML/CSS programmers and desire a mobile presentation for the E-Pass pop-ups.
<!-- START NEWZWARE INSERT -->
<noscript><meta http-equiv='REFRESH' content='0;url=https://<newzware server>/e-pass/site/nojavascript.jsp?page=undefined'></noscript>
<script type="text/javascript" src="https://<newzware server >/e-pass/site/js/config.js"></script>
<script type="text/javascript" src="https://<newzware server >/e-pass/site/js/site-mobile.js"></script>
<script type="text/javascript" src="https://<newzware server >/newzlib/js/jquery/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="https://<newzware server >/newzlib/js/jquery/jquery-ui-themes-1.8.18/js/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="https://<newzware server >/newzlib/js/jquery/jquery-ui-themes-1.8.18/js/jquery-ui.min.js"></script>
<script type='text/javascript'>var nwJQuery = jQuery.noConflict();</script>
<script type="text/javascript" src="https://<newzware server>/e-pass/common/js/e-pass.js"></script>
<script type="text/javascript">newzware_epassInit();</script>
<!-- END NEWZWARE INSERT -->
There are two method of protecting content.
1) Place the protected content into a div element and set the display attribute to none. Give that div element an id and set the nwContentId in the E-Pass configuration file
to that id. When a user is authenticated, that element will be displayed. This method is not 100% safe guarded in its protection of your content, since the content is already loaded in
the page and can be seen in the document's view source.
2) Set the nwContentCallback variable to a call back method in your own javascript that will load and display the contents. This can be any method name, but must be defined
in the document's javascript. An example of this is as follows: nwContentCallback="displayContent()" . Once the user is authenticated, the displayContent() javascript method is called.
The displayContent() method would then load the protected content via AJAX and place it correctly in the document. This method is 100% secure, as the protected content is only
loaded into the document upon a successful authentication. The drawback to this method is it requires some technical expertise to write the javascript function.
Each site that installs the Newzware E-Pass module can change settings in the site's configuration file to change the behavior of the E-Pass module. Changing the configuration file
can be done via the SSM Admin Console. The following are some of the different javascript variables that can be modified to control E-Pass behavior.
All variables can be updated in the config file or set after the config.js is included.
Javascript Variable Name | Description |
---|---|
nwUserCkSubscripDays | Flag to indicate to use the subscription end date for the cookie expiration. Possible values: Y or N. Default is Y. |
nwuserCkDefaultDays | Default days when no term subscription is found or nwUserCkSubscripDays is N. Possible values: Any integer. Default is 1. |
nwMustRegister | Users must register to view content, whether metered or not. Possible Values: Y or N. Default is Y. |
nwContentId | The ID of the content to be displayed upon authentication. Default id is "protectedcontent". |
nwContentCallback | If a callback is desired after authentication, define the function here. Eg. "mycallback()" . The callback function must be defined in the current page. Default: No callback (blank). |
nwPasswordLength | The minimum length of an entered password for the registration process. Default is 6. |
nwDoNonSubCheck | Check for an existing Newzware account affiliated with the email address entered at registration. If an account is found, the user is stopped and must enter a different email address or register as a subscriber using their existing account number. Possible Values: Y or N. Default is Y. |
nwECopyCreditAmts | The available money blocks for E-Wallet as a comma delimited string of text values. Default is 5.00,10.00,15.00,20.00,50.00,100.00 |
nwReauthTimeMin | The amount of time to re-authenticate a user already logged in. Default is 15 minutes. |
nwDefaultPurchasePanel | The purchase dialogs default panel to be open when shown. From the top to bottom, the index starts at 0. Default is -1, no open panel. |
nwRemoveCksOnLogout | When logging off, remove all the cookies to force the user to log back in when re-visiting a protected page. Possible values are Y and N. Default is N. |
nwAutoLoginForSessionLogout | If a previous session is found, allow the user to click the Account link and automatically log into the SSM account area to log off existing sessions. Possible values are Y and N. Default is N. |
nwShowLogout | Show the logout button at the top left when a user successfully logs into the E-Pass. Possible values are Y and N. Default is Y. |
nwShowMeterMessage | Shows the meter message if metering is enabled. Possible values are Y and N. Default is N. |
nwMeterThreshold | If metering enabled, the amount of page views before requiring authentication. Possible Values: Any integer. Default is 5. |
nwMeterBoxOpenThreshold | If metering enabled, the number used to start to display the metering box. If nwMeterThreshold is 5 and the nwMeterBoxOpenThreshold is 2, the meter box will begin to show after 3 views. |
nwMeterDefaultDay | If metering enabled, the amount of days to keep meter. Possible Values: Any integer. Default 30. |
nwMeterBoxHTML | The meter message HTML if metering is enabled. The _X_ in the default HTML is substituted with the remaining views that are left. |
nwJQueryDialogClass | Gives the JQuery dialog pop up a custom class instead of using the default. |
nwJQueryEffect | Sets the effect for all the showing of the panels in the E-Pass dialog. Effects can be found in the JQuery UI documentation. |
nwVerifyEmail | If set to 'Y', users will not be authorized until the email is validated. An email is sent containing an activation link. The user's account will be in a Pending General state until the account is activated. Pending General accounts will not be authorized. |
nwValidateEmailMessage | The message to display to the user indicating that the email on the account has not been verified (nwVerifyEmail='Y'). |
Newzware E-Pass Rate Configuration
The image below explains the setup of the rate that is used with the E-Pass module.
Day Pass
When purchasing a Day Pass, the subscriber will have an INACTIVE subscription. The purchase amount will be determined by the day of the purchase. The account will be debited for that amount and then credited back the amount when the credit card transaction is closed (Easy Pay Closed). A record is created in Newzware that contains the date of the transaction, so subsequent visits will automatically be authorized. The net result of this transaction is zero, with an adjustment and payment posted to the account for that day. A Day Pass allows a subscriber to have another term subscription for that edition, while permitting additional day views. For example, a weekend print subscriber can then read the online content during the week.
E-Wallet
An E-Wallet purchase consists of a block of money (credit) that is posted to the subscriber account. Each day the user views, will deduct that day's daily rate amount from the subscriber balance. An E-Wallet is an ACTIVE subscription and subscribers CANNOT have another subscription to that edition.
Troubleshooting/FAQ
(Q) What if I receive a syntax error when page is loading?
(A) The most common reason for a syntax error during page load is a missing element. When NO callback is defined, an element with an id of the nwContentId must be defined in the page.
(Q) When purchasing a Day Pass or E-Copy subscription, I receive an error from within the SSM about an EC rate?
(A) For Day Passes and E-Copy subscriptions, a retail rate with the delivery method of EC must be defined in the Newzware retail rate table.