DNN Hosting Register Login
 
Latest Discussions Minimize
UMG 5.2.2 by facuseh01
Hello,I have two questions:1. Does UMG 5.2.2 work with Presentation Pack 3.1? 2....
Comments by userID by daviking
Thank you for a great product! I am really enjoying working with the new UMG5 ga...
users add albums by OKCChopper
I want my users to be able to add there own albums but not delete others.. can t...
UVG Videos to play in Smart Phones by Ibbs
HiIs it possible for UVG videos to be played on Smart phones. e.g black berry or...
Copy to another page by OKCChopper
I want to copy the module to another page and also have access to the same album...
How to add a link to view all videos? by anthonyar
Sorry this is a newbie question...i want to add a link to the menu to VIEW ALL t...
Personal vs Profile mode by coolvibe
I carefully read the description for both modes. but, I'm not exactly sure which...
Permission Check Failed by tbredweb
I am getting the message: The binary pack is not installed, or ASPNET/Network_Se...
Furniture Showroom major crash by myearwood
Hi PengstenI sent you an email via service@bizmodules.net. It concerns the furni...
Top photos windows size restriction by OKCChopper
I have it so that i can restrict the size of the photos. However since some arn...
Our Partnership Minimize
If you are looking for good DNN hosting, then PowerDNN is the best DNN host around!
Support Forum Minimize
Subject: Change Server Directory Dynamically
Prev Next
You are not authorized to post a reply.

Author Messages
Thayer Tate
Posts:5
Bronze Member

03/20/2008 7:27 PM  
I am trying to use the media gallery as part of an dynamic application.  What I want to do is include the video gallery on a page but dynamically change the server directory where the images come from based on a url parameter passed to that page.

My initial thought had been to let the module generate the object tag then copy and paste that onto the web page and hoped that the setting for the directory might be part of the object's parameters.  If so then it is just text that I could replace with a bit of code on the server side logic of the page.

I don't understand enough about the module to figure out how the flash object is getting the images from the server when it renders.  So I don't know if what I had in mind is possible or not.

Anyone that could explain to me how the "Server Directory" you set up on the gallery setup wizard gets save .. it would help a lot.

Thanks.
Pengtsen R
Posts:5190


03/20/2008 8:28 PM  
the "server directory" is saved in ModuleSettings table.

UMG renders the flash object when browse it, and tells the flash object to get pictures from DG.aspx by passing ModuleId in querystring, DG.aspx then check ModuleSettiings table and returns the list of pictures.

so a possible solution is, you create a new DNN module, this module read server directory from querystring, then update ModuleSettings table, so DG.aspx can use this parameter.

thanks.

Pengtsen R
http://www.bizmodules.net
Thayer Tate
Posts:5
Bronze Member

03/23/2008 8:10 PM  

Thanks for the update.  I was able to see what you were talking about.  I think a simpler method would be for me to edit the underlying stored procedure that is being used by dg.aspx.  I could simply pass in a fake module id and process the query differently in those special cases.  Otherwise I would have to create a lot of fake module settings records.

I looked at various stored procedures but I'm not sure which one is doing the looking up that ultimately takes in a module id and returns the server directory or list of photo files that are being returned by dg.aspx

Can you tell me what stored procedures are being called by dg.aspx.  I assume it passes in the module id to a stored procedure that returns the server path for file list.

 

Thanks.

Pengtsen R
Posts:5190


03/24/2008 1:10 AM  
You may need to modify GetModuleSetting.

This SP accept 2 parameters, moduleId and SettingName, if SettingName equals to "SourceFolder", then this is callsed by dg.aspx.

thanks.

Pengtsen R
http://www.bizmodules.net
Thayer Tate
Posts:5
Bronze Member

03/24/2008 4:15 PM  
Thanks for the reply.  I had seen those procedures last night and did in fact try that.  It didn't work for me and my results suggest that it doesn't use that stored procedure.  I tried it again just now to be sure.

I changed the GetModuleSetting stored procedure to look like the following.  It should return a setting value of 'test' instead of the file path truly stored in that setting any time it is run.

IF @ModuleID = 640
Select 'SourceFolder' as SettingName, 'test' as SettingValue From ModuleSettings Where moduleID = @ModuleID

Else
SELECT
 SettingName,
 CASE WHEN LEFT(LOWER(ModuleSettings.SettingValue), 6) = 'fileid'
  THEN
   (SELECT Folder + FileName 
    FROM Files
    WHERE 'fileid=' + convert(varchar,Files.FileID) = ModuleSettings.SettingValue
   )
  ELSE
   ModuleSettings.SettingValue 
  END
 AS SettingValue
FROM ModuleSettings
WHERE  ModuleId = @ModuleId

I ran the stored procedure in sql server and go the expected result.  I then constructed the URL that the object tag is using that calls dg.aspx (I copied it below) and looked at the result after these stored procedures have been changed.

http://www.buckheadpreserveatl.com/DesktopModules/BizModules%20-%20UltraPhotoGallery/DG.aspx?ModuleId=640&alias=www.buckheadpreserveatl.com&configuration=/Portals/6/UltraPhotoGallery/640/UMGClasssicCfg.xml&resourceFile=/DesktopModules/BizModules%20-%20UltraPhotoGallery/Swf_Resource/UltraPhotoGallery.swf.xml&alias=www.buckheadpreserveatl.com&baseUrl=/DesktopModules/BizModules%20-%20UltraPhotoGallery/&myEmailAddress=thayer@silverelm.com&galleryUrl=http://www.buckheadpreserveatl.com/PlansAvailableHomes/HomeDetails/tabid/210/Default.aspx?PhotoId=[PHOTOID]

and this is the result I got back from that call:


-
-
 
 
 
 
 
 

 


You'll notice that the imagepath should have been been 'test' but instead it was the same value it was before I made the stored procedure change.  I don't know how that could possibly return that value if it is in fact calling GetModuleSetting.  As a side note I made a similar change to the GetModuleSettings stored proc as well in case it was using that one.

Are you sure it uses the GetModuleSetting stored procedure to get that value?  If so what am I missing?  If I can just get the right procedure I think this will be an easy and effective way to do what I need.

Thanks for the help.  I feel like we are close but need the right procedure call and I can't follow the flow behind the scenes without seeing the source code behind dg.aspx.

Thayer Tate
Posts:5
Bronze Member

03/24/2008 4:17 PM  
I saw the results did not paste well with the response that came back from dg.aspx .. trying again .... if not you may need to do a view source to see the album tag.


-
-






Pengtsen R
Posts:5190


03/24/2008 8:50 PM  
try to restart w3svc service, DG.aspx use cache to enhance performance.

Pengtsen R
http://www.bizmodules.net
You are not authorized to post a reply.
Forums > Ultra Media Gallery > Support Questions > Change Server Directory Dynamically

Enterprise level DotNetNuke Solutions Copyright © 2005-2008 BizModules   |  Contact Us  |  Terms Of Use  |  Privacy Statement