Rollip.com

Earlier this year, i got an email from Rollip, asking me if i could review their site because it would interest the reader here, I reply, i’d be happy to do it! :) I found Rollip last year from Makeuseof.com, tried a several effect and forgot ever since because of works. This site is really useful for me if i want a quick effect on my images.

The awesomeness of the site is the availability of the effect, here’s an images that i’ve tried on
The original photo

Me & My Wife

Here’s some of the effect

Rollip Effect 1

Rollip Effect 2

Rollip Effect 3

Rollip Effect 4

Rollip Effect 5

the effects was awesome but some of it looks like a filter rape to me, nonetheless the other look simply awesome with just a simple click, it would be nice if they could also mention the name of the effect. The last effect is simply really neat and old look awesomeness. Note that you’ll only get low-res result for the effect, if you want the high-res you have to pay, for a profile pic in social networking the low-res result look okay to me.

Create Thumbnail From Offsite Image Using Timthumb Beta

thumbnail
by petervanallen

I host most of my images in Picasa and Flickr, for along time i couldn’t use the native feature in WordPress to create custom thumbnail that i wanted, i could upload it and use custom fields, but it would be tediously boring to do that.

A couple of month ago a message from heaven came by to fulfilled my wishes and whisper it to Ben Gillbanks ear, the developer of timthumb. So thus came the timthumb beta for offsite image. After downloading it i tried it, my wishes fulfilled and it looks awesome! Oh Joy

Happy! Happy! Joy! Joy! from psherman420 on Vimeo.

This hack is similar with the one that i use on this website and this was a follow up from my previous post about how to create custom index post layout, but the method could be applicable for other WordPress themes.

Here is the screen shot on how the thumbnail will look like on the home page (i’m using thematicsamplechildtheme in the Thematic folder)

thumbnail screenshot

First we need to download timthumb beta at Binary Moon in here, put it on your child theme folder then create a folder called temp & cache (writeable 777)

Here are the code that we are going to use

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
function remove_index_loop() {
  remove_action('thematic_indexloop', 'thematic_index_loop');
}
add_action('init', 'remove_index_loop');
 
function catch_that_image() {
  global $post, $posts;
  $first_img = '';
  ob_start();
  ob_end_clean();
  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
  $first_img = $matches [1] [0];
 
  if(empty($first_img)){ //Defines a default image
    $first_img = "images/default.gif";
  }
  return $first_img;
}
 
function custom_index_loop() {
  global $post;
    /* Count the number of posts so we can insert a widgetized area */ $count = 1;
      while ( have_posts() ) : the_post() ?>
        <?php $counter++; ?>    
          <div class="column <?php if ($counter == 1) { echo 'one'; } else { echo 'two'; $counter = 0; } ?>">
            <div class="clear-fix">
              <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
                <?php thematic_postheader(); ?>
                  <?php if(catch_that_image()) {
                    echo '<a href="' .get_permalink(). '" title="' .get_the_title(). '"><img src="' .get_stylesheet_directory_uri(). '/timthumb.php?src=' .urlencode(catch_that_image()). '&amp;h=100&amp;w=240&amp;zc=1&amp;q=90"></a>'; } ?>
                    <div class="entry-content">
                    <?php the_excerpt(); ?>
                    <?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
                </div>
            <?php thematic_postfooter(); ?>
          </div><!-- .post -->
      </div><!-- .clear-fix -->
   </div><!-- .column -->
   <?php comments_template();
    if ($count==$thm_insert_position) { get_sidebar('index-insert');}
    $count = $count + 1;
    endwhile;
}
add_action('thematic_indexloop', 'custom_index_loop');
?>

The code below are to catch the first image on the post

1
2
3
4
5
6
7
8
9
10
11
12
13
function catch_that_image() {
  global $post, $posts;
  $first_img = '';
  ob_start();
  ob_end_clean();
  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
  $first_img = $matches [1] [0];
 
  if(empty($first_img)){ //Defines a default image
    $first_img = "images/default.gif";
  }
  return $first_img;
}

i use the_excerpt for the content so there’s no image there, i’m going to try catch the first image from post so i can feed it to the timthumb, this awesome function is from WPrecipes Jean-Baptiste Jung.

after catching it, we can call it with this

1
echo catch_that_image()

then i’m going to insert it to the custom index loop

1
2
<?php if(catch_that_image()) {
                    echo '<a href="' .get_permalink(). '" title="' .get_the_title(). '"><img src="' .get_stylesheet_directory_uri(). '/timthumb.php?src=' .urlencode(catch_that_image()). '&amp;h=100&amp;w=240&amp;zc=1&amp;q=90"></a>'; } ?>

change the h=100&w=240 for the size as needed

Voila! it’s done! simple right! :)

Create Custom Posts Layout in Home Page (Thematic Child Theme)

As I said before in the last post, there two ways to do this, First is using page template, the other one is using Thematic hooks & filter.


pic by Everything and the rest

What I want to describe here is using the theme filter & actions. if you’re lazy like me to read articles, download a couple of thematic child themes, see examples of filters and see the core of thematic and learning by doing.

After viewing the core, I notice that there are two or three files that I needed to see in adding filter for post layout. First, because I want to change the post layout in the home page so I checked function.php and search for the post or content filters. In there I was leaded to content-extensions.php (see the comment “Load custom content filters”). then I looked for thematic index loop (line 22 comment).

For this example i want to try to create two column of posts that will appear like this in home page, note that i’ll be using thematicsamplechildtheme (inside thematic folder) from Ian Stewart

screenshot

here are the code for basic index posts lay-out, if you want to copy paste it, put it in your child theme function.php, I will explain more after the code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
function remove_index_loop() {
  remove_action('thematic_indexloop', 'thematic_index_loop');
}
add_action('init', 'remove_index_loop');
 
function snippet_index_loop() {
  global $post;
        /* Count the number of posts so we can insert a widgetized area */ $count = 1;
        while ( have_posts() ) : the_post() ?>
            <?php $counter++; ?>    
            <div class="column <?php if ($counter == 1) { echo 'one'; } else { echo 'two'; $counter = 0; } ?>">
                <div class="clear-fix">
                    <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
                        <?php thematic_postheader(); ?>
                        <div class="entry-content">
                            <?php the_excerpt(); ?>
                            <?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
                        </div>
                            <?php thematic_postfooter(); ?>
                    </div><!-- .post -->
                </div><!-- .clear-fix -->
            </div><!-- .column -->
 
                    <?php comments_template();
                    if ($count==$thm_insert_position) { get_sidebar('index-insert');}
 
 
        $count = $count + 1;
        endwhile;
}
add_action('thematic_indexloop', 'snippet_index_loop');
 
?>

And for the styling, you could use this

1
2
3
4
5
.column{width:250px; display:inline;float:left; overflow:hidden;}
.clear-fix{display:box;}
.one{margin-right:40px;}
.hentry{padding:0;}
.column .entry-content{width:245px;}

Lets elaborate the code first

1
2
3
4
5
6
<?php
function remove_index_loop() {
  remove_action('thematic_indexloop', 'thematic_index_loop');
}
add_action('init', 'remove_index_loop');
?>

The first thing that we need to create is adding the remove function for the default thematic index loop. The default (as seen in the content-extensions.php) is thematic_index_loop.

then we add an action to replace the loop that we move, lets called it custom_index_loop

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
function custom_index_loop() {
  global $post;
        /* Count the number of posts so we can insert a widgetized area */ $count = 1;
        while ( have_posts() ) : the_post() ?>
            <?php $counter++; ?>    
            <div class="column <?php if ($counter == 1) { echo 'one'; } else { echo 'two'; $counter = 0; } ?>">
                <div class="clear-fix">
                    <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
                        <?php thematic_postheader(); ?>
                        <div class="entry-content">
                            <?php the_excerpt(); ?>
                            <?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
                        </div>
                            <?php thematic_postfooter(); ?>
                    </div><!-- .post -->
                </div><!-- .clear-fix -->
            </div><!-- .column -->
 
                    <?php comments_template();
                    if ($count==$thm_insert_position) { get_sidebar('index-insert');}
 
        $count = $count + 1;
        endwhile;
}
add_action('thematic_indexloop', 'custom_index_loop');
?>

the code

1
2
<?php $counter++; ?>    
    <div class="column <?php if ($counter == 1) { echo 'one'; } else { echo 'two'; $counter = 0; } ?>">

add the two column, if you want three column, just add another elseif and change the $counter then adjust the styling, but for now i will only give the styling for two column.

also i use the excerpt for the content

1
2
3
4
5
6
<?php
<div class="entry-content">
   <?php the_excerpt(); ?>
   <?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
</div>
?>

i’m not using the default loop for thematic index (thematic_content), because it will be strange to see full content in small width column.

and the last one is

1
2
3
<?php
add_action('thematic_indexloop', 'custom_index_loop');
?>

to insert the action.

for the styling of the column

1
2
.column{width:250px; display:inline;float:left; overflow:hidden;}
.clear-fix{display:box;}

overflow hidden makes every one happy :)

1
2
3
.one{margin-right:40px;}
.hentry{padding:0;}
.column .entry-content{width:245px;}

this styling is for more whitespace in the column.

by all means I’m still a noob, any and all feedback you can give would be helpful to me. please do leave a comments below.

Update:
This is an old article :) i may forgot a couple of things, but if you want to make three column using the function above, you add an else if in the code, the final code will look like this

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function remove_index_loop() {
  remove_action('thematic_indexloop', 'thematic_index_loop');
}
add_action('init', 'remove_index_loop');
 
function snippet_index_loop() {
  global $post;
        /* Count the number of posts so we can insert a widgetized area */ $count = 1;
        while ( have_posts() ) : the_post() ?>
            <?php $counter++; $clear=''; ?>    
			<div class="column <?php if ($counter == 1) { echo 'one'; } elseif ($counter == 2) { echo 'two'; }  else { echo 'three'; $counter = 0; $clear='<div style="clear:both;height:0px;"></div>';} ?>">
			    <div class="clear-fix">
                    <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
                        <?php thematic_postheader(); ?>
                        <div class="entry-content">
                            <?php the_excerpt(); ?>
                            <?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
                        </div>
                            <?php thematic_postfooter(); ?>
                    </div><!-- .post -->
                </div><!-- .clear-fix -->
            </div><!-- .column -->
 
                    <?php comments_template();
                    if ($count==$thm_insert_position) { get_sidebar('index-insert');}
 
		echo $clear;
        $count = $count + 1;
        endwhile;
}
add_action('thematic_indexloop', 'snippet_index_loop');

and the styling will be like this in the style.css

1
2
3
4
5
.column{width:160px; display:inline;float:left; overflow:hidden;}
.clear-fix{display:box;}
.two{margin:0 20px;}
.hentry{padding:0;}
.column .entry-content{width:245px;}

Be Water My Friend… With Thematic

At last i’ve re-align my website. The last time i’ve updated my site design I’ve thought that this is it, i wont change it anymore, but after a couple of month i have some doubt, Google doesn’t give me enough love juice.

Google always acknowledge me on what that i put on my first page, and just that. For the time being I prefer to have more exposure for all of my posts content, yes the first purpose of the design before this (puspaningrum theme) is that i want more exposure to each new post content that I’ve write, but beyond that, looks like Google bot didn’t read the sidebar recent post, because of that, there’s no other topic that appear in Google search beside the one on my home page. So I’ve decided to change it.

Two choices

Blogzine design is the one that appeal in my mind, but then i have to change the typography a lot more, every time i’ve publish a post, I don’t have a lot of time, i want to post once a week or twice a week, without the hassle designing each of it (for now).

Then magazine themes comes to my mind, i love the structure and the small thumbnail for each post that could make my posts look more interesting, so i decided i want to create it. The only hurdle for this kind of design is the thumbnail, if i upload my images in my server then i can automatically scan each post to create thumbnail in the home page, but alas since the beginning of my writing in this site, i use Google Picasa & Flickr. I believe that images is the biggest bandwidth hog for a site, so i rely on both of them to do the job. Unfortunately my favorite thumbnail maker (timthumb) doesn’t allowed to create thumbnail from external server images, so it discourage me to re-align the new design.

Two month ago after i subscribe to Binary Moon (Ben Gillbanks), a friend of Darren Hoyt (my favorite WordpPess designer ) I notice that he release a beta version of timthumb for external server, like a message from heaven i was completely happy. That means that I could automatically creates thumbnail on the fly from major image hosting site like picasa or flickr, but back then, i was handling two client online store project (Living With Nara & Asibune) so i haven’t enough time to create it.

Now i have the times, for about two-three days i have finish my website re-align, why re-align? because i felt my old design is my signature, simplicity. I prefer to stick with its typography and color scheme and only re-design the content layout for the home page, category and tag page.


by shizenquest

The Framework

Thumbnail is ready, design sketch is ready, the psd file are ready so the last thing that i want to do is choosing the framework to create a new child theme, my recent design i use Thematic framework but then i was interested about WooThemes Framework
what i love about WooThemes is that it uses 960 gs for the layout, it makes the layout designing freakishly faster than others that don’t. Thematic doesn’t use that.

I have some doubt in choosing WooThemes, because unlike Thematic that offer fully gpl, the WooThemes have multi-license in some of the script, some of the admin feature use cc license. so i choose Thematic instead. Beside the utterly helpful forum , right now there are a lot of reading source about Thematic so i’m sure that it won’t be a problem for me.

I find many fascinating stuff designing with Thematic, i thought it’s going to be difficult because i see no child themes that uses multi-column for its layout, so i expected a rough ride in coding the themes, but fortunately i was dead wrong, it was very easy designing with Thematic :)

There are two methods that you can use to change the content layout in Thematic (as a child theme). First, is using a page template, like adding category.php or tag.php on your child theme folder and the other one you can add a filter or hooks in the function.php, Using page template is easy and quick but by using it you are ignoring the biggest advantage of using Thematic, the themes hook & filter.

Most of the Thematic feature that i’ve use in changing the posts layout of this theme is using Thematic filter. There are only two files that i needed to see to learn how to create a filter, function php and content-extention.php

About the code, i’ll share it in the future post about how i change the layout for the home page, the category page, the tag page, filtering post for image, get the image in post, changing the excerpt length.

Here are the screenshot of my old design (using Puspaningrum Theme)

The purpose of the old design is major exposure on the content on the home page and i was considering in developing blogzine for future upgrade, but as time gone by, i prefer in using a magazine layout for the moment.

here are the new design screen shot.

Right now, I won’t release the design to the public like Puspaningrum theme, because I want to polish it event more, like adding more admin feature, custom widget or as we all say to make it more premium :)

Jatinegara

There are two places that i’ve known that are common to buy a large quantity of product for a general consumer, such as plastic, garment and cookery in Jakarta. The place is Tanah Abang and Jatinegara.

Tanah Abang is wildly known as a place for its cheapness in the old days, but because it’s transform into a regular mall, the cheapness now is questionable, you have to scourge the place to find the store that sells cheap. Jatinegara also have this kind of stigma, you have to scourge if you want to find store that sells cheap. The current place that i’ve visited is Jatinegara, i’ve come here once or twice a month to buy fruit or garment.

The place is quite crowded, the photo that i have is the “less” crowded version.

The first time you come here you’ll going to notice that the place is really a mess. The only path to walk that you can take is in the middle of the street, the rest of the place was taken by merchant.

The outside of the main building we are greeted with cookery merchant.

this is one of the picture that i take on august, in our independence day.

the motor parking lot

On the way home i found firecracker merchant. When I came here, I usually dont bring my car, because it’s quite hard to find parking space here. There’s a busway stop near here if you want to ride busway.

The red one is called bajaj :)

Happy Eid ul-Fitr!

Almost forgot to post it :)
Happy Eid ul-Fitr guys!
As always after a month fasting, the time has come for Muslims to celebrate Eid ul-Fitr. I would like to ask for your forgiveness if i have wrote something inconvenient in my site.

This post is different from the last Happy Eid ul Fitr post last year, i’d like to tell you a little about our tradition.

It’s a tradition with our family once in Eid ul-Fitr we met up with our elderly, because my parent are the oldest one, the met up are happens in their house this year Eid ul-Fitr (we usually called it “Lebaran” in indonesian). I have to admit my parents house aren’t that big, there’s around 5 family comes to the house and it’s quite crowded, here’s are the pictures of the girls, not all of them but most of them.

We had lots of fun and the food was really plenty, at noon we ate ice cream, lots of them

This is one of my brother, playing around.

After a long day at my parent house, in the afternoon we go to my mother-in-law house, outside Jakarta. There’s not much of a picture there, most of them are family gathering photoshoot.

At night, my niece played firecracker

I usually dont like firecracker because it’s a waste of money imho, but seeing those kids happy playing it, made me understand a little why firecracker is fun.

The next day at my mother in law house, we take a rest a full day because the busy days before, we chat the whole day doing nothing. The next day we go to one of the most popular mall in Jakarta for the kids to play, the mall was quite huge, there’s event a play ground for kids inside of it. My niece played almost four hours in the playground but me and my wife decided to split and go to the book store and after that accompanied me looking for camera (i was looking one :D)

Here is my niece and this the last ride we’ve played that day, she was really happy that day. Last week turns out to be a nice moment for me at this Lebaran, but there’s something that i didn’t fullfiled yet, is going to pekalongan. Happy Lebaran guys!

note :
looks like all of my friends think, i’ve set the photos color here are wrong on my camera or the camera is broken or something. Well to clear things up, I’ve photoshop all of my photos here so it look like from the 80 or an old photo, the old look was intentionally.

R.A. Kosasih, The Indonesian Comic Author

About two month ago my father reminded me about his collection of comic books, and i remembered it too that his collection of comics is super awesome, there are almost three 2 meter high cabinet filled with classic Indonesian’s comic book.

But after time went by, we don’t know how to preserve comic the right way, one by one the collection is destroyed by humidity and reading bugs :(

it’s a sad day for me and my dad the day that mom had to throw away our comic book. Nevertheless time gone by, we tried no to regret it.

Later, after my dad reminded me, me & my wife made a pact that we shall bought him the comic book that he had before, one by one. Since then we bought 8 comics book, it’s far from his total collection he once had before, but it’s a start.

The comic author that we got is R.A Kosasih, and the price is significantly higher than the first time we bough it’s around Rp,400. Now the price is Rp,35,000 to 85,000 (3,5 – 8,5 USD). We have a couple of more that we want to buy but i want to postponed it.

The publisher of the comic book, doesn’t use royalty system for the comic, so the comic author doesn’t get any penny after it was bought (i read it somewhere in Kompas newspaper), It’s been forty years and the comic still republished, i’m quite ashamed of the system, because in my opinion RA. Kosasih has the same status like Stan Lee did in US comic books .

Here’s a couple screen shot of the comic book cover that i bought

here’s clip of the content

the hand drawn for the comic is very classic, all of the story that brought by R.A Kosasih is around the epic of Mahabarata. He take the middle story of many version of the story trough his comic.

Here’s another screenshot of his comic book

and the content

honestly i haven’t read it all, in the old days i read it all but i was kid back then so i dont really understand what the story is about.

Right now i read half of the comic and felt this comic is LOL :D and you can’t complaint about the quality of the comic, it’s a reprinted edition from 40 years ago. it’s full of awesomeness in my childhood, maybe i’ll post the content in the future post.

I Dream of Tetris

How could you know if a games is filled with total awesomeness

  • it’s when you see the title only, you’ll be filled with the memory of the game
  • you want to play it all the time
  • you never get bored playing it after a long time
  • after almost 3 years in the shelf, the game itself is still awesome when you play it again

That’s what happen to me when i play Tetris DS, the game again been poisoning my mind for two month now.

It’s started when i was organizing my desk and found Tetris DS box, at that moment i was almost bored to death with my Nintendo DS, since Final Fantasy IV i haven’t found any game that interesting enough for me. Then after i played this game again, i play it over and over every time i have spare time.

Tetris DS Various

you see this screenshot? because of this, this past few week when i’m tired of reading and working, i daydream hearing and visualizing those damned Tetris block dropping away :D

this is just one of game mode that was in Tetris DS, there’s 5 more that could be addicted like this. Imagine, a game as simple as this could be so addicting. There’s other game that’s similiar like this, Meteos, but i forgot where do i put the game box. But Meteos only have one mode to play, Tetris DS have 6.

If that’s not the sign of a game that filled with awesomeness, then what is?

Jakarta Ragunan Zoo II

Just a quick visit to the zoo with my nieces, they want their holiday seeing animal, so we went there again, the last time i visit to the Ragunan Zoo it was quite awesome but i haven’t got a lot pictures because it was too crowded, I prefer Taman Safari more because the weather is more cooler and it’s not too crowded.

When we arrive at 9am in the morning, the weather is nice.

the first thing that we do is looking at the huge cage for peacock, i wonder why does have to be this huge.

i took pictures of my wife in front of it, the cage is huge right?

Bear, giraffe, lions, deer, komodo, you name it, there’s lot of it, but my main reason of this trip, is having a good time with my niece, so i don’t take a lot of pictures of the animal there.

after almost 6 hour, we went home to get some rest.

Night Market at Jakarta, Cipinang

Couple weeks ago while on the road visiting my parents, i came across on a night market near my house, which is unusual, because of all the time i live there, there’s no such things like this happen before. I decided to go there the next day, then my wife ask to my sister in law that the night market is only there for one day only then move to another place. We called this kind of market is “Pasar Kaget”, a market which only appear for a short of time, i’m sure there’s an English for this but i forgot what it’s called.

My sister in-law was right, the next day the market move to another street. but lucky for me, it’s also not far from my house, only 3 blocks away. It stretch along street for 700 meters (0.43 miles) long.

The market is full of people selling many things, many of them sell cheap shirt and crappy toys,

but i happen to found one of them selling this classic toys, boat that uses burning oil to cruise, it brings back many memory because i happen to have when i was a kid.

There are also store which sell traditional bamboo flute, in our culture this kind of music instrument called “Seruling Bambu”.

After a couple of hour, i ate fried duck on my way home near the market. We bought a cool embroidered shirt for my older brother sons and a cheap sandal for me.

Food, Walk Around Jakarta, WordPress and Rants on Random Geekiness