Posted on: 05/10/04 09:29pm
By: noktuki
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/11/04 09:47am
By: Turias
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,
Creating blog with more than one writer using Geeklog??
Posted on: 05/13/04 12:43pm
By: noktuki
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/13/04 02:10pm
By: Turias
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.
pCreating blog with more than one writer using Geeklog??
Posted on: 05/13/04 02:59pm
By: noktuki
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/13/04 03:33pm
By: Turias
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/13/04 03:53pm
By: noktuki
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/18/04 07:19pm
By: noktuki
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?
Creating blog with more than one writer using Geeklog??
Posted on: 05/19/04 01:26am
By: zachofalltrades
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/19/04 06:24am
By: noktuki
[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.[/QUOTE]
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..
Creating blog with more than one writer using Geeklog??
Posted on: 05/19/04 08:45am
By: zachofalltrades
The FAQ doesn't say this directly, but it sounds likje what we are trying to do should be possible:
FAQ[*1]
Creating blog with more than one writer using Geeklog??
Posted on: 05/19/04 10:54am
By: zachofalltrades
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...
Creating blog with more than one writer using Geeklog??
Posted on: 05/19/04 02:09pm
By: Dirk
[QUOTE BY= zachofalltrades] Basically any author with submit permission to any single topic can submit to ALL topics (I think).[/QUOTE]
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.[/QUOTE]
"Read-only topics" have been requested before. There's even a
task[*2] open for anyone who wants to contribute this, but there haven't been any takers so far ...
bye, Dirk
Creating blog with more than one writer using Geeklog??
Posted on: 05/19/04 06:15pm
By: Anonymous (zachofalltrades)
[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.[/QUOTE]
"Read-only topics" have been requested before. There's even a
task[*2] open for anyone who wants to contribute this, but there haven't been any takers so far ...
[/QUOTE]
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/20/04 03:11am
By: zachofalltrades
It works!
First, add the following function to /system/lib-custom.php
/**
* 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
$story_templates->set_var ('topic_options', COM_topicList ('tid,topic', $A['tid']));
change this to:
$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
$storyform->set_var('story_topic_options', COM_topicList('tid,topic',$A['tid']));
change this to:
$storyform->set_var('story_topic_options', custom_COM_topicList('tid,topic',$A['tid']));
Creating blog with more than one writer using Geeklog??
Posted on: 05/20/04 01:12pm
By: noktuki
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/20/04 03:01pm
By: Anonymous (zachofalltrades)
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/20/04 04:28pm
By: beewee
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/20/04 04:40pm
By: Turias
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.
Creating blog with more than one writer using Geeklog??
Posted on: 05/21/04 09:49am
By: Anonymous (NS)
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
Creating blog with more than one writer using Geeklog??
Posted on: 05/19/05 12:36pm
By: ckpicker
Great job on this hack! This is exactly what I was looking for. Thanks!
Creating blog with more than one writer using Geeklog??
Posted on: 05/19/05 12:38pm
By: ckpicker
[QUOTE BY= NS] 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]
I'm not sure if there is a way to do this, but you can reverse the options, so that 'Show only in Topic' is the default option.
Look
here[*3]
Creating blog with more than one writer using Geeklog??
Posted on: 05/19/05 03:46pm
By: beewee
There might be a trick: put that part in a separate CSS class, and define the font color in that class to the same color as the background, and very small, that makes it (nearly) invisible.
But if somebody knows the real work around or hack: