It works!
First, add the following function to /system/lib-custom.php
Text Formatted Code
/**
* The existing COM_topicList in lib-common.php returns
* all of the topics that the user has READ access to.
* This re-implentation returns topics that the user has
* READ/WRITE access to. The only difference between the two
* functions is that this version passes additional parameters
* to COM_getPermSQL.
*/
function custom_COM_topicList( $selection, $selected='', $sortcol=1 )
{
global $_TABLES;
$retval = '';
$tmp = str_replace( 'DISTINCT ', '', $selection );
$select_set = explode( ',',$tmp );
$result = DB_query( "SELECT * FROM {$_TABLES['topics']}" . COM_getPermSQL( 'WHERE', $U['uuid'], 3, $_TABLES['topics'] )
. " ORDER BY $select_set[$sortcol]" );
$nrows = DB_numRows( $result );
for( $i = 0; $i < $nrows; $i++ )
{
$A = DB_fetchArray( $result );
$retval .= '<option value="' . $A[0] . '"';
if( $A[0] == $selected )
{
$retval .= ' selected';
}
$retval .= '>' . stripslashes( $A[1] ) . '</option>' . LB;
}
return $retval;
}
Second, hack two core files...
line 322 (in version 1.3.9) of /public_html/admin/story.php is currently
Text Formatted Code
$story_templates->set_var ('topic_options', COM_topicList ('tid,topic', $A['tid']));
change this to:
Text Formatted Code
$story_templates->set_var ('topic_options', custom_COM_topicList ('tid,topic', $A['tid']));
line 330 (in version 1.3.9) of /public_html/submit.php is currently
Text Formatted Code
$storyform->set_var('story_topic_options', COM_topicList('tid,topic',$A['tid']));
change this to:
Text Formatted Code
$storyform->set_var('story_topic_options', custom_COM_topicList('tid,topic',$A['tid']));