Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
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&version=3&playerapiid=@flashID", "@flashID", "400", "300", "8" , null, flashVars, params, atts); </script> <!-- Controls --> <div class="muteControl mute"> </div> <div class="controlDiv"> </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>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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
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&version=3&playerapiid=@flashID", "@flashID", "400", "300", "8" , null, flashVars, params, atts);
</script>
<!-- Controls -->
<div class="muteControl mute"> </div>
<div class="controlDiv"> </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>
is working on a reply...