Results 1 to 13 of 13

Thread: Limit Sub-categories

  1. #1
    Join Date
    Jul 2003
    Posts
    128

    Exclamation Limit Sub-categories

    Say, search all over and can't find a field to limit the sub-cats.

    http://www.dfwwebhosting.com/support/faq.php

    Want to be able the sub-categories to 3.

    How do you do this, where do you do this???

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    There is no method to limit sub categories other than not adding them.

    Only the admin adds categories, so no method to limit them is required.

  3. #3
    Join Date
    Jul 2003
    Posts
    128

    Exclamation

    Quote Originally Posted by Bruceper View Post
    There is no method to limit sub categories other than not adding them.

    Only the admin adds categories, so no method to limit them is required.
    Yikes man, harsh response.

    Maybe you didn't understand my question? I am was not talking about the Main Category list, but rather the SUB Categories.

    I am trying to limit the {$sub_link} or Sub Categories which I am sure has a limit somewhere,
    otherwise the More >> link would sorta be a redundant addition to the script.



    Last edited by gspinney; 08-10-2008 at 12:42 AM.

  4. #4
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    It wasn't meant to be harsh, nor did I use any harsh words, it was simply factual.

    And perhaps I'm still a bit unclear on this, so let me ask it this way.

    On the index, you only want three subcats to display under each category regardless of how many subcategories there are?

    So for example, in your screenshot "Billing Issues" has 4 questions, but you want it to only show 3 and to remove the "More >>" link. Correct?

  5. #5
    Join Date
    Jul 2003
    Posts
    128

    Default

    No.

    You see under "Billing Issues (4)"

    I only want 3 sub categories, then More >>


  6. #6
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Now I understand. I'll answer shortly, I'm having some issues with my monitor so it might be a bit while I'm switching it out.

  7. #7
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    With the assistance of Dewa I was directed to a particular line and I hope this helps you out. On the index.php look for a line that says

    $faqs = $app->GetFaqsIndex(5);

    Change the 5 to a 3 and you should be good to go.

    Sorry for the delay, I have been fighting with my display for a week and replaced it tonight with a CRT monitor, the quality sucks but at least it's staying on!

  8. #8
    Join Date
    Jul 2003
    Posts
    128

    Default

    Thanks, but that only limits the listings on the index page.

    I am talking about limiting the sub_categories on the faq.php page.
    Last edited by gspinney; 08-11-2008 at 09:42 AM.

  9. #9
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    I don't see any way of limiting them on the faq.php page, and my fuzzy brain this morning tells me I don't think that you can, but I will talk with someone later and find out if this is possible.

  10. #10
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    In app.php:

    $query = "SELECT *
    FROM {$this->cfg[table][faq]}
    WHERE faq_cat_id = '{$val['faq_cat_id']}'
    ORDER BY faq_id LIMIT 5";

    the line should be around 2601 on function GetCats($cat_id = "")

    Change the 5 to a 3, again special thanks to Dewa for this response

  11. #11
    Join Date
    Jul 2003
    Posts
    128

    Default

    http://www.nicecoder.com/community/s...ead.php?t=7346

    my copy is in code. Can you send me an uncoded app.php ??



    <?php //0035e
    if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3) );$__ln='/ioncube/ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3 ).(($__oc=='win')?'.dll':'.so');$__oid=$__id=realp ath(ini_get('extension_dir'));$__here=dirname(__FI LE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists ($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}e lse{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){re turn _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
    ?>
    4+oV57HVZnl//RXrN2tc63ZOBhBm0+ZnCrPeviLJ1Un6L85N7ML821NsPXY2AZf cy6/wghZURLfv
    OjhFJEZ0NMaOcF4YTYUxOJf3YLj9Zy+RACmvH9yTt7x1pWaTeL WUG9V2ywX0xbgoHpW+QC+BUcAs
    MBhE8sKk4z2pBHRDJ8InLxuCjeBEfS3fgxfZjc/eR4RsKEe9jFa/KZZ4MtR7M398BQ0WYl9GvnaA
    RMR2W9kCWa0pm3sPXFkh1A9d7jycy8KoV0zYORlw6bqTOJOQah 5XPO4yN93bePVjHF+fF/9rDfv1
    ...and so on.

  12. #12
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    You can download a copy in the client area, the filename is something like idesk_source_161 or something like that.

  13. #13
    Join Date
    Jul 2003
    Posts
    128

    Default

    Well after a little tweeking, as I had to reupload most of the files.. it's working.

    Thanks you.

    http://www.dfwwebhosting.com/support/faq.php

    No to just finish building the knowledgebase, yippie!!

Similar Threads

  1. Replies: 2
    Last Post: 11-27-2006, 08:37 PM
  2. How to limit NEW/Modified listings limit on front page
    By lewisw in forum Blocks and Modification
    Replies: 3
    Last Post: 07-19-2006, 01:23 AM
  3. Replies: 1
    Last Post: 09-26-2004, 05:22 AM
  4. Limit of 150
    By sussigustis in forum Indexu Lite
    Replies: 2
    Last Post: 09-13-2002, 02:57 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
  •