Collections Public by Default

429 views
Skip to first unread message

Kevin Shenk

unread,
Apr 9, 2010, 11:08:38 AM4/9/10
to ResourceSpace
I am setting up a ResourceSpace installation for a very small business
where the software will only be used internally. There are only a few
users and they each only add resources which they want to make
publicly available to all the other users. Right now we have to
manually set each collection as public after all of the images are
uploaded. Is there any way to make all new collections public by
default?

Tom Gleason

unread,
Apr 9, 2010, 6:49:49 PM4/9/10
to resour...@googlegroups.com
No, I don't think there is a way to do that automatically at this time.

> --
> You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
> To post to this group, send email to resour...@googlegroups.com.
> To unsubscribe from this group, send email to resourcespac...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/resourcespace?hl=en.
>
>

--
Tom Gleason, PHP Developer
DBA Impressive Design

Exploring ResourceSpace at:
http://resourcespace.blogspot.com

Kevin Shenk

unread,
Apr 10, 2010, 7:34:30 PM4/10/10
to ResourceSpace
OK, that's disappointing, but is there any way to set Public/Private
status upon creation of a new collection?

On Apr 9, 6:49 pm, Tom Gleason <theorysav...@gmail.com> wrote:
> No, I don't think there is a way to do that automatically at this time.
>
>
>
> On Fri, Apr 9, 2010 at 11:08 AM, Kevin Shenk <kevinshenkm...@gmail.com> wrote:
> > I am setting up a ResourceSpace installation for a very small business
> > where the software will only be used internally.  There are only a few
> > users and they each only add resources which they want to make
> > publicly available to all the other users.  Right now we have to

> > manually set each collection aspublicafter all of the images are


> > uploaded.  Is there any way to make all new collectionspublicby
> > default?
>
> > --

> > You received this message because you are subscribed to the Google Groups "ResourceSpace" group.> To post to this group, send email toresou...@googlegroups.com.> To unsubscribe from this group, send email toresourcespa...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/resourcespace?hl=en.

Kevin Shenk

unread,
May 5, 2010, 9:02:37 AM5/5/10
to ResourceSpace
I finally found a sollution. With the iMacros plugin for firefox, you
can use the following macro to loop through all available collections
and set them to public.

TAB T=1
SET !LOOP 1
URL GOTO=http://imageserver/pages/collection_edit.php?ref={{!LOOP}}
FRAME F=1
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:public CONTENT=%1
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName
ATTR=ID:allow_changes CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=ID:relateall
CONTENT=YES
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:collectionform
ATTR=NAME:save&&VALUE:<SP><SP>Save<SP><SP>

You have to run it with the "Play (Loop)" button (change the "Max:" to
some big number) and when it runs into trouble like a users "My
Collection", you have to change the SET !LOOP argument to a higher
number (the number of the next collection).

NOTE THIS MACRO SETS ALL COLLECTIONS TO PUBLIC, AS WELL AS RELATING
ALL CONTENT AND ALLOWING CHANGES FROM OTHER USERS. CHANGE THE
http://imageserver/ ADDRESS TO THE ADDRESS OF YOUR RESOURCESPACE
INSTALLATION.
To post to this group, send email to resour...@googlegroups.com.
To unsubscribe from this group, send email to resourcespac...@googlegroups.com.

Matt G

unread,
May 5, 2010, 2:11:48 PM5/5/10
to ResourceSpace
One additional way to do it:

Edit your Cron-script that's running nightly and perform the following
query on the database:

File: pages/tools/cron_copy_hitcount.php

Line 14:
sql_query("UPDATE `collection` SET public = 1 WHERE name != 'My
Collection'");

That will set all collections that are not named "My Collection" to
public status every night

Hope this helps,
Matt G.

On May 5, 3:02 am, Kevin Shenk <kevinshenkm...@gmail.com> wrote:
> I finally found a sollution.  With the iMacros plugin for firefox, you
> can use the following macro to loop through all available collections
> and set them to public.
>
> TAB T=1
> SET !LOOP 1
> URL GOTO=http://imageserver/pages/collection_edit.php?ref={{!LOOP}}
> FRAME F=1
> TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:public CONTENT=%1
> TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName
> ATTR=ID:allow_changes CONTENT=YES
> TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=ID:relateall
> CONTENT=YES
> TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:collectionform
> ATTR=NAME:save&&VALUE:<SP><SP>Save<SP><SP>
>
> You have to run it with the "Play (Loop)" button (change the "Max:" to
> some big number) and when it runs into trouble like a users "My
> Collection", you have to change the SET !LOOP argument to a higher
> number (the number of the next collection).
>
> NOTE THIS MACRO SETS ALL COLLECTIONS TO PUBLIC, AS WELL AS RELATING
> ALL CONTENT AND ALLOWING CHANGES FROM OTHER USERS.  CHANGE THEhttp://imageserver/ ADDRESS TO THE ADDRESS OF YOUR RESOURCESPACE

Matt G

unread,
May 10, 2010, 6:11:05 PM5/10/10
to ResourceSpace
Just found another (better) way to default all new collections to
"Public"

- Edit the structure of the "collection" table to default to "Public"
for new collections (1).

Here's some SQL you can run to do the job:

ALTER TABLE `collection` CHANGE `public` `public` INT( 11 ) NULL
DEFAULT '1'


That's it!

- Matt G.

Svavar Svavarsson

unread,
May 26, 2010, 12:12:52 PM5/26/10
to ResourceSpace
That's what I did too. It would be great if ResourceSpace were more
centered around public collections since making everything private
silos the content and (IMHO) runs counter to the purpose of the system
which is collaboration.

Tom Gleason

unread,
May 26, 2010, 12:16:21 PM5/26/10
to resour...@googlegroups.com
Collaboration with collections is generally done via Sharing to attached users.

> For more options, visit this group at http://groups.google.com/group/resourcespace?hl=en.

J1m Sh4w

unread,
Apr 11, 2011, 2:38:15 PM4/11/11
to resour...@googlegroups.com

I'd like to voice my support for the idea of a configurable default option for public/private collections.


For developers who create non-public sites, i.e., those used for internal photography workflows, this would be very handy so that all members of a team could have access to the collection when the workflow requires it.


Would anything more be required than this (not sure what else would be affected)?


function create_collection($userid,$name,$allowchanges=0,$cant_delete=0) {

global $collections_public_by_default;

$public = $collections_public_by_default ? '1' : '0';

# Creates a new collection and returns the reference

sql_query("insert into collection (name,user,created,allow_changes,cant_delete, public) values ('" . escape_check($name) . "','$userid',now(),'$allowchanges','$cant_delete', $public)");

return sql_insert_id();

}



Also, couldn't a checkbox be added to the Upload page so that the choice could be made there?


Thanks.

Jim


mrpatulski

unread,
Apr 12, 2011, 11:16:50 AM4/12/11
to resour...@googlegroups.com
We are having this same challenge as well.  The issue is once a collection or resource is public anyone with a link inside our outside your organization can access the content. We have our install behind SSO but if we make a public collection it goes beyond our intranet.

Conceptually I think we are all asking for a level of access between  a log in account and a publicly shared collection open to anyone with the URL?

Is there a way to run RS without needing any accounts for browsing/collection building/sharing like an istockphoto site. Then account holders would be archivists admins and super-admin types.

mbuh...@gmail.com

unread,
May 26, 2022, 5:00:04 PM5/26/22
to ResourceSpace
Is this still a valid way of changing collections to public by default? I'm looking at the database via phpmyadmin and am not finding this reference. Thank you.
Reply all
Reply to author
Forward
0 new messages