Jun 25 2007

Youtube PlusBox - Showing video on demand

எல்லாமே உக்காந்த யெடெத்துலேயே கிடச்சா ரொம்ப சௌகரியந்தான். இது வலை மேயலுக்கும் பொருந்தும். கூகுளுக்கு இது நன்றாக தெரியும். அதனால் தான், தனது முடிவுகளில் வரும் வீடியோக்களை அதே இடத்திலேயே பார்க்குமாறு அமைத்தது. அதன் Source Code (www.google.com/extern_js/f/CgJlbhgDGAc/6TK0G_vpOxU.js) -ஐ பார்த்து எதாவது Copy-Paste செய்யலாம் என்று, அதை பார்த்தால் தலை தான் சுற்றுகிறது.
ஒரு முடிவோடு களத்தில் இறங்கி, இன்னொரு தளத்திலிருந்த இந்த JavaScript Code -ஐ எடுத்து, வீடியோவை காட்டுமாறு மாற்றினேன்.

இதோ செயல் விளக்கம்.

உங்கள் Template-ஐ திறந்து Head->Style பகுதியினுள் இதை ஒட்டவும்.

/* Plus Box styles start here. */.PlusBox_floatL {float:left;}.PlusBox_CL {clear:both;margin:0px;padding:0px;}.PlusBox_link {cursor:pointer; font-weight:700; text-decoration:underline; color:blue;}.PlusBox_plus {float:left;background:url('http://www.google.com/mb/plus_sm.gif') no-repeat;width:14px;height:14px;cursor:pointer; margin-left:0px; margin-right:4; margin-top:3; margin-bottom:0;}.PlusBox_minus {float:left;background:url('http://www.google.com/mb/minus_sm.gif') no-repeat;width:14px;height:14px;cursor:pointer; margin-left:0px; margin-right:4; margin-top:3; margin-bottom:0;}/* Plus Box styles end here. */

Head பகுதியினுள் இதை ஒட்டவும். இந்த Script-ல் சில HTML Entities வருவதால் இதை CDATAவினுள் தான் ஒட்டியாக வேண்டும்.

<script language='javascript' type='text/javascript'>//<![CDATA[/* Plus Box script starts here */

function PlusBox_Show(holderId, action){ if (document.getElementById(holderId)==null)  return; var videoGroup = document.getElementById(holderId).getAttribute("videoGroup"); var videoId = document.getElementById(holderId).getAttribute("videoId"); var videoCount = document.getElementById(holderId).getAttribute("videoCount");

 for (var i=1;i<=videoCount;i++){  if (i==videoId)  {    PlusBox_Insert(holderId, action);  }  else if (action == "expand")  {   if (document.getElementById(videoGroup+ "_" + i)==null)    continue;   var placeHolder = document.getElementById(videoGroup+ "_" + i).getAttribute("placeHolder"); // Get the place holder's id   var plusboxStatus = document.getElementById(placeHolder).getAttribute("plusboxStatus");   if (plusboxStatus == "expand")    PlusBox_Insert(placeHolder, "collapse");  } }}

function PlusBox_Insert(holderId, action) { if (document.getElementById(holderId)==null)  return; var videoGroup = document.getElementById(holderId).getAttribute("videoGroup"); var videoId = document.getElementById(holderId).getAttribute("videoId"); var videoCount = document.getElementById(holderId).getAttribute("videoCount"); var txtShow = document.getElementById(holderId).getAttribute("txtShow"); var txtHide = document.getElementById(holderId).getAttribute("txtHide"); var youTubeId = document.getElementById(holderId).getAttribute("youTubeId"); var videoWidth = document.getElementById(holderId).getAttribute("videoWidth"); var videoHeight = document.getElementById(holderId).getAttribute("videoHeight"); if (action == "expand") {  // Show the embedded video  var inner =  "<div style=\"width:260px;margin-left:2px;\" class=\"PlusBox_floatL\">" + "n" +  "<div id=\"" + videoGroup + "_B_" + videoId + "\" onclick=\"PlusBox_Show('" + holderId + "', 'collapse')\" class=\"PlusBox_minus\"></div>" + "n" +  "<div class=\"PlusBox_floatL\">" + "n" +  "<font color=\"#0000FF\">" + "n" +  "<a id=\"" + videoGroup + "_F_" + videoId + "\" onclick=\"PlusBox_Show('" + holderId + "', 'collapse')\" class=\"PlusBox_link\" txtShow=\"" + txtShow +"\" txtHide=\"" + txtHide + "\">" + txtShow + "</a>" + "n" +  "</font>" + "n" +  "</div>" + "n" +  "<div style=\"width:75px;margin-top:6px;margin-left:4px;\" class=\"PlusBox_floatL\"></div>" + "n" +  "</div>" + "n" +  "<div class=\"PlusBox_CL\"></div>" + "n" +  "<!-- YouTube Plus Box Video starts here -->" + "n" +  "<div id=\"" + videoGroup + "_" + videoId + "\" placeHolder = \"" + holderId + "\" style=\"display:block; margin:5 0 0 20px;\">" + "n" +  "<!-- Video Embed starts here -->" + "n" +  "<object width=\"" + videoWidth +"\" height=\"" + videoHeight + "\">" + "n" +  "<param name=\"movie\" value=\"http://www.youtube.com/v/" + youTubeId +"\"></param>" + "n" +  "<param name=\"wmode\" value=\"transparent\"></param>" + "n" +  "<embed src=\"http://www.youtube.com/v/" + youTubeId +"\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\""+ videoWidth + "\" height=\"" + videoHeight +"\"></embed>" + "n" +  "</object>" + "n" +  "<!-- Video Embed ends here -->" + "n" +  "</div>" + "n" +  "<!-- YouTube Plus Box Video ends here -->";

  document.getElementById(holderId).innerHTML = inner;  document.getElementById(holderId).setAttribute("plusboxStatus", "expand"); } else {  // Revert to the collapsed text link  //var txtShow = document.getElementById(holderId).innerText;  var colpasedHtml = "";  colpasedHtml += "<div style=\"width:260px;margin-left:2px;\" class=\"PlusBox_floatL\">";  colpasedHtml += "<div onclick=\"PlusBox_Show('" + holderId + "', 'expand')\" class=\"PlusBox_plus\"></div>";  colpasedHtml += "<div class=\"PlusBox_floatL\">";  colpasedHtml += "<a onclick=\"PlusBox_Show('" + holderId + "', 'expand')\" class=\"PlusBox_link\">" + txtShow + "</a>";  colpasedHtml += "</div>";  colpasedHtml += "<div style=\"width:75px;margin-top:6px;margin-left:4px;\" class=\"PlusBox_floatL\"></div>";  colpasedHtml += "</div>";  colpasedHtml += "<div class=\"PlusBox_CL\"></div>";  document.getElementById(holderId).innerHTML = colpasedHtml;  document.getElementById(holderId).setAttribute("plusboxStatus", "collapse"); }}

/*Plus Box script ends here*///]]></script>

பின்னர் பதிக்கும் போது இக்கோடில் உள்ள கோடிட்ட இடங்களை நிரப்பவும்.

<div id="UNIQUE_PLACEHOLDER_ID” plusboxStatus=”collapse” videoGroup=”GROUP_NAME” videoId=”VIDEO_NUM” videoCount=”VIDEO_TOTALCOUNT” txtShow=”SHOW_VIDEO_CAPTION” txtHide=”HIDE_VIDEO_CAPTION” youTubeId=”YOUTUBE_ID” videoWidth=”425″ videoHeight=”350″> <div style=”width:260px;margin-left:2px;” class=”PlusBox_floatL”>  <div onclick=”PlusBox_Show(’UNIQUE_PLACEHOLDER_ID‘, ‘expand’)” class=”PlusBox_plus”></div>  <div class=”PlusBox_floatL”>   <a onclick=”PlusBox_Show(’UNIQUE_PLACEHOLDER_ID‘, ‘expand’)” class=”PlusBox_link”>SHOW_VIDEO_CAPTION</a>  </div> <div style=”width:75px;margin-top:6px;margin-left:4px;” class=”PlusBox_floatL”></div> </div><div class=”PlusBox_CL”></div></div>

UNIQUE_PLACEHOLDER_ID - ஒரு யுனிக் பெயரை இடவும்.
GROUP_NAME - ஒன்றுக்கு மேற்பட்ட வீடியோக்களை இணைக்க வல்லதொரு பெயரை இடவும். இவ்வாறு இணைக்கப் பட்ட வீடியோக்களுள் ஒன்றை விரித்தால் அந்த இணையிலுள்ள மற்ற விடியோக்கள் சுருங்கும்.
VIDEO_NUM - இந்த இணையில் இந்த விடியோவின் எண் (1, 2, 3…)
VIDEO_TOTALCOUNT - இந்த இணையில் உள்ள மொத்த விடியோக்களின் எண்ணிக்கை
SHOW_VIDEO_CAPTION - விடியோவின் சுருங்கிய நிலையில் காட்டப் பட வேண்டிய தலைப்பு
HIDE_VIDEO_CAPTION - விடியோவின் விரிந்த நிலையில் காட்டப் பட வேண்டிய தலைப்பு
YOUTUBE_ID - விடியோவின் யூடியூப் ஐ.டி.

பிறகு உங்கள் கோடை ஒரே வரியில் வருமாறு செய்யவும். கடைசியில் உங்கள் கோட் இப்படித் தான் தோன்ற வேண்டும்.

<div id="GibbsSixes" plusboxStatus="collapse" videoGroup="cricketquotes" videoId="1" videoCount="3" txtShow="Watch Gibbs 6 X 6" txtHide="Hide Video" youTubeId="IZwOXPnJfLo" videoWidth="425" videoHeight="350"><div style="width:260px;margin-left:2px;" class="PlusBox_floatL"> <div onclick="PlusBox_Show('GibbsSixes', 'expand')" class="PlusBox_plus"></div><div class="PlusBox_floatL"><a onclick="PlusBox_Show('GibbsSixes', 'expand')" class="PlusBox_link">Watch Gibbs 6 X 6</a></div><div style="width:75px;margin-top:6px;margin-left:4px;" class="PlusBox_floatL"></div></div><div class="PlusBox_CL"></div></div><div id="McGrathSledging" plusboxStatus="collapse" videoGroup="cricketquotes" videoId="2" videoCount="3" txtShow="Watch Macgrath-Sarwan spat" txtHide="Hide Video" youTubeId="-IsVsLh-yGs" videoWidth="425" videoHeight="350"><div style="width:260px;margin-left:2px;" class="PlusBox_floatL"><div onclick="PlusBox_Show('McGrathSledging', 'expand')" class="PlusBox_plus"></div><div class="PlusBox_floatL"><a onclick="PlusBox_Show('McGrathSledging', 'expand')" class="PlusBox_link">Watch Macgrath-Sarwan spat</a></div><div style="width:75px;margin-top:6px;margin-left:4px;" class="PlusBox_floatL"></div></div><div class="PlusBox_CL"></div></div><div id="WarneBall" plusboxStatus="collapse" videoGroup="cricketquotes" videoId="3" videoCount="3" txtShow="Watch Ball of the Century" txtHide="Hide Video" youTubeId="66I1YDOKcGI" videoWidth="425" videoHeight="350"><div style="width:260px;margin-left:2px;" class="PlusBox_floatL"> <div onclick="PlusBox_Show('WarneBall', 'expand')" class="PlusBox_plus"></div><div class="PlusBox_floatL"><a onclick="PlusBox_Show('WarneBall', 'expand')" class="PlusBox_link">Watch Ball of the Century</a></div><div style="width:75px;margin-top:6px;margin-left:4px;" class="PlusBox_floatL"></div></div><div class="PlusBox_CL"></div></div>

இந்த எடுத்துக்காட்டு என்னுடைய முந்தய பதிவிலிருந்து எடுத்தது.

Related links:-


Jun 25 2007

லொள்ளு சபா - "புதுபேட்டை - Survival of the fittest"

விசய் தொலைக்காட்சியில் வரும் லொள்ளு சபாவின் தீவிர ரசிகன் நான். நீண்ட இடைவெளிக்குப் பின்னர் கடந்த பிப்ரவரி மாதத்திலிருந்து, மீண்டும் லொள்ளு சபா ஒளிபரப்பாகிக் கொண்டிருக்கிறது (வெள்ளி இரவு 9 மணி). முதல் வாரமே கலக்கி விட்டார்கள். புதுபேட்டை படத்தை அருமையாக கலாய்த்தார்கள். இந்த முறை வித்தியாசமான நகைச்சுவையை கையாண்டிருகிறார்கள். ஒரே மாதிரி உச்சரிக்கும்
சொற்களையும், வசனங்களையும் கோர்த்து டைமிங் காமெடிப் பண்ணியிருக்கிறார்கள். சந்தானம் இல்லாத குறையை அவரைப் போலவே இருக்கும் புதிய நடிகர் தீர்த்திருக்கிறார். வழக்கம் போல மனோகருக்கு அப்பாவித்தனம் நன்றாக வருகிறது.

பிடித்த வசனங்கள் சில,

  • நாயகன் : என் பேரு குமாரு
    ஒருவர் : கொஞ்சம் நீ சும்மாரு
  • நாயகன் : என் பேரு கொக்கி குமாரு. கொக்கின்னா என்னா? யாருக்கு தெரியும்
    மனோகர் : நான் சொல்றேன். அது கரண் நடிச்ச படம். சுமாராப் போச்சு.
  • நாயகன் : அண்ணே இட்லி கொடுங்கண்ணே
    கடைக்காரர் : காசு?
    நாயகன் : காசெல்லாம் வேணாண்ணே. இட்லி மட்டும் கொடுங்க, போதும்
  • நாயகன் : எதாச்சும் வேல கொடுங்க சார்
    ரவுடித் தலைவன் : வேல இல்ல
    நாயகன் : அப்ப எல்லாரும் வெட்டியாத் தான் இருக்கீங்களா?
    ரவுடித் தலைவன் : டே. ஒனக்கு வேல இல்லன்னு சொன்னேன்
    நாயகன் : எனக்கு வேல இல்லேன்னு தான ஒங்க கிட்ட வேல கேட்டு வந்திருக்கிறேன்
  • ஒருவன் : டே, என் தம்ளர்ல ஊத்து.
    மனோகர் : என்னாது. உன் தம்ளர்ல ஊத்தா? அம்பது அடி தோண்டினாலே தண்ணி இல்ல. உன் தம்ளர்ல ஊத்துன்ரே
  • ஒருவன் : குமாரு, ஒனக்கு அம்மான்னா ரொம்ப புடிக்குமா?
    குமாரு : அம்மான்னா யாருக்காத்தான் புடிக்காது
    மனோகர் : DMK-க்கு புடிக்காதே
  • தல : டே, எங்கிட்டயே கத்தியக் காட்றியா? டே அன்பு, கத்தி காட்ரா
    (அன்பு “டாய் டாய்…” -ன்னு கத்தி காட்டுகிறார்
  • ரவுடி : டே பாண்டிலே (- என்று வூடு கட்டுகிறார்)
    மனோகர் : பாண்டிலே?
    ரவுடி : என் பேரு பாண்டிலே
    மனோகர் : பாண்டிலே ஓன் பேரு என்னா?
    ரவுடி : (கடுப்பாகி) என் பேரு பாண்டிலே
    மனோகர் : அதான் கேக்குறேன். பாண்டிலே ஓன் பேரு என்னா?

வீடியோவை இதோ இங்கேயே கண்டு ரசியுங்கள்….


Jun 21 2007

நாஞ்சில் நாட்டுத் தமிழ்

Tag: தமிழில் (in Tamil)Karthik @ 8:07 pm

கன்னியாகுமரி மாவட்டதில் மட்டும் வழக்கில் உள்ள தமிழ்ச்சொற்களை பதிக்கலாம் என்ற எண்ணத்தில் கட்டப்பட்டு ஒவ்வொரு சொற்களாக யோசித்து பார்த்தேன். கொஞ்சம் தான் ஞாபகத்தில் வந்தது. சரியென்று கூகுளை கேட்டால், அருமையான மற்றோரு பதிவு கிட்டியது. இப்பதிவில் தென்மாவட்டங்கள் அனைத்திலும் வழக்கில் உள்ள சொற்களை தெரிந்து கொள்ளலாம்.அதில் மிஞ்சியன சில இதோ..

விளம்பு - பரிமாறு
ஒருவாடு கூட்டம் - ஒரே கூட்டமாக இருக்கிறது
சாடு - தாவு
சோத்தப்பு (சுகத்தப்பு) - உடம்பு சரியில்லை
அனக்கம் - சத்தம்
வாரியல் - துடைப்பம் (விளக்குமாறு)
தூறு - பெறுக்கு
சாரம் - லுங்கி
கோரி குடி - மொண்டு குடி
போஞ்சி - எலுமிச்சை பழரசம்
கழஞ்சி - தண்ணீர் ஊற்றி வைத்த பழைய சோறு
கழனி - மாடுகள் குடிக்கும் ஒரு வகையான கலவை. சமையலில் வடி கட்டிய தண்ணீர், பழத்தோல்கள் எல்லாம் சேர்ந்தது

சில வகை மீன்கள் : சாளை, துண்டம், பாறை, வாழை
சில வகை பாம்புகள் : எட்டடி வீரன், சாரை,
சில வகை வாழைப் பழங்கள் : கதிலி, பாளையங்கோட்டை, துழுவன், செந்துழுவன் (செவ்வாழை), பேயன்


Jun 13 2007

Widgets on this blog

Tag: Web DevelopmentKarthik @ 8:01 pm

Update: I had posted this during my blogspot days. Things have changed since I set up self hosting. So, please read this in the context of my old blog in http://fermisoft.blogspot.com

A widget is a piece of HTML code, that can be integrated into a web page and reused. This blog makes use of many widgets for different purposes. Here is a list of widgets and how to use them on your websites.

  • Meebo Room - This widget is a great way of communicating with the online visitors of your web page (or blog). Once you have this widget on your website, it creates a private room for you and connects all the visitors who are accessing the page. You can chat with them using either your Meebo account or through your own web page instance. The visitors can chat among themselves too.To create you own meebo room, please visit http://wwwl.meebo.com/rooms/create, customize, copy the embed code and paste it in your website code. This product is from the Meebo, which also provides free web based Instant Messaging, that provides integrated interfaces for IM’s like Yahoo, GTalk, AIM and MSN.
  • Google Adsense - For showing targetted ads. This is a Google product to make revenue out of your web page content by showing relevant ads on your site. Google shares revenue made out through the ads on your site. Google relieves you from finding appropriate ads for your web page by finding the related ads using its own algorithm.You need to have a Google account to avail this service. Login into https://www.google.com/adsense/home using you Google account, enable your Adsense account, choose the right Ad layout for your web site, get the script and paste it in your web site code.Google Adsense also offers revenue sharing for promotions. These are promotions for two of its services, one for Google search and another for Adsense itself.
  • Hit & Subscription counters : Hit counter is available for free on this site http://www.free-counter.com/ (Account is needed). You can select from a huge list of counters, which shows the number of unique hits. Subscription counter shows the number of readers, who are reading the RSS feed through FeedBurner.You need to open an account, specify your website/blog. It creates a feed for the same and gives you the widget code. Feedburner also creates free RSS feeds of your blog for readers like Netvibes, Google Reader, Bloglines etc.
  • This is a Google search customized to search within this blog. Visit http://www.google.com/coop/ and create your own search engine.
  • Google Analytics is a web tool to monitor and track the site traffic. Activate your Analytics account, create a profile, get the tracking code and paste it in your website code. The script gets invoked, every time the web page is accessed, and collects the data like Network profile, lead to your site etc. It has a great reporting tool to show the results.



Jun 09 2007

Cricket Quotes

Tag: Video, SportsKarthik @ 1:13 pm

Here are some of the best quotes, I have come across on cricinfo.

  • “There must be two Justin Langers in the world, I think.” Ricky Ponting can’t believe that Justin Langer, never shy of a word or two himself, wants sledging stopped in county cricket.
  • “Before the game we said ‘Let’s make history today.’ Well, we made history.” Dutch captain Luuk van Troost on Herschelle Gibbs’s six sixes against them.
  • “They might need one by the time we’ve finished with them.”Shane Warne approves of South Africa’s plans to fly a psychologist from Johannesburg to motivate the players before the first Test at Perth
  • “I always viewed him as a once-in-20 games bowler.”Arjuna Ranatunga offers his frank views on Ajit Agarkar
  • “Most teams, you know, only the next player to bat puts pads on. With Zimbabwe, everyone puts pads on.” A Zimbabwe supporter half-jokingly comments on his national team
  • “Chris Cairns’s mother is probably a very good cricketer.”Brett Lee comments on Chris Cairns’s statement about how even his mother could lead this great Australian side
  • “My dad is 70, my mother is 60. The chances of another Kapil are close to zero.”Kapil Dev on being asked when India will see another Kapil Dev
  • “I got some pretty funny text messages from him after every one of the games - ‘how are you … are you on the next flight over?’ and ‘you can have your job back, I don’t want it any more’.”Ricky Ponting jokes about the text messages he had been receiving from his stand-in captain, Mike Hussey, during the Chappell-Hadlee Trophy
  • “My theory is that every time a batsman plays and misses he should be asked to take off one piece of protective clothing of the bowler’s choice.”Michael Kasprowicz takes a novel approach in the plan to contain batsmen
  • “No. Nayan Mongia should keep the wickets.”
    Nayan Mongia, when asked if Rahul Dravid should continue keeping wicket in one-day internationals
  • The immortal quote. Steve Waugh’s statement to Herschelle Gibbs. In a crucial world cup match, the pugnacious Steve Waugh, who was battling bravely to keep Australia in the World Cup, hit a ball in the air to Herschelle Gibbs, who in his anxiety to celebrate the catch, dropped the ball to the mortification of his team mates and the anguish of the South Africans in the crowd and at home. Steve Waugh is supposed to have made his since immortalised statement: “You’ve just dropped the World Cup, son.”
  • Mcgrath to Sarwan during the West Indian innings, “What does Brian Lara’s d*#k taste like?”. Sarwan slammed back, “I dont know, ask your wife”.

Some of Ashes quotes.

  • “How anyone can spin a ball the width of Gatting boggles the mind.” Martin Johnson, in The Independent, on Shane Warne’s ball of the century which bowled Mike Gatting in 1993.

  • “If it had been a cheese roll, it would never have got past him.” Graham Gooch joins the fun.

  • “A fart competing with thunder.” England in Australia in 1990-91, as assessed by their captain Graham Gooch
  • “Tufnell! Can I borrow your brain? I’m building an idiot.” One of the funnier Australian barrackers as Phil Tufnell was pilloried by the crowd in Newcastle, Ashes series, 1994-5

Cricket is after all a Gentlemen’s game. Keep visiting this page for the latest cricket quotes.


Next Page »


Close
E-mail It