Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 09:14 am EDT

Geeklog Forums

Creating blog with more than one writer using Geeklog??

Page navigation


Status: offline

noktuki

Forum User
Newbie
Registered: 05/10/04
Posts: 12
Hello all.
Obviously, I am quite new with Geeklog, and I was wandering if I could create blog with more than one writer using Geeklog?? Actually, this is how it's like:
A few of my friends would like to write blog and they would like to be differentiated by some characteristics (e.g. each one of them has its own topic to which he/she only can write and put pictures).
What would be the easiest way to do this? I am calculating options with user groups and the answer to this one isn't quite obvious to me..
And also, suppose they don't want anyone else, except of those people(users) administrator creates, to be able to register with Geeklog. Is there any way of disabling registering (except the one I used: deleted some lines in users.php and language files, pretty dirty, I guess).
I'm a bit on this one (two, actually), so any kind of help is greatly appreciated.
IK!
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
1) Well, you could do one of a couple things. First, I would look at the Journal plugin. This will give each person a small section of the site in which to keep a blog. I've never used it, but I've heard good things about it.

You could also set up a topic for each user. It's a little more ugly since you will also have to create a group for each user and give that group write access to that topic. It's a little messy, but it sounds like that is what you want. If you trust your users not to post stories in each others topics, then you won't have to create N separate groups for N users and instead just create one group for all contributors on your site.

2) In the config.php file, in the submissions section, turn on user submissions. This will force all new accounts to enter a queue that must be specifically approved by an admin before they are activated,
 Quote

Status: offline

noktuki

Forum User
Newbie
Registered: 05/10/04
Posts: 12
Thanks for help. I've tried journal plugin, not really what I'm looking for. I like better the idea with topics for each user, and I have a little problem with that one: I can't seem to find the combination where each user can only post on his/her topic. If I assign them as story admins in 'only for them created' groups, they can still edit/create stories in other topics.
If you could just direct me concerning this one, I'd appreciate it.
IK!
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
1. Create a different group for every user and assign each user to his/her own group.
2. Give each group or user Story Admin privs.
3. Create a different topic for every user, giving edit privs to the corresponding group created in step 1 for each topic.


That should work.
 Quote

Status: offline

noktuki

Forum User
Newbie
Registered: 05/10/04
Posts: 12
confused
It doesn't seem to work: when I give 'story admin' rights to a certain group, that group can post stories to any topic, including the ones which it is not assigned to.
So, I'll have to manage without using 'story admin' right, but I don't think it's possible.. the same thing is when I assign 'story admin' to specific user, he/she can post to any topic..
Again, any suggestion appreciated.
IK!
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
You're going to have to check with Dirk on that one. I haven't heard a reason as to why Geeklog is like this. It might be a bug.

These people won't be able to edit those stories, though. Just create them.
 Quote

Status: offline

noktuki

Forum User
Newbie
Registered: 05/10/04
Posts: 12
cheerful
I think I found the solution:

1) I created a new group for each user and granted story.edit and story.submit rights to each of them, not the 'story admin' security group.
2) Then I assigned each user to his group, as well as standard 'All Users' and 'Logged-in Users' security groups.
3) (and this one is a knocker I created topic for each user and disabled the 'Members.read' permission-it means that only owner, group and anonymous users can see the story and, concerning the members, what you can't see, you can't edit .

I know it works for me only becouse I want everyone (except few of the people who i want to post stories) to stay anonymous, but I hope it helps someone..

Of course, if anyone finds a better solution, please let me know.

Thanks again, Turias.
IK!
 Quote

Status: offline

noktuki

Forum User
Newbie
Registered: 05/10/04
Posts: 12
As I noted above, I created my web so it's acctually possible to have more users, with each user having his/her topic in which only he/she can post/edit stories. But this comes with one (one for me, at least) flaw: when one of the authors logs in, he/she can see only his/her group, i.e. the topic in which he/she posts stories. Only way to see all of the the topics is to log out.
Is there a way to make it possible for all authors to see all the topics, and to have read-only access to other authors topics?? (if I'd to check the members.read checkbox, each author could post into each topic (don't want that), but could only edit stories in his/her own topic). And I don't have to mention that now authors can't post comments on other authors stories(they don't see them).

Any suggestions?
IK!
 Quote

Status: offline

zachofalltrades

Forum User
Newbie
Registered: 05/17/04
Posts: 7
I've got essentially the same problem that noktuki has. The fact is that this user/group topic/blog security model is fairly hard to come by in the world of open source CMS. The best support for this appears to be in MovableType (which is not OS/GPL, and now costs $$, but there is also the B2 fork -- B2evolution. This is an OS/GPL blogware that supports multiple blogs and multiple authors with fine grained permissions. You can accomplish this in PostNuke, and Xaraya, but it is pretty complicated to set up.

I had really hoped that I would be able to do this with Geeklog, butit doesn't appear that I can -- not out the box anyway.

Here is my situation:

I am setting up a site for an organization with several local chapters. I want to create a topic (separate blog) for each local group. Then I want to have one or more authors from each local with permission to submit/edit/delete posts ONLY in their assigned topic. Some users might be assigned to more that one topic, and everyone should have READ access to all topics.
 Quote

Status: offline

noktuki

Forum User
Newbie
Registered: 05/10/04
Posts: 12
Quote by zachofalltrades:
I am setting up a site for an organization with several local chapters. I want to create a topic (separate blog) for each local group. Then I want to have one or more authors from each local with permission to submit/edit/delete posts ONLY in their assigned topic. Some users might be assigned to more that one topic, and everyone should have READ access to all topics.


This is identical with my situation.. wouldn't want to use other CMS, though.. Anyways, if you come up with something, be sure to let me know..
IK!
 Quote

Status: offline

zachofalltrades

Forum User
Newbie
Registered: 05/17/04
Posts: 7
The FAQ doesn't say this directly, but it sounds likje what we are trying to do should be possible:

FAQ
 Quote

Status: offline

zachofalltrades

Forum User
Newbie
Registered: 05/17/04
Posts: 7
It seems that in fact, what I am trying to do IS supported to a certain degree, except that users can SUBMIT to any topic. They must have edit permission in the given topic to moderate it (change article status published, or delte an item). Basically any author with submit permission to any single topic can submit to ALL topics (I think).

So what we need is a hack to prevent users from submitting to topics unless they have edit permissions for that specific topic.

I haven't looked at the code yet, but it _might_ not be that difficult to do...
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by zachofalltrades: Basically any author with submit permission to any single topic can submit to ALL topics (I think).

They can submit to all the topics they can see. As can normal users.

Quote by zachofalltrades:So what we need is a hack to prevent users from submitting to topics unless they have edit permissions for that specific topic.

"Read-only topics" have been requested before. There's even a task open for anyone who wants to contribute this, but there haven't been any takers so far ...

bye, Dirk
 Quote

zachofalltrades

Anonymous
Quote by Dirk:
Quote by zachofalltrades:So what we need is a hack to prevent users from submitting to topics unless they have edit permissions for that specific topic.

"Read-only topics" have been requested before. There's even a task open for anyone who wants to contribute this, but there haven't been any takers so far ...


Now that I've looked at the code (which is downright elegant by the way), it appears that there are at least three ways to accomplish this:

1. hack COM_topiclist in lib_common.php so that it returns only topics where the user has read/write (id=3) instead of just read permission (id=2) This would be pretty simple to do by meraly changing the way that function calls COM_getPermSQL.
--but this would have consequences in other content areas that I have not yet explored (there are seven places that call this function in addition to the call from the story submission form in submit.php).
--this could be done by adding an optional parameter to COM_topiclist that would specify whether to return topics with read access or only topics with write access.

2. create a custom_COM_topiclist in lib_custom.php which re-implements COM_topiclist with a modified call to the COM_getPermSQL and then have the submitstory() function in submit.php use this instead.

3. modify the database and various functions in many files to support a per-topic option for whether or not authors can "cross post".
--most robust, but hardest to share with others, and way more work than I can take on right now.

I'm working on number two, which seems safest and easiest to share with other users. I'll post the code if my tests are successful. This option could also be combined pretty easily with a global variable in the config.php that would toggle between the two modes (submission requires only read access versus sumission requires write access).

My wife is nine months pregnant, and this is for a website that already has a functioning multi-user, multi-blog system in place (movabletype) -- so I may or may not get this done quickly.
 Quote

Status: offline

zachofalltrades

Forum User
Newbie
Registered: 05/17/04
Posts: 7
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']));

 
 Quote

Status: offline

noktuki

Forum User
Newbie
Registered: 05/10/04
Posts: 12
Modified it some hours ago, works great! I didn't want to answer before I tested it quite thoroughly, and I can't seem to find any problems.. And it sounds pretty logical what you did (although I'm a week old GL user, and not too familiar with GL code, but I'm catching up ), so I think I'm trying in vain.. luckily

Best wishes regarding the little one.
IK!
 Quote

zachofalltrades

Anonymous
a week old? Well that makes you ancient by my reckoning -- I've had GL installed for just under two days.

Honestly, the code for GL is so well structured and well commented that this was about the easiest hack I've ever done.
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
Man, that rocks! And so easy...you make me (and lots of other GL-users) very happy.

I would like to suggest that this option will be included in the next version of GL.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
Looks like a really useful hack! Thanks for posting it!

Just one quick word of caution for those of you implementing it: this will only prevent certain topics from being listed on the story submission page drop down. A malicious user could still submit stories to any topic by hijacking and messing with the values of variables before they are sent to the Geeklog server.

In order to prevent this you will have to do some server-side variable checking before actually writing the story to the database.

So, as long as you don't have an active hacker as a story submitter, I wouldn't worry about it.

Again, thanks for contributing! And please don't let me discourage you.
 Quote

NS

Anonymous
Hey Guys,
this hack really rocks!!!! Thank you to the guy who wrote this. But one more trick is required here... becoz,
The user who as the access right to only for the particular topic can post their stories only on their topic page but not on the Main page.
Now it is showing the two values in the STORY EDITOR page: Show on the Front Page, Show only in Topic.

pl. guide me how to remove Show On the Front Page option for this user.

u know wat i mean ???????

thanks,
NS
 Quote

Page navigation

All times are EDT. The time is now 09:14 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