Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Expanded Category List - make it a page and not a sidebox

    Is it possible to modify this sidebox so that the same results would display in the content area of a page instead of in a sidebox?

  2. #2
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Expanded Category List - make it a page and not a sidebox

    You can always study its template file and use that code anywhere you want.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #3
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Expanded Category List - make it a page and not a sidebox

    I've been working on that and I'm not having much luck on my own. Switching it from a sidebox to a template page is probably easy for someone who knows how... however I don't fall into that category.

    I thought I could just do some things like move the file from the sidebox directory to the templates directory and change some require functions, etc., etc.... nope!

  4. #4
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Expanded Category List - make it a page and not a sidebox

    You will actually need to copy most of the content of the sidebox template file, not the file itself.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  5. #5
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Expanded Category List - make it a page and not a sidebox

    Are you saying to copy the content of the sidebox template file and use that information to create a new page template file?

  6. #6
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Expanded Category List - make it a page and not a sidebox

    Yup, exactly.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  7. #7
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Expanded Category List - make it a page and not a sidebox

    I guess what seems to be getting me is what should go in the header file...
    /includes/modules/pages/MY_PAGE_NAME/header_php.php.

    Again, I tried copying the information from \includes\modules\sideboxes\YOUR_TEMPLATE\category_list_box.php and change a few settings, but it keeps kicking out warnings and fatal errors.
    Last edited by bradymc; 15 Feb 2008 at 08:35 PM.

  8. #8
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Expanded Category List - make it a page and not a sidebox

    Send me the link to that exact page.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  9. #9
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Expanded Category List - make it a page and not a sidebox

    So now I sit on a blank page.

    Here's my header file minus the comments and php tags:
    PHP Code:
    require DIR_WS_CLASSES 'category_list.php'
        
    $main_category_list = new category_list;
        
    $main_category_list->category_list();
        
    $row 0;
        
    $box_categories_array = array();    
        
    $box_categories_array $main_category_list->build_list();
        
        require(
    $template->get_template_dir('tpl_category_listing.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_category_listing.php');    
            
        
    $title BOX_HEADING_CATEGORY_LIST;
        
    $left_corner false;
        
    $right_corner false;
        
    $right_arrow false;
        
    $title_link false
    And here's what's in my template file:
    PHP Code:
    $content "";
        
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">' "\n";

      for (
    $i=0;$i<sizeof($box_categories_array);$i++) {
         
         
    //set selected style ($box_categories_array[$i]['current'] does not work)    
         
    $div_class='';
         if (
    $products_id){
             if ((
    $products_id)&&($box_categories_array[$i]['products_id']==$products_id)){
                 
    $div_class='category-subs-selected';
             }
         }else{
             if((
    $current_category_id!=0)&&($box_categories_array[$i]['category_id']==$current_category_id)){
                 
    $div_class='category-subs-selected';
             }
         }              
        
        
    // set top style
        
    if ($box_categories_array[$i]['top'] == 'true'){    
            
    $a_class 'category-top';
        }elseif(
    $box_categories_array[$i]['has_sub_cat']){
            
    $a_class 'category-subs';
        }else{
            
    $a_class='category-products';
        }
         
    // link to cat or prod
        
    if ($box_categories_array[$i]['is_product'] == true){
            
    $link zen_href_link(FILENAME_PRODUCT_INFO$box_categories_array[$i]['path']);
        }else{
            
    $link zen_href_link(FILENAME_DEFAULT$box_categories_array[$i]['path']);
        }    
        
    //indent
        
    if($box_categories_array[$i]['is_product'] == true){
            
    $indent str_repeat(CATEGORIES_SUBCATEGORIES_INDENT,  $box_categories_array[$i]['level']+1); 
        }else{
            
    $indent str_repeat(CATEGORIES_SUBCATEGORIES_INDENT,  $box_categories_array[$i]['level']); 
        }
        
    //cat sub seperator
        
    if (($box_categories_array[$i]['level'] == 0)&&($box_categories_array[$i]['is_product'] == false)){
            
    $separator '';
        }else{
            
    $separator CATEGORIES_SEPARATOR_SUBS;
        }
        
    // count
        
    $count='';
        if (
    SHOW_COUNTS == 'true') {
            if(
    $box_categories_array[$i]['is_product'] != true){
                
    $count CATEGORIES_SEPARATOR.CATEGORIES_COUNT_PREFIX $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX ;
            }
        }
        
    //add content
        
    $content .= '<span class="'$div_class .'">'
            
    $indent.$separator.'<a class="'$a_class .'" href="'$link .'">'$box_categories_array[$i]['name'] .'</a>'$count .
        
    '</span><br />';
        
      }


      if (
    SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
    // display a separator between categories and links
        
    if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
          
    $content .= '<hr id="catBoxDivider" />' "\n";
        }
        if (
    SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
          
    $show_this $db->Execute("select s.products_id from " TABLE_SPECIALS " s where s.status= '1' limit 1");
          if (
    $show_this->RecordCount() > 0) {
            
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_SPECIALS) . '">' CATEGORIES_BOX_HEADING_SPECIALS '</a>' '<br />';
          }
        }
        if (
    SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
          switch (
    true) {
            case (
    SHOW_NEW_PRODUCTS_LIMIT == '0'):
              
    $display_limit '';
              break;
            case (
    SHOW_NEW_PRODUCTS_LIMIT == '1'):
              
    $display_limit " and date_format(p.products_date_added, '%Y%m') >= date_format(now(), '%Y%m')";
              break;
            case (
    SHOW_NEW_PRODUCTS_LIMIT == '30'):
              
    $display_limit ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 30';
              break;
            case (
    SHOW_NEW_PRODUCTS_LIMIT == '60'):
              
    $display_limit ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 60';
              break;
            case (
    SHOW_NEW_PRODUCTS_LIMIT == '90'):
              
    $display_limit ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 90';
              break;
            case (
    SHOW_NEW_PRODUCTS_LIMIT == '120'):
              
    $display_limit ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 120';
              break;
          }

          
    $show_this $db->Execute("select p.products_id
                                     from " 
    TABLE_PRODUCTS " p
                                     where p.products_status = '1' " 
    $display_limit " limit 1");
          if (
    $show_this->RecordCount() > 0) {
            
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_PRODUCTS_NEW) . '">' CATEGORIES_BOX_HEADING_WHATS_NEW '</a>' '<br />';
          }
        }
        if (
    SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') {
          
    $show_this $db->Execute("select products_id from " TABLE_FEATURED " where status= '1' limit 1");
          if (
    $show_this->RecordCount() > 0) {
            
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS '</a>' '<br />';
          }
        }
        if (
    SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
          
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_PRODUCTS_ALL) . '">' CATEGORIES_BOX_HEADING_PRODUCTS_ALL '</a>';
        }
      }
        
    $content .= '</div>'
    Should I have this template code in includes/languages/english/html_includes/MY_TEMPLATE/define_my_page.php?

  10. #10
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Expanded Category List - make it a page and not a sidebox

    Ok, I'm slowly making progress. I finally got things situated so that the page is just waiting for me to display content. I assume that the code shown above is what should be in the html_includes file, but that isn't displaying anything on the page. I can replace it all with "abcdefg" and those letters will show on the page so I know I'm on the right track. Is the code above what should be in the html_includes file?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Expanded Category List Sidebox - How to Sort?
    By Jeff G in forum Addon Sideboxes
    Replies: 0
    Last Post: 2 May 2010, 09:37 PM
  2. Expanded Category List and BetterCategories
    By wasana in forum Addon Sideboxes
    Replies: 6
    Last Post: 6 Jan 2009, 11:50 PM
  3. expanded category list and 1.3.8
    By jafma in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 4 Sep 2008, 03:17 PM
  4. Expanded Category List not working
    By julieoolie in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 5 Feb 2008, 05:11 AM
  5. Replies: 1
    Last Post: 17 Jan 2008, 08:52 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
  •  
disjunctive-egg