to show all boards of category

Started by Joker™, June 03, 2010, 09:39:10 AM

Previous topic - Next topic

Joker™

Im using SMF RC3 with default curve theme.


i've seen as there is not option by which we can display all boards of a category on some other page.
i mean when we click on category name on main page , the category just get collapsed.
when we click category name in link tree it comes back to main page showing all categories there also.
i would like to have a function that if someone clicks category name in link tree it'll take user to a new page where all boards of the category clicked are shown.


Hope i was able to make myself clear
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved


Joker™

thanx alot ...

actually what im trying to achieve is that , my forum is having many categories and boards .
So the forum is too lengthy now ,s o as to make it short , i've made a bar on which we are showing some major categories.

when user click on the name of category it is being taken to separate page with the help of mod provided above.

Now i want to know how can i hide complete category from main page as i've category displayed as button im the bar i made.

So can anyone assist me to hide categories from main page ?

Thanx in advance
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Windy

Open "Sources/Subs-BoardIndex.php"

Code (Find) Select
WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? '' : '
Code (Replace) Select
WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? ' AND id_cat NOT IN()' : '

Code (Find) Select
AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)),
Code (Replace) Select
AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)) . (empty($boardIndexOptions['base_level']) ? ' AND id_cat NOT IN()' : ''),

where i've got NOT IN() insert the id's of the categories you wish to hide ie. NOT IN(1,2,3) to hide the categories with the id's 1, 2 and 3.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

Joker™

Quote from: Windy on June 13, 2010, 07:13:01 AM
Open "Sources/Subs-BoardIndex.php"

Code (Find) Select
WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? '' : '
Code (Replace) Select
WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? ' AND id_cat NOT IN()' : '

Code (Find) Select
AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)),
Code (Replace) Select
AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)) . (empty($boardIndexOptions['base_level']) ? ' AND id_cat NOT IN()' : ''),

where i've got NOT IN() insert the id's of the categories you wish to hide ie. NOT IN(1,2,3) to hide the categories with the id's 1, 2 and 3.

it gave me this error

Column 'id_cat' in where clause is ambiguous
File: C:\xampplite\htdocs\rc3\Sources\Subs-BoardIndex.php
Line: 80


can't we make a option for it in admin panel , like in "Modification Settings" where we can just put the category number and the number comes here in the NOT IN() .(just asked out of curiosity . )
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Windy

put c.id_cat instead

if you want to add it as an option in the admin panel that's up to you
i had previously written a tutorial on how to do it which can be found in the Important Customization Information sticky
i don't particularly want to do it myself
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

Joker™

Quote from: Windy on June 14, 2010, 01:23:47 PM
put c.id_cat instead

if you want to add it as an option in the admin panel that's up to you
i had previously written a tutorial on how to do it which can be found in the Important Customization Information sticky
i don't particularly want to do it myself

hurray that worked , for that option which i asked will require to modify more than 2 -3 files of source directory , and in coding part in complete new comer .Let's see if i got stuck somewhere i'll ask here for sure .

Thanks once again.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

Windy bro some more of your help .

After installing View Single category mod code in Subs-BoardIndex.php became


AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1))
. (isset($context['single_cats']) ? "
AND c.id_cat{raw:cat_field}
ORDER BY board_order ASC" : ""),


i tried alot but if i hide a category it's not showing as single category also.

as i want category to hide on main board , as i made a bar on which i've written name of all my main categories. I want these categories to be hidden on main board but if someone click on there name , with the help of single category mod it opens up.

hope i was able to clear myself up.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

Keeping Single category mod aside, we can do this by one more way

Same file (If anyone try this make backup of file before editing it)

Find:
WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? '' : '


Replace it with:
WHERE c.id_board NOT IN (1) AND {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? '' : '
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: