HomeInstallation and Upgrade ManualHelpSpot 4 - Installation & SetupHelpSpot 4 Portal Template Changes

15. HelpSpot 4 Portal Template Changes

Portal Template Changes

HelpSpot 4 contains only very minor template changes from Version 3.

As of HelpSpot 4.7.2+

request.tpl.php

These two code blocks can be included to allow CC and Subject line fields to appear.

To update your request.tpl.php file, add these lines below the sEmail field:

<?php if ($this->hd_allowCc): ?>
<p><label for="sCC" class="datalabel"><?php echo lg_portal_req_cc_email ?></label><br />
<?php echo $this->helper->showError('sCC','<br />') ?>
<input type="text" name="sCC" size="40" maxlength="250" value="<?php echo $this->request_sCC ?>" />
</p>
<?php endif; ?>

To update your request.tpl.php file to add the Subject Line field add these lines below this div.

Find:

<div class="forumoption"><?php echo lg_portal_req_detailsheader ?></div>

Below add

<?php if ($this->hd_allowSubject): ?>
<p><label for="sCC" class="datalabel"><?php echo lg_portal_req_subject ?></label><br />
<?php echo $this->helper->showError('sTitle','<br />') ?>
<input type="text" name="sTitle" size="40" maxlength="250" value="<?php echo $this->request_sTitle ?>" />
</p>
<?php endif; ?>

js.tpl.php

Find this line:

var password_confirm = $F('new_password_confirm');

Add this below:

var _token = $F('_token');

Find this line:

 parameters: {password: password_new},

Replace that line with this:

parameters: {password: password_new, _token: _token},

loginbar.tpl.php

Find this line:

<form onsubmit="return false;">

Below add:

<input type="hidden" name="_token" value="<?php echo $_SESSION['token']; ?>" id="_token">

As of HelpSpot 4.6+

js.tpl.php

Javascript is no longer loaded from a versioned directory.

To update your js.tpl.php file, find the following:

document.write('<script type="text/javascript" src="<?php echo $this->cf_primaryurl ?>/static_<?php echo $this->cf_version ?>/js/hs-js-combined-portal.php"></script>');

and update to

document.write('<script type="text/javascript" src="<?php echo $this->cf_primaryurl.elixir('js/helpspot.portal.js') ?>"></script>');

css.tpl.php

CSS is no longer loaded from a versioned directory.

To update your css.tpl.php file, find the following:

@import "<?php echo $this->cf_primaryurl ?>/static_<?php echo $this->cf_version ?>/js/jscal2/css/jscal2.css";

And update it to the following:

@import "<?php echo $this->cf_primaryurl ?>/static/js/jscal2/css/jscal2.css";

css.grey.tpl.php

CSS is no longer loaded from a versioned directory.

To update your  css.grey.tpl.php file, find the following:

@import "<?php echo $this->cf_primaryurl ?>/static_<?php echo $this->cf_version ?>/js/jscal2/css/jscal2.css";

And update it to the following:

@import "<?php echo $this->cf_primaryurl ?>/static/js/jscal2/css/jscal2.css";

css.blue.tpl.php

CSS is no longer loaded from a versioned directory.

To update your  css.blue.tpl.php file, find the following:

@import "<?php echo $this->cf_primaryurl ?>/static_<?php echo $this->cf_version ?>/js/jscal2/css/jscal2.css";

And update it to the following:

@import "<?php echo $this->cf_primaryurl ?>/static/js/jscal2/css/jscal2.css";

As of HelpSpot 4+

captcha.tpl.php

The largest change is that is uses a newer reCAPTCHA, which results in some changes to the helpspot/templates/captcha.tpl.php file.

The new captcha.tpl.php file is as follows:

<?php if($this->hd_useCaptcha == 1): ?>


<p><label for="captcha" class="datalabel required"><?php echo lg_portal_captcha ?> - </label><b class="captcha_label"><?php echo $this->helper->encodeText($_SESSION['portal_captcha']) ?></b><br />
<?php echo $this->helper->showError('captcha','<br />') ?>
<input type="text" name="captcha" size="15" maxlength="250" value="" />
</p>

<?php elseif($this->hd_useCaptcha == 2): ?>
<?php echo $this->helper->reCaptcha( $this->hd_reCAPTCHALang ); ?>
<?php /* <p><label for="recaptcha_response_field" class="datalabel required"><?php echo lg_portal_recaptcha ?></label> - <a href="javascript:Recaptcha.reload();"><?php echo lg_portal_recaptcha_changewords ?></a><br />
<?php echo $this->helper->showError('recaptcha','<br />') ?>
<?php echo $this->helper->reCaptcha(); ?>
</p> */?>
<?php endif; ?>

forums.feed.tpl.php

One other minor change is that the Forums XML feed now assumes the UTF-8 character set (as does all of HelpSpot as of version 4).

To update your forums.feed.tpl.php file, find the following:

<?php echo '<?xml version="1.0" encoding="UTF-8"?>

And update it to the following:

<?php echo '<?xml version="1.0" encoding="UTF-8"?>' ?>

This page was: Helpful | Not Helpful