vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Changing index.php for custom category list? (https://vborg.vbsupport.ru/showthread.php?t=2756)

08-28-2000 10:33 PM

well i think i found what huss used...

a hack called myforums by godfather... too lazy to get the thread... but i think it's part of a bookmark forum hack ?

08-28-2000 10:42 PM

I posted info on how to modify index.php to only display the forums that you want. Others have posted similiar info also. Just search for something like (index.php custom)

08-28-2000 10:44 PM

here's the godfather one http://vbulletin.com/forum/showthrea...hreadid=1029..

that one is not what i want... got search for rangersfan's one :D

found it http://vbulletin.com/forum/showthread.php?threadid=1433

[Edited by eva2000 on 08-28-2000 at 07:46 PM]

08-28-2000 10:49 PM

Actuall it is here http://www.vbulletin.com/forum/showt...?threadid=1433

And you posted in it so I guess you forgot? Note John mentions an easy way to set custom styles per forum in the "Next Major Version". So I guess it would be prudent to just sit on this and wait for the release in a few weeks time and see if it is in there?

08-28-2000 10:53 PM

so can someone make sense of that thread http://vbulletin.com/forum/showthread.php?threadid=1433 ? rangersfan and johnnyquest both hack good ways of doing it...

08-29-2000 10:20 AM

I am lost in confusion on those threads. :confused: Isn't there a simple disilled instructions anywhere or even just a hint :) as to how to make a customindex.php file to just show certain directories. All this stuff seems too much for my simple requirements.

08-29-2000 11:40 AM

Quote:

Originally posted by rangersfan
Actuall it is here http://www.vbulletin.com/forum/showt...?threadid=1433

And you posted in it so I guess you forgot? Note John mentions an easy way to set custom styles per forum in the "Next Major Version". So I guess it would be prudent to just sit on this and wait for the release in a few weeks time and see if it is in there?

yeah i lost the thread... i tried your way of doing it and it's alot easier i think...

i did a sample at http://animeboards.net/forums/tvshows.php

problem is the header and footer for the category page still shows the header and footer from the main forum at the index.php page.

08-29-2000 11:02 PM

Huss, why do you even post if you're not going to offer any help at all? I've seen a bunch of threads where you tease people with hacks and then never post about it again.

Its really annoying.

Goldenboy

09-01-2000 03:59 AM

please can you post this hack?

09-01-2000 01:57 PM

Here is the complete custom category hack:

1) Make a copy of index.php.

2) At the very beginning of this file add the following code:
Code:

if (isset($go)) {
                if ($go==1) {
                        $catname="Category 1";
                        $yourcat="16_2_4_13_14";
                } elseif ($go==2) {
                        $catname="Category 2";
                        $yourcat="3_16_2_4_13_14";
                } elseif ($go==6) {
                        $catname="Category 3";
                        $yourcat="1_2_13_4_14";
                } else {
                        $catname="";
                        $yourcat="3_16_2_4_13_1_11_7_14";
                }
}        else {
                        $catname="";
                        $yourcat="3_16_2_4_13_1_11_7_14";
}

$yourcat=str_replace("_", " OR categoryid=", $yourcat);

You need to replace the category names with the name that you are going to call each custom category list. Also, you need to change the numbers in each $yourcat variable to include the categories for that list. For example, in the above code, I will have a custom category called "Category 3" that contains categories 1, 2, 13, 4 and 14. The order of the categories here doesn't matter.
The final two else statements should contain all visible categories.

3) Find the following line:
Code:

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

  $categorys=$DB_site->query("SELECT categoryid,title,displayorder FROM category HAVING categoryid=$yourcat ORDER BY displayorder");
4) In the forumhome template, you can insert the variable $catname wherever you want the custom list name to appear.

5) to call this script, simply add the parameter ?go=number of custom category. For example, if you have called this script index2.php, you would link to http://www.yourdomain.com/forum/index2.php?go=1 and you would only see the forums which you designated for category 1. The categories will appear in the order you have them designated in the control panel.

I hope this makes sense. I realized while trying to describe this that custom categories isn't the best wording as this still uses the set categories from the board. You can see an example of this here: http://www.bigsoccer.com/forum/boards.php?go=3


All times are GMT. The time now is 06:50 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.01593 seconds
  • Memory Usage 1,738KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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