Eddy Yanto http://blog.eddyyanto.com Bits and bytes of me! posterous.com Fri, 06 Jan 2012 07:10:00 -0800 Working with Arduino http://blog.eddyyanto.com/working-with-arduino http://blog.eddyyanto.com/working-with-arduino

I started working on projects that use Arduino last year. The very first project was for a Heritage Gallery which showcases local education history and development since its establishment until present time. Following are my experience working on them.

Seamless projection shows using WatchOut and Arduino.

These 2 shows are similar in implementation with the only difference is on their number of projector used. The first one uses a single projector while the second uses 4. The video contents of the show are delivered using WatchOut, a software that output seamless projection out of multiple projectors. This software also controls the lighting in the projection room through it's DMX feature and in turn, the operation of the software is controlled using motion sensor and physical buttons. When motion sensor detects movement, lightings are turned on and the shows would transition to the introduction screen. It will stay until all visitors occupy the room. A gallery guide will then press one of the buttons to start the main part of the show. Another button which is designed to function as emergency will be used to stop the show. Near the ending of the show, a media player housed in an antique radio is triggered through a relay. All these things work in tandem to make the show appears harmonious.

To accomplish this, a number of things are put to work together: the storyline, animation and effect which make up most of the show, the DMX device that dims and brightens the lighting, the media player, the Arduino, Ethernet Shield and some related components. Arduino works as a proxy and manages the communication between these things. It receives input from motion sensor and buttons, transmits the corresponding message to WatchOut systems and through a relay, it triggers the playback of the media player. I was responsible for the implementation of the Arduino: wiring and programming. As this was my first time working with it, I had to learn basic electronics, soldering and stuff.

When everything was completed, we put them to test. At this time, an unknown error caused the show to jump to the start and end of timeline. The error manifested randomly, at one time, it caused a jump thorough the show and at other times, it didn't at all. I couldn't conclude anything from observing the continual occurrence of the error, it appeared purely random, without any pattern. In the end, this specific error took me almost 3 evenings to trace. As it turned out, the cables that that link the buttons to Arduino were to blame.

In the grand scheme of things, the cables were the least suspecting thing to me when I traced. I assumed they either work or didn't because they were just intermediary that carry the signal from the buttons and contain no moving parts. Earlier, I tested the cables using multimeter but found no defect. As the cables were quite long spanning from atop of the ceiling to outlets on the wall and was provided by an external vendor, I felt unenthusiastic to replace them if they worked fine. So hypothetically, I thought the cause of the error might lay elsewhere, perhaps in the wiring or in my code or even on the Arduino board.

The problem only became clear when I devised some test cases and started narrowing down the error. First I ran the WatchOut systems standalone and made sure they were operating as expected. Then I dismantled everything that was connected to Arduino and hooked them up step by step with a new set I built. The new set including some shorter cables just for testing were built because the previous debugging of old set didn't produce result. On each of these steps, I made the show run from start to end and log every message that was sent between Arduino and WatchOut to a text file using a serial logging utility called Gobetwino. The log enabled me to see what Arduino and the counterparts were doing and their states. After executing almost every test case, it became evident that the culprit was the cables. The new cables were running without hiccups for the first and subsequent times. And to replicate the error, I hooked back the old cables to Arduino. I showed this to the vendor and they replaced the cables next day. My boss's assumption was that from time to time, the cables somehow built up power and released it when reaching certain threshold.

Scrolling text using Matrix LED and Arduino.

The layout of this exhibit follows the model of a train map. It's installed vertically on the wall with 27 LED buttons fastened to it and covered by a thick glass. Each of these button corresponds to a message of the year during which an education policy is proposed or implemented. The message will be displayed on the Matrix LED when the button is pressed and stay scrolling until the message repeats for the second time.

This installation uses 27 buttons with LEDs so it requires 54 pins in total. Half of these pins are used for the press button input and another half for lighting up the LEDs on the button. To keep things simple, I used an Arduino Mega because of its larger quantity of pins. So that each pin can be mapped to either one button or it's LED. In fact, smaller Arduino boards can be used in conjunction with shift registers to produce more pins but this would make the whole thing more complex. For the wiring, I decided to use breadboard as is, instead of stripboard because hooking up 54 cables and resistors can be difficult and prone to short circuitry.

Luckily when the whole board was fully assembled, it looked neat. To make them easier to work with and also to prevent error, I put labels on each pair of them.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Fri, 29 Apr 2011 01:07:00 -0700 Override Joomla view logic class through plugin http://blog.eddyyanto.com/override-joomla-view-logic-class-through-plug http://blog.eddyyanto.com/override-joomla-view-logic-class-through-plug

On previous post, I wrote about overriding AcyMailing’s archive view class with the purpose of adding a custom field. It was done through alteration of component core file since layout-override only applies to view-output files. Later, I found a more sensible way to override the view class through plugin. In its simplest term, the plugin is used to include the modified view-class thus the original view-class never gets declared. This is possible because when the system instantiates the view class, it uses class_exists to load the respective class. When a class gets declared, the subsequent declaration will simply be ignored.

The following code demonstrates this possiblity. The code gets executed during onAfterRoute event and it does so by including archive.view.html.php

1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
class plgSystemAcyFieldExtend extends JPlugin {
public function __construct(&$subject, $config = array()) {
parent::__construct($subject, $config);
}
public function onAfterRoute() {
$app = JFactory::getApplication();
if('com_acymailing' == JRequest::getCMD('option') && !$app->isAdmin()) {
require_once(dirname(__FILE__) . DS . 'archive.view.html.php');
}
}
}
?>

On a side note, the plugin xml file now accepts install and sql tag but does’t seem to accept uninstall tag. During the plugin installation, the sql runs okay but not during uninstallation. Otherwise, this AcyMailing field extender could be packaged into an installable plugin and that the alteration of database, view-logic files inclusion and output override can be seamless and automatic through plugin installer.

Reference : http://community.joomla.org/blogs/community/521-did-you-know-overrides-are-not-just-for-html.html

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Wed, 20 Apr 2011 01:26:00 -0700 Extend AcyMailing : add custom newsletter field http://blog.eddyyanto.com/extend-acymailing-add-custom-newsletter-field http://blog.eddyyanto.com/extend-acymailing-add-custom-newsletter-field

Recently, I worked on a Joomla based website where one of the requirements was to add a custom field and display it in front-end newsletter archive list, next to the default subject and date. This additional field contains multi-line short descriptions and would act as a summary to each newsletter. And there has to be an extra corresponding textarea in the back-end for the editing of this custom field during creation or updating of newsletters.

In back-end, by default, I see no option to just add the custom field, which means field addition to newsletter table isn’t supported out of the box. So one way to do is to alter the newsletter table and edit a few component files.

I posted the following steps in the hope that this might be of help to other users who are trying to achieve the same thing. Before that, please back-up database and Joomla files just in case.

  1. Add the custom field after ‘altbody’ to the newsletter table. Note that my table prefix is ‘jos’, if you have a different prefix, change it to whatever you’ve set during the installation.
    1
    
    ALTER TABLE `jos_acymailing_mail` ADD `summary` TEXT AFTER `altbody`
  2. Add an editable textarea to the newsletter back-end form. Edit administrator/components/com_acymailing/views/newsletter/tmpl/form.php, add the following code after line 22:
    1
    2
    3
    4
    
    <fieldset class="adminform" id="summary">
    <legend><?php echo JText::_( 'SUMMARY' ); ?></legend>
    <textarea style="width:100%" rows="10" name="data[mail][summary]" id="summary" ><?php echo @$this->mail->summary; ?></textarea>
    </fieldset>
  3. Alter newsletter archive’s view logic to include custom field query to the newsletter table. Edit components/com_acymailing/views/archive.view.html.php, replace line 98:
    1
    
    $searchMap = array('a.mailid','a.subject','a.alias');

    with the following:
    1
    
    $searchMap = array('a.mailid','a.subject','a.summary','a.alias');
  4. Alter newsletter archive listing to show another table header and also the custom field. Multiple lines contained in this custom field would be outputted as unordered list. Edit components/com_acymailing/views/archive/tmpl/listing_newsletters.php, add the following code after line 33:
    1
    2
    3
    
    <td class="sectiontableheader<?php echo $this->values->suffix; ?>" align="center">
    <?php echo JText::_( 'SUMMARY' );?>
    </td>

    and add after line 78 the following code:
    1
    2
    3
    
    <td>
    <?php echo str_replace("\n","</li><li class=\"$css_class\">","<ul><li>" . $row->summary ."</li></ul>"); ?>
    </td>
  5. On step 4, we used JText::_( 'SUMMARY' ) to output its heading to table header. This entry is retrieved from the current active component’s language file. Since this is a new language entry, we need to add it to the language file. Edit language/en-GB/en-GB.com_acymailing.ini, add the following code after line 25:
    1
    
    SUMMARY="Summary"

Steps above are the minimum to get the custom field working. By now, the summary field should show up below the text version on the same form in the newsletter back-end. We can type summaries of the newsletter into that textarea and it will be saved into newsletter table. And once saved, it will be displayed on the archive list of the front-end as unordered list.

Last thing you might be concerned about is how the newer update of the component is going to affect the above alteration. We can technically put our altered view files under html folder of our current active template and leave the core view logic files untouched as these files will override those inside the component during execution of view logic. But this applies only to step 2 and 4 but not step 3 which contains the archive view logic. Because as of Joomla! 1.6, only component and module view output files can be overridden but not view logic files. So for now, we need to keep track of what has been changed and re-apply again on the next update.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Fri, 27 Aug 2010 05:53:00 -0700 A Meditative Experience http://blog.eddyyanto.com/a-meditative-experience http://blog.eddyyanto.com/a-meditative-experience

During year-end holiday two years ago, I experienced first hand a comprehensive meditation training in Klaten, Java. The training is held a few times in a year and draw many enthusiasts from different places. As there's a limit on the number of people per training, participants need to register themselves weeks or even months before the training starts to be invited. The limit is due to the need to host participants adequately in the small available space and to give them a more qualitative experience because normally there are only two teachers present for questions after each period of meditation.

As informed during the registration, the training requires participants to agree on a number of things. New participants will observe one set of rules and repeat participants will observe the same set with additional rules. It was a thorough training that span over the course of ten days. A few meditation techniques are introduced along the way, with each day getting more extensive than the previous. Code of disciplines, rules and timetable can be seen its course website : http://www.dhamma.org/en/code.shtml.

After the training ended, I came back but didn't manage to keep the same training regularly. I forget the extensive part of the training. Still I think it's worth my effort and time because I was able to go through something that interest me and completed it. I remember on the last day of the meditation, the teacher advised us to keep the practice going and try to make it part of our life. The practise doesn't have to be as extensive but setting aside two hours each day and keeping it consistent would suffice. He added that the more we practice each day, the better we become.

Since a few months ago up until today, I began doing a relatively short breathing meditation again. As the name implies, it's the action of focussing attention on one's own breath. I do it a few times daily with each one typically takes more or less than half an hour. I have so far been able to keep the practice going in a consistent manner. Below is my experience and observation.

I would start the meditation by sitting on a cushion with my back straight and eyes closed. In a relaxed posture and I would signal different parts of my body to rest. Then I would take a few deep breaths. Starting out, there might be stiffness around the chest, taking deep breath will weaken the stiffness and gradually they will disappear. After a while, my whole body would feel relax, I would draw my attention to the tip of the nose and focus solely on the in-out of my breath and try to sustain the attention for as long as I could with my focus fixed on the nostril. This process lasts for a while until my mind helplessly gets distracted and busy, evidenced by the arising of stream of thoughts. This will often the case cause my attention to weaken if I am not mindful. The attention might even descend into any arising thought and wander along for a while until awareness manifest itself again. Soon I would try to pull the focus back on the nostril.

The lost and found cycle of our attention would go on and on which I believe will improve over time the more we practice. I noticed a small but significant improvement over the course of a few months even though my attention still wander and lost very often during the practice. I feel that the longer I could sustain and focus my attention on breathing, the subtler the surrounding noises become. This feeling is like cotton being put into ears which made the noise considerably weaker. Also when breath becomes much more subtler, the ins, the outs and the pauses as they change can still be felt. Until this point, my mind somehow doesn't follow the arising and passing thoughts any longer. It observes them instead without being pulled into it, like a retired man sitting peacefully in his home garden observing vehicles moving past on a busy street.

During meditation, I could feel how unrestrained my mind is. With eyes closed and focus turn inward, thoughts could still arise from any past or recent encounter made with the people around me. Stored inside memory, everything I saw or heard or experienced could surface. Memory of these encounters bring along all kind of feelings and emotions — bliss, sorrow, jealousy, indignity, anger, guilt and all the kind that we could describe and label. But by simply staying put and observe without being attached to them, I feel calm and peaceful.

Sitting alone in solitude made me capable of scrutinizing my own thoughts, sometimes way before the occurrences manifested into thought. The capacity to intercept and inspect them may still be infancy but it's there and needs to be constantly sharpened. I also acquired a new idea about "perception" and it was enforced when I attended a short talk last week. The speaker described that things we generally see has gone through a lot of distortions, in a subjective way, which include our mishmash of emotions, past experiences, both pleasant and unpleasant.

Alas, I do hope that I could keep the practice going for as long as I could.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Mon, 16 Aug 2010 13:13:00 -0700 Stillness http://blog.eddyyanto.com/stillness http://blog.eddyyanto.com/stillness

Img_1263

I strolled along the elevated pathway surrounding the reservoir yesterday. The elevated pathway acts as boundary to the surrounding area which is on a lower altitude. In one corner of the reservoir, there remains a huge water outlet which lead to a nearby river. Extra water would be released to the river when the level gets high during rainy season as to prevent them from flooding surrounding land and road. The river in turn, leads to the sea.

One early morning, the atmosphere was serene at the reservoir and the wind breezy. I can see the effect wind-sheer has made upon the water surface. Seen from distance, they felt alive. But into the second half hour, the wind went silent. As can be seen from the photo, the water and trees were in complete stillness. The sky and dark trees due to faint light, were reflected on the still water. Behind these dark trees, layers of hills appear fainter and fainter the farther they are situated.

This particular scene reminded me of Michael's work where they showcase the deep silent of nature. Being able in a place where things are in tranquility and experiencing it is both rewarding and fulfilling.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Sat, 14 Aug 2010 06:36:00 -0700 Cloud Above The Beach http://blog.eddyyanto.com/clouds-from-past-week http://blog.eddyyanto.com/clouds-from-past-week

Few cloud photos taken around the beach in Batu Besar. Broad sky with clouds and birds, windy sea with waves. Calming.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Tue, 03 Aug 2010 11:37:00 -0700 Clouds In The Sky http://blog.eddyyanto.com/clouds-in-the-sky http://blog.eddyyanto.com/clouds-in-the-sky

Happiness is like a cloud, if you stare at it long enough, it evaporates. - Sarah McLachlan

Cloud as object of photography can sometimes bring emotion to whoever takes them. They are formed by billions of tiny water vapor yet almost weightless, drifting to wherever the wind takes them. Motion of the drifting clouds in the vast sky give me a sense of broadness and ever-changing. On a fine day when nature paints the sky blue and the cloud white, they together provide a sense of cheerful and warmth. At times when it's about to rain, dark clouds form and they give me gloomy feeling.

This set of cloud photos were taken using camera phone, which is handy for this kind of quick snap. As clouds evaporate fast, one moment they are fluffy and huge, the next they disappear altogether, leaving only vast blueish sky. All pictures in this set are portrait oriented and I experimented with this orientation to somehow get a different feeling out of them instead of a normal landscape mode.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Fri, 30 Jul 2010 04:46:00 -0700 Lake Toba http://blog.eddyyanto.com/lake-toba http://blog.eddyyanto.com/lake-toba

lake-toba.m4v Watch on Posterous

This is a short clip that I took when I was at Lake Toba a few months ago. During the visit, I stayed in Carolina Cottage, a clean and affordable lodge in Tuk Tuk. This cottage features beautiful view, overseeing the lake and surrounding hills. It has around 20-something number of rooms, shore or lake front. I took a lake front room which has double beds and a modest bathroom without heater. It's situated at the utmost right of the cottage.

There's a restaurant in the center of the cottage serving Western and Indonesian food. And they have this kind of unique payment that you just order the food during your stay and they'll only bill when you are checking-out, which is convenient for longer staying travellers. Just recently I heard they begin accepting credit cards.

To the left of the restaurant, there are some other rooms near the shore with a few long chairs and a jumping board and a hut by the side of the lake. A few trees surround the hut and a small fish pond just right beside, making it shady. A totem pole stands in front of the pond. I am not sure what it is but it must mean something for the Batak.

The clip was taken in the corner of the shore. It was a windy afternoon and the sun can hardly be seen. A boat has just made crossing from the opposite island to fetch and aboard travelers before heading back again.

I stayed two nights in this cottage. The first day, as I arrived late in the afternoon I immersed myself around the lake until dark. Early morning the next day, I rented a motorbike and toured around the coastline of Samosir which is some fifty kilometers long. I made a few stops along the way, first to the Museum of Batak. It was almost noon when I reached the museum and I was the only visitor. Inside the museum you can see ancient tools, weapons and boat used by the Batak. Nearby, there are granaries, tombs and a dancing ground which has a two meters high totem pole in the center.

I proceeded to Pangururan after museum and it took almost half of the journey before I got there. A few hot springs can be seen up until I travelled out of Samosir Island, not far from Pangururan. I was travelling alone in this trip so I didn't visit any hot spring as most of them were empty. I took a last view of the surrounding before I headed back to the cottage.

You can see more of my Lake Toba pictures on Flickr.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Thu, 29 Jul 2010 02:00:00 -0700 Minimalism http://blog.eddyyanto.com/minimalism http://blog.eddyyanto.com/minimalism

I stumbled across the works of Michael Kenna, a professional photographer whose works center around nature. As can be seen from his online gallery - lake, forest and trees are some of his favorite objects. He, amongst the photographers that I paid attention to, has a singular minimalist style (if I may label so for his style of photography).

His color of choice is modest, mostly using black and white. And it can be seen consistently across all of his work. Simple yet sophisticated. They evoke a calm and peaceful response and leave very much the rest to our own, the viewer's imagination. When being asked in an interview by The Light magazine on why he loves doing black and white photography, his replied:

I believe black and white is immediately more mysterious because we see in color all the time. It is also more subjective. I think it is quieter and more calm than color.

Personally, I think minimalism in general deal with something that is functional yet with less clutter. But there can be times when we can't resist introducing something extra into them. It then become a distraction. Michael's work provides us a perspective to keep our work simple and quiet.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Wed, 28 Jul 2010 13:24:00 -0700 West Lake http://blog.eddyyanto.com/west-lake http://blog.eddyyanto.com/west-lake

I spent 2 weeks in China a few months ago and had a chance to visit Hangzhou, a renowned city famous for its beautiful natural scenery. One of the popular places is West Lake (西湖), a name that I've heard many times both in historical dramas and music performances.

Being part of a tour group and a conversational mandarin speaker myself although not a very good one, I was able to understand most of what the tour guide was saying. Along the journey, he spoke a number of proverbs and one that stick to my head is the following:

生在苏州, 活在杭州, 吃在广州, 死在柳州

Which roughly translates to "Be born in Suzhou, live in Hangzhou, eat in Guangzhou and die in Liuzhou". The meaning behind the proverb is that for the most of ancient times, Suzhou has been renowned for its educated scholars, Guangzhou for its food delicacies, Liuzhou for its wooden coffins used for the resting of the dead. And Hangzhou had been a prosper and livable city with scenic landscapes.

The galery above contains some pictures that I took around the lake. I especially like the first one where the willow leaves hang from above against the background of hills and calm water. It feels peaceful.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Sun, 09 May 2010 15:49:00 -0700 The Olden Days http://blog.eddyyanto.com/the-olden-days http://blog.eddyyanto.com/the-olden-days

My childhood memory from the later part of primary school is at its best today, thanks to a friend who has just created an online group for it. It sprung those old memories up. Many other have joined the group afterward and subsequently uploaded a few pictures from those days.

One of the pictures dated back to some thirteen years ago, it features a group of children on stage performing flute, on supposedly a farewell event. They were putting unsmiling expression which strike me now as memorable. Not sure how they feel back then or if they really understand the meaning of the farewell but for kids, such a gathering would translate to fun.

Since I was a little, I have always been intrigued by the working of human’s memory. Songs, sounds, smells, pictures and almost anything could evoke our past memories. Even when we think we’ve forgotten already but deep in our subconsciousness, they do exist. These memories only surface when something evokes them.

Through the names, pictures and events in the group, I could remember a few things from that time. My strongest recollection are from the last three years of primary school. Below are 2 of them:

 

The school bell incident.

In school, there’s a quite heavy bell hanging by a rope just in front of teacher's office, weighing probably some tens of kilograms. The bell acts as a signalling tool to students and would ring a few times: first in the morning when the school starts, second and third in the noon when there’s class break and when the school ends.

One time after the ending of a class break, a student was asked to ring the bell with an iron stick so that students would be ushered into their own classes. Due to the weathered condition of the hanging rope, the bell fell and landed on the student's foot. He screamed and was off of school for at least a few weeks. His initial is A.

 

The hit and bleed incident.

This happened when I was in primary four. A boy student was playing noisily during class and as a result, disturbed the whole class. The teacher came and hit his head with a wooden ruler. As she might had accidentally put too much strength on it, the boy bleed and cried. His initial is A.W.

There were more incidents happened, but none comes as sticky as above.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Mon, 08 Mar 2010 18:24:00 -0800 House Viewing http://blog.eddyyanto.com/house-viewing http://blog.eddyyanto.com/house-viewing

After weeks of delay, we finally went all-out for house viewing last weekend. Reason is our contract is ending in 3 weeks. It felt a little bit of rush but we finally did it anyway. Let's get into what we've seen so far.

Of all the houses we viewed, a couple of them left good impression in us. The first one being a two-storey house comes with three bedrooms on the upper level. On the lower level there are dining room, living room and a kitchen. It's spacious. The floor in the bedroom and the stairs are made of wooden material so it feels good walking on them. Basic furnitures are provided: sofa set, TV, dining table and beds, all look pretty clean and seem to be in good shape.

The second house is a single-level flat and comes with three bedrooms. One considerable thing is the new looking bathroom, clean and well-maintained. The living room is large enough for 5 persons with a sofa set sit nicely beside the wall. A low-level table that houses the TV lies opposite. The sofa set and the low-level table are light-brown in color which match the surrounding wall. We can see that the house was renovated recently.

With all good things mentioned, these 2 houses seemed almost perfect except that they're quite a distance from the nearest train station which is 5 bus stops away. It adds up our travel time in the morning.

But all in all, everything is nice, both feel like home.

Update: we chose the first one. Good choice.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Sat, 07 Mar 2009 06:35:00 -0800 Adding Tabbed-View to Magento Default Theme http://blog.eddyyanto.com/adding-tabbed-view-to-magento-default-theme http://blog.eddyyanto.com/adding-tabbed-view-to-magento-default-theme

This is a repost from my other blog which doesn't exist any longer. I am retaining it here for reference.

I received a question from the forum the past week asking how to bring tabbed view into Default Theme. As tabbed view doesn't exist in the Default Theme, bringing it into the theme means changing some code in the template, layout and skin files. Before we start and do any changes, please backup those related files (template, layout and skin) so we can refer back when something goes wrong and the files have been overwritten.

Here are the steps:

  1. Paste the following block of template code into Default Theme's product view.phtml, located in "app/design/frontend/default/default/template/catalog/product/view.phtml", right before the closing div:
    1
    
    <?php echo $this->getChildHtml('info_tabs'); ?>

    and remove the following template logic block within the same file:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    
    <div class="product-collateral">
        <?php if ($_description = $this->getChildHtml('description')):?>
            <div class="collateral-box">
                <div class="head">
                    <h4><?php echo $this->__('Product Description') ?></h4>
                </div>
                <?php echo $_description ?>
            </div>
        <?php endif;?>
        <?php if ($_additional = $this->getChildHtml('additional')):?>
            <div class="collateral-box">
                <div class="head">
                    <h4><?php echo $this->__('Additional Information') ?></h4>
                </div>
                <?php echo $_additional ?>
            </div>
        <?php endif;?>
        <?php echo $this->getChildHtml('upsell_products') ?>
        <?php echo $this->getChildHtml('product_additional_data') ?>
    </div>
  2. Remove folders and files under "app/design/frontend/default/default/template/catalog/product/view" then copy back from "app/design/frontend/default/modern/template/catalog/product/view" into the former folder.
  3. Paste the following block of layout tags into Default Theme's catalog.xml, located in "app/design/frontend/default/default/layout/catalog.xml"
    1
    2
    3
    4
    5
    
    <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >
        <action method="addTab" translate="title" module="catalog"><alias>description</alias><title>Product Description</title><block>catalog/product_view_description</block><template>catalog/product/view/description.phtml</template></action>
        <action method="addTab" translate="title" module="catalog"><alias>upsell_products</alias><title>We Also Recommend</title><block>catalog/product_list_upsell</block><template>catalog/product/list/upsell.phtml</template></action>
        <action method="addTab" translate="title" module="catalog"><alias>additional</alias><title>Additional Information</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action>
    </block>

    within <catalog_product_view>, right below "<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml"/>"
  4. Paste the following block of layout tags into Default Theme's tag.xml, located in app/design/frontend/default/default/layout/tag.xml
    1
    2
    3
    
    <reference name="product.info.tabs">
        <action method="addTab" translate="title" module="tag"><alias>tags</alias><title>Product Tags</title><block>tag/product_list</block><template>tag/list.phtml</template></action>
    </reference>

    within <catalog_product_view>, right below the following tags:
    1
    2
    3
    
    <reference name="product.info.additional">
        <block type="tag/product_list" name="product_tag_list" before="-" template="tag/list.phtml"></block>
    </reference>
  5. Now put some basic styling for the tabs, paste the following CSS to the end of boxes.css file located at "skin/frontend/default/default/css/boxes.css"
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    
    /********************** Tabs */
    .tabs { margin-bottom:15px; border-bottom:1px solid #666; background: url('/joomlavue/../images/tabs_bg.gif') repeat-x 0 100% #f2f2f2; }
    .tabs li { float:left; border-right:1px solid #a4a4a4; border-left:1px solid #fff; font-size:1.1em; line-height:1em; }
    .tabs li.first { border-left:0; }
    .tabs li.last { border-right:0; }
    .tabs a { display:block; padding:6px 15px; color:#444; }
    .tabs a:hover { background-color:#ddd; text-decoration:none; color:#444; }
    .tabs li.active a,
    .tabs li.active a:hover { background-color:#666; font-weight:bold; color:#fff; }
     
    /* Style */
    .outline-creator { border:1px solid #bbb; border-bottom-color:#666; background:#fff; }
    .col-main .padder{ padding-right:20px; }
    .layout-3columns .padder { padding:0; }
  6. The last part is to copy the background image from "skin/frontend/default/modern/images/tabs_bg.gif" to "skin/frontend/default/default/images"

Finally, here's the screengrab of the tab view in Default Theme:

Tab-in-default-theme

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Sat, 04 Oct 2008 08:47:00 -0700 Joomla Files and Classes Inclusion Graph http://blog.eddyyanto.com/joomla-files-and-classes-inclusion-graph http://blog.eddyyanto.com/joomla-files-and-classes-inclusion-graph

This is another repost from my other blog which doesn't exist any longer. I am retaining it for reference.

Federico of PhpImpact posted a few graphs showing class dependencies and files inclusion of various open source frameworks such as WordPress, MediaWiki, CodeIgniter and CakePHP. These graphs provides an overview of files and classes inclusion during the initial load of a system. These graphs also show which files and classes are being referenced or called from the root controller, showing dependency structure of the said system.

There isn't any graph for Joomla! 1.5 yet which I use fairly often so I created one using Inclued and Graphviz utility. The following 2 graphs are generated from Joomla! 1.5.7 running default frontpage controller.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto
Sun, 28 Sep 2008 20:58:00 -0700 Manual Installation of Magento Modern Theme http://blog.eddyyanto.com/manual-installation-of-magento-modern-theme http://blog.eddyyanto.com/manual-installation-of-magento-modern-theme

This is a repost from my other blog which doesn't exist any longer. I am retaining here for reference.

Browsing Magento forum today, I found a few users were asking how to download the Modern Theme manually. Since Modern Theme is an official theme and only available through Magento Connect as an extension, it has to be installed through Connect Manager using its extension key. Installing the theme through Connect manager is quite straightforward but some users were reporting issues such as: short script execution time (a limitation on their webhost) and garbled error messages in the extension installer.

So here's the manual way to get pass this show-stopper: download and upload the theme into its folder. Here are the steps:

  1. Do an svn checkout from stable branch "http://svn.magentocommerce.com/source/branches/1.1/" to your local folder.
  2. Copy "app/design/frontend/default/modern" into "app/design/frontend/default" folder.
  3. Copy "skin/frontend/default/modern" into your "skin/frontend/default" folder.
  4. Enable the new theme through admin page : System -> Configuration -> Design and under theme section, put "modern" for template, skin, layout and default.
  5. Clear both store and browser cache and refresh your storefront.

You should now see the Modern theme working.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/1168676/eddy-avatar.png http://posterous.com/users/37lzbXEm80rT Eddy Yanto Eddy Eddy Yanto