|
|
Rank: Enthusiast
Joined: 11/4/2008 Posts: 48 Location: US
|
bootnumlock wrote:
in regards to an earlier post regarding the lightbox size... you can use the same mentality using imageGen...
I will update the package later this week to include imageGen sizing for the full size image as well.
Please could you tell me if this got done? I just installed the gallery on a fresh beta v4 installation and it works great, except for the fullsize image size on big images (bigger than screen res). When the images are bigger than the screen res it invokes scrollbars. If there's something in Jquery you can edit, would you mind pointing me to which section it's under?
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
i will make this addition and re-release later this weekend. thanks
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
Rank: Enthusiast
Joined: 11/4/2008 Posts: 48 Location: US
|
Thanks ever so much, I would really appreciate it!
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
okay, here is the planned upgrade... on the docType for the gallery, i am going to add variables for thumb H and thumb W and for fullsizeH and fullsizeW constrain will always be true but you can update that via the xslt.
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
as requested... here is an update to the gallery package... now, in addition to picking the folder for the images and the thumbnail that represents the gallery, i have extended it to allow you to specify thumbnail sizes and full size image sizes... please let me know if i forgot anything in the new package... i was moving kinda fast... http://packages.maliciousthinktank.com/media/374/mtt_gallery2_2.0.zip
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
Rank: Enthusiast
Joined: 11/4/2008 Posts: 48 Location: US
|
Thank you very much. I uninstalled the previous gallery, and when I try to install the v2 gallery, I get the following error. Is there any way I can get around this without doing a fresh install of umbraco? From what I can tell, the error occurs because the installer is finding something already present, but I could be way off on this. Code:Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Item has already been added. Key in dictionary: 'gallery' Key being added: 'gallery'
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Item has already been added. Key in dictionary: 'gallery' Key being added: 'gallery'] System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +2904181 System.Collections.Hashtable.Add(Object key, Object value) +11 umbraco.cms.businesslogic.template.Template.initTemplateAliases() in d:\inetpub\wwwroot\ccnet\Source\Umbraco 3.1\umbraco\cms\businesslogic\template\Template.cs:324 umbraco.cms.businesslogic.template.Template.set_Alias(String value) in d:\inetpub\wwwroot\ccnet\Source\Umbraco 3.1\umbraco\cms\businesslogic\template\Template.cs:156 umbraco.cms.businesslogic.packager.Installer.InstallBusinessLogic(Int32 packageId, String tempDir) in d:\inetpub\wwwroot\ccnet\Source\Umbraco 3.1\umbraco\cms\businesslogic\Packager\Installer.cs:260 umbraco.presentation.developer.packages.Installer.processInstall(String currentStep) in d:\inetpub\wwwroot\ccnet\Source\Umbraco 3.1\umbraco\presentation\umbraco\developer\Packages\installer.aspx.cs:156 umbraco.presentation.developer.packages.Installer.Page_Load(Object sender, EventArgs e) in d:\inetpub\wwwroot\ccnet\Source\Umbraco 3.1\umbraco\presentation\umbraco\developer\Packages\installer.aspx.cs:42 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33 System.Web.UI.Control.OnLoad(EventArgs e) +99 umbraco.BasePages.BasePage.OnLoad(EventArgs e) in d:\inetpub\wwwroot\ccnet\Source\Umbraco 3.1\umbraco\businesslogic\BasePages\BasePage.cs:287 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,831 Location: MA, USA
|
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
did you delete all the nodes that were gallery related too??? i will try and paste the two xslt files here... if you can reinstall the original gallery these might prove helpful to just overwrite the originals... list galleries.... Code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!-- start writing XSLT --> <xsl:for-each select="$currentPage/node [string(data [@alias='umbracoNaviHide']) != '1']"> <xsl:variable name="picFile" select="./data[@alias='mainGalleryIMG']"/> <xsl:variable name="thumbW" select="./data[@alias='galThumbW']"/> <xsl:variable name="thumbH" select="./data[@alias='galThumbH']"/> <xsl:if test="$picFile !=''"> <xsl:variable name="galImage" select="umbraco.library:GetMedia($picFile,0)/data[@alias='umbracoFile']"/> <a href="{umbraco.library:NiceUrl(@id)}"> <img> <xsl:attribute name="src">/umbraco/imageGen.aspx?image=<xsl:value-of select="$galImage"/>&width=<xsl:value-of select="$thumbW"/>&height=<xsl:value-of select="$thumbH"/>&constrain=true</xsl:attribute> <xsl:attribute name ="style">float:left;margin:0 15px 20px 0;</xsl:attribute> </img> </a> </xsl:if> </xsl:for-each>
</xsl:template>
</xsl:stylesheet>
and showPics.... Code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!-- start writing XSLT --> <xsl:variable name="images" select="number($currentPage/data [@alias = 'galImages'])"/> <xsl:variable name="imageH" select="$currentPage/data [@alias = 'imageH']"/> <xsl:variable name="imageW" select="$currentPage/data [@alias = 'imageW']"/>
<xsl:variable name="thumbH" select="$currentPage/data [@alias = 'galThumbH']"/> <xsl:variable name="thumbW" select="$currentPage/data [@alias = 'galThumbW']"/>
<xsl:if test="$currentPage/data [@alias = 'galImages'] != 0"> <xsl:for-each select="umbraco.library:GetMedia($images, 'true')/node">
<xsl:variable name="theNode" select="."/> <xsl:variable name="picFile" select="./data[@alias='umbracoFile']"/>
<xsl:variable name="theTitle" select="@nodeName"/> <div class="galPic"> <a href="/umbraco/imageGen.aspx?image={$picFile}&width={$imageW}&height={$imageH}&constrain=true" rel='lightbox' title='{$theTitle}'> <img> <xsl:attribute name="src"> /umbraco/imageGen.aspx?image=<xsl:value-of select="$picFile"/>&width=<xsl:value-of select="$thumbW"/>&height=<xsl:value-of select="$thumbH"/>;constrain=true </xsl:attribute> </img> </a> </div> </xsl:for-each> </xsl:if>
</xsl:template>
</xsl:stylesheet>
the key is to add fields to the gallery doctype per the variables defined in the xslt. sorry about the issues with the new package... i will see what i can find out.
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
Rank: Enthusiast
Joined: 11/4/2008 Posts: 48 Location: US
|
Thanks for the help, it seemed to be my templates that were causing the problem. I manually removed the macros and then the tempaltes and it installed fine. Checking it out now.
Update:
I seem to be having a few problems - I don't know if they're related to not putting it on a fresh install.
Here's what I'm noticing:
- The max height parameter on the thumbnails doesn't seem to be working. Max width works great. It's ignoring max height so when I have a portrait oriented photo, it's much higher than the landscape ones.
- When the gallery page first loads up, I get the ! icon (error on page) in the status bar, error:
line 27, char 1 object expected. line 27 in my code is the first line of the javascript function: $(function() {
- possibly related to the previous point - The lightbox isn't functioning. When I click a thumbnail, it just loads the image via imagegen.aspx. The image displays at the correct size, but there's no lightbox stuff showing up.
Any suggestions on getting these few issues straightened out would be awesome. This is so close to having perfect functionality.
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
can you send me a link to where you are working? i may be able to trouble shoot better... the scaling with maxH and maxW i believe is an either or situation... typically, if i want everything uniform, i sent them to the same dimension -- ie 200 or 100, so that way if it is a tall picture, it will only be 200 tall, etc. feed me more info and double check that i remembered to include the lightbox js file in the package, i may have forgotten it.
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
yep, that was it... i forgot to include the js files... doh! try to download again from my site -- same link...
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
Rank: Enthusiast
Joined: 11/4/2008 Posts: 48 Location: US
|
Thank you, the lightbox is working great now. I am still having issues with the thumbnail height though. When I enter a thumbnail width only, it works (keeps them all to that width). When I enter a width and height, it seems to resize them to the width and ignore the height, but does constrain proportions. When I leave width blank and enter a height only, it displays the thumbnails at full image size (in this case, very big). I changed the order of the parameters in the xslt, putting height first. This seemed to work - is it a solid enough fix? (Am I right in thinking that it ignores the second parameter, since you said it's an either-or situation?) I changed this line: Code: <xsl:attribute name="src"> /umbraco/imageGen.aspx?image=<xsl:value-of select="$picFile"/>&width=<xsl:value-of select="$thumbW"/>&height=<xsl:value-of select="$thumbH"/>;constrain=true </xsl:attribute>
to this: Code:<xsl:attribute name="src"> /umbraco/imageGen.aspx?image=<xsl:value-of select="$picFile"/>&height=<xsl:value-of select="$thumbH"/>&width=<xsl:value-of select="$thumbW"/>;constrain=true </xsl:attribute>
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
very interesting... guess i learn somethign every day... did not know the order was important... if the fix works for you, then it is solid enough!
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,831 Location: MA, USA
|
ImageGen itself doesn't care about the order of parameters (or shouldn't, anyway). cheers, doug.
MVP 2007-2009 - Percipient Studios
|
|
Rank: Enthusiast
Joined: 11/4/2008 Posts: 48 Location: US
|
It seems to work, (I don't really know what I'm doing with the xslt, it just seemed like a good troubleshooting step to try.)
I really appreciate the help with tweaking this, it does just about everything I need it to now.
I highly recommend this module to anyone looking for a customizable user friendly photo gallery -I'm running this on the latest nightly build of the v4 beta and it's working perfectly.
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
thanks, i really dig the suggestion you made with specifying the sizes! great addition...i should really try to tighten this up soon and submit to the Repo... thanks for helping me make it better!!!
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
Rank: Newbie
Joined: 12/10/2008 Posts: 2 Location: Philadelphia
|
Hello, I installed your latest package (mtt_gallery2_2.0.zip) and that went ok, but when I go to view the "galleryDemo.aspx" page (or the Chicago.aspx gallery below), I get the raw ASPX file output to my browser, not the processed HTML output. What I mean, is that I see:
<%@Master Language="C#" MasterPageFile="~/masterpagers/galleryDemo.master"...
and all the rest of it in my browser.
I don't even have a "masterpages" directory in my site, so I am not sure what that path is referring to.
I checked out the template "galleryDemo", "galleryCat" and "gallery" I saw that there is ASP.NET markup in these files. I am new to Umbraco and I did not realize you can just drop asp.net code into a template. Is that correct?
In any case, it doesn't seem to be processing this page, just spitting out the raw file.
Do you know why this might be happening?
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
which version of umbraco are you running?
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
Rank: Newbie
Joined: 12/10/2008 Posts: 2 Location: Philadelphia
|
Sorry, forgot to mention: umbraco v 3.0.6 (Assembly version: 1.0.3050.25839)
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
aha! that package is developed to run under the v4 system, which uses masterpages :) so, you could modify the templates, etc to work with v3 by putting them in the correct syntax. If not, you could just dive into v4 as it is getting really stable and is the new face of the umbraco system. sorry for the confusion... perhaps i should update the info on my page to note that this package is for V4 of umbraco.
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
|
Guest |