Welcome to Geeklog, Anonymous Tuesday, November 26 2024 @ 09:45 pm EST

Geeklog Forums

Forcing the draft?


Anonymous

Anonymous
Hi, I have two kinds of users, story editors, and editors. I like my editors to review the stories prior to posting but I like my story editors to have access to the full geeklog editor so they can put in an introduction, attach images, etc. Can I make it so only certain groups have access to the draft checkbox and for others it is simply always a draft? Or perhaps some other clever way? My users simply can't get it together enough to check that box! Thanks!
 Quote

Anonymous

Anonymous
When you set up your two groups, did you check the Story Admin for each of them?? If so, at first glance I don't see a simple fix for this to turn the draft checkbox on for one group and not the other group. I would have to study the code's logic more to see if I can figure out how to do this. I'm working on something else so I don't have the time right now. In this case, you can force the draft box to be checked for everyone and then those you authorize to publish can uncheck the box. To do this you can add these two lines of code: if ($A['group_id'] == 3) $A['draft_flag'] = 1; If you did NOT use Story Admin but checked the story.edit, story.submit, and/or story.moderate instead (which I don't think are working properly right now) for the non-publishing editor group, then you can force the check box on for them and off for everyone else. It's the exact same code but you'll change the group id number. To find this, go inside Group Manger and access the link of that group. The url will look like this: http://www.yourdomainname.com/admin/group.php?mode=edit&grp_id=53 The grp_id is the number you're looking for here and will replace the 3 (which equates to Story Admin). In this particular case, the code could look like this: if ($A['group_id'] == 53) $A['draft_flag'] = 1; Now, that you have your two lines, find this section under function storyeditor in the story.php file: $result = DB_query ("SELECT group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['topics']} WHERE tid = '{$A['tid']}'"Wink; $T = DB_fetchArray ($result); $A['group_id'] = $T['group_id']; **** PLACE THE TWO LINES OF CODE HERE *** $A['perm_owner'] = $T['perm_owner']; $A['perm_group'] = $T['perm_group']; Find this section under function storyeditor which is just a little further down on the same page : $A['featured'] = 0; $A['owner_id'] = $_USER['uid']; $A['group_id'] = DB_getItem($_TABLES['groups'],'grp_id',"grp_name = 'Story Admin'"Wink; **** PLACE THE TWO LINES OF CODE HERE *** $A['perm_owner'] = 3; $A['perm_group'] = 2; That's it...the box will be checked. In first scenario above for everyone and in the second just for that one group.
 Quote

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