HomeAdmin ManualRelease NotesVersion 3.0.1 - Template Changes

48. Version 3.0.1 - Template Changes

This page describes the changes to each HelpSpot portal template. If you have an HTML editor available like Dreamweaver or BBEdit it is probably more efficient to simple use the diff tools to compare your edited documents (/custom_templates) with the new templates (/helpspot/templates/). If those tools are not available, the listings below will allow you to manually change the templates.

These changes are only needed if you have customized your portal and specifically customized the files listed below. If not, you do not need to make any adjustments.

Your portal will not work correctly until these changes have been made.

Note: If you're upgrading from versions prior to 2.6.0 (2.4.2,2.1.1,2.1.0) you will also need to apply the previous template changes as well.

These templates have changed in version 3:

css.tpl.php

Modified line 16, changed URL. Line should be:

header('Content-type: text/css'); header('Content-Disposition: inline; filename="style.css"'); ?> /* Import styles for calendar used in date/datetime custom fields */
@import "<?php echo $this->cf_primaryurl ?>/static_<?php echo $this->cf_version ?>/js/jscal2/css/jscal2.css";

Add to end of file:

.calendar_input{
	padding-right: 10px;
	padding-top: 5px;
	padding-bottom: 5px;
	position: relative;
	text-align:	bottom;
	cursor: pointer;
	padding-left: 34px;
	border: 1px solid #BBBBBB;
}

.calendar_btn{
	position: absolute;
	top: 1px;
	left: 2px;
	height: 24px;
	width: 24px;
	background: transparent url(<?php echo $this->cf_primaryurl ?>/portal/images/calendar.png) no-repeat left top;
}

.tag-block-home{
	
}

.tag-block-page{
	margin: 0px;
	padding-left: 42px;
}

.tag-block a{
	display: inline-block;
	height: 26px;
	line-height: 26px;
}

.tag-sep{
	font-size: 11px;
	color: #ccc;
}

.tag-table{
    font-size: 13px;
    width: 100%;
    margin: 15px 0 20px 0;
 	border-bottom: 1px solid #DADADA;
}

.tag-table td { 
	padding: 8px; /* not for grey design */		
}

.tag-header{
	margin-bottom: 30px;
}

#helpspot-link{
	font-size: 12px;
}

footer.tpl.php

Replace line 25 through end of file. Previously line 25 started with a <strong> tag. Should now be:

</div> <!-- End of footer div -->
</div> <!-- End of container div -->

<div id="helpspot-link">
	<?php
	/*
	You may remove this link, however we would be very appreciative if you didn't! Helping spread the word about HelpSpot
	creates a stronger community and a better product for all our customers. 
	Sincerely, 
	
	Ian Landsman 
	President, UserScape
	ian@userscape.com
	*/
	?>
	
	<strong><a href="http://www.helpspot.com">Help Desk Software</a> by HelpSpot</strong>
</div>
</body>
</html>

forums.posts.tpl.php

Add at line 61:

<?php if($this->splugin('Forums_PostTags','count',$this->get_id)): ?>
	<fieldset class="fieldset">
		<legend><b><?php echo lg_portal_tags ?></b></legend>
		<div class="tag-block tag-block-page">
			<?php foreach($this->splugin('Forums_PostTags','getTags',$this->get_id) AS $tags): ?>
				<a href="index.php?pg=tag.search&id=<?php echo $tags['xTag'] ?>">
					<?php echo $tags['sTag'] ?>
				</a> <span class="tag-sep"> / </span>
			<?php endforeach; ?>
		</div>
	</fieldset>
<br />
<?php endif; ?>

<?php if(!$this->helper->isTopicClosed($this->topic,$this->forum)): ?> <form action="index.php?pg=forums.posts&id=<?php echo $this->get_id ?>" method="post">

header.tpl.php

Replaced line 9 (meta robots tag) with:

<meta name="description" content="<?php echo $this->hd_name ?> - help desk and customer service portal" />
<?php if($this->get_page == 'request.check'): ?>
	<meta name="robots" content="noindex, nofollow">
<?php else: ?>
	<meta name="robots" content="index, follow">
<?php endif; ?>

<title><?php echo $this->pg_title ?></title>

Modified line 18, changed URL. Line should be:

<!--stylesheets-->
<link rel="stylesheet" type="text/css"  href="<?php echo $this->cf_url ?>/index.php?pg=<?php echo $this->hd_theme ?>" media="screen, projection" />

Modified & Added at line 18, changed URL & added IE stylesheet. Line should be:

<!--stylesheets-->
<link rel="stylesheet" type="text/css" href="<?php echo $this->cf_url ?>/index.php?pg=<?php echo $this->hd_theme ?>" media="screen, projection" />
<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo $this->cf_url ?>/index.php?pg=<?php echo $this->hd_theme_ie ?>" />
<![endif]-->

Modified line 23, added class attribute. Line should be:

</head>
<body onload="<?php echo $this->pg_onload ?>" class="page-<?php echo $this->get_page_css_class ?>">

home.tpl.php

Added at line 30:

><?php endif; ?>
<?php $this->helper->reset_altrow(); ?>

<?php if($this->splugin('Tags','count') > 0): //Only show tags if there are any ?>
	<table width="555" cellspacing="0" class="forumtable tag-cloud-homepage">
	<tr>
		<td>
			<h2><?php echo lg_portal_tags ?></h2>	<br />
		</td>
	</tr>
	<tr>
		<td class="tag-cloud-td">
			<div class="tag-block tag-block-home">
			<?php foreach($this->splugin('Tags','getCloud') AS $tag): ?>
				<a href="index.php?pg=tag.search&id=<?php echo $tag['xTag'] ?>"  style="font-size:<?php echo $tag['font-size'] ?>%;"><?php echo $tag['sTag'] ?></a> <span class="tag-sep"> / </span> 
			<?php endforeach; ?>
			</div>
		</td>
	</tr>
	</table>
<?php endif; ?>

<?php if($this->splugin('Forums_LatestTopics','count') > 0): //Only show most recent forum posts if there are any ?>

Modified line 44 added class name. Line should be:

<td align="right" class="forum-name">

Added at line 71:

<?php endif; ?>
<?php $this->helper->reset_altrow(); ?>

<?php if($this->splugin('KB_HelpfulPages','count') > 0): //Only show most helpful pages if there are any ?>

index.tpl.php

Added at line 24:

case "css": include $this->loadTemplate('css.tpl.php'); break;
case "css.grey":
	include $this->loadTemplate('css.grey.tpl.php');
	break;
case "css.blue":
	include $this->loadTemplate('css.blue.tpl.php');
	break;		
case "ie.css":
	include $this->loadTemplate('ie.css.tpl.php');
	break;
case "ie.css.grey":
	include $this->loadTemplate('ie.css.grey.tpl.php');
	break;
case "ie.css.blue":
	include $this->loadTemplate('ie.css.blue.tpl.php');
	break;

Added at line 77:

case "search": include $this->loadTemplate('search.tpl.php'); break;
case "tag.search":
	include $this->loadTemplate('tag.search.tpl.php');
	break;	

js.tpl.php

Replace the document.write at line 24 with:

// jscalendar/calendar-setup.js (used for date custom fields)
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>');

kb.page.tpl.php

Added at line 30:

<p> <?php echo $this->page['tPage'] ?> </p>

<?php if($this->splugin('KB_PageTags','count',$this->get_id)): ?>
	<fieldset class="fieldset">
		<legend><b><?php echo lg_portal_tags ?></b></legend>
		<div class="tag-block tag-block-page">
			<?php foreach($this->splugin('KB_PageTags','getTags',$this->get_id) AS $tags): ?>
				<a href="index.php?pg=tag.search&id=<?php echo $tags['xTag'] ?>">
					<?php echo $tags['sTag'] ?>
				</a> <span class="tag-sep"> / </span>
			<?php endforeach; ?>
		</div>
	</fieldset>
<br />
<?php endif; ?>

Modified line 37 changed variable. Line should be:

<?php foreach($this->splugin('KB_PageDownloads','getDownloads',$this->get_id) AS $download): ?>
	<li><?php echo $this->helper->mimeimg($download['sFilename']) ?> <a href="index.php?pg=file&from=2&id=<?php echo $download['xDocumentId'] ?>"><?php echo $download['sFilename'] ?></a>
<?php endforeach; ?>

request.check.tpl.php

Modified line 169 added ID. Line should be:

	<input type="text" name="id" value="" size="20" maxlength="100" tabindex="100" />
	<input type="submit" name="submit" id="accesskey-btn" value="<?php echo lg_portal_check ?>" tabindex="101" />
</p>

Added at line 197:

<?php if(isset($_GET['reset_password'])): ?>
<script type="text/javascript">
document.observe("dom:loaded", function(){
	var page_href = location.href + " ";
	if(page_href.search(/password/i) > 0){
		$("feedback_box").show();
		$("feedback_box").addClassName("feedback_box_positive");
		$("feedback_box").update("<?php echo htmlentities(lg_portal_password_reset) ?>");
	}
});
</script>
<?php endif; ?>
	
<?php include $this->loadTemplate('footer.tpl.php'); ?>

search.tpl.php

Added at line 19:

<?php include $this->loadTemplate('searchbox.tpl.php'); ?>

<?php if($this->splugin('Tags','searchCount',$this->get_q)): ?>
	<fieldset class="fieldset">
		<legend><b><?php echo lg_portal_searchtags ?></b></legend>
		<div class="tag-block tag-block-page">
			<?php foreach($this->splugin('Tags','searchTags',$this->get_q) AS $tags): ?>
				<a href="index.php?pg=tag.search&id=<?php echo $tags['xTag'] ?>">
					<?php echo $tags['sTag'] ?>
				</a> <span class="tag-sep"> / </span>
			<?php endforeach; ?>
		</div>
	</fieldset>
<br />
<?php endif; ?>

searchbox.tpl.php

Modified line 6 added ID. Line should be:

<p align="center">
	<input type="text" name="q" id="q" value="<?php echo $this->get_q ?>"> 

This page was: Helpful | Not Helpful