Not sure if this is a bug, but I am running 5.2.0 and I can't get it to override the default footer at the category level???
C
Not sure if this is a bug, but I am running 5.2.0 and I can't get it to override the default footer at the category level???
C
are you sure its not jsut loading the page from the cache?
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
okay ... i see what the problem is ... the rss feed implemented into the footer is not rendering -- the whole point of using a different footer (to implement category-specific feeds). just the raw html shows????
Last edited by CEC; 08-23-2006 at 03:28 PM.
please post your footer.htmlOriginally Posted by CEC
I use the same footer, just with a different feed, across the website.
_______________________________________________
<div align="center">
<%block_rss_feed url="http://news.google.com/news?hl=en&ned=us&q=cosmetic+dentistry&ie=UTF-8&output=rss" title="US Cosmetic Dental News" template="block.rss_feed.html" max_item="6" cache_time="86400"%>
</div>
</td>
</tr>
</div>
<br/><br/>
<div id="footer">
<p> <a href="index.php" class="footer">Home</a>
<a href="cp/" >My Account</a>
<a href="power_search.php" >Power Search</a>
<a href="add.php?cat=<%$cat%>">
<%if $cat%></a>
<a href="add.php?cat=<%$cat%>">
<%else%></a>
<a href="add.php">
<%/if%>
Add a Listing</a>
<a href="modify.php" class="footer">Update a Listing</a>
<a href="register.php" >Register</a>
Copyright © 2006</p>
<a href="/cosmetic-dentists/florida/">Florida</a>
</div>
</div>
<script language="javascript" src="<%$tpl_base%>/trackclick.js" type="text/javascript"></script>
</body>
</html>
Last edited by CEC; 08-23-2006 at 08:58 PM.
Any luck on this Doddy?
I tested and it work. Try to load the other block to test.
<%block_directory_stat%>
I also tested your rss block
<%block_rss_feed url="http://news.google.com/news?hl=en&ned=us&q=cosmetic+dentistry&ie=UTF-8&output=rss" title="US Cosmetic Dental News" template="block.rss_feed.html" max_item="6" cache_time="86400"%>
Try to set cache_time="0"
Nope, none of this is working when it is passed through the control panel.
In Firefox you can see the block code sitting there (without parsing):
<%block_directory_stat%>
Code is also evident in the footer menu itself -- even if no block is added -- when added through the control panel:
Home My Account Power Search <%if $cat%> <%else%> <%/if%> Add a Listing Update a Listing Register
The standard HTML comes through and works fine.
Last edited by CEC; 08-25-2006 at 03:21 PM.
That is weird. Please submit a ticket and provide us your ftp account.
Thanks. I have submitted a ticket.
For others interested in this, here's the feedback and the current work around from Zubby:
"Unfortunately current indexu version do not parse footer/header that override from admin panel. Perhaps I'll add this in the next version."
The hack he provided is as follows (which I haven't had a chance to try quite yet):
Modify /browse.php,
Change :
$header = $category_obj->GetHeader($cat);
$footer = $category_obj->GetFooter($cat);
To :
$header = $category_obj->GetHeader($cat);
$footer = $category_obj->GetFooter($cat);
if ($footer) {
$tpl = new template;
$template_string = $footer;
$tpl->assign('cat', $cat);
$footer = $tpl->fetch('var:template_string');
}
Modify /lib/template.lib.php,
Change :
function fetch($file, $cache_id = null, $compile_id = null, $display = false) {
if (strpos($file, 'var:template_string') === FALSE) {
$this->_load_block_function($file);
}
return parent::fetch($file, $cache_id, $compile_id, $display);
}
To :
function fetch($file, $cache_id = null, $compile_id = null, $display = false) {
if (strpos($file, 'var:template_string') === FALSE) {
$this->_load_block_function($file);
}
else {
global $base_path, $template_string;
preg_match_all('|<%block_(.*?)%>|ms', $template_string, $match);
while (list($key, $value) = @each($match[1])) {
$arr = explode(" ", $value);
$value = $arr[0];
if (!function_exists('block_' . $value)) {
if (file_exists($base_path . "blocks/block." . $value . ".php")) {
include_once ($base_path . "blocks/block." . $value . ".php");
$this->register_function("block_$value", "block_$value");
}
}
}
}
return parent::fetch($file, $cache_id, $compile_id, $display);
}
Here's the SVN change:
http://nicecoder.com/svn/index.php?act=changeset&id=354