Default to User instead of None?

sralos - April 7, 2008 - 04:24
Project:Book Expand
Version:5.x-1.0.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:dwees
Status:closed
Description

Hello,

Currently, if I select "Group" as the filter, and a person is not a member of a group, the access defaults to none. Is there a way to make it default to user instead? I'd like group members to be able to colaborate on a book, but I don't want individual users to be able to post child pages to any book out there.

Is this possible?

Thanks!

#1

dwees - April 7, 2008 - 09:22

Doing this should be relatively straight forward.

What my module basically does is changes the sql query that is made to find all of the child pages of a book. It does this with 4 different functions, switched based on what filter you have chosen. The group filter function has an if then conditional which decides whether to display grouped related book pages because the current context is a group, or to use no filter at all. All you need to do is find the sql statement from the filter by user function and paste it into this section as an alternative (making sure to put the statement

<?php
global $user;
?>

before it).

#2

dwees - April 7, 2008 - 09:22

Oh, make sure to do this on a test website.

Dave

#3

sralos - July 6, 2008 - 17:37

Pardon my ignorance, but huh? LOL

Pretend I'm 5 years old and tell me step by step where to go and what to change.

Where is the sql statement for the filter by user function?

How much of it do I copy? Where should I start and stop?

How do I make it an alternative? Do I need to replace something?

Sorry for all the questions, but I want to make sure I'm doing this right.

Thanks!!

#4

dwees - September 1, 2008 - 11:03
Assigned to:Anonymous» dwees
Status:active» fixed

This is fixed in the newest version.

#5

Anonymous (not verified) - September 15, 2008 - 11:13
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.