Welcome to Geeklog, Anonymous Wednesday, July 09 2025 @ 03:16 pm EDT
Geeklog Forums
Blog Section Hack
Status: offline
Forum User
Full Member
Registered: 11/25/04
Posts: 315
If you hack admin/story.php , User 'test' can make story in the topic which owner is 'test'. Pull down topic lists are only topics: User 'test' have EDIT right.
and Moderator can create a topic for user 'test' by setting number, by hack to
<public_html>/layout/<theme>/admin/topic/topiceditor.thtml.
Please login http://demo.geeklog.jp user:test password:test,
and make story.
Document: http://wiki.geeklog.jp/index.php/BlogSection_en
and Moderator can create a topic for user 'test' by setting number, by hack to
<public_html>/layout/<theme>/admin/topic/topiceditor.thtml.
Please login http://demo.geeklog.jp user:test password:test,
and make story.
Document: http://wiki.geeklog.jp/index.php/BlogSection_en
10
14
Quote
Status: offline
Site Admin
Admin
Registered: 03/19/06
Posts: 100
To supplement what Ivy said above, I'll write about the way to ensure stroies are editable by non-Root contributors. You may say this is just what the journal plugin is made for, but the plugin doesn't work with register_globals off.
One of Geeklog.jp members suggests the way to allow multiple bloggers who don't belong to the Root group to administer articles easily.
As you know, when you create a story, you can choose ANY topic you have read-access to. In case you are on the Root group, this is natural.
Well, then, suppose you are story-admin and topic-admin but are NOT on the Root group. You can choose ANY topic you have read-access to as well. But once you have posted a story, you can no longer edit or delete it, unless you have write-access to the topic, which is seldom the case with non-Root users. This might be a bit embarrassing to those who are not familiar with Geeklog.
In order to deal with this, how about modifying admin/story.php? As for Geeklog-1.4.0, if you change the line around 657,
COM_topicList ('tid,topic', $A['tid'])
to
CUSTOM_topicList ('tid,topic', $A['tid'])
and in the lib-cusutom.php, add the following:
function CUSTOM_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', 0, 3 )
. " ORDER BY $select_set[$sortcol]" );
$nrows = DB_numRows( $result );
for( $i = 0; $i < $nrows; $i++ )
{
$A = DB_fetchArray( $result, true );
$retval .= '<option value="' . $A[0] . '"';
if( $A[0] == $selected )
{
$retval .= ' selected';
}
$retval .= '>' . stripslashes( $A[1] ) . '</option>' . LB;
}
return $retval;
}
Much the same as COM_topicList, except that
[code]
COM_getPermSQL()
is replaced with
COM_getPermSQL( 'where', 0, 3 )
In addition, modify part of <public_html>/layout/theme_name/admin/topic/topiceditor.thtml
from
<td align="right">{lang_owner}:</td>
<td>{owner_username}<input type="hidden" name="owner_id" value="{owner_id}"></td>
to
<td align="right">{lang_owner}:</td>
<td>{owner_username}<input type="text" name="owner_id" value="{owner_id}"></td>
We wish the above hack will be merged into GL's core code.
Text Formatted Code
COM_topicList ('tid,topic', $A['tid'])
Text Formatted Code
CUSTOM_topicList ('tid,topic', $A['tid'])
Text Formatted Code
function CUSTOM_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', 0, 3 )
. " ORDER BY $select_set[$sortcol]" );
$nrows = DB_numRows( $result );
for( $i = 0; $i < $nrows; $i++ )
{
$A = DB_fetchArray( $result, true );
$retval .= '<option value="' . $A[0] . '"';
if( $A[0] == $selected )
{
$retval .= ' selected';
}
$retval .= '>' . stripslashes( $A[1] ) . '</option>' . LB;
}
return $retval;
}
Much the same as COM_topicList, except that
[code]
COM_getPermSQL()
Text Formatted Code
COM_getPermSQL( 'where', 0, 3 )
Text Formatted Code
<td align="right">{lang_owner}:</td>
<td>{owner_username}<input type="hidden" name="owner_id" value="{owner_id}"></td>
Text Formatted Code
<td align="right">{lang_owner}:</td>
<td>{owner_username}<input type="text" name="owner_id" value="{owner_id}"></td>
13
10
Quote
Status: offline
Forum User
Full Member
Registered: 09/29/02
Posts: 820
That's what I've always wanted.
Has this been patched to the 1.4.1 yet?
Sam

Has this been patched to the 1.4.1 yet?
Sam
14
13
Quote
All times are EDT. The time is now 03:16 pm.
- 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