Our Forum has Moved

This site is our old forum and is only here for achive until we get proper 301 redirects setup to make Google happy.

Please use our new community site - Our Umbraco - which contains an improved forum, documentation wiki, package repository and a member locator.

Go to Our Umbraco now

Learn everything about Umbraco
new package - mttGallery using jquery and imageGen Options
bootnumlock
Posted: Sunday, August 10, 2008 7:50:34 PM

Rank: Addict

Joined: 10/9/2006
Posts: 534
Location: batavia, IL
Hello all... after some basic testing from the community, i will submit this package to the REPO team :)

I have been asked about this lots since codegarden and actually before codegarden. I FINALLY made time to make this happen.

Mad Props to Per for the package creator and also Mad Props to Doug for imageGen, without those two pieces, this package could never happen.

any way, here is the brief intro:

This package is meant for version 3 of umbraco, but i can't see why it would not work with version 4 -- however, this is not a nitro :)

YOU NEED TO INSTALL IMAGEGEN FOR THIS TO WORK...

after that, just install the package...

The package creates a content node of galleryDemo with one gallery...
You will have to create a media folder with pics in it and pick that directory on the gallery node.

anyway, you can create galleries under the galleryCat home node... and select the folder with the pictures and the picture for the main gallery image.

here is the path to the package:
http://dev.baty-barr.com/media/40/mttgallery_1.0.zip

Let me know if anything goofy happens. I tested the install on a naked 3.0.5 install and all appears to be good...

Thanks!


bootnumlock - aka bob baty-barr
http://packages.maliciousthinktank.com


Level 1 Certified!
neilf
Posted: Monday, August 11, 2008 6:00:22 PM

Rank: Devotee

Joined: 3/19/2008
Posts: 69
Location: London
Hi Bob,

Just gave your gallery package a whirl and it installed ok on a not-so-naked version 3.0.5 test site. Looks pretty good and does the job nicely.

The ImageGen code to constrain proportions seems to work well for the gallery page and its neat & tidy for a sample folder that I pointed it at.

Ps if you have a large image e.g > screen resolution, then the lightbox grows outside the page and scrollbars appear. I don't know if its possible to constrain proportions in the lightbox - I haven't used the jquery lightbox yet - that might be an optional tweak if you know how...

Cheers for sharing. I'll let you know before I ever use the package. I was just giving it a test drive for now.

Neil


Neil

warren
Posted: Monday, August 11, 2008 6:23:34 PM

Rank: Umbracoholic

Joined: 7/19/2006
Posts: 1,025
Location: Benfleet, Essex, UK
Hi Bob,
Do you have a link to a DEMO version running of the package in action so its easier to know what i can expect when i install it.

Thanks,
Warren ;)

Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer

Are you NEW to Umbraco? Download CWS to help you learn Umbraco quickly
NOW Available from the Official Umbraco Package Repository
Skiltz
Posted: Tuesday, August 12, 2008 12:39:18 AM

Rank: Devotee

Joined: 12/6/2007
Posts: 64
Hi Bob, Gallery works great!

I've added it to my test site here http://nztua.trading.co.nz/gallery.aspx

The only modification I made was to show image and gallery names by altering the XSLT.

Thanks,
Matthew


New Zealand Umbracoee
bootnumlock
Posted: Wednesday, August 13, 2008 3:52:09 PM

Rank: Addict

Joined: 10/9/2006
Posts: 534
Location: batavia, IL
Yeah, sorry team :)

http://dev.baty-barr.com/

this page has a simple demo of the gallery... the link contains a single gallery that links to 4 images...


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.

Thanks for all the feedback thus far!



bootnumlock - aka bob baty-barr
http://packages.maliciousthinktank.com


Level 1 Certified!
americantabloid
Posted: Wednesday, August 13, 2008 8:43:39 PM
Rank: Enthusiast

Joined: 9/25/2006
Posts: 36
Seams really nice!!!

Great work.

Is there a way to include Next and Previous or something similar when you get the large picture, so you don't have to close the window and click on the next image you want to show.

Best regards
Max
Sweden
bootnumlock
Posted: Wednesday, August 13, 2008 8:51:18 PM

Rank: Addict

Joined: 10/9/2006
Posts: 534
Location: batavia, IL
the way the gallery is currently configured it renders each gallery out as a connected unit...

if you mouse over the right hand side of the first big image, you will see a NEXT graphic... just click the right hand side of the image and it goes to the next...

hope that helps

bootnumlock - aka bob baty-barr
http://packages.maliciousthinktank.com


Level 1 Certified!
Dirk
Posted: Wednesday, August 13, 2008 8:54:24 PM

Rank: Umbracoholic

Joined: 9/27/2007
Posts: 1,874
Location: Belgium
Hi Max,

Have a look at the docs for Lightbox. It explains in detail how to create a 'set' of pics, with previous/next support

Hope that helps.

Regards,
/Dirk


level 1 & 2 certified - umbraco MVP 2008/2009 - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
americantabloid
Posted: Thursday, August 14, 2008 1:52:04 PM
Rank: Enthusiast

Joined: 9/25/2006
Posts: 36
Hi guys!

Thanks for the replys, will definitely look into the package more closely.

Best regards
at
Claushingebjerg
Posted: Tuesday, August 26, 2008 4:07:44 PM

Rank: Devotee

Joined: 8/26/2008
Posts: 54
Location: Denmark
Hi

What a great gallery package.

I have one problem though... The gallery doesnt seem to use the thumbnails created by imagegen. This puts unnecessary load on the server! Is the gallery set to do this on purpose or am i doing something wrong?!?!

Check out the gallery here: http://www.hingebjerg.dk/billeder/rune-paa-besoeg.aspx

The source images are hi-res - like 3500 pixels wide, so you'll experience quite some load time due to the image resizing, which is what im looking to avoid.

Any help will be apreciated.

Thanks
bootnumlock
Posted: Tuesday, August 26, 2008 4:11:45 PM

Rank: Addict

Joined: 10/9/2006
Posts: 534
Location: batavia, IL
@Claushingebjerg i am confused a bit by your post. The script does create thumbnails via imageGen from the gallery images. It appears you have added a custom thumbnail that is cropped, etc.?

is this correct? Please let me know how you modified, so i may be of better assistance.

bootnumlock - aka bob baty-barr
http://packages.maliciousthinktank.com


Level 1 Certified!
Claushingebjerg
Posted: Tuesday, August 26, 2008 4:35:33 PM

Rank: Devotee

Joined: 8/26/2008
Posts: 54
Location: Denmark
No, i just place the thumb inside <div class="galPic"> which is then set to overflow:hidden and a height and width of 50 pixels via css.

But ive turned that off now, so you dont get confused ;)

My problem is it doesnt use the cached thumbnails on reload.
It recreates them every time, which is a bit heavy on the server.
bootnumlock
Posted: Tuesday, August 26, 2008 4:39:37 PM

Rank: Addict

Joined: 10/9/2006
Posts: 534
Location: batavia, IL
First, that is brilliant -- never thought to do something like that for the thumbnails :P great work!

The thumbnails should cache that is odd... and you are running the latest version of imageGen?

lastly, perhaps check to see if the macro is set to NOT cache? Doug may have to jump in on this after his holiday. I will ask him the next time i see him if i have overlooked something with my package that is not utilizing the cached thumbs...

Sorry for any stress the package is causing you.

Great Site!

bob

bootnumlock - aka bob baty-barr
http://packages.maliciousthinktank.com


Level 1 Certified!
Claushingebjerg
Posted: Tuesday, August 26, 2008 4:56:39 PM

Rank: Devotee

Joined: 8/26/2008
Posts: 54
Location: Denmark
I'm using the imagegen from the Umbraco Repository, 2.01. on an 3.05 Umbraco.
So that should be up to speed.

The macro properties is set to
"Cache period" is set to 0 seconds
"Cache by page" is checked.

These setting are from the default installation. i havent messed with them.

I tried changing the cache period just now, but it has no effect.



No problem on the stress part :)
bootnumlock
Posted: Tuesday, August 26, 2008 5:01:41 PM

Rank: Addict

Joined: 10/9/2006
Posts: 534
Location: batavia, IL
in media can you see the cached thumbs? perhaps it is a permissions issue with the media directories???

bootnumlock - aka bob baty-barr
http://packages.maliciousthinktank.com


Level 1 Certified!
Claushingebjerg
Posted: Wednesday, August 27, 2008 1:17:22 PM

Rank: Devotee

Joined: 8/26/2008
Posts: 54
Location: Denmark
No, i cant see the thumbnails in the media section of umbraco, but i can see them in the file system on the server.

There are two files in every "numbered" media folder, "filename.jpg" and "filename_thumb.jpg"

Inside the folder is another folder called "cached". Inside that is a number of images with strange names, like 8u8gt2zc.jpeg and an index.xml. these images are all different versions/sizes of the original image.

pkoutoul
Posted: Wednesday, September 10, 2008 7:34:38 PM

Rank: Fanatic

Joined: 8/9/2007
Posts: 292
Location: Kentucky, USA
Funny, I missed this when it was first posted. I basically created my own mini gallery script and when I was doing a search today about some media related XSLT I was having trouble with, I found this. I had already implemented the same JavaScript (Lightbox) so my gallery looks a lot like yours Bob! By the way, I wound up downloading your packsage just to look at the XSLT and the answer to my question was right there, so this was a big help.

Here's my version: http://www.fcps.net/news/features/2008-09/bus-driver


Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
skooter
Posted: Monday, October 06, 2008 11:02:44 AM

Rank: Devotee

Joined: 8/7/2008
Posts: 72
Location: Denmark
Get this error when trying to save listGalleries.xslt in umbraco 3.0.6. Havn't edited the xslt-file.

Code:
Hide ErrorsError occured
System.Xml.XPath.XPathException: Function 'umbraco.library:GetMedia()' has failed. ---> System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
at System.Double.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, TypeCode typeCode, IFormatProvider provider)
at System.Xml.Xsl.XsltOld.XsltCompileContext.XsltFunctionImpl.ToNumeric(Object argument, TypeCode typeCode)
at System.Xml.Xsl.XsltOld.XsltCompileContext.XsltFunctionImpl.ConvertToXPathType(Object val, XPathResultType xt, TypeCode typeCode)
at System.Xml.Xsl.XsltOld.XsltCompileContext.FuncExtension.Invoke(XsltContext xsltContext, Object[] args, XPathNavigator docContext)
at MS.Internal.Xml.XPath.FunctionQuery.Evaluate(XPathNodeIterator nodeIterator)
--- End of inner exception stack trace ---
at MS.Internal.Xml.XPath.FunctionQuery.Evaluate(XPathNodeIterator nodeIterator)
at MS.Internal.Xml.XPath.BaseAxisQuery.Evaluate(XPathNodeIterator nodeIterator)
at MS.Internal.Xml.XPath.BaseAxisQuery.Evaluate(XPathNodeIterator nodeIterator)
at System.Xml.Xsl.XsltOld.Processor.RunQuery(ActionFrame context, Int32 key)
at System.Xml.Xsl.XsltOld.VariableAction.Execute(Processor processor, ActionFrame frame)
at System.Xml.Xsl.XsltOld.ActionFrame.Execute(Processor processor)
at System.Xml.Xsl.XsltOld.Processor.Execute()
at System.Xml.Xsl.XsltOld.Processor.Execute(TextWriter writer)
at System.Xml.Xsl.XslTransform.Transform(XPathNavigator input, XsltArgumentList args, TextWriter output, XmlResolver resolver)
at System.Xml.Xsl.XslTransform.Transform(IXPathNavigable input, XsltArgumentList args, TextWriter output, XmlResolver resolver)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String fileContents, Boolean ignoreDebugging)


skooter.dk (danish)
Dirk
Posted: Monday, October 06, 2008 11:11:21 AM

Rank: Umbracoholic

Joined: 9/27/2007
Posts: 1,874
Location: Belgium
Hi,

Does it help when adding an <xsl:if> statement around the statements that contains the GetMedia() call? Probably due to the fact that the xslt is checked against a node (when it's saving) that doesn't have the mainGalleryPIC property!

Regards,
/Dirk


level 1 & 2 certified - umbraco MVP 2008/2009 - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
skooter
Posted: Monday, October 06, 2008 11:27:28 AM

Rank: Devotee

Joined: 8/7/2008
Posts: 72
Location: Denmark
Thanks Dirk, it worked :) Here is the xslt:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<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: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"/>&amp;width=200&amp;height=100&amp;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>


skooter.dk (danish)

The forum has moved

This forum is no longer in use, so you can't reply to this message - please go to Our Umbraco

Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.