Announcing new module: GBFilePicker

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am
Location: New Zealand

Re: Announcing new module: GBFilePicker

Post by Cerulean »

NaN, I notice that the thumbnail displayed (in "browser" mode) once an image has been chosen from the filepicker is given a height of 96px and a width of 96px, which causes images not of a 1:1 aspect ratio to distort. Is it possible to have the "chosen" thumbnail appear the same as it does in the filepicker?
Note: the thumbnail only loses its original aspect ratio once Apply is clicked, or when entering the Edit Page screen when an image has already been selected.
Last edited by Cerulean on Sat Nov 06, 2010 3:02 am, edited 1 time in total.
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am
Location: New Zealand

Re: Announcing new module: GBFilePicker

Post by Cerulean »

Another thing... the setting in the admin panel for "Allow upscaling" doesn't seem to work. In the filepicker, if resize images is checked and the dimensions are larger than the uploaded image then the image is indeed upscaled regardless of the admin setting.
I'm using GBFilePicker with the Advanced Content module if that makes a difference.
NaN

Re: Announcing new module: GBFilePicker

Post by NaN »

cerulean wrote:
the setting in the admin panel for "Allow upscaling" doesn't seem to work
module help wrote:
All params are optional and can be used with {content_module} tag as well with the api function.
Notice that some params will have no effect if you are the admin. That means the admin has always any permissions.
E.g: you cannot deny filemanagement or image resizing on upload to the admin but only to other users.

...

allow_upscaling (true/false)

   * Usually this is a preference that can be set up in the modules admin panel. It specifies if images may be enlarged when resized.
     With this param you can override this setting to specify certain preferences for each block individually.
     Note: This has no effect if you are admin.
If you are admin or if you belong to the admin group there are no restrictions for you.
So you are allowed to scale the images to whatever size you want.
This is no bug but a feature since the admin cannot reduce his own permissions.
He can always do whatever he thinks is right.

cerulean wrote:
Note: the thumbnail only loses its original aspect ratio once Apply is clicked, or when entering the Edit Page screen when an image has already been selected.
Confirmed.
Is an error.
Remove in the template GBFilePicker/templates/input.tpl the height attrib from the image:



It doesn't make sense here.
Thanks for reporting this.
Last edited by NaN on Sat Nov 06, 2010 10:29 pm, edited 1 time in total.
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am
Location: New Zealand

Re: Announcing new module: GBFilePicker

Post by Cerulean »

Thanks NaN, understood. :)

For any programmers keen for a project, the News module is crying out for the integration of GBFilePicker, so images and files can be selected from the server. Ref this request from a while back: http://forum.cmsmadesimple.org/index.ph ... 071.0.html
Last edited by Cerulean on Sun Nov 07, 2010 12:05 am, edited 1 time in total.
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am
Location: New Zealand

Re: Announcing new module: GBFilePicker

Post by Cerulean »

NaN, I'm having some trouble getting the "dir" parameter to work for Users outside the Admin group. In short, having a dir parameter set seems to allow a non-admin user to access any directory but the specified dir.

I have the Editor group permissions allowing "Modify Files", and I have "Restrict user's dir access" unchecked in the GBFilePicker options.

My template uses GBFilePicker like this:
{content_module module="GBFilePicker" block="image1" label="Image One" mode="browser" dir="images/homepage-feature-photos/"}

This works fine for Admin users, but Editors get an error "This directory is empty".

If I include show_subdirs="true" in the tag an Editor is redirected to the "uploads" directory. They can then browse into the "images" subdirectory, but if they try to browse into "homepage-feature-photos" (my specified dir) they are again redirected to the "uploads" root.

If I leave out the dir parameter and include show_subdirs="true", the Editor can browse all the way into "homepage-feature-photos".

Any idea what's going on there? Thanks.
NaN

Re: Announcing new module: GBFilePicker

Post by NaN »

Sounds weird.
Will have a look at this.
NaN

Re: Announcing new module: GBFilePicker

Post by NaN »

Confirmed.
Is an error.
Is fixed in SVN and on my DropBox
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am
Location: New Zealand

Re: Announcing new module: GBFilePicker

Post by Cerulean »

Thanks  :)
george_gr
New Member
New Member
Posts: 8
Joined: Fri Oct 15, 2010 7:00 am

Re: Announcing new module: GBFilePicker

Post by george_gr »

I think the problem in internet explorer is in :

#GBFP_wrapper #GBFP .GBFP_header fieldset
{
          margin  : 5px;
          position : relative;
}

If you remove the position : relative;  On this entry it works (almost) ok on msie.

------------------------------------------------
I have been trying to implement this module inside news but I have had very little luck with it.
My knowledge of cmsms is limited though, and I am not a professional programer anyways so i am a bit fumbling here.

If anyone could help out in the following it would really be great :

Is there anyway (a hack most likely) to allow all users (groups) the same access to  GBFilePicker as admins have.

Please please and info would be greatly appreciated.

Thanks
George
NaN

Re: Announcing new module: GBFilePicker

Post by NaN »

Thanks for the CSS hint. Seems to work. Now i can finally release v.1.2 :)

To grant full access to the filepicker there are various ways.

You just need to set permission "Modify Files" and set the module setting "Show filemanagement options". The users are now able to do almost any file operation.
But they cannot browse in other directories than the specified one. (and therefore they cannot create directories)
If the users may create directories you need additionally set the param show_subdirs="true". (it doesn't make sense to grant directory creation but deny browsing the created dirs. this is why you need both.)

But the users are still "trapped" in the specified directory. This cannot be changed unless you do not specify a directory. So the users are able to browse the entire uploads directory.

If you don't want to set the permission "Modify Files" to these users (because you don't want them to use the FileManager) disable this permission and use the params upload, delete, create_dirs and show_subdirs (set them all to true). So even non-admin users without permission of fileoperations are able to do fileoperations in the filepicker.

Using the {content_module} tags it may look like this:

{content_module module="GBFilePicker" block="some_block_name_without_whitespaces" label="The label of this block" mode="browser" dir="some_dir" upload="true" delete="true" create_dirs="true" show_subdirs="true"}

This grants almost any operation even to non-admin users but with one restriction: they cannot browse above the specified dir. That means the users are "trapped" in "some_dir".
If the param dir is not used, they are able to browse the entire uploads dir and can do everything an admin can do.

In version 1.2 you will additionally be able to do the opposite thing. That means instead of only to grant functions to non-admin users without appropriate permissions you can also deny certain functions even to users with sufficient permissions.
(except the admins of course)

Notice: in version 1.2 the module setting "Show filemanagement options" needs to be checked to allow non-admin users to use fileoperations in general. If this is unchecked only the admin is able to use fileoperations in filepicker. No matter what permission the non-admin users have. (Some security stuff to just turn it off)
george_gr
New Member
New Member
Posts: 8
Joined: Fri Oct 15, 2010 7:00 am

Re: Announcing new module: GBFilePicker

Post by george_gr »

thank you very much for the guide NaN much much appreciated.
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am
Location: New Zealand

Re: Announcing new module: GBFilePicker

Post by Cerulean »

Has anyone found a fix the bug logged here: http://dev.cmsmadesimple.org/bug/view/6484 ?

GBFilePicker v1.3 won't open from the "Browse" link in Internet Explorer 6, 7 or 8 (not sure about IE9 as I'm using XP).
Error is: 'GBFP.tmp.template.#GBFP_filelist' is null or not an object

Would be great to be able to use this excellent module again.
Locked

Return to “Modules/Add-Ons”