vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Category only view......... (https://vborg.vbsupport.ru/showthread.php?t=6144)

01-07-2001 12:25 PM

oh man!!!
thats not what i was talking about :( :D
that's available in any version, not just the 1.1.5... ;)

What I was talking about was....ok go to http://www.carforums.com/forums
you there? good :D
now click on "Acura"
once you do this, it will take you to a completely new page that ONLY lists the forums that are under "Acura".
vBulletin expands the categories to show the forums inside. This website uses a hack or something of that sort, because if you have 70 forums, it's not going to work morally to expand it and all that, the visitors will die because of the load time. :D

If you still aren't sure what I'm talking about gimme a beep:

ICQ # 83417350
AIM - tennisboy

.....and no, I REALLY SERIOUSLY can't wait 'till v 2.0 for this :)

thanks.

01-07-2001 12:51 PM

Sorry I didn't notice that change.

I think they ripped out some code to do that and isn't a hack really.

01-07-2001 12:54 PM

can you plz tell me which part to rip out???
that would be so awesome!
Or just which file should i tweak?
Thanks!!!

01-07-2001 01:31 PM

Novel idea...

Set "categoriesonly" to yes.

01-07-2001 01:48 PM

yes Mike, that is a very novel idea, but unfortunately that is not the issue, since I know that.
You're thinking what vboard.co.uk was thinking in the beginning and he said that the option is available in 1.1.5
Read the posts before these. :D
My porblem is this:
Once I switch to vB, I will have 70 categories and around 700 forums in them.
Of course I will use, category-only view.
I don't like the way vB works with categories only. If you click on a category, it will expand that category to show the forums inside, but it will still be a list of all other categories too.
for example:
http://www.vbulletin.com/forum/index.php?categoryid=2
you see that it display forum under "General" but you still see "vBulletin", "vBulletin 2.0 Development"...etc.
What I want my board to do when someone clicks on a category is to take him to a new page that ONLY lists the forums in that category, without displaying the whole list of other categories.

HERE IS EXACTLY HOW I WANT MY FORUM TO BEHAVE:
http://www.carforums.com/forums/
It uses vB. It is tweaked to just what I want.
Once you click on "Acura" for example, it takes to a page with ONLY the list of forums under "Audi".
You do not see the list of other categories.

I hope I made sense... :D

01-07-2001 02:16 PM

mike, where did u go?

01-07-2001 04:40 PM

Here is how to do this... In INDEX.PHP

look for
Code:

  if (isset($categoryid)!=0 and $categoryid!=0) {
    $categoryid = verifyid("category",$categoryid);
    $selcategoryid=$categoryid;
    $categoriesonly=1;
  }

above that add:
Code:

  $selcategoryid=0;
Then look for:
Code:

  $categorys=$DB_site->query("SELECT categoryid,title,displayorder FROM category WHERE displayorder<>0 ORDER BY displayorder");
and replace with:
Code:

  if ($selcategoryid==0) {
    $categorys=$DB_site->query("SELECT categoryid,title,displayorder FROM category WHERE displayorder<>0 ORDER BY displayorder");
  } else {
    $categorys=$DB_site->query("SELECT categoryid,title,displayorder FROM category WHERE categoryid=$selcategoryid AND displayorder<>0 ORDER BY displayorder");
  }

You can see this is in effect at http://sitepointforums.com just click on any category.,


[Edited by wluke on 01-07-2001 at 01:44 PM]

01-07-2001 04:44 PM

THANKS
Wayne!!!
You da man! :D

01-09-2001 01:10 PM

Quote:

Originally posted by wluke
Here is how to do this... In INDEX.PHP

look for
Code:

  if (isset($categoryid)!=0 and $categoryid!=0) {
    $categoryid = verifyid("category",$categoryid);
    $selcategoryid=$categoryid;
    $categoriesonly=1;
  }

above that add:
Code:

  $selcategoryid=0;
Then look for:
Code:

  $categorys=$DB_site->query("SELECT categoryid,title,displayorder FROM category WHERE displayorder<>0 ORDER BY displayorder");
and replace with:
Code:

  if ($selcategoryid==0) {
    $categorys=$DB_site->query("SELECT categoryid,title,displayorder FROM category WHERE displayorder<>0 ORDER BY displayorder");
  } else {
    $categorys=$DB_site->query("SELECT categoryid,title,displayorder FROM category WHERE categoryid=$selcategoryid AND displayorder<>0 ORDER BY displayorder");
  }

You can see this is in effect at http://sitepointforums.com just click on any category.,


[Edited by wluke on 01-07-2001 at 01:44 PM]

oh man.. never knew i needed this until it fell in my lap :)

01-09-2001 01:22 PM

works perfectly on a renamed index.php to cat_index.php and just edited the categorybit template to point the cats to cat_index.php instead :)


All times are GMT. The time now is 04:45 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03055 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete