Saturday, March 31, 2012

Comic Font Type

What i have learnt - 1st drupal module




PDO php in drupal

When i was reading about connection to dB in drupal, i come across a lot of unsual & unfamiliar connection method in drupal that has something to do with PDO. So ichecked in php.net & google it. So, this is what i found; PDO is one of php techniques in connecting to database regardless of its type (MySql, Oracle, Postgress). Anyway there is not much doc about it in php.net. there are few references in other links though as follows:

  1. http://www.kitebird.com/articles/php-pdo.html
  2. http://www.phpro.org/tutorials/
  3. http://developers.sun.com/

Friday, March 30, 2012

Plan for weekend


  1. Going to the gym with intention of at least accomplishing 400kcal burn. This should take around 2 hrs with cardio and weight lifting routine. - accomplished
  2. Cooking for the following entire week. I guess the usual chicken curry would do. i have already took out the frozen chicken outside, hopefully by the time i come back from the gym, the meat is already soft, good for cooking. - accomplished
  3. Targeting not to spend any single penny. Today is the last day of this month so i hope i still can meet the target. Speeding money for kitchen stuff and others can only start tomorrow. - accomplished
  4. Spend at least 2 hours on my piano; i have made myself familiar already with the LHS and RHS notes, it is just to bind them together mentally. This requires left and right brain practice, together with the coordination of my fingers.
  5. i must start off reading on form documentation and produce some videologs on my form creation in drupal. My target for today is at least one videolog is uploaded to Youtube for reference.
  6. hopefully at nite, i'm able to iron up all my shirts for office use. - accomplished
  7. Last but not least, changing water for my mind blowing aquarium. As of now, because of my own procrastination the water level has dropped to a two third. The plants are still growing healthily though, but the aqua-scene that looks not so neat that is now slowly getting into my nerve.- accomplished


Breakfast with sardine pack

last week, i bought one pack of sardine with the intention of wanting to taste and knowing how much weight would it give if in case, i want to bring it along during my camping or jungle tracking. So today, early in the morning i just remembered about this sardine and after taking it out from the fridge, i heat it and eat with the leftovers of gardenia bread slice. hmmm... so far it tastes acceptably okay and the weight of a pack also quite light. There are 3 chucks of sardine inside the pact. So, for a camping that requires 3 to 4 days, 3 pacts sardine would be enough for 2 people.



With a net weight per pact of 120gram as oppose to other sardine pact of 155gram, i think this can be part of my weight inside my racksack and simple menu while waiting for the real dish to finish cooking.
.

Thursday, March 29, 2012

Downloading module Devel



I'm still searching for one page that tells me about a good practice of installing 3 modules in drupal for debugging purpose. Until now, i have no clue where i have read the page.

Damn!

Wednesday, March 28, 2012

Writing drupal module - displaying the block on page

As of now, i've completed my codes on the entire module for displaying a block at RHS region of my drupal framework. However, i haven't enabled it and see the results. On my 3rd attempt of coding (this is a continuation of the series of writing drupal module of block) i have encountered few things, one of which is the use of array in drupal. I realise that drupal is overusing arrays in every function it has in particular is associative array. As i'm not really fond of using array in my past PHP experience, i find it rather not-comfortable.




Anyway, in short, here are some new things wrt coding tutorial:

  1. Using hook() function called hook_block_view(). This function is used to display out the block content onto the page. the function has passing variable, i name it as $param where it stores the unique id (aka name) of the block.
  2. Use of switch to filter only id=buat_sendiri. This means, there could be a lot other blocks in any regions that carry their own IDs or names.
  3. The use of array variable where i must assign at least 2 key name; (1) subject (2) content. I need to assign 'subject' and 'content' with appropriate names and content values.
  4. using the custom function that i've written earlier, namely buat_sendiri_content(). This function passes the result in array format to a new defined array parameter called $result.
  5. create one array that will store all iterated data from $result. This can be achieved using foreach(). Here i call the new array as $item
  6. assigning the iterated data like this -> $item[] = array ('data' => iterated-data);
  7. After completing foreach(), need to assign 'content' with values from $item[].
  8. Using theme() <------ This one aku kurang faham lagi!!!




Acceptable Audio setting & What to do today

Audio level setting for recording purpose

This is a test on the setting i've set on BB Flash. I put it roughly around a third from the highest recording sound. The sound looks okay without any significant noise when i play on my computer using BB Flash Player, however i need to ensure that the volume control is set quite high. But once i uploaded it to Youtube, the sound recorded when played back was lowered down, so listener could not hear my voice clearly. I guess i should adjust BB Flash recorder recording sound level to half level.

Below is the output when the setting is at a third from the highest level.



Writing drupal module - block with database connection

this is a continuation of my codes done previously to create a block region on right hand side of drupal framesite where it shall display list of contents. This videolog in particular shows the code for database connection via command db_select()->...


In summary, what i've learnt from this exercise are:

  1. writing custom function for buat_sendiri module; this has nothing to do with hook() functions.
  2. Using php time functions; such as getDate(), mktime(hr, min, sec, month, day, year), time()
  3. *** most important command - Using db_select() class. the usage is => db_select('table_name','alias')->fields('alias',array('table_field')->condition('table_field',value)->orderBy('table_field','ASC/DESC')->execute(). an array variable should be assigned to db_select()


Below is the doc on getdate() that i extracted from php.net. The values return are used in mktime().




.

Tuesday, March 27, 2012

Writing drupal module - block

I finally completed making a videolog of a tutorial on writing drupal module that i've re-did this for the 3rd time. The earlier 2 videos that i have produced are lengthy so it's difficult for me to produce a nice watchable video for Youtube. So i made few attempts just to ensure that the outcome of the video is short enough for viewers to watch and requires reasoanably short time to upload to YouTube.

Anyway, the complete codes are still not enough because it still require the retrival of info from drupal dB and codes on presenting the content inside a block.
.


This is the summary of what i've learnt

RON95 price remains RM1.90 with government subsidy increases

Thank you for sustaining the petrol RON95 price at RM1.90. people like me would be appreciative on this decision. Anyway, report says that this would only a first wave hits as more increase of price will occur in the future particularly in this coming June. Well, i know government side will push to their limit to ensure that the price remains as is, because they are watching anything that may financially affect the average people segment where the national election is rumoured to somewhere in June or September. The opposition party will definitely use this issue to influence the public on any bad-to-the-public changes the government may take. It also states here that other countries have already have riots because of the price petrol jacked up.

Gadis Hilang

I read the statistics about girls got lost. The numbers are not that motivating. I've this idea yesterday while riding on my bike to the office; i wanna run a portal that advertise the missing of kids around melesia and hope and i can make some money out of it. I know it kinda not really ethical where the purpose of having the portal in the first place is for personal financial benefit but in this world of race, someone may and should take this opportunity; seeing problem to the community and look it from the good side. Anyway, 1000 missing kids reported in just 2011 is not 'impressive' memberansang.



I think for the time being, let just make this as a mere idea.
.

Most efficient day at the office.

I think today is one of the most efficient day of my life; specifically at the office and me following my strict rushing workout time. In between 2 meetings, one in the morning and the later one in the evening, i managed to squeezed time going to FF at menara Axis, PJ followed my strict workout, however it was not as complete as usual because i only did 18minutes of cardio exercise running on the treadmill, did simple weight lifting of hands and chest part and use the machine to do crunching which i rarely use. I normally do it manually without involving any machines to focus on my abdomen, but this time because i was so in rush, i skipped doing it and use the machine instead. In total i managed to burn roughly 300kcal which i thought quite reasonable due to short of time i have.

Out of all, one thing which i still regret until now is, i still could not able to follow my plan to do something benefiting & useful for my drupal project. Now, i am sort of getting ready for my piano lesson where as usual it is scheduled at half past 8 on every Tuesday nite. Hope i can still have my mind to do some drupal tasks before i go to bed.

Today my girlfren registered to the hospital ward for her usual kimo procedure routine. I pray that she'll do well and healthy enough to endure all those kimo tests. Love u always.

.

Monday, March 26, 2012

Small book by government on political issues

I should get this book, at least for my own mental consumption. I know that this is not the truth of everything because it will strongly incline towards supporting government especially this close to the general 13th election.

another social network site as powerful as FB in China

I don't know that there is a site that is as powerful as Facebook or Tweet that is used by China. This shows that anybody can create their own customised social network site that may suit with the local folks and do not need to rely on foreigner's site. In other words, the possibility to do something great in future is still there.

470kcal burn of running.

I was damn tired today. partly because of my running early in the morning right before i went off to work. I try to make this as my routine before work and sometimes alternate it with my workout at gym during lunch time. The non-stop running around my house area for 35minutes with uphill track at the end of the trail really test my endurance. Anyway, because of me running together with my girlfren, it has somehow given me some additional push for me to go on running with any stop; mainly because of seeing my girlfren doing so. Hehe.. it'd a shame if i have to stop and let her finish the run leaving me behind.

The whole time at the office was truly not as lively as usual. My mind was like so slow and lembab. and i even had a pain at my back; i think this is from the climb that i did on Saturday at Bukit Saga.

.

PHP.net function link

This is the reference of all PHP functions as in php.net.
http://www.php.net/manual/en/

Sunday, March 25, 2012

Red Meat - Healthy section

Looks like i have to cut down eating mutton red meat to once in a month.

Thursday, March 22, 2012

Feel being stupid reading epaper harakah

I'm not any political minded person but i feel a little bit intriguing when first reading harakah contents. Lately since i first purchase utusan online via ebrowse site, i have this critical thoughts in my mind that i should be fair at least to myself. i thought, why not have a different perspective also from the opposition party on areas brought up by government-supporting editors in Utusan. So i subscribed epaper harakah daily. But when i read the paper, it kinda suprise me that a lot of stories being presented to the readers are misleading. One thing as an example is coments and interview done with Daim Zainuddin on his thoughts of what would happen to the next national poll 13th. Personally i think, those editors from Harakah have clearly manipulated Daim's story and try their desperate effort to spin the Daim story to the advantage of the opposition. I can claim this as that because i also read the content about Daim's interview in Utusan and in fact i have copied the newpaper cutting and saved it for my own personal record. Daim's view was clear, he said BN has better opportunity in the next election and might be able to reconquer several states that are now under opposition. But what have been reported and presented in Harakah were totally the opposite!

In the end, after going through most harakah article & news, i felt i'm being cheated and worst of all i feel stupid!

Anyway, i still don't claim that i am government-pro citizen. It's just i don't like feeling being manipulated by some groups of people, planning to pyscho people to their advantage. It's so obvious when reading Harakah!

p/s: i still like reading comments from Tok Guru Nik Aziz on the topic of muamalat with Jews; between accepting money and belief towards Jews, based on the facts & directly straight to the point & not assumptions unlike most of Harakah editors do. I feel confident about myself and feel his comment is genuine because at the end of the reading, he let & allows the readers to make his own judgement based on facts.
.

Jomhosting Lembab and slow when replying my tickets

takkkan la lembab nak mampos camni nak reply ticket aku.. memang bengap betol la admin jomhosting ni! aku bukan main reply dalam ticket aku siap tunjuk video Youtube lagi mcm mana aku ping server, diorang balas reply cam sial. mintak aku sendiri plak check version software diorang, mmg takde professionalism langsung.

I replied their ticket on ~10:15am and they replied me back at 4:30pm. That's 5 hours later. Memamng bangsat. If they cannot solve this problem, i definitley will remove my webserver & hosting to different provider. We'll see what will happen.



And the below is the one replied back by jomhosting team after 5 fucking hours.

Wednesday, March 21, 2012

Hosting jomhosting is crap

i've been facing the problem with jomhosting since last week when i first started to install drupal & run the script. Firstly it was about the crappy Fantastico that turn out to be shitty piece of software. It did not work as expected and i spent wastedly on trying to find my own error and the workarounds due to Fantastico fault. At the end in the following week, the admin told me to use another software pre-installed in the hosting called softaculous. and it work, i managed to run drupal script for the installation purpose in less than 5 minutes.

Then another different problem repeated occuring. My webserver kept on down and inaccessible. After the admin has done something, it was up again. This was the third time it has happened after the 2nd reply from the technical team telling me that he has changed the login config for me. I suspected that he had done nothing except reseting my account info but the server is still the same. One thing i noticed everytime it become down was, whenever i changed some drupal config and has something to do with drupal dB, the whole website went down. And until now at noon after my last submitted ticket to them since 10am, nothing has changed. seringgit.com & drupalfree.com are still down!

It starts to get into my nerves now!


.

How-to links on Drupal Doc

I find it helpful when Drupal Doc lists down some howto topics. It shows some links on writing own module starting from the beginner level to more complicated areas.

Module HowTos



I'm penniless after spending my last RM50 on Philips headphone & microphone

Just came back from my routine workout today at FF. I was a bit disappointed at the gym because when i put my heart detector strap, it did not work, so the whole running was done without me being able to monitor my actual kcal burn and my heart rate. I hope it is not faulty as i just bought it at the end of last year. it would be shameful if i have to kick that stuff out and crash it.

Anyway, right after finishing my workout, i stopped by at computer centre section 14 because i want to look around on a good quality headphone with attached microphone. I knew that if i were to spend on this thing, it would be on my last RM50. On second thought, as i seldom stop by at that place, i finally grabbed one which i believe is good quality and affordable. the price is RM59, so there was the last RM50 out of my pocket. I definitely will use it to the fullest on my seringgit.com project.

When i reached my office, i brought along the new gadget to my place and straight away plug into my notebook. And as what had happened before, my fucking notebook still showed some intermittent problem. Sometimes it works well with the microphone being jacked into the socket hole and most of the times, it gave me headache. I wish i can crash this notebook into pieces. But after few attempts of plugging in and out of the socket, it detected the microphone. Hmmm.. at least this proved that the new gadget i bought is in good shape.


.

Tuesday, March 20, 2012

How to set a clean URL for my drupalfree.com

My drupalfree.com blog is already up but before i plan to aggressively promote this blog in the internet through google, i must make sure that the URL is clean. Currently it is running with non-clean url. This will not make a good reference for any search engine.



Well, i think for the time being, i'll just populate the blog with as many contents as possible. Just make sure that it will be update regularly so that any search engine out there will capture the link and record it in its ranking.

.

Statistics on Malaysia youngster who have yet to register as voters

here is another story about Malaysian polling that is coming soon. The statistics about those youngsters who haven't registered as voters for next 13th national polling are quite alarming especially malays where it is noticable now that more and more parties break up due to political and ideological differences.

Tablet iPad

Here is a finding from Gartner on the tablet market share. This is newspaper cutting from Utusan.

RM50 left

I've a RM50 bill in my wallet just for me to survive for the next 10 days until the end of the month. I spent the other half of the original Rm100 on my weekly groceries. Trivial things that cost so much. Bread loaf, cheese cake, sambal pact, 2 carrots, cendawan; those cost me around RM30 and on top of that i'd lunch today at the price of RM8.20.

This is a trap and a rat race. I just live myself with a bare minimal cost. So much less remaining for savings or investments.

..

Monday, March 19, 2012

Reply from jomhosting on installing Drupal

My salute to jomhosting technical of their fast response and straight-to-the-point answer. I should just give them 5 thumbs up out of 5. They replied that i should use another software called Softaculous instead of Fantastico, which i tried and the installation was smooth, easy and no-hassle problematic experience. To my suprise, the installation of drupal took in less than 3 minutes as oppose to my attempt of using Fantastico where at the end of every trial ended up in error message. Well, who's fault is that? Jomhosting should just remove Fantastico immediately so that customers like me would not waste time trying to find workarounds and trouble shoot the bug.



And Yesss, after opening up my drupalfree.com/blog, i am finally able to see the correct output. I know it's so plain and nothing fancy about the site, but that's not the real thing in my head. It's just a test to see drupal is really running on my site.


.

Finally DrupalFree.com is online

memang nak kena screw jomhosting nih! reply email kata dah okay, berhari2 aku check takleh. Lepas aku hantar ticket baru buat proper DNS setting right. Now it's working fine.

Memang Bangsat Fantastico JomHosting.Net

aku dah try macam2 utk install kan CMS baik Drupal mahupun Wordpress, tapi semua hampeh shit!!! ni dah masuk hari kedua aku dok berjam2 trouble shooting problem running script both Drupal & Wordpress on my site using Fantastico jomhosting. In fact, i tried changing the directories from root to the subdirectories pointing to my addon domain. And not just that, i even manually configure the MySql database by creating new dB and appropriate username assigned to that particular dB with proper privilege access & re-run the script and all of that are in vain. The responded error were the same; everytime the script created the username that is assigned to dB, the character underscore was rejected by jomhosting. I'm pretty sure that this has nothing to do with the installation scripts of both drupal & wordpress because it was obvious that the error was the same. Bloody hell jomhosting nih!

Now the last resort, what i do now is uploading the entire directory structure with complete contents to my hosting. We'll see whether this works or not.

..

Current problems of cpanel seringgit.com to solve


  1. The phpmyadmin does not show the menu 'Privilege' where i can add/edit/delete any MySql users. This is where i can add new user for my drupal dB and assign appropriate privilege to him. Perhaps i can try via the following method:

    1. MySQL database or MySQL dB wizard.
    2. Execution of SQL query at phpmyadmin - issuing grant privilege access


  2. cpanel phpmyadmin does not show any mysql dB where i can check the available users inside table user. So there should be another way around for me to ensure a particular username can be created and he has access to my new drupal dB.

  3. The settings.php at site/all/default/ shows a preset values for database name, username and password where they do not tally with the configuration of MySQL at cpanel. This happens when i run drupal script for installation process. Because of this i need to manually change the settings.php value and upload back to the hosting.

  4. Perhaps one way to verify this is to install Wordpress and see whether this problem arises or not. I can also check how does the new username assigned to wordpress dB is contructed in my seringgit.com hosting.



Trouble-shooting attempts

  1. I managed to assign one particular user (i've just created via cpanel) using MySQL database cpanel web-application to my drupal dB. So i think my mistake was, i tried to use phpmyadmin to do this task, but what i should do was to use MysSQL database icon in cpanel.

    The values set in settings.php are as below:

    Then when i re-run drupal script, another different problem occurs.



Sunday, March 18, 2012

Problem running drupal script via Fantastico.

Till now i've able to install the complete drupal script but when i want to run & install drupal on my hosting, it failed. Partly because the script does not understand the auto created username seringgi_drupal (example ya) and database seringgi_drpl1 (also example ya) in file settings.php. So, what i need to do right now is to manually change the name and try to setup the valid MysQL username that has all GRANTED access to this particular table.


Well, i still need to refer to the guru-drupal-doc page -> "Installation Guide" along the way of trouble-shooting this problem. I hope i will be able to solve this by today.


The link is http://drupal.org/documentation/install/create-database

.

Running 10km at Putrajaya on weekend night.

I didn't really make a plan with my girlfren that both of us will make a non-stop run go-and-forth from Putrajaya Mosque till PICC and return back setting a first time record of 10km. In fact i've never thought also that i'd be able to accomplish that because just before we start our run and warm up, i felt so damn sleepy and tired. It was due to the fact that i have spent my valuable time on some shitty pending office work, mother-fucking LLUB. i must complete replying to this shitty sotong fellow on that particular day, or else i would be regretting myself on the entire weekend. So i decided that i must reply him before my nite run.

At first, when i started off moving my legs, the exhaustion was still there. However after 10minutes of running, my mind and body were able to adjust with my workout already; the tiredness had completely worn off and i was able to focus on my steady run.

The run happened on the same day when Putrajaya was conducting a national balloon event where 13 countries worldwide had participated. Anyway, we never join the crowd because we were to busy and focused on achieving our goal of completing 10km run and morever me and my girlfren are the the type of people that never find it enjoyable to be in big crowd. So we always avoid ourselves from getting stuck into any big crowd events.

Anyway, on the following day, i started to feel the pain and pure exhaustion and we just spent our time at home.
.

Counter showing new country

Ahaa.. at least now there is a new country registered into my blog counter and it is India. I bet that person come into my blog because of him trying to learn something about drupal. What else do you expect, a guy from India?



And one more thing i realise here which bewilder me somehow. Why there is so many counts coming from Negori Sombilan?

.

Slow tul laa jomhosting.net

I'ven't really tried using jomhosting to its fullest capacity. What i've done till now is just login in and changing some configurations, but i notice something quite obvious - it is dammmn fucking slow. i don't understand why, is it because of me accessing dfom my office or is it running over the SSL? which ever it is, i hope when i really publish my website on the internet, it is not as lembab as this. Hope that my bad experience only applies to my accessing the cpanel.

This is the result from my pinging test that i've done from my office using unify to seringgit.com ip address 112.137.167.176. Bersepah request time out, 40% fail. The ping test was done at 1pm - 2pm time range.


The following table plak showing the result from the jomhosting.net and the result is expectedly the same.

Aku harap la the slowness is due to the office unify traffic is jammed up because so many bangsat2 yg dok download movies.

Okay, it is 5:30pm and it looks like the traffic to internet via my office unify has
subsided and it become resonably acceptable. I did another ping test to seringgit.com and the following shows a good result ~ 30-50ms response.




.

Thursday, March 15, 2012

Tutorial Writing Drupal Module - Content Posts

statistics on malaysian internet users on Facebook

This is based on Utusan 16-march-2012. The actual article is on the bad influence of LBGT to Msian society and how those groups expand in facebook.

Pembantu rumah

Thus is a piece of newspaper cutting from Utusan showing the agreement btw Malaysian Government and Indonesian on the terms and roles of future amah, or aka as Tenaga Kerja Indonesia (TKI). They have agreed that amah can only do 4 types of roles respectively and cannot mix up do all those tasks together which is jaga orang tua, jaga baby, kemas rumah and memasak.

Personally i oppose this agreement. The original purpose of getting amah for one particular household is to do anything that requires help. How can you quantify help based on work task? If you differentiate the tasks and require amah to perform her duty based on roles, then it won't really fulfil the original objective already. Who wants a helper to help them one particular role? Even the secreatary will do all kinda work for her boss. Idiot tul laa.. Not to mention also here that the salary per month for a single amah is RM700, although our governement denies that the RM700 is not part of the bilateral agreement btw both goverments.




Anyway, i really wonder whether what they claim here about the cost of getting amah is just RM4,511 plus additional deposit of RM1,800. I heard last time the total cost is somewhere around RM8K.

Buying new domain drupalfree.com

I didn't make long thoughts of the domain name that i wanna use. After several search of suitable name, i decided to take drupalfree.com as my domain name for the project. The main reason of selecting such name is because when i check the most typed keyword using Google Keyword tool, "drupal free" is one of those typed by users that have reached 1000 hits and the word "Free" itself is undeniably catchy and easy to remember and the fact that everybody searches for free things will make the easily remembered.


I haven't decided yet how to use drupalfree.com. It's either used for landing page or to house the blog site. Anyway, whichever it is, it must listed with highest ranking in Google Search engine.

Searching catchy domain name for my drupal site

A lot of catchy names for drupal has already been taken. Until now, based on my research using tool of available domain name service shown the following keywords still available.

  1. drupalfree.com
  2. drupalcodes.com
  3. sharedrupal.com
  4. whatisdrupal.org
  5. belajardrupal.org
  6. drupalmalaysia.com


Search Drupal Keyword using Google Tool

It's unfortunate to know that the search result for any keyword related to drupal shows a poor figure. Well according to the statistics, the average search per month for drupal keyword is somewhere around 1000. I narrow down my search based on country Malaysia, any language with a broad searching filter based on keyword "drupal module" and excluding some irrelevant terms such as joomla, wordpress, etc. The most people have search for based on drupal-related word is 22,000 hits. In my opinion, most Malaysian only interested to know in general what is drupal and for those who are considered as programmer level is still very few.

I'm no so sure whether this data i found really helps me to go off strongly with my project or it is a sign for me to seriously re-consider on embarking web-programming project using drupal language. It's kinda scary info for me.



There are few things that i can conclude from the analysis.

  1. There are not many people who understand what is drupal. Most people who do, are not up to the level of programmer level. In order words, there are very few of Malaysian who know drupal programming. Those who know generally understand at the conceptual level or drupal as an overview.
  2. As the search shows poor result, it also indicates that the market out there in Malaysia is still small.
  3. I could also interpret differently, which is; as there is not many people who understand Drupal and definitely few Drupal programmers only exist in Malaysia, this could be a potential area for me. If I were to explore this area now, i could be regarded as one of the pioneers in Malaysia. It's good to go into green area ahead from the rest because i'll have greater opportunity compared to other programmers.
  4. I'll have greater opportunity to conquer the local marketing and search engine ranking.

Google Keyword Tool

While i was browsing the drupal doc site, my smelly fren named Lan came close to be and as usual will never miss to promote his domain. So i took this chance to ask him regarding about the tools that Google provides on the keyword search. Lan is extremely good at affiliating programs and he even sometimes spent blindly & foolishly on domain names and endlessly on any affiliate marketing program that from his view is good. One of examples here is a website called clickbank.com. Anyway, this time as a response to my request, he told me about Google Keyword Tool Analysis. This site is definite a must for me before i start on paying for marketing charges on keywords or even domain names.


Anyway for a short cut, this site can be accessed from my existing GoogleAdd account.

.

Pendapat tentang Drupal secara umum

Hari ini adalah hari pertama aku masukkan content ke dalam Drupal Website framework. Personally bagi aku, secara principle ia adalah lebih kurang sama dengan Wordpress cuma aku mmg perasan byk sgt yg Wordpress lebih fokus uk menghasilkan website berciri blog manakal Drupal pula lebih kena generic use. Secara dasarnya Drupal boleh dijadikan sebagai web application yg lebih specific kpd perkara tertentu ataupun boleh dijadikan sbg website biasa atau juga blog.

Kalau nak dikiutkan experience aku dlm Wordpress, kalau dah install Wordpress dalam site domain tertentu dan jadikannya sebagai default landing page, maka amat susah utk menukarkan mood landing page tu menjadi website yg normal tanpa ada ciri-ciri blog. Berbeza sekali dgn Drupal, bilasaja aku install Drupal framework pada website domain aku, aku boleh tukarkannya menjadi apa-apa bentuk website sesenang yg mungkin. Aku boleh tukar dia jadi Website biasa yg takde blog contohnya website yg hanya tunjuk content About Us, Product & Services, Contact Us, dsb. Aku juga boleh ubah dia jadi blog sebijik cam Wordpress ataupun jugak aku boleh ubah dia jadi applikasi web tertentu. Dari segi ni memang aku puji Drupal, tapi kalau anda dah memang berfikir nak setup website berlandaskan blog, baik ada terus guna Wordpress sbb Wordpress memang dah amat mahir dan penuh dgn plugins-plugins yang difokuskan untuk menyokong blog. Sebagai contoh ialah penggunaan SEO and manipulation of comments.

Sebagai seorang programmer dalam proses belajar nak buat module Drupal ni, aku mmg rasa amat smooth sekali nak guna Drupal untuk dijadikan web application aku.

Ni la sedikit sebanyak pendapat aku ttg Drupal nih.

..

Wednesday, March 14, 2012

Yess, my drupal module works!

Based on my 1st attempt last nite before going to sleep on writing my own custome drupal module, i rewrite the same coding of drupal module. But this time, when i encountered the error which i've already expected it beforehand, i did some tweaking on the filenames as well as the directory name. it looks like the error was due to a very silly mistake; drupal or PHP in drupal does not understand the dash use in filename/directory or the function names.

So my next mission is to create a simple form template in drupal and by keying some values with some validations, drupal will insert the data into the database. Well, i could not wait and eager to see the wonders i can achieve from this learning curve and experience.


Mind the noisy surrounding background, i could not able to set up the sound recording properly. So at the end after giving up i settled down with my notebook's internal microphone. My apology.

..

First attempt of writing drupal module - failed



I wonder where is the error that i did here... mmm

Well, on the following day, which is today, i fixed the problem and the following video shows how it works.

List of interesting topics for further reading

I intend to update this list from time-to-time once i bump into anything that interest me but i don't have time to go in depth into it for that particular time, so just make it as a mental note for me to learn it later or visit the site in the future.


  1. what is drupal_get_form()? i have debugged the error but still have no clue how does the thing work - http://mukastone.blogspot.com/2012/04/trouble-shoot-drupal-menu-module.html
  2. Devel installation and how to use. To find 2 other modules that are good practice during debugging
  3. the concept of 'block module' and 'node module'


  4. There are currently 8 block-related hook functions.


  5. (Solved) What the fuck checking is this???? couldn't see any at module pane!

    Of course laa.. kalau engko tak wat lagi module, misti la x nampak dalam module niiih! aparaa..

Reference on Core hook() functionalities

Hook() functionalities are part of core module. If you wish to integrate or call up the existing core module functionalities, you'll need to know all available hook() names. The implementation of hook() can be done via overriding method. If your module wish to use the core hook() functionality eg hook_help(), you can just override the existing function name of hook_help() to your own customised name but retaining the functioname which is _help whereas the name of hook is changed to your modulename. Example hook_help() is changed to modulename_help().



The link to description of all available hook name is here

Some handy notes when Getting Started

I must write this down or else i would forget this steps and keynotes.


  1. To enable any error reporting to my site when developing my own module i should add in those following commands in my Drupal settings.php. Link.


  2. Naming convention of the functions of module. It should be written the same as the module name. example "_()". This representation of function names in writing module is refered as hook().

    Never ever use dash in naming convention. This applies for function names, filenames and the directory of your module. I did some errors on this during my first attempt of writing my own module. Example is here.

  3. Add in the


  4. Besides file .module, you should also have .info file. It can be called as modulename.info.


  5. for clarity purposes, the drupal doc site uses this convention in their explanation throughout the site