Results 1 to 12 of 12

Thread: Overriding Default Footer?

  1. #1
    Join Date
    Apr 2006
    Posts
    447

    Default Overriding Default Footer?

    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

  2. #2
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    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 )

  3. #3
    Join Date
    Apr 2006
    Posts
    447

    Default

    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.

  4. #4
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    Quote Originally Posted by CEC
    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????
    please post your footer.html

  5. #5
    Join Date
    Apr 2006
    Posts
    447

    Default

    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> &nbsp;&nbsp;&nbsp;&nbsp;
    <a href="cp/" >My Account</a> &nbsp;&nbsp;&nbsp;&nbsp;
    <a href="power_search.php" >Power Search</a> &nbsp;&nbsp;&nbsp;&nbsp;
    <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> &nbsp;&nbsp;&nbsp;&nbsp;
    <a href="modify.php" class="footer">Update a Listing</a> &nbsp;&nbsp;&nbsp;&nbsp;
    <a href="register.php" >Register</a>&nbsp;&nbsp;&nbsp;&nbsp;
    Copyright &copy; 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.

  6. #6
    Join Date
    Apr 2006
    Posts
    447

    Default

    Any luck on this Doddy?

  7. #7
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    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"

  8. #8
    Join Date
    Apr 2006
    Posts
    447

    Default

    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.

  9. #9
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    That is weird. Please submit a ticket and provide us your ftp account.

  10. #10
    Join Date
    Apr 2006
    Posts
    447

    Default

    Thanks. I have submitted a ticket.

  11. #11
    Join Date
    Apr 2006
    Posts
    447

    Default

    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);
    }

  12. #12
    Join Date
    Apr 2006
    Posts
    447

Similar Threads

  1. Changing INDEXU in in default.msg
    By reidnunn in forum v5.x
    Replies: 11
    Last Post: 01-10-2005, 09:02 PM
  2. Regarding themes/default/mail
    By solmio in forum v5.x
    Replies: 2
    Last Post: 04-13-2004, 07:55 PM
  3. Have the default templates been updated?
    By Phil Latio in forum v5.x
    Replies: 3
    Last Post: 09-21-2002, 08:27 AM
  4. themes/default/cp
    By tariqali in forum v5.x
    Replies: 1
    Last Post: 07-13-2002, 05:50 PM
  5. Add a favorites folder by default
    By Bruceper in forum v5.x
    Replies: 4
    Last Post: 07-08-2002, 02:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •