Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2007
    Posts
    555
    Plugin Contributions
    0

    Default /index/main_template_vars.php - do I need to change this?

    Hi,

    Just upgrading and I have found a few differences within

    includes/modules/pages/index/main_template_vars.php

    The one I am not sure about is at the bottom:

    My old file has this:
    Code:
    // bof modified for Short Description for Categories
    $current_categories_description = "";
    $current_categories_description_sub = "";
    // categories_description
    $sql = "SELECT categories_description, categories_description_sub 
            FROM " . TABLE_CATEGORIES_DESCRIPTION . "
            WHERE categories_id= :categoriesID
            AND language_id = :languagesID";
    
    $sql = $db->bindVars($sql, ':categoriesID', $current_category_id, 'integer');
    $sql = $db->bindVars($sql, ':languagesID', $_SESSION['languages_id'], 'integer');
    $categories_description_lookup = $db->Execute($sql);
    if ($categories_description_lookup->RecordCount() > 0) {
      $current_categories_description = $categories_description_lookup->fields['categories_description'];
      $current_categories_description_sub = $categories_description_lookup->fields['categories_description_sub'];
    }
    // eof modified for Short Description for Categories
    
    require($template->get_template_dir($tpl_page_body, DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . $tpl_page_body);
    
    // This should be last line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_END_INDEX_MAIN_TEMPLATE_VARS');
    ?>
    Upgraded file has this at the bottom:
    Code:
    $current_categories_description = "";
    // categories_description
    $sql = "SELECT categories_description
            FROM " . TABLE_CATEGORIES_DESCRIPTION . "
            WHERE categories_id= :categoriesID
            AND language_id = :languagesID";
    
    $sql = $db->bindVars($sql, ':categoriesID', $current_category_id, 'integer');
    $sql = $db->bindVars($sql, ':languagesID', $_SESSION['languages_id'], 'integer');
    $categories_description_lookup = $db->Execute($sql);
    if ($categories_description_lookup->RecordCount() > 0) {
      $current_categories_description = $categories_description_lookup->fields['categories_description'];
    }
    
    require($template->get_template_dir($tpl_page_body, DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . $tpl_page_body);
    
    // This should be last line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_END_INDEX_MAIN_TEMPLATE_VARS');
    ?>
    Should I replace this bit with my old script? Or leave alone?

    Thanks

  2. #2
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: /index/main_template_vars.php - do I need to change this?

    Check the top of your old file.

    Does it read this?

    ....
    * @version $Id: main_template_vars.php 6066 2007-03-25 17:51:43Z ajeh $
    */
    If the date and time in your file are older then use the new file

  3. #3
    Join Date
    Nov 2007
    Posts
    555
    Plugin Contributions
    0

    Default Re: /index/main_template_vars.php - do I need to change this?

    Yes its older..so I'll leave the file as it is.

    Thanks

  4. #4
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: /index/main_template_vars.php - do I need to change this?

    Quote Originally Posted by pb4 View Post
    Yes its older..so I'll leave the file as it is.

    Thanks
    I may not have made myself clear enough: you should use the file with the newer date and discard the file with the older date.

  5. #5
    Join Date
    Nov 2007
    Posts
    555
    Plugin Contributions
    0

    Default Re: /index/main_template_vars.php - do I need to change this?

    Yeah you were clear...I have left the newer version (upgraded file) and not copied over it with the older one

    Thnaks for checking

 

 

Similar Threads

  1. v139a Is it possible to change this path: index.php?main_page=login
    By AndyPortia in forum General Questions
    Replies: 6
    Last Post: 23 Aug 2012, 05:12 PM
  2. v150 questions about code - header_php.php & main_template_vars.php
    By barricades in forum General Questions
    Replies: 3
    Last Post: 8 May 2012, 06:44 AM

Posting Permissions

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