about rotating header images

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
6/28/2010 7:47:24 AM
Gravatar
Total Posts 18439

Re: about rotating header images

Hi Andria,

The settings in the Html will only affect the slideshow if used in the Html instance it will not affect your header slide show, I just pointed you there for the help documentation. All the Html feature is doing with those settings is using them to determine what properties to set on the <portal:SlidePanel inside the Html feature.

You can specify settings directly on the control like this:

<portal:SlidePanel id="spanel1" runat="server" CssClass="rotatecontainer" TransitionEffect="fade,curtainX,turnUp,slideY,zoom,pinch,scrollRight" Random="true" TransitionInterval="3000" Speed="1000">

</portal:SlidePanel>

The properties I've shown here are the ones of interest, by default the TransitionEffect is only fade, but you can specify them comma separated as shown above, and the help in the html feature lists the possible transitions.

Best,

Joe

6/28/2010 6:25:34 PM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

Re: about rotating header images

Again, thank you!  This is marvelous, after so many years of trying to finesse some script or other thru a web interface to slide or fade as desired, where desired -- php was nice after trying to wrestle with perl cgi, but this! -- I can't believe it took me 10 years to find this!  But I guess asp.net hasn't been around for 10 years, and like so many folks, I had that "linux snobbery" going on, figuring it must surely be better, it's not microsoft.  wink

But this is a piece of cake, I'm finding out, despite looking like a train wreck on first glance -- I really was freaking out when I first got on an asp.net server about 3 wks ago, just hysterical -- now I'm seriously considering moving my "home" from my .com to my .net!!

Thank you, thank you! kiss

Andria

7/6/2010 6:56:30 AM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

Re: about rotating header images

Have no idea what those 2 posts from LeeRain are about, they probably should be deleted as they don't really say anything, just quote what I said.

Now:  I need to use this thing to setup a rotating banner, but frankly I'm stumped.  I see that one of the rotating bits is a bit of HTML, but how would that work when you need to put a link around the image?  The code looks like:

<div class="rotateitem">
<asp:Image id="img4" runat="server" CssClass="rotateitem" AlternateText=" " Height="60" ImageUrl="~/Data/logos/mojothumb.jpg" />
<p>lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor
lorem ipsum dolor </p>
</div>

but where, in that, does the link go?  I'm afraid if I just go ahead and make a standard image link, <a href="thatdomain.com"><img src="thisbanner.png"></a>, after I've already put in the src of the pic in the asp: statement, that it will somehow try to show the banner twice?

Yeah, I have looked at the AdRotator pages in the w3schools.com tutorial, at some length in fact, and I think *maybe* I get it, *somewhat*, but since I know this rotating img thing you showed me works so beautifully, and does that excellent user-defined fade, I'd really like to use it, if it's possible -- I just don't know how or where in the asp: statement to put a link, or how to "word" it, or what.

Linkless but hoping, wink

Andria

7/6/2010 7:13:02 AM
Gravatar
Total Posts 18439

Re: about rotating header images

Hi Andria,

I was wondering about those LeeRain posts. I think it was just a spammer trying top post links to some dating site. I deleted the posts.

I "think" you can wrap it like this:

<a href="http://yourfullyqualifiedurl"><asp:Image id="img4" runat="server" CssClass="rotateitem" AlternateText=" " Height="60" ImageUrl="~/Data/logos/mojothumb.jpg" /></a>

or if that gives any trouble try this:

<asp:Hyperlink id="lnk4" runat="server" CssClass="rotateitem" ImageUrl="~/Data/logos/mojothumb.jpg" NavigateUrl="~/yoururl" />

note that ids must be unique if you add more than one.

Hope it helps,

Joe

7/6/2010 10:42:18 AM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

Re: about rotating header images

Hmm.  Well, I tried the first way; not only did it not work, for some reason it seems to have completely broken the CSS layout.  Not sure why.  So I'll have to drop back and punt, re-upload an entirely virgin design without any of this rotating stuff, to make sure the page is in proper layout -- I swear, the page looked great last night, then I got up this morning and started on this rotating banner wild hair, and now it's broken.  *sigh*

Once I get it looking right again, I'll try that second way, see if that does any better.

I believe you're right about the spammer, which is why I said nothing about it when he first did it -- they're like hyperactive kids, paying attention to them just makes them worse! wink

 

Thx!

Andria

7/6/2010 10:49:49 AM
Gravatar
Total Posts 18439

Re: about rotating header images

It appears to break the CSS if an error happens because if the syntax in your usercontrol is not right an error happens and then it can't load the layout.master from your skin so it falls back to a different one and that is what makes it seem like the style is messed up. There is probably errors in the log that may give a clue about the error in your UserControl. Like 2 controls with the same id or something like that can cause an error. Probably the second way is the way to go.

Hope it helps,

Joe

7/6/2010 12:43:45 PM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

Re: about rotating header images

Well, that last little tidbit regarding the behavior on error causing the CSS breakage, and how to find the error in the system log, did the trick -- that first bit of code actually does work exactly as shown, once I got the stupid ID right! (I went over the URLs for the links and banners so carefully, and completely overlooked that my last copy/paste had left the imgs3 ID duplicated on the 4th banner! ARGH!)

So, I may at some point try out that 2nd example of coding the banners, but for now, the first way is in fact working -- check it out, http://mojo.crypticsites.net/home.aspx -- WITH rotating banners!  That is just sweet, no extra "extension" or module or whatnot needed, just the asp.net code!  I am plumb tickled pink about it.

 

And that reminds me, I wanted to find out if there is a way to change the default URL in that top-most menu, the one that mojo provides -- right now, the default home url is http://mojo.crypticsites.net but the only way to trigger the artisteer "home" button to appear in its active state is if you're on that url I used up above, home.aspx.  I've looked over the various mojo files to some extent, but much of that exploring was without a real sense of what exactly I was looking for, and although I'm sure the file is there somewhere, where I could edit that URL, for the life of me I can't find it.  Gimme a hint?

Thx!!

Andria

7/6/2010 1:54:00 PM
Gravatar
Total Posts 18439

Re: about rotating header images

Hi Andria,

Your site is looking good!

The issue with the menu highlighting seems to me like a bug in the artisteer script.js file. I was able to produce the same problem with the artisteer-24verticalmenu3 skin that is included with mojoPortal. Same symptom, if the url is / it was not highlighting but when you click the home page it would highlight.

I found that by editing the script.js file I could fix the issue by commenting out 1 line of javascript.

Look in the script.js file in the function shown here:

function artVMenu() {
    var menus = artGetElementsByClassName("art-vmenu", document, "ul");
    for (var k = 0; k < menus.length; k++) {
        var vmenu = menus[k];
        vmenu.uls = vmenu.getElementsByTagName("ul");
        vmenu.items = vmenu.getElementsByTagName("li");
        vmenu.alinks = vmenu.getElementsByTagName("a");

        for (var x = 0; x < vmenu.items.length; x++) {
            var li = vmenu.items[x];
            li.className = li.className.replace(/active/, "").replace(" ", " ");
            for (var s = 0; s < li.childNodes.length; s++) {
                var ch = li.childNodes[s];
                if (!(ch && ch.tagName)) continue;
                if (String(ch.tagName).toLowerCase() == "a") {
                    if (ch.href == window.location.href)
                       vmenu.active = li;
                    li.a = ch;
                }
                if (String(ch.tagName).toLowerCase() == "ul")
li.ul = ch;
//ch.className = ch.className.replace(/active/, "").replace(" ", " ");
}
}
if (!vmenu.active) return;
if (vmenu.active.ul) vmenu.active.ul.className += " active";
var parent = vmenu.active;
while (parent && parent != vmenu) {
parent.className += " active";
if (parent.a) parent.a.className += " active";
parent = parent.parentNode;
}
}

Notice specifically this line:

//ch.className = ch.className.replace(/active/, "").replace(" ", " ");

I added the  // at the beginning of that line to comment it out. Then clear your browser cache and refresh the page to be sure it reloads the javascript

Commenting that line out fixed it for me and did not seem to produce any side effects that I can see.

Hope it helps,

Joe

7/6/2010 6:40:57 PM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

Re: about rotating header images

Hmm, that *kinda* worked, but not completely; it allows the child menu entry to display (Norwegian Wood, a skin I made for mojo from one I had made for Joomla, mainly just playing with the page and menu structure -- eventually "skins" will be its own menu entry/page, but right now that one is the only one I've posted for download -- I made this as a child to the Home page just for this purpose, to make sure the buttons and sub-levels are displaying correctly).  However it still isn't triggering it to the "active" state -- there are 3 buttons that will display, passive (the black w/black arrow), hover (black w/orange arrow), and active, which is blue w/white arrow -- if you click the artisteer home button from any point in the site, you'll see the home button in the active state, and the "home" link in the sitemap also uses the home.aspx url, so it also shows the active-state button -- but that home link in the top, mojo-generated menu, is still just the no-file-specified link.  I've looked in admin/Site settings, but don't see anyplace to specify it there, but I seem to recall something along this line in the web.config... I think?  Maybe it was in some other config file, I'm not really sure, but there ought to be some way of getting at that URL in that menu...?

Thx!!

Andria

7/6/2010 10:04:48 PM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

Re: about rotating header images

It occurs to me that this might be something I need to do at my hosting control panel, setup a hard redirect from http://mojo.crypticsites.net/ to http://mojo.crypticsites.net/home.aspx, so that anytime it finds itself at the first, it will automagically load the 2nd -- will that work?  Or would it screw up mojo?

Andria

7/7/2010 8:46:00 AM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

Re: about rotating header images

Well, I have managed a solution, a sort of end-run around that Home link at the top always using the no-file-specified URL.

In my hosting control panel, I set the first default files as index.htm and index.html.  In both of those, I setup a META http-equiv redirect:

<META http-equiv="refresh" content="0; url=http://mojo.crypticsites.net/home.aspx">

So, now whenever, on this site, a no-file-specified "http://mojo.crypticsites.net/" URL is encountered, it automatically loads the home.aspx, so that the artisteer Home button is triggered to its active state.

This seems to be the only way to ensure that home.aspx is always the "home" one gets to.

Andria

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