Email Routing Problem with Contact Form on Planet CakePHP

Sorry to everyone who sent me emails between Jan 2009 to May 2009 and have not received any replies. I just realised that the emails got bounced due to my web host routing them to the local MX server instead of Google's mail servers. I am sure it used to be working but oh well. So please don't think I can't be bothered to reply to emails. Those who have yet to get any replies, feel free to drop me another email via the contact page. Thanks!

CakePHP : signets remarquables du 20/06/2009 au 02/07/2009

Quelques bonnes adresses CakePHP vues entre le 20/06/2009 et le 02/07/2009:

Importer un modèle depuis un contrôleur

CakePHP : Framework de RAD en PHP

La question revient souvent sur le forum ou sur IRC, alors voici un petit récapitulatif pour comprendre comment importer proprement un modèle au sein d’un contrôleur CakePHP lorsque l’on en a besoin. Le cas d’utilisation le plus typique est la mise en place d’un tableau de bord qui centralise des informations de divers Modèles de l’application.

Default views for extensions

I’m currently revamping the API of NoseRub to use CakePHP’s Router::parseExtensions() magic, i.e. if you append an extension like “.json” to the action you request, then CakePHP automagically sets the correct content type, and uses extension-specific layouts and views to render the result (e.g. if you request /example/action.json then the layout app/views/layouts/json/default.ctp and the view app/views/example/json/action.ctp are used by default).

That’s nice, however, in our case all JSON views are identical (the same applies for the XML views):

KISS – O Retorno!

Eai galera!

Nos ultimos dias enfrentamos turbulências na realização da mudança do nosso servidor, cache do WP, e outras azias aleatórias .

O KISS ficou zuadão, mas agora (de acordo com o Bodão) está rodando normalmente:

Hj eu botei um sistema de cache de macho nele… agora eh cache de banco de dados, e nao cache de pagina completa… a separacao de contexto conteudo estatico e conteudo gerado por consultas eh bem mais interessante, gasta menos espaco em disco, menos processamento, e tudo acaba realmente ficando mais rapido…

Bom… sendo assim, gostariamos de deixar aqui nossas sinceras desculpas pelos transtornos =D

[]’ss

[cakePHP][IRC集会] 第3回 CakePHP IRC集会終了とまとめ

第3回 CakePHP IRC集会が終了しました。参加して頂いた皆様、ありがとうございました。

平日の昼間という無謀な時間にやってみましたが、45人ぐらいの参加者となり、かなり良い感じでした。

やっぱり業務時間中というのはとりあえず参加しやすいということが分かりました。ただ、発言数は少なくなる傾向にありましたが。

今まで、平日夜、休日夜、平日昼というパターンで傾向を見てきた結果、次回からは、平日、休日の交互に開催していくことにしました。開催間隔も少し短くして、1.5ヶ月に1回ぐらいのペースにしたいと思います。

下記、集会の内容で外に出してもよさそうなものだけざっくりまとめました。他にもたくさん発言があったのですが、まとめるのが難しそうなトピックなどは飛ばしました。

Give Me Cake now on iPhone

Browse to Give Me Cake on your iPhone to see this Blog in iPhone Theme. This is made possible by using WPtouch.

This is how givemecake.dev-work.com looks like in Safari with iPhone user agent string.
Some cool features of WPtouch mentioned:

Support for FlickrRSS plugin, Blip.it video plugin
Automatic Archives page layout (if you have or create a page [...]

Switch blocks are not so smart

I have found some common code patterns/refactoring patterns while doing code reviewing in my current day job. And one of them involves switch blocks. After reading nate’s blog here about switch blocks, I thought to share something similar.<!--more-->

Following is an example code, where switch-case is used to configure some variables based on the value of $api_name.

Simple Math Question Captcha Component for CakePHP

I don’t like CAPTCHAs. I don’t know anyone who does. But most forms need some sort of protection against spam, especially where heavyweight spam detection services (e.g. Akismet) aren’t suitable. The downfalls of CAPTCHAs are many - hard to read, annoying, impossible for those with vision difficulties - and the benefits are slim. So, a few months ago I wrote a little function (and I do mean little - like 10 lines of code) to generate a random math question to ask the user in plain text instead of a CAPTCHA. The idea was that a bot wouldn’t be able to answer it, since it requires some human logic. And you know what? It worked - spam went way down on our websites.

Increasing life expectancy with 2 lines of code. CakePHP Auth component.

life_expectancy

if(isset($this->params['requested']))
	$this->Auth->allow($this->action);

I just spent about 3 hours pulling my hair trying to figure out why my CakePHP application was stuck in an infinite redirect loop when using the built-in Auth component. The above code snipped was the simple solution.

Uploader Plugin officially released!

For the past month I have been talking about CakePHPs lack of a built in uploader component or mechanism, and how I wanted to build one. Well wouldn't it be great if I actually did build it? Oh wait, what is this? I did build one? Yes. Is it released? Yes. May I use it? Of course! The Uploader is primarily used as an all purpose file uploader and was built to not interact with a model/database. Here is a quick rundown of the plugin.

The plugin comes bundled with an uploader component and a validation behavior. The component is used to upload the files to a destination, resize or generate images, validate against mime types, log errors, scan for viruses and more. The behavior is used to add validation rules to a model to check against image uploads.

A big thank you to Mark Story and Matt Curry for beta testing and giving input and ideas.

Simple tweak for model relations in CakePHP

What happens when you wait for half an hour to delete one row in your database? Investigation!

Video Sharing Website Part 2 : Converting the uploaded video to FLV

This series of blog post will talk about how to setup a Video Sharing Website.
Converting the uploaded video to FLV
This is a ‘on the fly’ conversion example, using Cakephp Framework.  I am using the ffmpeg library for the transcoding in my example. The ffmpeg converter supports FLV, MP4 and many more.
ffmpeg supported formats: http://ffmpeg.org/general.html#SEC8
For the [...]

Video Sharing Website Part 1 : Introduction to Video Streaming

This series of blog post will talk about how to setup a Video Sharing Website.
Definition to various methods of video downloads and video format

Streaming
HTTP Download
HTTP Streaming – A combination of Streaming and HTTP Download

Streaming
Use of Video Stream Application servers. Examples of Video Stream Application servers include: Video Desk, Adobe Flash Media Server. To use a [...]

Sorry, I was not able to successfully run APXS.

Have you experienced this for the APC install?
--------------------------
Sorry, I was not able to successfully run APXS. Possible reasons:

1. Perl is not installed;
2. Apache was not compiled with DSO support (--enable-module=so);
3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs
The output of /var/tmp/pear-build-cba/APC-3.0.19/y follows
/tmp/tmpwmgpL4/APC-3.0.19/configure: line 3232: /var/tmp/*****/APC-3.0.19/y: No such file or directory
configure: error: Aborting
ERROR: `/tmp/tmpwmgpL4/APC-3.0.19/configure --with-apxs=y' failed
--------------------------

The answer is:
"--with-apxs=y"
has to be
"--with-apxs=yes".

つまり、
-----------------
Use apxs to set compile flags (if using APC with Apache)? [yes] : y
-----------------
というのは間違いで、
-----------------
Use apxs to set compile flags (if using APC with Apache)? [yes] : yes

[CakePHP]Viewからヘッダにスクリプトを追加する($script_for_layoutを利用)

各ビューファイルから内にスクリプトを追加する方法のメモ

// $javascript->linkでファイルを読み込む方法
echo $javascript->link("test", f [...]

Twitter, are you taking advantage yet?

I’m sure you are well aware of Twitter by now.  If you are not, perhaps you should crawl out of the hole in the crowd and begin checking out the latest fad on the Internet!  People are absolutely obsessed with Twitter right now.  There are a million sites out there on how to make money [...]

Two CakePHP behaviours to extend MeioUpload

I’ve been using the the Meio Upload Behaviour for a while as its a very handy piece of code, but as is so often the case it doesn’t do quite what I need. In the past I’ve got round this by hacking together a kind of supporting framework in app_controller and scattered about in my models. But the other day I came across the newest version of the code by Juan Basso on Github and decided to dump my mess of spaghetti code and start from scratch.

Aims

The idea is that each model can have its own uploads with their own defaults, for example:

CakePHP core.phpの設定をbootstrap.phpに書く

CakePHPでDebug Levelなどの設定を変更する際は、core.phpを修正するのが一般的です。インストール直後にSecurity.saltを変更するのはお馴染みですね。

そんなcore.phpですが、実はこの設定はbootstrap.phpに記述してもokです。例えば以下のようにDebug Levelをbootstrap.phpに記述するとDEBUG=0として動作します。

[app/config/bootstrap.php]

私は如何にしてF905iからN-02Aへ移りそしてまたFへ戻ったか、そしてiモードブラウザ2.0のタブ機能への落胆

title_img by you.

なぜFに舞い戻ったか。

答え:iモードブラウザ2.0で、タブ機能が全機種に搭載されたから。

まあこれだけです。逆にいうと、Nに移ったのはタブブラウザのためのみでした。F905iはかなり気に入った部類の端末でしたが、iモードブラウザ2.0登場以前でiモードブラウザでタブ機能を備えていたのは僕の知る限りNのみでした。どうしてもiモードでタブブラウザを使いたかったし使ってみたかったので思い切って機種変更したのでした。4~5万くらいかかったかな。

ちなみにN-02Aで他にも良かったのは、当時Nのみがサポートしていたiモードでのタブブラウジングに加えて、最薄級の端末でありながらGPSを搭載していたこと。最新F-08Aよりも薄くて軽い端末ながら、GPSの搭載はなかなかのものと思われます。(N-02Aは防水ではありませんが)

N-02Aのタブブラウザはよくできていて、ソフトキー一発でリンクを別タブで開くことができます。タブ切り替えもソフトキーで一発です。

R0011857 by you.
N-02Aのiモードブラウザ。ソフトキーの右に新タブで開く機能、左にはタブ切り替えが割り当てられている。

Syndicate content