Welcome to Geeklog, Anonymous Thursday, April 24 2025 @ 01:11 am EDT
Geeklog Forums
Menu Plugin Hack to show correct story numbers
tokyoahead
Anonymous
The Menu plugin in the current version does always show the complete number of stories in a topic instead of the number that the user can actually see with his current permissions. To Fix this please open the file functions.in in the directory geeklog/plugins/menu and change the line 455 from
$rcount = DB_query( "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE draft_flag = 0 AND date <= NOW() AND left(tid,length('$tid')) = '{$tid}'" );
to
$rcount = DB_query( "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE draft_flag = 0 AND date <= NOW() AND left(tid,length('$tid')) = '{$tid}'" . COM_getPermSQL( 'AND' ));
then the number is correct.
$rcount = DB_query( "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE draft_flag = 0 AND date <= NOW() AND left(tid,length('$tid')) = '{$tid}'" );
to
$rcount = DB_query( "SELECT count(*) AS count FROM {$_TABLES['stories']} WHERE draft_flag = 0 AND date <= NOW() AND left(tid,length('$tid')) = '{$tid}'" . COM_getPermSQL( 'AND' ));
then the number is correct.
12
11
Quote
tokyoahead
Anonymous
Sorry, must have forgot to submit the last edit. It should be ok now.
10
13
Quote
All times are EDT. The time is now 01:11 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