Image Gallery (Simple Folder Version)

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
4/25/2010 10:04:44 PM
Gravatar
Total Posts 2239

Image Gallery (Simple Folder Version)

Hi Joe,

I have verified this on the demo site.

Changing the "Root Folder" in the module settings does nothing. When you change it and click save, the default option remains.

Thanks,
Joe D.

4/26/2010 7:17:46 AM
Gravatar
Total Posts 18439

Re: Image Gallery (Simple Folder Version)

Hi Joe,

The real bug is that this setting was showing up in module settings at all. I had changed this quite a while back so that it is only editable from the edit link not from module settings but must have missed something in an upgrade script along the way. It does work correctly from the edit page, but by design it only lets you choose a folder beneath /Data/Sites/[SiteID]/FolderGalleries and on the demo site I have the file manager locked down to the /Data/Sites/[SiteID]/media folder.

Because of the way this feature was designed it is needed to constrain the folder otherwise it could/would allow browsing file system folders that are beyond its scope. This feature came from a codeplex project that was not designed to plug into mojoPortal and was not designed to have any security or permissions of who could view the images.

I had considered changing it to locate the FolderGalleries folder beneath the media folder, but the problem is this would contain full size images not really suitable for use in web content. The feature generates its web and thumbnail images in a single location on disk for all sites under /Data/SystemFiles/FolderGalleryCache. There was not a way to make it have a different cache location for each site so there is not a good way to make the cache of web and thumbnail images browseable.

So to fix the issue about the setting showing up in module settings, this sql can be run:

DELETE FROM mp_ModuleSettings
WHERE SettingName = 'FolderGalleryRootFolder'
AND ControlType = 'Text'

The bug is that even though we changed it on the moduledefinition setting to not have a controltype it still had a lingering setting in mp_ModuleSettings with TextBox as the control type. By having an empty ControlType the setting will not appear in module settings, but it still can be accessed from code so we can edit it on the edit page and enforce checking that the entered folder name exists beneath /Data/Sites/[SiteID]/FolderGalleries

Best,

Joe

4/18/2011 12:55:39 PM
Gravatar
Total Posts 9

Re: Image Gallery (Simple Folder Version)

The functionality is brilliant, but I will agree that ascetically it isn't all that pleasing. You can however change the default Black box to a more pleasing color in Web.config by changing value FolderGalleryImageBackColor and FolderGalleryImageBorderColor.

You can also add such things as a background color and margins to foldergallery class in your template's styles.css file to make it look a little more cleaner.

4/18/2011 1:01:22 PM
Gravatar
Total Posts 9

Re: Image Gallery (Simple Folder Version)

Sorry, this was posted in the wrong section, should be here:

http://www.mojoportal.com/Forums/Thread.aspx?thread=3351&mid=34&pageid=5&ItemID=7

You must sign in to post in the forums. This thread is closed to new posts.