Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsGalleryGalleryMax File Size across multiple galleriesMax File Size across multiple galleries
Previous
 
Next
New Post
6/15/2010 12:56 PM
 
Hello,

I plan on using the gallery on individual user's sites in a portal.  Is there anyway to set the cap for Max File Size across the entire portal so that each gallery will pick up instead of me having to manually increase it from 1000 for each gallery?

Thanks!
 
New Post
6/15/2010 10:28 PM
 
If you are looking to change the default MaxFileSize value of 1000 that is first assigned when a Gallery module is placed on the page, there is no way to do so without changing the value returned for the DefaultMaxFileSize property in the source code file Config.vb and re-compiling the Gallery project. Keep in mind, however, that any such change would be overwritten during any future upgrades of the Gallery module.

If you are looking to change the MaxFileSize value of all existing instances of a Gallery modules across the portal, you could try running the following SQL statements in the Host-->SQL command window with "Run as Script" checked:

DECLARE @PortalID int = 0
DECLARE @MyMaxFileSize int = 4096

DECLARE @ModuleDefID int = (SELECT ModuleDefID FROM {databaseOwner}{objectQualifier}ModuleControls
WHERE ControlSrc = 'DesktopModules/Gallery/Container.ascx')

UPDATE {databaseOwner}{objectQualifier}ModuleSettings
SET
SettingValue = @MyMaxFileSize
FROM {databaseOwner}{objectQualifier}ModuleSettings MS, {databaseOwner}{objectQualifier}Modules M
WHERE M.ModuleDefID = @ModuleDefID AND MS.ModuleID=M.ModuleID AND M.PortalID = @PortalID AND MS.SettingName='MaxFileSize'

GO

The above should change the MaxFileSize of all instances of the module on Portal 0 to 4 MB. Note that later additions of Gallery modules to the site will still default to 1000 KB and that the above SQL has not been thoroughly tested.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
6/16/2010 10:00 AM
 
William,

Thanks for the tips.  I had thought about changing the default in the source file but I was hoping there was a less drastic method of achieving my goal.

The SQL tip was definitely something I hadn't thought about and it ended up solving my problem with a few modifications.  In case anyone tries this in the future, the SQL Engine in the version of DNN I'm using (05.02.03 (74)) doesn't allow variables to be declared with a default value.

So
DECLARE @PortalID int = 0
would become
DECLARE @PortalID int
SET @PortalID = 0

This is assuming I wasn't doing anything wrong :P

Anyway, again, thanks William for giving me a solution!
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsGalleryGalleryMax File Size across multiple galleriesMax File Size across multiple galleries


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out