Finally it's my dev blog's turn

I been spending quite some time on my personal blog for the past few day and finally get it with a new theme and pushing myself with some blogging momentum to kick start my blogging life.

Finally i can squeeze out some time for here also , i have remova captcha for comment and using the new anti-spam – mollom to defend my comments, lets wish the module really work compare to akismet. I getting Zemanta too for here , since i already using it on my wordpress-power blog, it doesn’t really help a lot but at least it give some idea what how i can continue the post some time.

I was trying to install path auto module just now , at first i m so happy it release for drupal 6 but after i install , the module is not compatible with drupal 6.3 core, sigh, other then this , i m thinking shall i remain to use Textile or shall i go back to wysiwyg mode ? Zemanta doesn’t really support textile too , sigh ... it is hard to being unique.

anyway i think i got 4~5 technical post to post but until i sort the input method out, those post should remain on my evernote.

That's still hope

i talk about i thought i will change this not long ago and today an excited news been announce , some of the major module Views, CCK and Organic Group has release RC version for drupal 6. Remember to upgrade the drupal core to 6.3 dev version , beacuse there are some bug affected these RC module.

Geez i think i might just rebuild a site that i build on drupal 5 for the group purpose, if this is really working well.

Tags:

I thought i will change this

For the past few day i been thinking to give up drupal, i even think that to change this blog into habari or textpattern in the end i m thinking to give drupal another chance, since i been thinking to have a dev blog on top of drupal.

So why i m so feel like give up drupal ? the latest drupal 6 seem powerful and having some good review but the main issue is on the module, i m not sure after few month already so many module still not updated, it that because drupal 5 to 6 have too many changes ? or simply because the dev team never release enough info for module developer to prepare for drupal 6 ?

A simple one for anti spam module , it seem like my only choice is captcha module, akismet module doesn’t work, bad behavior also, currently i need to moderate all the comments just to avoid any spam going through , this is getting frustrated.

Anyway i giving myself another 6 month to get use to it , i hope by that time most of the module is getting stable.

Memory Cache vs Disk Cache

There is this interesting discussion during meeting just now, it’s about caching, there are people claim that Memory cache is faster then Disk cache without looking at the big picture.

The Infrastructure is build in this way, the memory cache is not on web server itself, the memory cache is using memory on the storage server which no need too much processing power, theoretical Memory cache did perform better but now on this infra, the problem is not Memory Cache vs Disk Cache already, it is more like network transfer + memory cache vs disk cache.

Interesting, i never think of that.

Tags:

Relaunch My Dev Blog

I just complete reconfigure this site , it seem like after my last post on Nov 07, its been nearly 6 month i never post anything here.

Other then upgrade the drupal to version 6 , one of the main thing is i replace textile by markdown, the textile module seem like no one is maintain and make it working for drupal 6, so current solution is make use of markdown module first, i think i might spend sometime to see can fix the textile module this weekend.

Most of the usual module like google analytics and akismet working as usual, another new module that i addon is GeSHi module which allow code highlighting , should be working when i try to demo some code at here.

Using email as username

Another bug that i handle today, which i think worth to share it.

It is a site that keep track of some benchmark, the user will be require to put their email on the first page to start the survey. During page 6 before complete of the survey, it will ask to reconfirm email again, this step is actually giving the user another chance to put in a proper email.

Imagine you might start the survey just by random email, until end of the survey, you find out that this benchmark is useful for you and it will email you the username and password, this will be the time you like to change it to your proper email.

I receive one of the support request that there is this user, who got his/her account with password but unable to login, after some digging and testing , the user actually put in a lower case email at the begining , on page 6 he/her change the email address to first letter capital
bq. first – knight.ashodin@email.com then become Knight.Ashodin@gmail.com

I believe my previous developer never think of this, thats why there is no control on page 6, because of this it create 2 account, by a same email but different caps and hard to believe there will be user just to change the char to caps.

if your system is build on top of using email as username , always remember make use of strtolower() , this function will be convert the whole email to lower case, this can avoid duplicate account created. Thats why i just added this function on page 6, the register page already handle this.

Checking on repeat number

There is this validation i need to do today , to check the value is it a repeat number, example 111111 or 22222 is not allow, but 1112222 or 222333 is ok. So this is what i come out with

$same=(substr_count($text,$text[0]) == strlen($text))? TRUE : FALSE;

  • what does function substr_count(words,character) do ? if actually checking the character that you supply through the entire words and return the total number that character been use.
  • a word is actually an array of character , that’s why $text[0] means the first character in the word
  • strlen() is use to return total number of character in a word
  • one of the good tactic i learn here Variable=(Condition):condition true value ? condition false value

By using the first char compare to the whole words, it should return me the same number of total length of the word, because what i try to find out is is this word full with the same number.

OnChange and redirect

i using these code to redirect once the user select an option from a select menu

<select onChange="location=this.value"> 
<option id="flcikr" value="http://flickr.com" selected="selected">Flickr</option>
<option id="delicious" value="http://del.icio.us" >Del.icio.us</option>
<option id="netvibes" value="http://netvibes.com" >Netvibes</option>
<option id="facebook" value="http://facebook.com" >Facebook</option>
<option id="rememberthemilk" value="http://rememberthemilk.com">Remember The Milk</option>
</select>

Set Cookie by javascript

Javascript that i use to set cookie

<script type="text/javascript">
function setCookie(n, v) {
var cookieStr = "";
var date = new Date();
date.setTime(date.getTime()+(3/span>3024/span>6060*1000));
var expiry = "; expires="+date.toGMTString();
cookieStr = n /span> " = "  v /span> ";expires="expiry+";path=/ "  ;
document.cookie = cookieStr;
}
</script>

Do we need WYSIWYG tools for blogging ?

I been spending nearly half of day tweaking tinymce , one of the popular WYSIWYG on drupal, but the more i tweak it, the more i realiase it cannot be done. Example things that i can’t do

  • cannot insert flickr photo
  • cannot insert <code> tag
  • conflict with different filter

although most of the problem i can solve it by other module, or switch between different input format, but this seem like not a good way to me.
I don’t really mind typing but of course i don’t want to type all the html code just to blog something, finally i found a module that allow me to make use of Textile – humane Web text generator , by using this module , it allow me to do some of the markup in simple way.

This is the first post that i blog by using Textile

Syndicate content