Results 1 to 10 of 2267

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    OK, that makes it easy.
    You didn't mention your current setting for
    define('CAT_BOX_ACTIVE_LEVEL', '#|#|#')

    It should probably be

    define('CAT_BOX_ACTIVE_LEVEL', '0|1|1')

    The function code is not the setting, and yours shows that it is the standard version of the function.

  2. #2
    Join Date
    Dec 2009
    Location
    Sarajevo
    Posts
    80
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Quote Originally Posted by gjh42 View Post
    OK, that makes it easy.
    You didn't mention your current setting for
    define('CAT_BOX_ACTIVE_LEVEL', '#|#|#')

    It should probably be

    define('CAT_BOX_ACTIVE_LEVEL', '0|1|1')

    The function code is not the setting, and yours shows that it is the standard version of the function.
    OK, I changed code in categories_dressing_functions.php saved/upload it and it now it looks like this:

    function cat_active_level_manage($path) {
    $skip_cat = 0;
    if (defined('CAT_BOX_ACTIVE_LEVEL','0|1|1')) {
    $test_level = 0;
    $cat_box_active_level = explode('|',constant('CAT_BOX_ACTIVE_LEVEL'));
    $cPath_top = (int)$_GET['cPath'];
    $path_top = (int)$path;
    $cat_depth = substr_count($path,'_');
    //tests for various kinds of skipping - more can be added
    switch ($cat_box_active_level[0]){
    case 0:
    $test_level = 1;
    break;
    case 1://active tree only
    if($cPath_top != $path_top) $skip_cat = 1;
    break;
    case 2://active only (all tops when no cat selected)
    if($cPath_top != $path_top and $cPath_top != 0) $skip_cat = 1;
    break;
    case 3://full active tree, others per level
    if($cPath_top != $path_top) $test_level = 1;
    break;
    case 4://like 3, active branches only
    if($cPath_top == $path_top){
    if ($cat_depth >= 2){//only test sub-subcats+
    $path_ids = explode('_',$path);
    $path_parent = $path_ids[count($path_ids)-2];
    if (!in_array($path_parent,explode('_',$_GET['cPath']))) $skip_cat = 1;//show only subcats w parent in $cPath
    }
    } else {//if not active test for level
    $test_level = 1;
    }
    break;
    case 5:// show active, no top, per levels
    if ($cat_depth == 0 or $cPath_top != $path_top) {
    $skip_cat = 1;
    }else{
    $test_level = 1;
    }
    break;
    }//switch
    if ($test_level){
    switch ('true'){
    case ($cat_box_active_level[1] > $cat_depth):
    $skip_cat = 1;
    break;
    case ($cat_box_active_level[2] < $cat_depth):
    $skip_cat = 1;
    break;
    }//switch
    }//if
    }//defined
    return $skip_cat;
    }

    but no changes on left sidebox on website (you can check it out when you click on "Selling parts" in top menu bar)
    Last edited by adi2009; 1 Feb 2010 at 09:41 PM.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    No! You don't want to change the code in categories_dressing_functions.php at all.

    Set the define in /includes/languages/english/extra_definitions/your_template/categories_dressing_defines.php as shown.

  4. #4
    Join Date
    Dec 2009
    Location
    Sarajevo
    Posts
    80
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Yes, I also just checked some of the older post in meantime, on this thread (link) and I see I made mistake changing wrong file, I will correct/test it right away

  5. #5
    Join Date
    Dec 2009
    Location
    Sarajevo
    Posts
    80
    Plugin Contributions
    0

    Default Re: Categories Dressing

    first, sorry for little delay with post, I was exhausted last night after working on my site all day I didnt fully read help files so this morning I read it all, set up my categories_dressing_defines.php file and also css and its working/looks great! Thanks Glenn you rock

    However, I have one more thing to workout: I need one more sidebox on rightcolumn which will have display-limiting set to '0|5|4' (becuse my clients wants this option). I am not sure how to acomplish this, is there some Addon which could be helpful, or should I somehow make copy of original categories sidebox and use that copy to put it in right column?

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    That second categories box is going to be the interesting one. Using different settings for each box will require some cloned and renamed code, and a test to decide which to use in a given situation. It can be done, but will take a bit of work. I'll look at it to get a sense of the best route.

  7. #7
    Join Date
    Dec 2009
    Location
    Sarajevo
    Posts
    80
    Plugin Contributions
    0

    Default Re: Categories Dressing

    OK Glenn. This is why my client exactly wants that additional sidebox in right column:

    Example Link


    You will notice right "sidebox" named Parts, which is showing type of spare parts (engine, brakes, suspension...) for current selected model, so user can easly switch for exam. from Engine Parts to Suspension for his car model.

    ps. Example link takes time to open, but site is working

 

 

Similar Threads

  1. categories dressing
    By fw541c in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Nov 2010, 09:29 PM
  2. Categories Dressing
    By wotnow in forum Addon Sideboxes
    Replies: 10
    Last Post: 7 Apr 2010, 03:06 AM
  3. Categories Dressing issue
    By Maynards in forum Addon Sideboxes
    Replies: 0
    Last Post: 13 Mar 2010, 10:51 PM
  4. Categories Dressing
    By Maynards in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Mar 2010, 11:05 PM
  5. Categories Dressing
    By PGlad in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Aug 2007, 07:05 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