Loading...
21 August 2012

blog එකේ comment box එකට video, image දාන්න අවස්තාවක් හා එක එක විදියේ පාට දාපු හැඩ කරපු අකුරු වලින් comment කරන්න දෙන්න ඕනද?

source:http://www.spiceupyourblog.com/2010/12/images-colored-text-blogger-comments.html andhttp://pastebin.com/UBBNK8zA

ඔයාලගේ බ්ලොග් එකේ comment box එකට video phato වගේ දේවල් comment එකක් විදියට දාන්න පුලුවන් කියලා ඔයාලා දන්නවද? ඒ වගේම comment box එකේ ලියන වචන වලට එක එක හැඩ වගේම එක එක දේ දෙන්න පුලුවන් කියලා ඔයාලා දන්නවද. ඔවු එහෙම පුලුවන්. ඒත් පොඩි වැඩක් කරන්න තියනවා.

මේ පහල තියන code ටික edit HTML වල </body> වලට පස්සේ දාන්න

<script src='http://hosting.gmodules.com/ig/gadgets/file/105066904960012479556/nccode.js' type='text/javascript'/>

හරි දැන් video එක ඇරෙන්න අනිත් සේරම කරන්න පුලුවන්. video එක දාන නම් පහල code ටික </head> වලට කලින් දාන්න ඕන

<script src='http://code.jquery.com/jquery-latest.js' type='text/javascript'/>
<script type='text/javascript'>
//<![CDATA[
// Embed youtube videos in Blogspot comments by MS-potilas 2012.
// See http://yabtb.blogspot.com/2012/03/embed-youtube-in-blogger-comments.html
//
// if oetag=0, just use video urls like:
// http://www.youtube.com/watch?v=12345678901
// surrounded by white space (video tag can be used, too)
// if oetag=1 (for nerdy blogs?), use syntax:
// [video=http://www.youtube.com/watch?v=12345678901]
// config:
var oetag = 0; // see above
var oetagname = "video"; // [video=zzz], maybe you like "embed" or "youtube" more?
var oelazy = -1; // -1 detect, 0 = normal, 1 = lazy (needs lazy load hack)
//
function oe_loadscript(filename) {
var scr=document.createElement('script');
scr.setAttribute("type","text/javascript");
scr.setAttribute("src",filename);
document.getElementsByTagName("head")[0].appendChild(scr);
}
function oe_jumptohash() { // reposition to anchor
window.scrollTo(0, $("#"+window.location.hash.replace(/^#/, "")).offset().top);
}
var oe_tid;
var oe_elems = {};
//
function oembed_callback(response) {
var resp = response;
revurl = resp.url.split("").reverse().join("");
html = oe_elems[response.callID].html();
ee = $(resp.html);
w = parseInt(ee.attr("width"));
h = parseInt(ee.attr("height"));
if(oelazy==1) { // convert to lazy load
src = ee.attr("src");
src += ((src.indexOf("?")==-1) ? "?" : "&") + "autoplay=1";
ee.attr("src", src);
ee.attr("style", "vertical-align:top;");
htm = $("<div/>").append(ee).html();
htm = $('<div/>').text(htm).html().replace(/"/g,'&quot;');
resp.html = '<a href="'+resp.url+'" class="youtube-lazy-link" style="width: '+w+'px; height: '+h+'px; background: #000 url('+resp.thumbnail_url+') center center no-repeat;" onclick="$(this).replaceWith(\''+htm+'\');return false;"><div style="width:'+(w-4)+'px;height:'+(h-4)+'px;" class="youtube-lazy-link-div"></div><div class="youtube-lazy-link-info"><b>'+resp.title+(resp.playlist ? '</b> [playlist]' : '</b>')+'<br /><small>by '+resp.author_name+'</small></div></a>';
}
htmlx = html.replace("[" + oetagname + "="+resp.url+"]", " " + resp.url + " ");
htmlx = htmlx.replace("[" + oetagname + "="+resp.url+" ]", " " + resp.url + " ");
htmlx = htmlx.replace('"'+resp.url+'"', '"'+revurl+'"'); // trick to preserve href="url"
htmlx = htmlx.replace(resp.url, '<div style="height:'+h+'px;" class="oembed youtube">'+resp.html+'</div>')
htmlx = htmlx.replace('"'+revurl+'"', '"'+resp.url+'"'); // trick to preserve href="url"
if(html != htmlx) {
oe_elems[response.callID].html(htmlx);
if(window.location.hash.replace(/^#/, "").length > 0) {
if(oe_tid) window.clearTimeout(oe_tid);
oe_tid = window.setTimeout("oe_jumptohash()", 1000);
}
}
}
function oembed_yt(url, width, callID) {
src = "http://oembed-js.appspot.com/?url=" + encodeURIComponent(url) + "&callback=oembed_callback&callID=" + encodeURIComponent(callID);
if(width) src = src + "&maxwidth=" + width + "&maxheight=" + width;
oe_loadscript(src);
}
$(document).ready(function() {
det=$('<div class="youtube-lazy-link-div" />');
$("body").append(det);
if(det.css("position")=="absolute") {
if(oelazy != 0) oelazy=1;
}
else oelazy = 0;
det.remove();
window.setTimeout(function() {
var callID=0;
$(".comment-content,.comment-body,.comment-body-author").each(function() {
html = " " + $(this).html() + " ";
if(oetag)
matches = html.match(new RegExp("\\["+oetagname+"=(https?:\\/\\/[^\\s<\\/]*youtu\\.*be[^\\]]+)", "g"));
else
matches = html.match(/([>\s^]|\[\w+=)(https?:\/\/[^\s<\/]*youtu\.*be[^\s<\]]+)/g);
if(matches && matches.length) {
for(var i=0;i<matches.length;i++) {
url = matches[i].match(/https?:\/\/[^\s<\/]*youtu\.*be[^\s<\]]+/);
oe_elems[callID] = $(this);
oembed_yt(url, $(this).width(), callID++);
}
}
});
}, 500);
});
//]]>
</script>

දැන් හරි save template දෙන්න. 

ඒත් මේ ගැන comment කරන අය දැනුවත් කරන්න එපයි. ඒකට settings >> comments >> Comment Form Message වල පහල එක හරි වෙන එකක් හරි දාලා දැනුවත් කරන්න.

<b>Comment Hint</b>

ඔබට comment සදහා <i> youtube video, Image, color text සහ marquee text</i> ඇතුලත් කල හැක


<b>Video:</b> Youtube video link

<b>Images:</b> [im]...........................[/im]

<b>scrolling effect:</b> [ma].....................[/ma]

<b>font size:</b> [si=&quot;2&quot;]..............[/si]

<b>font color:</b> [co=&quot;red&quot;].........................[/co]

<b>centralize the text:</b> [ce]..................[/ce]

<b>scrolling effect in right side:</b> [ma+]......................[/ma+]

<b>box the comment:</b> [box]....................[/box]

<b>mark the comment:</b> [mark].................[/mark]

<b>background effect:</b> [card=&quot;blue&quot;].....................[/card]

<b>image to fit the column(100%):</b> [im#]...........................[/im]

<b>Highlight the words:</b> [hi=&quot;yellow&quot;].........................[/hi]

හරි. මේකේ video photo වැඩ කරනවා. අකුරු වැඩ කරනවද බැලුවෙ නෑ වැඩකරනවා කියලා හිතෙනවා.

12 comments. :

  1. කමෙන්ට් එකත් හැඩ කරලා දෙන්න පුලුවන් වෙයි. :)
    …දාලා බලලා කියන්නම් කොහොමද කියලා.

    …වැදගත් වෙයි හැමෝටම

    ReplyDelete
  2. [ma]ම්ම්..මේකම තිබුණා නොනිම් අහස බ්ලොග් එකෙත්.. :D [/ma]

    ReplyDelete
    Replies
    1. [MA+]වෙන්න ඇති බලමු තියද කියලා. මම නම් හොයා ගත්තේ අර උඩ තියන SOURCE කියන SITE 2න්[/MA]

      Delete
  3. Honda Wadak! Try Karala Balanna ona!Thanx Yaluu!

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. [im]http://photos.lilduckduck.com/masquerade-thank-you-card-red-gold-front-m.jpg[/im]

    මේක ඔන්න මගේ බ්ලොග් එකටත් දාගත්තා..

    ReplyDelete
    Replies
    1. [im]http://img1.123friendster.com/en/youarewelcome/18.jpg[/im]

      Delete
  6. [im]http://1.bp.blogspot.com/-UFVcqpwb4BE/TjmZuCCbSMI/AAAAAAAAAy0/gDR8rbZYRsc/s1600/2011115_clapping_animation.gif[/im]

    ReplyDelete
  7. මමත් ඔය ගැන ලිව්වා නොනිමි අහසේ මෙතනින් බලන්න පුළුවන් කැමති අයට .ටිකක් විස්තර එක්ක තියනවා

    ReplyDelete
  8. තැන්කිවු මල්ලියා. ලින්ක් එක දුන්නේ දුඩ්. මතේ ෆොටෝග්‍රපි ගැන කියන පොස්ට් වලට මේක ගොඩක් වැදගත්.

    මල්ලි කොමෙන්ට් හින්ට් එකේ ෆොන්ට් සයිස් එක මාරු කරන්නේ කොහොමද?

    ReplyDelete
  9. [im]http://f0.pepst.com/c/0C9770/950214/ssc3/home/087/thisari/albums/suba_aluth_awuruddak_wewaaa...___.jpg_480_480_0_64000_0_1_0.jpg[/im]

    ReplyDelete

Your comment is the most important item for me...

අපිත් එක්ක එකතු වෙමු

 
TOP