Copied to clipboard

Flag this post as spam?

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


  • Mr A 216 posts 278 karma points
    Sep 15, 2011 @ 17:15
    Mr A
    0

    Adding youtube(utube) videos to ublogsy

    hi , I tried adding utube package to the ublogsy with no success, 

    I added the following line to uBlogsyshowPost macro  

    <div class="uBlogsy_post_body">

        @Html.Raw(umbraco.library.RenderMacroContent(d.GetProperty("youtubeVideo").Value, d.Id)) 

        @Html.Raw(d.GetProperty("uBlogsyContentBody").Value)

         </div>

     where youtubeVideo is the umbraco item field but it only renders the youtube link it doesnt shows the video , How can i Add the youtube macro in it so that i can pass the htmlraw to the uTubeVideo :

    <umbraco:Macro uTubeVideo="" uTubeWidth="" uTubeHeight="" Alias="uTube.ChromelessPlayer" runat="server"></umbraco:Macro>
     

    Regards

  • Mr A 216 posts 278 karma points
    Sep 22, 2011 @ 17:38
    Mr A
    0
  • Mr A 216 posts 278 karma points
    Sep 22, 2011 @ 17:39
    Mr A
    0

    I manage to figure out the above issue by modifying the uBlogsyShowPost.cshtml :

    @{
        string flashID "ytPlayerAPI-" d.GetProperty("youtubeVideo").Value;

        }
    <div class="youTubePlayer" style="height:300px; width:400px;">

                <!-- Video is allowed to be embedded -->
                <div id="@flashID">
                  <p>You need Flash version 8 and JS enabled to view the video</p>
                </div>

                <!-- SWFObject call to Embed Chromless player -->
                <script type="text/javascript">
                  //SWF Embedd
                  var flashVars   = {video_id : '@d.GetProperty("youtubeVideo").Value', playerapiid: '@flashID'};
                  var params      = { allowScriptAccess: "always", wmode: "transparent" };
                  var atts        = { id: "@flashID" };
                  swfobject.embedSWF("http://www.youtube.com/apiplayer?enablejsapi=1&amp;version=3&amp;playerapiid=@flashID", "@flashID", "400", "300", "8" , null, flashVars, params, atts);
                </script>

                <!-- Controls -->
                <div class="muteControl mute">&nbsp;</div>
                <div class="controlDiv">&nbsp;</div>
                <div class="progressBar">
                  <div class="elapsed">
                    
                  </div>
                </div>
             
              
           

          </div>

          <div class="test">

                @Html.Raw(d.GetProperty("uBlogsyContentBody").Value)
               
                   
                 
               { <div class="test">@Html.Raw(d.GetProperty("uBlogsyContentBody").Value)</div>
                 }
            </div>
            
            @RenderPage("/macroScripts/uBlogsyListAuthors.cshtml", d.Id)

            <div class="uBlogsy_comment_count">
                @{
                    var comments = d.Descendants("uBlogsyComment")
                                    .Items.Where(x => x.GetProperty("umbracoNaviHide").Value != "1")
                                    .ToList();

                    if (comments.Count == 0)
                    {
                         <a href="@d.Url">0 Comments</a>
                    }
                    else
                    {
                        string hash = comments.First().Url.Replace(comments.First().Parent.Url, string.Empty);
                        string url = d.Url + "#!/" + hash;
                        
                        <a href="@url">@comments.Count Comments</a>
                    }
                }
                </div>

            <div class="uBlogsy_tag_list"> @RenderPage("/macroScripts/uBlogsyListTags.cshtml", @d.Id) </div>
            <div class="uBlogsy_category_list">  @RenderPage("/macroScripts/uBlogsyListCategories.cshtml", @d.Id) </div>
Please Sign in or register to post replies

Write your reply to:

Draft