portal:carousel - anyone working with this?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/29/2010 9:02:11 PM
Gravatar
Total Posts 355

portal:carousel - Working in FF, not IE (Was: anyone working with this?)

I'm writing a custom feature, and the portal:carousel would be perfect in it - if I could get it to work.  So far, the CSS works, but no joy with an actual control.  Any suggestions?

8/29/2010 9:12:32 PM
Gravatar
Total Posts 355

Re: portal:carousel - anyone working with this?

NM - missed the step of adding the jcarousel style sheets to the style config of the custom skins I'd created for this client project.  Much better now - thyx!

9/4/2010 2:52:38 PM
Gravatar
Total Posts 355

portal:carousel - Working in FF, not IE

<div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" style="display: block;" disabled="true"></div>

<div class="jcarousel-next jcarousel-next-horizontal" style="display: block;" disabled="false"></div><div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" style="display: block;" disabled="true"></div>

<div class="jcarousel-next jcarousel-next-horizontal" style="display: block;" disabled="false"></div>

I've implemented the portal:carousel control, and it works great in FF, but not so very well in IE - my "Prev"/"Next" buttons have disappeared.  Any suggestions of what I might need to be looking for?

 

Edit: OK, looking at how the code's rendering in IE vs. FF, I think I see the problem:

 

IE:

<div< disabled="disabled" class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" style="display: block;" div=""/>

<DIV< style="DISPLAY: block" class="jcarousel-next jcarousel-next-horizontal" div jQuery1283637218429="8">

FF:

 

<div class="jcarousel-prev jcarousel-prev-horizontal jcarousel-prev-disabled jcarousel-prev-disabled-horizontal" style="display: block;" disabled="true"></div>

<div class="jcarousel-next jcarousel-next-horizontal" style="display: block;" disabled="false"></div>

 

I think I'll take a look at how the control's actually generating the jCarousel code...

9/4/2010 5:48:05 PM
Gravatar
Total Posts 355

Re: portal:carousel - anyone working with this?

Ah - found it!

       private string buttonNextHTML = "<div</div>";
        /// <summary>
        ///The HTML markup for the auto-generated next button. If set to null, no next-button is created.
        /// </summary>
        public string ButtonNextHTML
        {
            get { return buttonNextHTML; }
            set { buttonNextHTML = value; }
        }

        private string buttonPrevHTML = "<div</div>";
        /// <summary>
        ///The HTML markup for the auto-generated next button. If set to null, no next-button is created.
        /// </summary>
        public string ButtonPrevHTML
        {
            get { return buttonPrevHTML; }
            set { buttonPrevHTML = value; }
        }

 

Close the div tag, and it's gravy!

9/7/2010 7:08:40 AM
Gravatar
Total Posts 18439

Re: portal:carousel - anyone working with this?

Thanks!

This is now fixed in the source code repository.

Best,

Joe

9/7/2010 8:17:13 AM
Gravatar
Total Posts 355

Re: portal:carousel - anyone working with this?

No problem; it's just the exact thing I needed, just a tiny tweak!

12/6/2010 1:17:20 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

Hello i added a carousel script similar to the one on this site http://www.sapient.com/.. i had it working perfectly when i was using DNN but is not working at all in mojoPortal, i mean all the images appear which are three images, but its all broken. How can i fix this i have read a few samples but not luck, i tried teh asp:Script control but nothing i dont knwo what else to do.

this is the script that i had working on DNN

 

<!--script type="text/javascript" src="<%= SkinPath %>js/jquery-1.4.2.min.js"></script-->
<script type="text/javascript" src="<%= SkinPath %>js/jquery.jcarousellite.js"></script>
<script type="text/javascript" src="<%= SkinPath %>js/jquery.easing.1.1.js"></script>
<script type="text/javascript">

var current_carousel_position = 1;

$(document).ready(function() {

/* initialize carousel */
$('.mycarousel').jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed:200,
easing: "easein",
visible: 1,
afterEnd: function(a) {
show_carousel_selected(current_carousel_position);
}
});

show_carousel_selected(current_carousel_position);

if(jQuery.browser.webkit || jQuery.browser.msie){
$("#mycarousel").css('marginTop', '-16px');
}

/*if(jQuery.browser.webkit){
$("#mycarousel").css('marginTop', '-16px');
}*/


});

/* ***************************************************************************************** */
function show_carousel_selected(index){
//alert ($('.slideshow .button-holder ul li').size());
index = ((index-1) % $('.slideshow .button-holder span').size()+1);
$('.slideshow .button-holder span').removeClass('on');
$('.slideshow .button-holder span#showcase-bullet-'+index).addClass('on');
}

</script>

Thank you

12/6/2010 1:21:29 PM
Gravatar
Total Posts 18439

Re: portal:carousel - anyone working with this?

please do not post the same question more than once.

I already gave you a good answer on this thread and you have not taken advantage of my help there. please review the links I posted for you and watch the video I told you about and you will learn how to integrate jquery including carousels in mojoPortal.

12/6/2010 1:31:22 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: portal:carousel - anyone working with this?

Unless you need that "navigator" control in your slideshow, I'd recommend using the built in "Slideshow of elements" settings of the mojoPortal HTML feature. It's much easier than maintaining extra JavaScript code in each skin. We're using this on the home page of our site: http://www.escondido.org.

Jamie

12/6/2010 1:36:54 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

Yes i need the navigator, but im only using this script for the front home page. i added the images in the html.

12/6/2010 3:07:40 PM
Gravatar
Total Posts 355

Re: portal:carousel - anyone working with this?

Have a look at www.roseanddagger.com - for the front page, I've just got an embedded jquery slider.  for the galleries, I've created a custom control that implements the portal:carousel.  Let me know if you have any questions I can answer for you.

12/6/2010 3:14:55 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

The one i created is in www.sapient.com which is somewhat a little similar to that one, im just really having a rough time in finding out where to put this jscript in my layout.master  in mojoPortal. this is my full layout.Master.

 

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="~/App_MasterPages/layout.Master.cs"
Inherits="mojoPortal.Web.layout" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
<head id="Head1" runat="server">
<title></title>
<%-- JQueryUIThemeName valid options are:
base, black-tie, blitzer, cupertino, dark-hive, dot-luv, eggplant, excite-bike, flick, hot-sneaks,
humanity, le-frog, mint-choc, overcast, pepper-grinder,
redmond, smoothness, south-street, start, sunny, swanky-purse, trontastic, ui-darkness, ui-lightness, vader
--%>
<portal:StyleSheetCombiner ID="StyleSheetCombiner" runat="server" JQueryUIThemeName="ui-darkness"
UseIconsForAdminLinks="false" UseTextLinksForFeatureSettings="false" EnableNonClickablePageLinks="true" />
<portal:IEStyleIncludes ID="IEStyleIncludes1" runat="server" IncludeHtml5Script="false"
IE6CssFile="style.ie6.css" IE7CssFile="style.ie7.css" />
<portal:MetaContent ID="MetaContent" runat="server" />
<!--[if IE]>
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" /><meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />
<![endif]-->
<portal:Favicon ID="Favicon1" runat="server" />
<portal:ScriptLoader ID="ScriptLoader1" runat="server" />
<portal:SkinFolderScript ID="sfs1" runat="server" ScriptFileName="script.js" />
<link href="css/about.css" rel="stylesheet" type="text/css" />
<link href="css/stylemenu.css" rel="stylesheet" type="text/css" />
<link href="css/customer-spotlight.css" rel="stylesheet" type="text/css" />
<link href="css/home.css" rel="stylesheet" type="text/css" />
<link href="css/ie.css" rel="stylesheet" type="text/css" />
<link href="css/news.css" rel="stylesheet" type="text/css" />
<link href="css/platform.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />

</head>
<body class="pagebody">
<form id="frmMain" runat="server">
<asp:SiteMapDataSource ID="SiteMapData" runat="server" ShowStartingNode="false" />
<asp:SiteMapDataSource ID="PageMapDataSource" runat="server" ShowStartingNode="false" />
<asp:SiteMapDataSource ID="ChildPageSiteMapData" runat="server" ShowStartingNode="false" />
<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
<div id="wrapwebsite">
<div class="topnav">
<portal:SkipLink ID="SkipLink1" runat="server" />
<ul>
<portal:WelcomeMessage ID="WelcomeMessage" runat="server" RenderAsListItem="true"
ListItemCss="firstnav" />
<portal:HomeLink ID="HomeLink" runat="server" RenderAsListItem="true" />
<portal:SiteMapLink ID="SiteMapLink2" runat="server" CssClass="sitelink" RenderAsListItem="true" />
<portal:MyPageLink ID="MyPageLink1" runat="server" RenderAsListItem="true" />
<portal:UserProfileLink ID="UserProfileLink" runat="server" RenderAsListItem="true" />
<portal:MailboxLink ID="MailboxLink1" runat="server" RenderAsListItem="true" />
<portal:MemberListLink ID="MemberListLink" runat="server" RenderAsListItem="true" />
<portal:SearchInput ID="SearchInput1" LinkOnly="True" RenderAsListItem="true" runat="server" />
<portal:RegisterLink ID="RegisterLink" runat="server" RenderAsListItem="true" />
<portal:LoginLink ID="LoginLink" runat="server" RenderAsListItem="true" />
<portal:LogoutLink ID="LogoutLink" runat="server" RenderAsListItem="true" />
</ul>
</div>
<div id="header">
<div class="logo">
<a href="home.aspx">Home</a></div>
<div class="contact">
<a href="#">Contact Us</a> | <a href="#">Sitemap</a>
</div>
</div>
<div id="wrapheader">
<%-- <portal:SiteMenu ID="SiteMenu1" runat="server" EnableTheming="false" UseTreeView="false"
HideMenuOnSiteMap="false" Direction="Horizontal" TopLevelOnly="true"></portal:SiteMenu>--%>
<asp:Panel ID="divAlt1" runat="server" CssClass="altcontent1">
<asp:ContentPlaceHolder ID="altContent1" runat="server">
</asp:ContentPlaceHolder>
</asp:Panel>
</div>
<div id="main">
<div class="hero-image">
<div class="inner">
<div id="wrapcenter">
<asp:Panel ID="divLeft" runat="server" CssClass="leftside" Visible="True" SkinID="pnlPlain">

<div class="sidebar">
<portal:PageMenu ID="PageMenu1" runat="server" UseTreeView="true" TreeViewShowExpandCollapse="true" />
<a id="startcontent"></a>
<asp:ContentPlaceHolder ID="leftContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</asp:Panel>
<asp:Panel ID="divCenter" runat="server" Visible="True" CssClass="center-rightandleftmargins"
SkinID="pnlPlain">
<div class="content">
<portal:Breadcrumbs ID="Breadcrumbs" runat="server"></portal:Breadcrumbs>
<portal:ChildPageMenu ID="ChildPageMenu" runat="server" CssClass="txtnormal"></portal:ChildPageMenu>
<asp:ContentPlaceHolder ID="mainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</asp:Panel>
<asp:Panel ID="divRight" runat="server" Visible="True" CssClass="rightside" SkinID="pnlPlain">
<asp:ContentPlaceHolder ID="rightContent" runat="server">
</asp:ContentPlaceHolder>
</asp:Panel>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="wrapfooter">
<p>
&copy; . All rights reserved</p>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$("span.downarr a").click(function () {
$("#toolbar").fadeOut();
$("#toolbarbut").fadeIn("slow");
});
$("span.showbar a").click(function () {
$("#toolbar").fadeIn();
$("#toolbarbut").fadeOut("slow");
});
$("span.downarr a, span.showbar a").click(function () {
return false;
});
});


</script>
<portal:AutoHidePanel ID="ah1" runat="server">
<div id="toolbarbut">
<span class="showbar"><a href="#">show bar</a></span>
</div>
<div id="toolbar">
<div class="toolbarleft">
&nbsp;
</div>
<div class="toolbarright">
<span class="downarr"><a href="#"></a></span>
<portal:AdminMenuLink ID="lnkAdminMenu" runat="server" />
<portal:FileManagerLink ID="lnkFileManager" runat="server" />
<portal:NewPageLink ID="lnkNewPage" runat="server" />
<portal:PageEditFeaturesLink ID="lnkPageContent" runat="server" />
<portal:PageEditSettingsLink ID="lnkPageSettings" runat="server" />
<asp:ContentPlaceHolder ID="pageEditContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</portal:AutoHidePanel>
<portal:mojoGoogleAnalyticsScript ID="mojoGoogleAnalyticsScript1" runat="server" />
<portal:Woopra ID="woopra11" runat="server" />
</form>
</body>
</html>
 

12/6/2010 3:46:47 PM
Gravatar
Total Posts 355

Re: portal:carousel - anyone working with this?

Are you planning on using your slide in multiple locations, or just a one-off on the front page?

12/6/2010 3:48:51 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

Just the front page.

12/6/2010 3:59:13 PM
Gravatar
Total Posts 355

Re: portal:carousel - anyone working with this?

Well, since it's a one-off, you can just "cheat"; put all your instance-specific javascript in an "instance.js" file, and reference your javascript files and .css (inline, if it's not too complex) in the HTML module containing your images.  It works just fine, and you can edit your content on the fly, and pull the animation entirely without having to shred the skin itself.

Here's another example where I used the same technique (site is in "pre-live" status at the moment): http://www.simplycyfair.com/

12/6/2010 4:09:34 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

Thanks for your quick reply,

 

I grabbed my jscript code which is this one and i put it inside a separate .js file and add it the inline path of the .JS between the <head> tags,an

d then in the html module i added the html code, but nothing seems to happen, all the images appear but the carousel transition is not working yet here is my code.

var current_carousel_position = 1;

$(document).ready(function () {

/* initialize carousel */
$('.mycarousel').jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed: 200,
easing: "easein",
visible: 1,
afterEnd: function (a) {
show_carousel_selected(current_carousel_position);
}
});

show_carousel_selected(current_carousel_position);

if (jQuery.browser.webkit || jQuery.browser.msie) {
$("#mycarousel").css('marginTop', '-16px');
}

/*if(jQuery.browser.webkit){
$("#mycarousel").css('marginTop', '-16px');
}*/


});

/* ***************************************************************************************** */
function show_carousel_selected(index) {
//alert ($('.slideshow .button-holder ul li').size());
index = ((index - 1) % $('.slideshow .button-holder span').size() + 1);
$('.slideshow .button-holder span').removeClass('on');
$('.slideshow .button-holder span#showcase-bullet-' + index).addClass('on');
}
 

12/6/2010 4:19:37 PM
Gravatar
Total Posts 355

Re: portal:carousel - anyone working with this?

Where are you inserting your carousel CSS?

12/6/2010 4:45:36 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

I created my css called home.css where I have included all the properties for the carousel, and I have inserted this file in the head tags with the right path.
12/6/2010 4:45:41 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

I created my css called home.css where I have included all the properties for the carousel, and I have inserted this file in the head tags with the right path.
12/6/2010 5:04:05 PM
Gravatar
Total Posts 355

Re: portal:carousel - anyone working with this?

Load the active page up in Firebug, and make sure everything's applying correctly.  Is there a URL where I can look at your WIP?

12/7/2010 8:40:15 AM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

I used Firebug and it gave me this error. "$ is not defined
 $(document).ready(function () { "

 

this is my script between the <head> tags

 

<script type="text/javascript">
var current_carousel_position = 1;

$(document).ready(function () {

/* initialize carousel */
$('.mycarousel').jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed: 200,
easing: "easein",
visible: 1,
afterEnd: function (a) {
show_carousel_selected(current_carousel_position);
}
});

show_carousel_selected(current_carousel_position);

if (jQuery.browser.webkit || jQuery.browser.msie) {
$("#mycarousel").css('marginTop', '-16px');
}

/*if(jQuery.browser.webkit){
$("#mycarousel").css('marginTop', '-16px');
}*/


});

/* ***************************************************************************************** */
function show_carousel_selected(index) {
//alert ($('.slideshow .button-holder ul li').size());
index = ((index - 1) % $('.slideshow .button-holder span').size() + 1);
$('.slideshow .button-holder span').removeClass('on');
$('.slideshow .button-holder span#showcase-bullet-' + index).addClass('on');
}

</script>

12/7/2010 8:56:35 AM
Gravatar
Total Posts 18439

Re: portal:carousel - anyone working with this?

You can keep struggling or you can follow the advice I already gave you and read this document:

http://www.mojoportal.com/adding-custom-javascript.aspx

and watch the video of the August mojoPortal User Group meeting

then you will understand how to do it correctly.

Also the way you are adding your css is wrong. You would save yourself some time and struggle by reading the skinning documentation carefully, in particular the document about the style.config file and how to add css files.

 

12/7/2010 10:40:05 AM
Gravatar
Total Posts 355

Re: portal:carousel - anyone working with this?

The error you're receiving is happening because your code's being read in the header before jQuery is being referenced.

It is a good idea to review the documentation Joe's mentioned; it's always good to know "the right way" before experimenting and implementing an alternative solution, the way I have for my "one-off" implementations. wink

Joe - I deeply appreciate all the work you put into the videos, the documentation, and most of all, into MojoPortal itself.  Exploring different ways of implementing functionality is a hallmark of the kind of people drawn to MojoPortal, and sometimes it's good to know "good enough" techniques when there's no time to do a custom control, re-compile, upload, etc.

Dasan - here is working example code of the jQuery horizontal slider on the front page of Rose and Dagger: it should give you an idea of how to do an "on the fly" implementation.  The following code is embedded along with the proper unordered list structures in an HTML control:

/*Main Container*/
.container {
width:872px;
}
.container ul{
list-style-type: none;
margin: 0;
padding:0;
}
.container li{
display: inline;
margin: 0px;
padding:0px;
}
/*Content Container*/
.contentContainer {
padding-left: 0px;
float: left;
width:0px;
height: 398px;
overflow:hidden;
}
.contentWrapper{
}
.contentInnerWrapper{
text-align: justify;
}
/* Handle*/
.handle{
float: left;
width: 84px;
height: 398px;
margin:0;
background: url("/Data/Sites/1/FrontPageSlider/inactive.jpg") no-repeat;
}

.handle img{
position:absolute;
margin-left:-82px;
clip: rect(0px, 164px, 398px, 90px)

/*top, right, bottom, left*/
}

.handleOver{
background: url("hover.jpg") no-repeat;

}
.handleSelected{
background: url("active.jpg") no-repeat;

}

.handleSelected:hover{
background: url("hover.jpg") no-repeat;
}

.handleSelected:hover img{
position:absolute;
margin-left:-82px;
clip: rect(0px, 164px, 398px, 88px)
}

.handleSelected img
{
position:absolute;
margin-left:0px;
clip: rect(0px, 84px, 398px, 4px)

}
.divText
{
width:417px!important;
margin-left:2px;
height:60px;
z-index:85;
padding:10px;
color:#eeeeee;
background-image:url("grey_trans.png");
background-repeat:repeat;
font-size:11px;
} </style>
<script type="text/javascript" src="/ClientScript/hrzAccordion/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="/ClientScript/hrzAccordion/jquery.hrzAccordion.js"></script>
<script type="text/javascript" src="/ClientScript/hrzAccordion/thisInstance.js"></script>

 

It's a big jump from DNN to MojoPortal; I've found Mojo to be a great product, and I'm sure you will, too. Hang in there!

 

12/7/2010 5:37:31 PM
Gravatar
Total Posts 18439

Re: portal:carousel - anyone working with this?

I've been chewing on this thread in the back of my mind today and what I concluded is it should be easier to add a jquery plugin scripts directly in layout.master.

I've changed the logic for the next release so that it will render the main jquery and jqueryui scripts in the head section, and as long as you add your script below the <portal:ScriptLoader, the jquery scripts you add that the plugin depends on will be below the main jquery and jqueryui scripts. So basically where you previously/currently need to create a UserControl and register the script from code to make it come in after the main jquery scripts, that problem will go away in the next release. Actually it is already changed in the source code repository for anyone working directly with the source code.

Hope it helps reduce struggles like this in the future.

Best,

Joe

12/8/2010 9:22:32 AM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

Thanks Joe, i think i will wait for the next release, unfortunately i have not been able to make it work yet. i keep on getting errors like this one

Firebug's log limit has been reached. 0 entries not shown. Preferences
$(".mycarousel").jCarouselLite is not a function
[Break On This Error] afterEnd: function (a) {
home.aspx (line 330)
$(".mycarousel").jCarouselLite is not a function
[Break On This Error] afterEnd: function (a) {

and im trying to learn how to create an UserControl to register the script but again this is new for me , i was use of just dragging the script link or source to the page.

 

12/8/2010 9:54:58 AM
Gravatar
Total Posts 18439

Re: portal:carousel - anyone working with this?

You can get it working now if you put both your plugin script and your instance script at the bottom just before the closing body tag.

<script type="text/javascript" src="/pathtoyourplugin.js" /

<script type="text/javascript">

$(document).ready(function () {
// wire up your plugin instance

});

</script>
</body>

this way you can be sure that jquery and jqueryui are already loaded above it.

12/8/2010 10:13:54 AM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

i can just add this in the  Layout.Master? Do i still need to put my .js in the ClientScript folder? Do i need to update mojoPortal?

 

Thank you

12/8/2010 10:18:46 AM
Gravatar
Total Posts 18439

Re: portal:carousel - anyone working with this?

yes in layout.master

you can put the plugin script where you like but under /ClientScript is not a bad idea, that is where I would put it, also the plugin may have css and image files that need to be placed relative to where you place the plugin js so you may need to structure it carefully to make sure it finds what it is looking for. It just depends on the plugin, I don't know much about jcarousellite, we have jcarousel built in to mojoPortal and it can be used much easier.

12/8/2010 10:21:25 AM
Gravatar
Total Posts 18439

Re: portal:carousel - anyone working with this?

no you don't need to update mojoPortal. In the next release it will be more tolerant of where you place the plugin script but for now you can put it at the bottom and it should work because the jquery and jquery ui will already be loaded above it.

 

12/8/2010 10:32:43 AM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

This is what i have!

 

<div class="toolbarright">
<span class="downarr"><a href="#"></a></span>
<portal:AdminMenuLink ID="lnkAdminMenu" runat="server" />
<portal:FileManagerLink ID="lnkFileManager" runat="server" />
<portal:NewPageLink ID="lnkNewPage" runat="server" />
<portal:PageEditFeaturesLink ID="lnkPageContent" runat="server" />
<portal:PageEditSettingsLink ID="lnkPageSettings" runat="server" />
<asp:ContentPlaceHolder ID="pageEditContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</portal:AutoHidePanel>
<portal:mojoGoogleAnalyticsScript ID="mojoGoogleAnalyticsScript1" runat="server" />
<portal:Woopra ID="woopra11" runat="server" />
</form>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"</script>
<script type="text/javascript" src="js/jquery.jcarousellite.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.1.js"></script>

<script type="text/javascript">

var current_carousel_position = 1;

$(document).ready(function () {

/* initialize carousel */
$('.mycarousel').jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed: 200,
easing: "easein",
visible: 1,
afterEnd: function (a) {
show_carousel_selected(current_carousel_position);
}
});

show_carousel_selected(current_carousel_position);

});

/* ***************************************************************************************** */
function show_carousel_selected(index) {
//alert ($('.slideshow .button-holder ul li').size());
index = ((index - 1) % $('.slideshow .button-holder span').size() + 1);
$('.slideshow .button-holder span').removeClass('on');
$('.slideshow .button-holder span#showcase-bullet-' + index).addClass('on');
}

</script>
</body>

 

and its giving me this ERROR

 

$(".mycarousel").jCarouselLite is not a function
http://localhost/mojoportal/home.aspx
Line 344

12/8/2010 10:41:23 AM
Gravatar
Total Posts 18439

Re: portal:carousel - anyone working with this?

get rid of the jquery 1.4.2 script since jquery is already loaded by mojoPortal.

If your js folder is in the root then you need to specify the url like /js/jquery.carousellight.js, you are missing the first /

the easing script may need to be above the carousel script

12/8/2010 10:50:30 AM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

</form>
<script type="text/javascript" src="/js/jquery.easing.1.1.js"></script>
<script type="text/javascript" src="/js/jquery.jcarousellite.js"></script>
 

<script type="text/javascript">

var current_carousel_position = 1;

$(document).ready(function () {

/* initialize carousel */
$('.mycarousel').jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed: 200,
easing: "easein",
visible: 1,
afterEnd: function (a) {
show_carousel_selected(current_carousel_position);
}
});

show_carousel_selected(current_carousel_position);

});

/* ***************************************************************************************** */
function show_carousel_selected(index) {
//alert ($('.slideshow .button-holder ul li').size());
index = ((index - 1) % $('.slideshow .button-holder span').size() + 1);
$('.slideshow .button-holder span').removeClass('on');
$('.slideshow .button-holder span#showcase-bullet-' + index).addClass('on');
}

</script>
</body>

Same ERROR

$(".mycarousel").jCarouselLite is not a function
[Break On This Error] afterEnd: function (a) {

12/8/2010 10:57:18 AM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

Do you have a place where i can send you a screen shot of how it looks

12/8/2010 10:59:08 AM
Gravatar
Total Posts 18439

Re: portal:carousel - anyone working with this?

you need to use Firebug and make sure it is not getting a 404 loading your js as well as your css and correct the urls as needed to make sure it finds your files. They should have urls relative to the root of the site, so if for example you are running the site as localhost/mojoportal then the script url would be like /mojoportal/js/...

Firebug will help you.

12/8/2010 11:58:01 AM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?Could it be something that im missing in my Layout.Master,

Could it be something that im missing in my Layout.Master, since im creating my own skin.

 

Because this is what im putting in the HTML Module inside the  DivLeft Content. And i have all my css in the style.config

<div class="showcase">
<div class="slideshow">
<div class="button-holder">
<ul>
<li><span id="showcase-bullet-1">1</span></li>
<li><span id="showcase-bullet-2">2</span></li>
<li><span id="showcase-bullet-3">3</span></li>
</ul>
</div>
<div class="button-holder-prev"><a href="#" class="prev" onclick="current_carousel_position--;">Prev</a></div>
<div class="button-holder-next"><a href="#" class="next" onclick="current_carousel_position++;">Next</a></div>
<div class="mycarousel">
<ul id="mycarousel">
<li class="power-synch">
<div><img height="334" width="946" src="/mojoportal/Data/Sites/1/skins/[skinfolder]/images/home/showcase/image1.jpg" alt="" /> <span>Harmonize media placement across markets and digital devices worldwide. <a href="#">More Information »</a></span></div>
</li>
<li class="change-the-game">
<div><img height="334" width="946" src="/mojoportal/Data/Sites/1/skins/[skinfolder]/images/home/showcase/image2.jpg" alt="" /> <span>Transform and optimize a single piece of creative content for multiple digital delivery points. <a href="#">More Information »</a></span></div>
</li>
<li class="consumer-experience">
<div><img height="334" width="946" src="/mojoportal/Data/Sites/1/skins/[skinfolder]/images/home/showcase/image3.jpg" alt="" /> <span>Refined transactional analytics create greater opportunities to learn from your customers. Create dialogue and build brand loyalty. <a href="#">More Information »</a></span></div>
</li>
</ul>
</div>
</div>
</div>

12/8/2010 1:47:08 PM
Gravatar
Total Posts 2253

Re: portal:carousel - anyone working with this?

Hi,

If you send me your skin and your javascript files, I will make it work and send it back to you.

joe (at) i7media (dot) net

Thanks,
Joe D.

12/8/2010 1:55:20 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

sent

12/8/2010 2:37:41 PM
Gravatar
Total Posts 2253

Re: portal:carousel - anyone working with this?

Hello,

I did the following and it worked fine.

  1. Move the javascript files to a directory named 'js' in the root of the website.
  2. Change the reference to the javascript files to /js/<javascript-filename>
  3. Removed the width rule from the .content class in the style.css file. This was preventing the slideshow controls from being viewed at all.

HTH,
Joe D.

12/8/2010 2:42:27 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

let me give it a try, when you say root of the Website you mean the custom skin folder?

12/8/2010 2:45:52 PM
Gravatar
Total Posts 2253

Re: portal:carousel - anyone working with this?

Nope, I mean the actual root of the entire site (/). The same directory that is holding the web.config file for your mojoPortal site. I used the following:

 

<script type="text/javascript" src="/js/jquery.easing.1.1.js"></script>
<script type="text/javascript" src="/js/jquery.jcarousellite.js"></script>
 
And by the structure of your skin, I doubt your mojoPortal installation is in a sub-directory or virtual directory of any kind so the above should work for you.
 
Thanks,
Joe D.
12/8/2010 3:05:08 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

Yayyy DONE!! Thanks a lot guys for all your support.laugh

12/8/2010 3:48:53 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

Fixed, It seemed there was just an extra class in the html.

 

Thanks once again

12/16/2010 1:39:29 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

Hello Joe,

After adding the .js everything works fine, except when i do to Administration > Site Settings > Security > Permissions. The Role tabs are not working. And i noticed that if i remove the javascript i added they work fine, but once i put the <script> the Roles tab will not work. What choices do i have?

 

Thank you, 

12/16/2010 1:46:33 PM
Gravatar
Total Posts 18439

Re: portal:carousel - anyone working with this?

make sure you are not loading jquery yourself since it is already loaded by mojoPortal, if you load it again it may cause errors.

12/16/2010 2:05:13 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

I noticed that this is the script that is causing this error with the Permission Roles Tab. My  javascript is in place but the navigator button is not working. What else can i do?

<script type="text/javascript" src="/js/jquery.easing.1.1.js"></script>

12/16/2010 2:13:53 PM
Gravatar
Total Posts 2253

Re: portal:carousel - anyone working with this?

Hi Damian,

You will have to figure out what part of the JS is causing the tabs to behave incorrectly and then figure out a way to modify the script so it doesn't cause problems.

You could also remove the JS include lines from your layout.master, place them in a separate HTML file and upload the HTML file to\Data\Sites\[sitenumber]\htmlfragments and then use the "HTML Fragment Include" module to include on the page with the SlideShow.

Hope this helps,
Joe D.

12/16/2010 2:21:50 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

is there any link that explains how to use the html fragments and then use the "HTML Fragment Include" module to include on the page with the SlideShow.

12/16/2010 2:31:15 PM
Gravatar
Total Posts 2253

Re: portal:carousel - anyone working with this?

Hi,

I just created documentation for this module here: http://www.mojoportal.com/using-the-html-fragment-include-module.aspx.

Thanks,
Joe

12/16/2010 3:43:50 PM
Gravatar
Total Posts 36

Re: portal:carousel - anyone working with this?

Fixed! thanks

You must sign in to post in the forums. This thread is closed to new posts.