Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MartinB 411 posts 512 karma points
    Jun 26, 2010 @ 20:25
    MartinB
    0

    Player works but totally trashes my layout

    The function of the player is fine, the only problem is that the macro totally trashes my webpage layout in IE8 and Firefox.

    It doesn't seem to be the scripts you manually have to put in the head section. If i remove them i still have a trashed layout. I suppose is the macro div* that's making it go nuts although i don't understand why as everything seems to close nicely. If i remove the macro from the RichTextEditor then i have no problems at all.

    Very peculiar :(

    * Macro code:

    <div umb_macroalias="Bouvet.Umbraco.AudioPlayer" umb_mediaid="1089" ismacro="true" onresizestart="return false;" umbversionid="c7e0989c-b524-4292-bb05-3dd6c869b868" umbpageid="1054" title="This is rendered content from macro" class="umbMacroHolder"><!-- startUmbMacro --><span style="color: green">No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>

  • MartinB 411 posts 512 karma points
    Jun 26, 2010 @ 20:32
    MartinB
    0

    This is what i get from view source:

    I don't get why the div from before is transformed to a <p> but all in all the code seems correct regardless

    <p id="audioplayer_ctl00_ctl00_ctl00_ContentPlaceHolderDefault_RunwayMasterContentPlaceHolder_ctl00_Mp3Player_3_main">/media/737/cocaine.mp3</p><script type="text/javascript"> AudioPlayer.embed("audioplayer_ctl00_ctl00_ctl00_ContentPlaceHolderDefault_RunwayMasterContentPlaceHolder_ctl00_Mp3Player_3_main", {soundFile: "/media/737/cocaine.mp3"});</script>
  • MartinB 411 posts 512 karma points
    Jun 26, 2010 @ 21:18
    MartinB
    0

    It seems that the macro doesn't like floats very much. I also use an "always stick to bottom" footer with pure css that fiddles around with 100% height. Dunno if that has any effect on the macro.

    If i remove the floatsm, a bit more of my content is shown, but the footer and other stuff is missing. Regardless it works flawlessly in IE7, IE8 and Firefox when i don't use the audio player. Also i can see that my page stops loading after the player is initialized. It just says "Stopped" at the lower left corner in firefox.

    I'vre tried to remove my jQuery references but no luck.

  • MartinB 411 posts 512 karma points
    Jun 26, 2010 @ 21:25
    MartinB
    0

    Ok, i found the error.

    I had a form tag (default for runway template) around the asp content that displays the bodyText. The audio macro doesn't like this for some reason.

    Guess i'll just have to make a seperate template for the contact page with the runway form as this will not work without the form tag.

    Well, at least i hope someone else will find this usefull.

  • Kristian Ravnevand 94 posts 214 karma points
    Jun 30, 2010 @ 11:08
    Kristian Ravnevand
    0

    Hm sorry for the lack of response here, but your monolog seems to find the solution :-)

  • Chad Rosenthal 272 posts 474 karma points
    Jul 30, 2010 @ 18:21
    Chad Rosenthal
    0

    It didn't trash my layout, but I'm certainly having issues with it. Basically it puts a ton of space above and below and we can't seem to style it. We added a class to the paragraph tag, but still no luck.

    We just want the control to display with maybe a 10px margiin on all sides.

  • Kristian Ravnevand 94 posts 214 karma points
    Aug 02, 2010 @ 08:17
    Kristian Ravnevand
    0

    Chad; you might consider putting a div around the player in the Mp3Player.ascx file, that might be easier to style.

    Something like this:

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Mp3Player.ascx.cs" Inherits="Bouvet.Umbraco.AudioPlayer.Mp3Player" %>
    <div class="myPlayer">
        <asp:Literal ID="main" runat="server"></asp:Literal>
    </div>

    The issue could have comething to do with other styles on you site. The only thing "my" code does is to put a flash file inside a paragraph tag.

  • Josh Reid 182 posts 258 karma points
    Feb 07, 2011 @ 03:22
    Josh Reid
    2

    Hey Kristian

    I have been havng the same issues without layout from this control when used within a .net form, so I just looked at the source and the self-closing script tags you have registered through the code behind are breaking layout...

    Could you please rebuild with full closed script tags (ie: <script></script> as below, rather than <script /> ");

    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "swfobject", "<script src='/scripts/swfobject_web.js' type='text/javascript'></script>");
    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "audio-player", "<script src='/scripts/audio-player.js' type='text/javascript'></script>");
    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "audio-player-init", "<script src='/scripts/audio-player-init.js' type='text/javascript'></script>");

    This would solve the display bugs people are encountering.

    Thanks
    Josh

  • Kristian Ravnevand 94 posts 214 karma points
    Feb 07, 2011 @ 08:22
    Kristian Ravnevand
    0

    Thanks for sharing this fix :-)

Please Sign in or register to post replies

Write your reply to:

Draft