I found that Article Manager was not working with Simple Template System 1.9 and higher with the Header Tags Controller installed. To get the HTC and STS to work I stated in a
previous post that all that was needed was to disable the HTC code in /catalog/includes/application_top.php, since STS has HTC support built already. Here's what I actually did to make everything play well together:
/includes/application_top.php
AM specifies to comment out the following line if HTC installed:
require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
Line is left intact.
HTC adds the following code:
// BOF: WebMakers.com Added: Header Tags Controller v1.0
require(DIR_WS_FUNCTIONS . 'header_tags.php');
// Clean out HTML comments from ALT tags etc.
require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE
// EOF: WebMakers.com Added: Header Tags Controller v1.0
Comment out or delete this section. STS has support for HTC in sts_display_output.php.
/catalog/includes/article_header_tags.php
Added the following line to the end of the file, before the closing ?> tag:
// flag to determine whether to use custom tags or article header tags with STS
$use_ah_tags = 'true';
/catalog/article*.php
Comment out or delete the HTC <?php ?> code blocks immediately above and below the
<title><?php echo TITLE ?></title>
line.
Changed the code between <!-- header //--> and <!-- header_eof //--> to the following:
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php');
// Moved header tag call to here to facilitate STS blocks
if ( file_exists(DIR_WS_INCLUDES . 'article_header_tags.php') ) {
require(DIR_WS_INCLUDES . 'article_header_tags.php');
}
?>
<!-- header_eof //-->
/includes/sts_display_output.php
Lines 149-167 (stock file) are HTC support code.
Changed the code to the following:
// STS: ADD: Support for WebMakers.com's Header Tag Controller contribution
// BOF: WebMakers.com Changed: Header Tag Controller v1.0
// Replaced by header_tags.php
// Modified to work with Article Manager (which uses custom headers)
if ($use_ah_tags == 'true') {
// require(DIR_WS_INCLUDES . 'article_header_tags.php');
// don't process HTC - use headertags from article_header_tags
} else {
// Capture the output
require(STS_START_CAPTURE);
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
require_once(DIR_WS_FUNCTIONS . 'header_tags.php');
require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
echo "<title>" . TITLE . "</title>";
}
$sts_block_name = 'headertags';
require(STS_STOP_CAPTURE);
}
// EOF: WebMakers.com Changed: Header Tag Controller v1.0
// STS: EOADD: Support for WebMakers.com's Header Tag Controller contribution
-C