Apr 11, 2014

CSS scrolling at horizontal behavior

Your HTML data.

<div class="wrapper">
  <div class="scrolls">
       <img src="http://placehold.it/50x50" />
       <img src="http://placehold.it/50x50" />
       <img src="http://placehold.it/50x50" />

CSS Data
.wrapper { 
        box-shadow: 1px 1px 10px #999; 
        margin: auto; 
        text-align: center; 
        position: relative;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border-radius: 5px;
        margin-bottom: 20px !important;
        width: 800px;
        padding-top: 5px;
    .scrolls { 
        overflow-x: scroll;
        overflow-y: hidden;
        height: 80px;
    .imageDiv img { 
        box-shadow: 1px 1px 10px #999; 
        margin: 2px;
        max-height: 50px;
        cursor: pointer;

See Reference output here http://jsfiddle.net/YbrX3/

Apr 9, 2014

Simplified version on how to download videos in ustream.tv

Let say this one from Will There Be a Spinoff From The Mentalist?

Here the pattern of the download URL

Given data/URL VIDEOID is 41138669. Now our problem is what is the CHANNELID? To get this one try to press CTRL+U to view the source code.
Here what you see in image below

Now two unknown data already exist. Just to check sure that that you know where the I get the video id. Check below datas.
URL: http://www.ustream.tv/recorded/41138669
VIDEOID: 41138669
CHANNELID: 7262640

And now what is the
? In our video id(41138669) the First Five(5) digits are 411386

Finally all data need to download the video already define. See summary below.

VIDEOID: 41138669
CHANNELID: 7262640

See the pattern and the output/outcome url.


URL To Donwload.

Try to download the file here.

Jan 14, 2014

How to override magento model.

Overriding magento model is some tricky base, that's why I want to share how this models Override.

First Mage_Reports_Model_Event_Observer

Second Mage_Reports_Model_Mysql4_Product_Index_Viewed_Collection
<!-- You configs -->

// Your PHP class
class Globe_Reports_Model_Mysql4_Product_Index_Viewed_Collection extends Mage_Reports_Model_Mysql4_Product_Index_Viewed_Collection{

// Put possible override methods or 
//  addition methods you want here