Is output tied to specific templates?
Moderator: Thorsten
Is output tied to specific templates?
I would like to put a tag (is that the proper word?) into a different spot than in its default template. Specifically, I'd like to put "Ask question" (output of the tag {msgQuestion}) into the center column of the index page (and maybe elsewhere). However, when I put the string {msgQuestion} (which of course normally resides in index.tpl) into main.tpl, instead of it displaying "Ask Question" in the browser, it just shows the name of the tag, i.e. the text string "{msgQuestion}" (without the quotes, of course).
Is there some limitation in the build of PMF that forces one to only use tags in the originally purposed templates? I had a similar problem when I tried to put the ask.tpl form into index.tpl, which leads me to ask. Or am I missing something here? I know next to nothing about PHP, by the way, so I hope this doesn't call for significant hacking.
I'm running PMF locally on XAMPP under WinXP.
TIA,
Ed
Is there some limitation in the build of PMF that forces one to only use tags in the originally purposed templates? I had a similar problem when I tried to put the ask.tpl form into index.tpl, which leads me to ask. Or am I missing something here? I know next to nothing about PHP, by the way, so I hope this doesn't call for significant hacking.
I'm running PMF locally on XAMPP under WinXP.
TIA,
Ed
Hi,
this is possible.
If you add e.g. a {testlink} in index.tpl you have to set this variable in index.php:
bye
Thorsten
this is possible.
If you add e.g. a {testlink} in index.tpl you have to set this variable in index.php:
Code: Select all
$tpl->processTemplate('index', array(
'textlink' => 'Textlink'));Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Does it matter where?
Thanks for the quick reply, Thorsten. (By the way, PMF looks to me to be a wonderful piece of work. If I can make it do what I want to do, I'll be visiting your Amazon wishlist, if only to buy you some coffee filters -- I think that's what they are, though I don't speak German...!).
One question, though: does it matter where I set this variable in the index.php file?
Ed
One question, though: does it matter where I set this variable in the index.php file?
Ed
Re: Does it matter where?
Hi Ed,
bye
Thorsten
just look for the line with $tpl->processTemplate and add your new template variable there.skysaw wrote:One question, though: does it matter where I set this variable in the index.php file?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Tried, but failed
Okay, I have perhaps done something wrong. In index.php, I put in your snippet as follows (I've included the preceding and following lines to show placement I guessed might be right):
In main.tpl, I placed the following:
Still, the output is the text string "{msgQuestion}" (not "Ask question").
What am I doing wrong?
Ed
Code: Select all
// get main template, set main variables
$tpl->processTemplate ("index", array_merge($main_template_vars, $links_template_vars, $debug_template_vars));
// SET HACKED VARIABLES
$tpl->processTemplate('index', array('msgQuestion' => 'msgQuestion'));
// include requested PHP file
require_once($inc_php);Code: Select all
<p>{msgQuestion}</p>What am I doing wrong?
Ed
Hi,
sorry, that was a little bit confusing by myself:
You have to use the main variable array:
bye
Thorsten
sorry, that was a little bit confusing by myself:
You have to use the main variable array:
Code: Select all
$main_template_vars = array(
"title" => $PMF_CONF["title"].$title,
'msgQuestion' => 'msgQuestion', // <- your code for example
"header" => $PMF_CONF["title"],
.....Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hmm. Still not working.
I've tried just putting your latest code into the main variable array. I've tried substituting double quotes for the single quotes. I've tried setting it up as $PMF_LANG[...]. I've tried using it in combination with your originally suggested entry in $tpl->processTemplate. Nothing's working, I'm still seeing the same. (And yes, I've cleared my cache, though I'm working in Firefox, where I find that's not necessary.)
I am sad.
Ed
I am sad.
Ed
Hi,
can you please post your index.php and index.tpl file here?
bye
Thorsten
can you please post your index.php and index.tpl file here?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
index.php and index.tpl
Here's index.php (without the changes you suggested; that is, pretty much out-of-the-box):
Here's index.tpl (so far, including the table gunk I referred to in the other topic, re incorporating PMF in a table-based site):
Any help, greatly appreciated.
Ed
Code: Select all
<?php
/**
* $Id: index.php,v 1.17.2.23 2005/12/18 18:02:36 thorstenr Exp $
*
* This is the main public frontend page of phpMyFAQ. It detects the browser's
* language, gets all cookie, post and get informations and includes the
* templates we need and set all internal variables to the template variables.
* That's all.
*
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @author Lars Tiedemann <larstiedemann@yahoo.de>
* @since 2001-02-12
* @copyright: (c) 2001-2005 phpMyFAQ Team
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*/
require_once('inc/functions.php');
require_once('inc/init.php');
define('IS_VALID_PHPMYFAQ', null);
PMF_Init::cleanRequest();
// Just for security reasons - thanks to Johannes for the hint
$_SERVER['PHP_SELF'] = strtr(rawurlencode($_SERVER['PHP_SELF']),array( "%2F"=>"/", "%257E"=>"%7E"));
$_SERVER['HTTP_USER_AGENT'] = urlencode($_SERVER['HTTP_USER_AGENT']);
// check if config.php and data.php exist -> if not, redirect to installer
if (!file_exists('inc/config.php') || !file_exists('inc/data.php')) {
header('Location: http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF'])."/install/installer.php");
exit();
}
// connect to the database server, define the prefix and connect
require_once("inc/data.php");
require_once("inc/db.php");
define("SQLPREFIX", $DB["prefix"]);
$db = db::db_select($DB["type"]);
$db->connect($DB["server"], $DB["user"], $DB["password"], $DB["db"]);
// get configuration, constants, main functions, template parser, category class, IDNA class
require_once("inc/config.php");
require_once("inc/constants.php");
require_once("inc/parser.php");
require_once("inc/category.php");
require_once("inc/idna_convert.class.php");
$IDN = new idna_convert;
// connect to LDAP server, when LDAP support is enabled
if (isset($PMF_CONF["ldap_support"]) && $PMF_CONF["ldap_support"] == true && file_exists('inc/dataldap.php')) {
require_once('inc/dataldap.php');
require_once('inc/ldap.php');
$ldap = new LDAP($PMF_LDAP['ldap_server'], $PMF_LDAP['ldap_port'], $PMF_LDAP['ldap_base'], $PMF_LDAP['ldap_user'], $PMF_LDAP['ldap_password']);
} else {
$ldap = null;
}
// get language (default: english)
$pmf = new PMF_Init();
$LANGCODE = $pmf->setLanguage((isset($PMF_CONF['detection']) ? true : false), $PMF_CONF['language']);
if (isset($LANGCODE) && isset($languageCodes[strtoupper($LANGCODE)])) {
require_once("lang/language_".$LANGCODE.".php");
} else {
$LANGCODE = "en";
require_once ("lang/language_en.php");
}
// use mbstring extension if available
$valid_mb_strings = array('ja', 'en');
if (function_exists('mb_language') && in_array($PMF_LANG['metaLanguage'], $valid_mb_strings)) {
mb_language($PMF_LANG['metaLanguage']);
mb_internal_encoding($PMF_LANG['metaCharset']);
}
// found a session ID in _GET or _COOKIE?
if (!isset($_GET['sid']) || !isset($_COOKIE['pmf_sid'])) {
Tracking('new_session', 0);
setcookie('pmf_sid', $sid, time() + 3600);
} else {
if (isset($_COOKIE['pmf_sid']) && is_numeric($_COOKIE['pmf_sid'])) {
CheckSID((int)$_COOKIE['pmf_sid'], getenv('REMOTE_ADDR'));
} else {
CheckSID((int)$_GET['sid'], getenv('REMOTE_ADDR'));
}
}
// is user tracking activated?
if (isset($PMF_CONF["tracking"])) {
if (isset($sid)) {
if (!isset($_COOKIE["pmf_sid"])) {
$sids = 'sid='.(int)$sid.'&lang='.$LANGCODE.'&';
} else {
$sids = '';
}
} elseif (isset($_GET['sid']) || isset($_COOKIE['pmf_sid'])) {
if (!isset($_COOKIE['pmf_sid'])) {
$sids = 'sid='.(int)$_GET['sid'].'&lang='.$LANGCODE.'&';
} else {
$sids = '';
}
}
} else {
if (!setcookie('pmf_lang', $LANGCODE, time()+3600)) {
$sids = 'lang='.$LANGCODE.'&';
} else {
$sids = '';
}
}
// found a article language?
if (isset($_GET["artlang"]) && strlen($_GET["artlang"]) <= 2 && !preg_match("=/=", $_GET["artlang"])) {
$lang = $_GET["artlang"];
} else {
$lang = $LANGCODE;
}
// found a record ID?
if (isset($_REQUEST['id']) && is_numeric($_REQUEST['id']) === true) {
$id = $_REQUEST['id'];
$title = ' - '.stripslashes(getThema($id, $lang));
$keywords = ' '.stripslashes(getKeywords($id, $lang));
} else {
$id = '';
$title = ' - powered by phpMyFAQ '.$PMF_CONF['version'];
$keywords = '';
}
// found a category?
if (isset($_GET["cat"])) {
$cat = $_GET["cat"];
} else {
$cat = 0;
}
$tree = new Category($LANGCODE);
$cat_from_id = -1;
if (is_numeric($id) && $id > 0) {
$cat_from_id = $tree->getCategoryIdFromArticle($id);
}
if ($cat_from_id != -1 && $cat == 0) {
$cat = $cat_from_id;
}
$tree->transform(0);
$tree->collapseAll();
if ($cat != 0) {
$tree->expandTo($cat);
}
if (isset($cat) && $cat != 0 && $id == '' && isset($tree->categoryName[$cat])) {
$title = ' - '.$tree->categoryName[$cat]['name'];
}
// found an action request?
if (isset($_REQUEST["action"]) && !preg_match("=/=", $_REQUEST["action"]) && isset($allowedVariables[$_REQUEST["action"]])) {
$action = $_REQUEST["action"];
} else {
$action = "main";
}
/* select the template for the requested page */
if ($action != "main") {
$inc_tpl = "template/".trim($action).".tpl";
$inc_php = $action.".php";
$writeLangAdress = $_SERVER["PHP_SELF"]."?".str_replace("&", "&",$_SERVER["QUERY_STRING"]);
} else {
$inc_tpl = "template/main.tpl";
$inc_php = "main.php";
$writeLangAdress = $_SERVER["PHP_SELF"]."?".$sids;
}
// load templates
$tpl = new phpmyfaqTemplate (array(
"index" => 'template/index.tpl',
"writeContent" => $inc_tpl));
$main_template_vars = array(
"title" => $PMF_CONF["title"].$title,
"header" => $PMF_CONF["title"],
"metaDescription" => $PMF_CONF["metaDescription"],
"metaKeywords" => $PMF_CONF["metaKeywords"].$keywords,
"metaPublisher" => $PMF_CONF["metaPublisher"],
"metaLanguage" => $PMF_LANG["metaLanguage"],
"metaCharset" => $PMF_LANG["metaCharset"],
"dir" => $PMF_LANG["dir"],
"msgCategory" => $PMF_LANG["msgCategory"],
"showCategories" => $tree->printCategories($cat),
"searchBox" => $PMF_LANG["msgSearch"],
"languageBox" => $PMF_LANG["msgLangaugeSubmit"],
"writeLangAdress" => $writeLangAdress,
"switchLanguages" => selectLanguages($LANGCODE),
"userOnline" => userOnline().$PMF_LANG["msgUserOnline"],
'writeTopTenHeader' => $PMF_LANG['msgTopTen'],
'writeTopTenRow' => generateTopTen($LANGCODE),
'writeNewestHeader' => $PMF_LANG['msgLatestArticles'],
'writeNewestRow' => generateFiveNewest($LANGCODE),
'copyright' => 'powered by <a href="http://www.phpmyfaq.de" target="_blank">phpMyFAQ</a> '.$PMF_CONF["version"]);
if (isset($PMF_CONF["mod_rewrite"]) && $PMF_CONF["mod_rewrite"] == "TRUE") {
$links_template_vars = array(
"faqHome" => '',
"msgSearch" => '<a href="search.html">'.$PMF_LANG["msgSearch"].'</a>',
"msgAddContent" => '<a href="addcontent.html">'.$PMF_LANG["msgAddContent"].'</a>',
"msgQuestion" => '<a href="ask.html">'.$PMF_LANG["msgQuestion"].'</a>',
"msgOpenQuestions" => '<a href="open.html">'.$PMF_LANG["msgOpenQuestions"].'</a>',
"msgHelp" => '<a href="help.html">'.$PMF_LANG["msgHelp"].'</a>',
"msgContact" => '<a href="contact.html">'.$PMF_LANG["msgContact"].'</a>',
"backToHome" => '<a href="index.html">'.$PMF_LANG["msgHome"].'</a>',
"allCategories" => '<a href="showcat.html">'.$PMF_LANG["msgShowAllCategories"].'</a>',
"writeSendAdress" => 'search.html',
'showSitemap' => '<a href="sitemap-A_'.$lang.'.html">'.$PMF_LANG['msgSitemap'].'</a>');
} else {
$links_template_vars = array(
"faqHome" => $_SERVER['PHP_SELF'],
"msgSearch" => '<a href="'.$_SERVER["PHP_SELF"].'?'.$sids.'action=search">'.$PMF_LANG["msgSearch"].'</a>',
"msgAddContent" => '<a href="'.$_SERVER["PHP_SELF"].'?'.$sids.'action=add">'.$PMF_LANG["msgAddContent"].'</a>',
"msgQuestion" => '<a href="'.$_SERVER["PHP_SELF"].'?'.$sids.'action=ask">'.$PMF_LANG["msgQuestion"].'</a>',
"msgOpenQuestions" => '<a href="'.$_SERVER["PHP_SELF"].'?'.$sids.'action=open">'.$PMF_LANG["msgOpenQuestions"].'</a>',
"msgHelp" => '<a href="'.$_SERVER["PHP_SELF"].'?'.$sids.'action=help">'.$PMF_LANG["msgHelp"].'</a>',
"msgContact" => '<a href="'.$_SERVER["PHP_SELF"].'?'.$sids.'action=contact">'.$PMF_LANG["msgContact"].'</a>',
"allCategories" => '<a href="'.$_SERVER["PHP_SELF"].'?'.$sids.'action=show">'.$PMF_LANG["msgShowAllCategories"].'</a>',
"backToHome" => '<a href="'.$_SERVER["PHP_SELF"].'?'.$sids.'">'.$PMF_LANG["msgHome"].'</a>',
"writeSendAdress" => $_SERVER["PHP_SELF"]."?".$sids."action=search",
'showSitemap' => '<a href="'.$_SERVER["PHP_SELF"].'?'.$sids.'action=sitemap">'.$PMF_LANG['msgSitemap'].'</a>');
}
if (DEBUG) {
$debug_template_vars = array('debugMessages' => '<p>DEBUG INFORMATION:<br />'.$db->sqllog().'</p>');
} else {
// send headers and print template
@header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
@header("Cache-Control: no-store, no-cache, must-revalidate");
@header("Cache-Control: post-check=0, pre-check=0", false);
@header("Pragma: no-cache");
@header("Content-type: text/html; charset=".$PMF_LANG["metaCharset"]);
@header("Vary: Negotiate,Accept");
$debug_template_vars = array('debugMessages' => '');
}
// get main template, set main variables
$tpl->processTemplate ("index", array_merge($main_template_vars, $links_template_vars, $debug_template_vars));
// include requested PHP file
require_once($inc_php);
if ('xml' != $action) {
$tpl->printTemplate();
}
// disconnect from database
$db->dbclose();
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{metaLanguage}" lang="{metaLanguage}">
<head>
<title>Alice Orr Seminars : {title}</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset={metaCharset}" />
<meta name="title" content="Alice Orr Seminars : {title}" />
<meta name="description" content="{metaDescription}" />
<meta name="keywords" content="{metaKeywords}" />
<meta name="author" content="{metaPublisher}" />
<meta name="publisher" content="{metaPublisher}" />
<meta name="copyright" content="(c) 2006 and beyond Alice Orr" />
<meta name="Content-Language" content="{metaCharset}" />
<meta name="robots" content="INDEX, FOLLOW" />
<meta name="revisit-after" content="7 days" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<style type="text/css" media="screen">
/*<![CDATA[*/
<!--
@import url(template/style.css);
@import url(template/colors.css);
-->
/*]]>*/
</style>
<style type="text/css" media="print">
/*<![CDATA[*/
<!--
@import "template/print.css";
-->
/*]]>*/
</style>
<script type="text/javascript" src="inc/functions.js"></script>
<link rel="shortcut icon" href="template/favicon.ico" type="image/x-icon" />
<link rel="icon" href="template/favicon.ico" type="image/x-icon" />
<link rel="alternate" title="News RSS Feed" type="application/rss+xml" href="feed/news/rss.php" />
</head>
<body dir="{dir}">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<!-- Begin "banner" -->
<tr>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td bgcolor="#990000"><img src="images/spacer.gif" alt="" width="100%" height="5" align="left"></td>
</tr>
</table>
</tr>
<tr>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="3" width="1" height="100%" align="left" bgcolor="#990000">
<img src="images/spacer.gif" alt="" width="1" height="100%" align="left">
</td>
<td height="40" bgcolor="#990000" valign="top">
<img src="images/spacer.gif" alt="" width="4" height="29" align="left">
<div id="bannerLeft">
GET PUBLISHED NOW!
</div>
</td>
<td rowspan="3" width="1" height="100%" align="right" bgcolor="#990000">
<img src="images/spacer.gif" alt="" width="1" height="100%" align="right">
</td>
<td rowspan="3" width="126" height="165" bgcolor="#990000">
<table border="0" cellpadding="0" cellspacing="0" summary="">
<tr>
<td width="126" height="165">
<img src="images/aliceorrphoto2.jpg" alt="Alice Orr" border="0" width="126" height="165" align="center">
</td>
</tr>
</table>
</td>
<td rowspan="3" width="1" height="100%" align="right" bgcolor="#990000">
<img src="images/spacer.gif" alt="" width="1" height="100%" align="right">
</td>
</tr>
<tr>
<td height="85" bgcolor="#FFCC66">
<div id="bannerCenter">
Alice Orr
</div>
</td>
</tr>
<tr>
<td height="40" bgcolor="#990000" valign="bottom">
<img src="images/spacer.gif" alt="" width="4" height="29" align="left">
<div id="bannerRight">
{header}
</div>
</td>
</tr>
</table>
</tr>
<tr>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td bgcolor="#990000"><img src="images/spacer.gif" alt="" width="100%" height="5" align="left"></td>
</tr>
</table>
</tr>
</table>
<!-- End "banner" -->
<div id="wrapper1">
<div id="wrapper2">
<!-- start headers -->
<div class="header" id="header">
<h1><a title="{header}" href="{faqHome}">{header}</a></h1>
<ul>
<li>{msgContact}</li>
<li>{msgHelp}</li>
<li>{msgOpenQuestions}</li>
<li>{msgQuestion}</li>
<li>{msgAddContent}</li>
<li>{msgSearch}</li>
</ul>
</div>
<!-- end headers -->
<!-- start columns -->
<div class="columns">
<!-- start left sidebar -->
<div class="leftcolumn sidebar" id="sidebar-left">
<div class="leftpadding">
<h2 class="invisible">Navigation</h2>
<!-- start categories -->
<div class="content">
<div id="categories">
<ul>
<li class="home">{backToHome}</li>
<li>{allCategories}</li>
{showCategories}
</ul>
</div>
</div>
<!-- end categories -->
<!-- start search box -->
<div class="content">
<div id="search">
<form action="{writeSendAdress}" method="post">
<label for="suchbegriff">{searchBox} "Ask Alice"</label>
<input alt="search..." class="inputfield" type="text" name="suchbegriff" id="suchbegriff" size="18" /><br />
<input type="submit" name="submit" value="Go" class="submit" />
</form>
</div>
</div>
<!-- end search box -->
</div>
</div>
<!-- end left sidebar -->
<!-- start right sidebar -->
<div class="rightcolumn sidebar" id="sidebar-right">
<div class="rightpadding">
<div class="content">
<div id="topten">
<h3>{writeTopTenHeader}</h3>
{writeTopTenRow}
</div>
</div>
<div class="content">
<div id="latest">
<h3>{writeNewestHeader}</h3>
{writeNewestRow}
</div>
</div>
</div>
</div>
<!-- end right sidebar -->
<!-- start main content -->
<div class="centercolumn">
<div class="centerpadding">
<div class="main-content" id="main">
{writeContent}
</div>
</div>
</div>
<!-- end main content -->
</div>
<!-- end columns -->
<div class="clearing"></div>
<!-- start footer -->
<div id="footer" class="footer">
<!-- please do not remove the following line -->
<p id="copyrightnote">"Ask Alice" is {copyright}</p>
</div>
<!-- end footer -->
<!-- start debug messages -->
{debugMessages}
<!-- end debug messages -->
</div>
</div>
</body>
</html>
Ed
Hi Ed,
ouch... I should read more carful!
If you add something into main.tpl you have to add the template variable into main.php! SORRY!!!
bye
Thorsten
ouch... I should read more carful!
If you add something into main.tpl you have to add the template variable into main.php! SORRY!!!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Okay, that makes sense. (My entire understanding of PHP at the moment is based on puzzling things out logically. I really need to study this.)
I'm still not sure which of the two (?) snippets you provided goes in which of the files involved (index.php, index.tpl, main.php, main.tpl), but I'm going to try it out in various combinations tomorrow. It's almost 2 a.m. here, and I have to get up not too long from now to get my kids off to school.
As for the odd "thickening" of the table cells, I'll also look for anything you can tell me about that. It's more an aesthetic annoyance than anything else, at least at this point, but I want to figure it out. I suppose I can mess around with the styles or table/cell attributes to tweak the PMF display to look exactly like the original site display -- or just live with it -- but now my curiosity's aroused. Unfortunately, this is a bit of a rush job, so I may have to just live with it for now.
Once again, many thanks, Thorsen, for your help and for what looks to be a really nice piece of work.
Ed
I'm still not sure which of the two (?) snippets you provided goes in which of the files involved (index.php, index.tpl, main.php, main.tpl), but I'm going to try it out in various combinations tomorrow. It's almost 2 a.m. here, and I have to get up not too long from now to get my kids off to school.
As for the odd "thickening" of the table cells, I'll also look for anything you can tell me about that. It's more an aesthetic annoyance than anything else, at least at this point, but I want to figure it out. I suppose I can mess around with the styles or table/cell attributes to tweak the PMF display to look exactly like the original site display -- or just live with it -- but now my curiosity's aroused. Unfortunately, this is a bit of a rush job, so I may have to just live with it for now.
Once again, many thanks, Thorsen, for your help and for what looks to be a really nice piece of work.
Ed
Hi Ed,
bye
Thorsten
no problem. You can send me an e-mail as well for these problems.skysaw wrote:I'm still not sure which of the two (?) snippets you provided goes in which of the files involved (index.php, index.tpl, main.php, main.tpl), but I'm going to try it out in various combinations tomorrow. It's almost 2 a.m. here, and I have to get up not too long from now to get my kids off to school.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist