Please forgive my questions, as I'm getting a little confused, and having played around with settings for a couple of days, I'm starting to feel a little dizzy!
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- -- ResourceSpace Developer Reseller of Colorhythm's Prismpoint Portal DAM
Thanks for the response. Sorry it’s taken a while to reply. I have made progress on some fronts, but perhaps not in the best manner (I'm using 7.3.7009 - should have mentioned that earlier). Please forgive me if my post seems to ramble!
Firstly, I discovered why some resources were being set to active rather than going to "pending submission". The group did not have the permissions "e-2" or "e-1". However, they did have the "d" permission rather than "c", so by my understanding, they should have been sent to "pending submission". Adding "e-2" and "e-1" corrects this behaviour. Perhaps this is a bug in the upload process? I'm using plupload if that changes anything.
I've played around further with trying to hide resources from the anonymous user, and found the following:
I guess I was hoping that users without the "s" permission wouldn't be able to see resources at all, even if they have uploaded them (aimed specifically at the anonymous user, as multiple users can upload through that account, and shouldn't be able to see others' contributions). Thus, I have tried the following:
I have created a new page (thanks.php), to redirect the anonymous user to after upload, instead of the search page showing their contributions;
I have edited upload_plupload.php (line 708 to test the current user's credentials and redirect accordingly)
The original line 708 is:
window.location.href='<?php echo $baseurl_short?>pages/search.php?search=!contributions<?php echo urlencode($userref) ?>&archive=<?php echo urlencode($setarchivestate) ?>';
In its place, I've put:
<?php if (!checkperm("s")) { ?>
window.location.href='<?php echo $baseurl_short?>pages/thanks.php';
<?php }
else { ?>
window.location.href='<?php echo $baseurl_short?>pages/search.php?search=!contributions<?php echo urlencode($userref) ?>&archive=<?php echo urlencode($setarchivestate) ?>';
<?php } ?>
So it checks to see if the current user has the search permission, and if not, redirects to thanks.php, but if they can, does as before. This appears to be the best way for me to hide uploads from the anonymous user, but there aren't any hooks or functions I can see that I can use to make this into a plugin. Is there any way for me to do this without having to edit the active code? Is there, perhaps, a way to replace the whole upload_plupload.php file through a plugin, or to add a new thanks.php page via a plugin? If I can do this, then at least I don’t need to merge changes each time there is an update, which would make things easier.