Welcome to Geeklog Tuesday, May 21 2013 @ 07:41 PM EDT
|
||||||||
![]() |
Forum Index > Extensions > Cool Hacks |
New Topic
|
Post Reply
|
Blog Section Hack |
|||
| ivy |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member ![]() Status: offline ![]() Registered: 11/25/04 Posts: 136 |
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 Geeklog Japanese http://www.geeklog.jp |
||||||
|
|||||||
| mystral-kk |
|
||||||
![]() ![]() ![]() ![]() ![]() Regular Poster ![]() Status: offline ![]() Registered: 03/19/06 Posts: 89 |
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, PHP Formatted Code COM_topicList ('tid,topic', $A['tid']) to PHP Formatted Code CUSTOM_topicList ('tid,topic', $A['tid']) and in the lib-cusutom.php, add the following: PHP 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() is replaced with PHP Formatted Code COM_getPermSQL( 'where', 0, 3 ) In addition, modify part of <public_html>/layout/theme_name/admin/topic/topiceditor.thtml from PHP Formatted Code <td align="right">{lang_owner}:</td> <td>{owner_username}<input type="hidden" name="owner_id" value="{owner_id}"></td> to PHP Formatted Code <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. -- mystral-kk, "Every cloud has a silver lining." |
||||||
|
|||||||
| samstone |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member ![]() Status: offline ![]() Registered: 09/29/02 Posts: 820 |
That's what I've always wanted.
Has this been patched to the 1.4.1 yet? Sam |
||||||
|
|||||||
| Content generated in: 1.12 seconds |
|
|
|