Welcome to Geeklog, Anonymous Monday, November 25 2024 @ 09:44 am EST
Geeklog Forums
News Categories?
Status: offline
dman101
Forum User
Newbie
Registered: 06/04/04
Posts: 4
Hey i'm new here so if my question is real easy then u can beat me up.
I have a new geeklog site with a bunch of articles and news stories that will be added. I want to have a broad category such as News. Then I would like to have subcategories like: sports, culture etc.
Is this incorparated into GeekLog already or does this have to be done with hacking the code. Does anyone already have the code to do this.
Thanks all
I have a new geeklog site with a bunch of articles and news stories that will be added. I want to have a broad category such as News. Then I would like to have subcategories like: sports, culture etc.
Is this incorparated into GeekLog already or does this have to be done with hacking the code. Does anyone already have the code to do this.
Thanks all
5
7
Quote
Status: offline
usarid
Forum User
Newbie
Registered: 05/11/04
Posts: 3
I ran into this requirement myself a few days ago, and needed to hack the menu plugin gently to prevent certain topics from showing up in the topics list. It was better to explicitly specify which topics should be excluded (because I would include explicit hyperlinks to them elsewhere in the menu) than which ones should be included, as that would change often over time.
Here's the additional line in menu/config.php:
$CONFIG_MENU['excludedtopics'] = array('Topic1','Topic2');
and here's the hack to the menu/functions.inc file: in the MNU_showTopics() function, the first for loop should get the following extra line:
Here's what the beginning of the for loop looks like with this line added:
$A = DB_fetchArray( $result );
if (in_array($A['tid'],$CONFIG_MENU['excludedtopics'])) continue;
if( SEC_hasAccess( $A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']) > 0 )
{
$labela = array();
$labela = explode('_',$A['tid']);
$lsz = sizeof($labela);
Here's the additional line in menu/config.php:
Text Formatted Code
// Array of topic id's to exclude from the topics list menu$CONFIG_MENU['excludedtopics'] = array('Topic1','Topic2');
and here's the hack to the menu/functions.inc file: in the MNU_showTopics() function, the first for loop should get the following extra line:
Text Formatted Code
if (in_array($A['tid'],$CONFIG_MENU['excludedtopics'])) continue;Here's what the beginning of the for loop looks like with this line added:
Text Formatted Code
for( $i = 0; $i < $nrows; $i++ ) {$A = DB_fetchArray( $result );
if (in_array($A['tid'],$CONFIG_MENU['excludedtopics'])) continue;
if( SEC_hasAccess( $A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon']) > 0 )
{
$labela = array();
$labela = explode('_',$A['tid']);
$lsz = sizeof($labela);
8
5
Quote
All times are EST. The time is now 09:44 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content