RSS

Make your days count

Sudah lama saya tidak menulis renungan mengenai hidup lagi. Saya akan coba menulis lagi. Semoga bisa menjadi berkat.

Untuk saya bisa di bilang “Life begin at 24th”. Dari masa kanak-kanak sampai awal masuk dunia pekerjaan, belum terasa yang namanya hukuman Tuhan atas dosa manusia: manusia harus bekerja keras dan berjerih lelah untuk memenuhi kebutuhannya. Namun saat mulai memikirkan masa depan, mendengar keluh kesah orang mengenai keluarga, biaya untuk keluarga, anak, pendidikan anak, rumah (this is frustrating), dan lain sebagainya, baru merasakan akibat dosa manusia.

Karena itu seolah-olah pekerjaan menjadi yang nomor 1 dalam menapaki setiap harinya. Tidak terasa hari demi hari berlalu, dan sepertinya kebutuhan juga belum tercukupi. Setiap hari hanya diwarnai dengan ke-stress-an dalam pekerjaan, keletihan, muak, semangat kerja kembali, capek, letih, semangat kerja kembali, bosan, lelah, dan begitu seterusnya.

Dalam Mazmur 90:1-17, diceritakan bahwa masa hidup manusia adalah 70 tahun, kalau kuat 80 tahun, dan kebanggaannya adalah kesukaran dan penderitaan. Dalam benak saya terpikirkan, manusia hidup dan bekerja keras hanya untuk menyambung keturunan. Setiap hari dalam hidupnya ia bekerja dan bekerja terus, namun nanti anaknya pun harus melakukan hal yang sama, bekerja dan bekerja. Begitu seterusnya.

Begitu manusia sudah mencapai usia senja (ini tebakan pikiran saya saja) yang bisa dibanggakan mungkin hanya harta yang sudah dikumpulkan selama hidup, anak-anak yang bisa hidup lebih enak / mudah karena kerja kerasnya dahulu. Yang dibanggakan adalah kesukaran dan penderitaannya. Kalau dipikir-pikir, toh anaknya juga harus bekerja keras untuk menghidupi kehidupannya juga.

Karena itu dalam Mazmur ini disambungkan dengan “Ajarlah kami menghitung hari-hari kami sedemikian, hingga kami beroleh hati yang bijaksana.” Biarlah kita boleh lebih bijaksana menggunakan hari-hari kita, sehingga kita tidak hanya menuai keletihan di masa tua kita. Jangan biarkan kesibukan kerja memenuhi kebutuhan kita mengorbankan hubungan kita dengan Tuhan. Karena itulah yang paling bijaksana yang dapat kita lakukan setiap hari, yaitu membangun hubungan yang lebih erat dengan Pencipta kita.

Jangan kuatirkan akan masa depan mu. Be still and know that I am GOD. Tuhan dapat memenuhi setiap detil kebutuhan kita dengan segala kemaha-kuasaan-Nya. Beberapa cerita dari rekan saya menyatakan bahwa Tuhan pasti akan menyediakan selangkah demi selangkah.

Be still and know that I am GOD. 

Selamat menjalani hari-hari mu bersama Allah.

 
3 Comments

Posted by on May 22, 2012 in My reflection

 

Delay action in Action Script 3 (Flash)

To delay a flash action for some times, you can use this code:

var myDelay:Timer = new Timer(30000,1);
myDelay.addEventListener(TimerEvent.TIMER, showMessage);
myDelay.start();
function showMessage(event:TimerEvent):void{
gotoAndPlay("enterMain");
}
stop();

 
Leave a comment

Posted by on May 11, 2012 in Flash

 

Tags: , ,

Playing with sound in Action Script 3 (Flash)

To play an external audio files:

var hisPromise:Sound = new Sound();
var hisPromiseChannel:SoundChannel = new SoundChannel();
hisPromise.load(new URLRequest("audio/01_His_Promise_is_Forever.mp3"));
hisPromiseChannel = hisPromise.play();

to stop:

hisPromiseChannel.stop();

to adjust volume (range 0 – 1):

hisPromiseChannel.soundTransform = new SoundTransform(0.2);

to Pause:

lastPosition = myChannel.position;
myChannel.stop();

to Play from last position:

myChannel = mySound.play(lastPosition);

to Loop sound:

var hisPromise:Sound = new Sound();
var hisPromiseChannel:SoundChannel = new SoundChannel();
hisPromise.load(new URLRequest("audio/01_His_Promise_is_Forever.mp3"));
playSound();
function playSound():void
{
hisPromiseChannel = hisPromise.play();
hisPromiseChannel.addEventListener(Event.SOUND_COMPLETE, onComplete);
}
function onComplete(event:Event):void {
SoundChannel(event.target).removeEventListener(event.type, onComplete);
playSound();
}

 
Leave a comment

Posted by on May 11, 2012 in Flash

 

Tags: , ,

Outlook Settings for Yahoo mail

Having problem connecting to yahoo smtp mail using Outlook? Me too. But these settings resolved the issue:

Outgoing Mail server : smtp.mail.yahoo.co.id
Incoming Mail server : pop.mail.yahoo.co.id
Mailbox type : POP3
Incoming Port : 995
Outgoing Port : 465
SSL : ON

Good Luck..!!

 
Leave a comment

Posted by on May 9, 2012 in Windows

 

Good Reading on WordPress Plugin Performance

http://www.dev4press.com/2011/tutorials/wordpress/practical/how-to-optimize-plugin-loading/

 
Leave a comment

Posted by on April 26, 2012 in Wordpress

 

Tags: , ,

WordPress Custom Post Type Archive

I have problem showing custom post type archive page. I want to share the code to create a custom widget which you can input the post type name and it will show you the archive (year and month) for that custom post type. You can edit it as needed.

<?php
class custom_archive extends WP_Widget {
function custom_archive() {
parent::WP_Widget(false, 'Custom Archive');
}
function form($instance) {
// outputs the options form on admin
$post_type = $instance['post_type'];
$title = $instance['title'];
?>
<p>Title:<br /> <input name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
<p>Post Type:<br /> <input name="<?php echo $this->get_field_name( 'post_type' ); ?>" type="text" value="<?php echo esc_attr( $post_type ); ?>" /></p>
<?php
}
function update($new_instance, $old_instance) {
// processes widget options to be saved
$instance = $old_instance;
$instance['post_type'] = strip_tags( $new_instance['post_type'] );
$instance['title'] = strip_tags( $new_instance['title'] );
return $instance;
}
function widget($args, $instance) {
// outputs the content of the widget
extract( $args, EXTR_SKIP );
$post_type = $instance['post_type'];
$title = $instance['title'];
?>
<?php echo $before_widget; ?>
<?php echo $before_title . $title . $after_title; ?>
<ul>
<?php
global $wpdb;
/**/
$years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = '".$post_type."' ORDER BY post_date DESC");
foreach($years as $year) :
$years_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = '".$post_type."' AND YEAR(post_date) = ".$year.";" ) );
?>
<li class="year"><a href="<?php echo get_year_link($year)."?post_type=".$post_type; ?>"><?php echo $year; ?></a> (<?php echo $years_count; ?> Posts)
<ul>
<? $months = $wpdb->get_col("SELECT DISTINCT MONTH(post_date) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = '".$post_type."' AND YEAR(post_date) = '".$year."' ORDER BY post_date DESC");
foreach($months as $month) :
$months_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = '".$post_type."' AND YEAR(post_date) = ".$year." and MONTH(post_date) = ".$month.";" ) );
?>
<li class="month">>
<a href="<?php echo get_month_link($year, $month)."?post_type=".$post_type; ?>"><?php echo date( 'F', mktime(0, 0, 0, $month) );?></a> (<?php echo $months_count; ?> Posts)
</li>
<?php endforeach;?>
</ul>
</li>
<?php endforeach; ?>
</ul>
<?php echo $after_widget; ?>
<?php
}
}
register_widget('custom_archive');
?>

 
Leave a comment

Posted by on April 17, 2012 in Wordpress

 

Tags: , ,

“You do not have sufficient permissions to access this page” after database prefix change

After several times moving WordPress websites from one host to another, I get this painfully permission denied for superadmin user “You do not have sufficient permissions to access this page”. The frontend page was all fine. But I can’t access the admin page. Then I found these people who have the same problem and found the solution (http://wordpress.org/support/topic/sudden-you-do-not-have-sufficient-permissions-to-access-this-page-error).

The main cause is the database prefix changes. It cause the wordpress doesn’t recognize the admininstrator privilege. if you look into the wp_options table, the option_name from roles is wp_user_roles. The wp_ should match the table prefix. So if you change the wp_options table to en_options, then you must change the options_name to en_user_roles. That’s how the wordpress recognize the roles.

Besides that, user to role mapping also use the table prefix. You can see it in wp_usermeta tables. There is a meta_key called wp_capabilities. The wp_ is the table prefix of the wordpress tables. So if you change the table prefix e.q. wp_usermeta to en_usermeta, then you should change the wp_capabilities to en_capabilities.

Thats how you fix the permission problem to wp_admin page.

Have a good day

 
Leave a comment

Posted by on April 13, 2012 in Wordpress

 

Tags: , ,

Get Taxonomy List without links

Use <?php wp_get_object_terms( $object_ids, $taxonomies, $args ) ?>

http://codex.wordpress.org/Function_Reference/wp_get_object_terms

 
Leave a comment

Posted by on April 11, 2012 in Wordpress

 

Tags: ,

Woocommerce: Change number of products displayed per page

add_filter('loop_shop_per_page', create_function('$cols', 'return 6;'));

 
Leave a comment

Posted by on March 9, 2012 in Wordpress

 

Tags: ,

Change breadcrumb separator on woocommerce page

Good afternoon everyone.

I just change my woocommerce breadcrumb separator. It only need simple steps.

  • Copy the breadcrumb.php template from woocommerce plugin directory (/wp-content\themes/bestdeal/woocommerce/shop/breadcrumb.php) to your woocommerce theme template directory (/wp-content/themes/foreverlove/woocommerce/shop/breadcrumb.php)
  • Edit the breadcrumb.php, add this line after $prepend = '';
    $delimiter = '<span class="sep">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>';
  • You can put your delimiter in $delimiter variable. For me, I just add the style for .sep class.

Home this helps.

 
Leave a comment

Posted by on March 1, 2012 in Wordpress

 
 
Follow

Get every new post delivered to your Inbox.

Join 106 other followers