CodeGarden 10: The sixth annual Umbraco Developer Conference
June 23-25th 2010 - free ASP.NET MVC pre-conference. Register today!

need help with simple image rotator by bootnumlock

6/23/2009 9:30:05 PMAvatarEvanLocation: Lynchburg, Virginia 24503posts: 344Karma: 98

I am using umbraco v4.0.2 and I am trying to get this to work.  I have imported the package, added <script src="/Scripts/swfobject.js" type="text/javascript"></script> to my header, created a folder with the id 1130 in my media section and added 5 pictures to it.  I have added the macro:


    <umbraco:Macro flashW="725" flashH="204" imageFolder="1130" playerTransition="fade" flashTime="4" Alias="InsertSimpleRotator" runat="server"></umbraco:Macro>

to my page but nothing shows up.  What is really weird is the flash is showing up under my content background image (have to remove it in firebug to see the loading screen).  It loads for about 30 seconds then the website says done but no images show, what am I doing wrong?

6/23/2009 9:59:10 PMAvatarEvanLocation: Lynchburg, Virginia 24503posts: 344Karma: 98
Comment with ID: 7794

Ok I fixed the problem with the swf loading under my content background, but it is still not pulling any images from the folder...

6/24/2009 9:43:48 AMAvatarbob baty-barrLocation: 339 elm street batavia, ILposts: 691Karma: 429
Comment with ID: 7810

when you visit the altTemplate which has the xml generation macro on it, what output do you see?

also, sorry for the slow response, still on Copenhagen time.  Let me know if you need more help, should be around most of day today.

7/2/2009 7:44:54 AMAvatarWadeLocation: Auckland, New Zealandposts: 11Karma: 31
Comment with ID: 8395

Hi Bob,

I have the same problem as Evan. I have imported the package, and added the InsertSimpleRotator macro into a template.  I have added the javascript in the header as well.  The template displays my content, and I see the loader, but no images. 

Do I need to add the SimpleRotator2_xml macro somewhere?  I have tried adding it to the same page without success as I assume without it no xml will be generated? Any ideas as to what we are doing wrong?

 

My code for the template is as follows:

<%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>

<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Page Title</title>
<script src="/Scripts/swfobject.js" type="text/javascript"></script>
</head>

<body>
<div>
<umbraco:Macro Alias="simpleRotator2_XML" runat="server"></umbraco:Macro>
Hello<br />
<umbraco:Macro imageFolder="photos" flashH="500" flashW="500" playerTransition="fade" flashTime="5" Alias="InsertSimpleRotator" runat="server"></umbraco:Macro>
</div>
</body>
</html>

</asp:Content>

Thanks Bob

7/4/2009 7:00:34 AMAvatarbob baty-barrLocation: 339 elm street batavia, ILposts: 691Karma: 429
Comment with ID: 8554

the other macro needs to be added to a template [i think it does by default] which is called to render the xml -- please feel free to contact me via email so we can set up a chat session [bob--atSign--maliciousthinktank--dot--com]

thanks

7/13/2009 12:41:05 AMAvatarWadeLocation: Auckland, New Zealandposts: 11Karma: 31
Comment with ID: 9387

So I actually managed to find the answer to my problem thanks to a friend Jamil.  I didn't have to add in the second macro at all.  I simply added the InsertSimpleRotator macro to my page template.  It then asks for the dimensions and the folder that the photos are found in.  The problem was that the photos weren't being accessed properly.  I made a photos folder in the media section of Umbraco, and so when the macro asked for the folder the photos were stored in, I wrote in the NAME of the folder (in this case "photos"), however, what the macro was looking for and what I didn't understand at first was that the macro wants to know the ID of the folder.  To find this, go to the media section, click on your folder where you have put your images, and there will be two tabs... content and propteries.  On the properties tab, at the bottom, it tells you the ID of the folder (in my case 1045).  Put this number in the area where it asks you for the folder, when you insert the macro into your template. 

<umbraco:Macro imageFolder="1045" flashH="247" flashW="500" playerTransition="fade" flashTime="5" Alias="InsertSimpleRotator" runat="server"></umbraco:Macro>

Macro imageFolder="1045" is the bit that was wrong.  Before I had it as Macro imageFolder="photos"

Thanks for the Macro Bob, I'm just getting to know xslt and umbraco, but this is a really handy macro.

 

10/4/2009 12:24:24 PMAvatarKevin CosterLocation: Bournemouthposts: 36Karma: 28
Comment with ID: 16060

Hi all

Having an issue with getting this working can see the Flash loader trying to load the images but its not working... have changed the imagefolder location and there are images there but it just sits and loads.

would appreciate some advice

Thanks

10/22/2009 9:52:24 AMAvatarWadeLocation: Auckland, New Zealandposts: 11Karma: 31
Comment with ID: 17481

Hi Kevin,

That is the same issue that I had before.  I could see the loader, but not the actual images.  I think it means that the macro can't find the folder where the images are located.  Did you try doing what my last post said and when you insert the code for the macro into your template make sure you have the ID of the images folder and not the name?

ie: <umbraco:Macro imageFolder="1045" flashH="247" flashW="500" playerTransition="fade" flashTime="5" Alias="InsertSimpleRotator" runat="server"></umbraco:Macro>

and not 

<umbraco:Macro imageFolder="photos" flashH="247" flashW="500" playerTransition="fade" flashTime="5" Alias="InsertSimpleRotator" runat="server"></umbraco:Macro>

11/1/2009 5:52:02 PMAvatarTaoistTottyLocation: Redruth, Cornwallposts: 22Karma: 42
Comment with ID: 18327

No joy for me with this.

I have used the folder number, but am just seeing the text, where is a good place to try and problem solve?

 

11/5/2009 11:30:30 PMAvatarWadeLocation: Auckland, New Zealandposts: 11Karma: 31
Comment with ID: 18761

Have you put the javascript in the header?

<script src="/Scripts/swfobject.js" type="text/javascript"></script>

Please login or Sign up To post replies