【KtaiLibrary】Ktai Library勉強会楽しかった!

昨晩、「Ktai Library勉強会@関東」がE2さんにて行われました。
まずはお集まりいただいた皆様&スタッフの皆様どうもお疲れ様&ありがとうございました!
CakePHP関連のイベントは色々ありましたが、1冊の本がベースで、しかもそれに準じて開発していく形式のイベントは今回初めてだったため、大変におもしろかったです。なんというか、従来のカンファレンス形式は「聞くだけ」なのに対し、自分で手を動かす「ワークショップ」形式は達成感のようなものが得られる点、そして本をベースにすることにより、解説を聞くことで作業が中断してしまうことが無く自分主導で進捗が得られる点にメリットがあるかなーと感じました。逆に、開催中は大変に静かになるため、個人的には全く落ち着かないのですが(笑)。
誤植関係が良く見つかってまあお恥ずかしい限りですが、それとは別に、また例によって環境依存系のトラブルが多発しまして、進捗がなかなか得られなかった方もいらっしゃいました。そのトラブルとは、「Firefox3.6 & FireMobileSimulator1.1.10でdocomo・au表示の際にバイナリ絵文字が表示されない」というもので、Windows, Mac関係なしに出ていました。バイナリではなくて数値表現にすると出てくるため、ブラウザ内で表示トラブルだと思うのですが…
まあ2時間では限界があり、結局セットアップで終わってしまった方が多かったのではないかと思いますが、とりあえず皆さん絵文字が表示できていたみたいなのでホッと胸をなで下ろした感じです。

Debugging a Browser Redirect Loop

Hi all,

I am using CakePHP with the Auth and ACL components. My page loads fine for non-registered users, but if I try to log in as a registered user I get an infinite redirect loop in the browser.

I am sure that this is some sort of permissions problem, but the problem exists even for users who have permissions for everything. The only way to prevent this behavior is to allow '*' in my AppController's beforeFilter method.

What is the best way to debug this sort of problem?

Thanks!

CakePHP : signets remarquables du 04/03/2010 au 08/03/2010

Quelques bonnes adresses CakePHP vues entre le 04/03/2010 et le 08/03/2010:

How can I find all records for a model without doing a long list of "OR" conditions?

I'm having trouble composing a CakePHP find() which returns the records I'm looking for.

My associations go like this:

User ->(has many)-> Friends ,

User ->(has many)-> Posts

I'm trying to display a list of all a user's friends recent posts, in other words, list every post that was created by a friend of the current user logged in.

The only way I can think of doing this is by putting all the user's friends' user_ids in a big array, and then looping through each one, so that the find() call would look something like:

Problem in integrating Wordpress blog's in Cakephp Website

Hello Everyone,
I was working on a site of Cakephp which was successfully delivered.But recently Client again appered and asked me to put the Wordpress blog in it,to cover up the Blogging thing in his site.He wants to share the authentication between the Cakephp and WP.Whoever registers in his site,then Logins in it and if he clicks on the Blog Tab,he must be redirected to the WP blog with the session still there.After some googling I have installed it in /app/webroot/blog folder but I am not able to edit the .htaccess file.
Please help me in the right direction,that how to share the authentication betwenn Cake Php and Wordpress, and the second one how to customize the .htaccess file so that URL's look good.
Thanks in advance..!

OpenInviter for CakePHP

A few months ago, I've published a case study on the bakery about a website made with Cake.

http://bakery.cakephp.org/articles/view/unaneem-com-a-community-website-...

As I listed the components I used, i spoke of an OpenInviter component for CakePHP. A lot of people asked more informations about it.

The thing is that the OpenInviter tool evolves very fast (a new version every 2-3 days) so it's hard to disclose a stable CakePHP version component.

Whatever, I decided to disclose my current version and hope that the community will contribute to make it stable. So here it is...

Introducing VaM Cart

VaM Cart - Free, Open Source CakePHP Based Shopping Cart.

Official Site - http://vamcart.com/
Online Demo - http://vamcart.com/demo/

* Easy Installation.
* CSS, JS minify and compress.
* SEO - Search Engine Optimization.
* Unlimited Categories, Products.
* CakePHP, MVC, Smarty.
* Multi Language, Multi Currency.
* Templatable.
* Open Source.
* Automatic Image Resize.
* Product Reviews.
* Coupons...

Join Us.

Copyable Behavior

Copyable Behavior adds the ability to copy a model record, including all hasMany and hasAndBelongsToMany
associations. Copyable relies on Containable behavior, which this behavior will attach on the fly as needed. HABTM relationships are just duplicated in the join table, while hasMany and hasOne records are recursively copied as well.

The value of a simple release process

I’ve been doing many of the CakePHP releases, since “the great framework apocalypse of imminent doom”. Between then and now, CakePHP has had quite a few releases. During these past few months, I’ve really begun to understand the value of a simple release process. When I initially started doing releases for CakePHP, our release process involved many steps and I was doing them all manually.

Making CakePHP Templates in TextMate

I finally got around to exploring templates in the TextMate bundle editor. The PHP bundle does not have any templates, and so I set out to create a few to improve my workflow. I thought it would be helpful information for PHP developers using TextMate. I actually used the Ruby interpreter to power my templates, but you can definately use PHP, or any other interpreter you like (Python, Perl, etc.). You might want to check out Environment Variables in the TextMate manual.

For the impatient: download the bundle. You should go through this post and make sure you set up shell variables properly. They are useful and worth understanding.

Managing Memory on the Cheap

It’s not new that taking notes, writing and playing with data makes it easy to remember the subject in question. I remember that back on school time when instead of cheating on the tests I would just prepare the cheat sheet and by doing so I would fix the matter and end up not even needing to cheat at all.
Another example is post-it cards that allow taking quick notes and thus exercising the subject in question before even getting back to it. After writing in one, before sticking on the wall I already get it stuck in my mind. In both cases I ended up having a document to refer to when in need of some help to refresh my mind, but still I had it much clearer in my mind.
Here are some habits that help me get on track by creating stronger references in memory for things I need to keep in mind or would like to use in the future:

[CakePHP] Can not Bake table model, controller and view

I developed small CakePHP application, and now I want to add one more table (in fact, model/controller/view) into system, named notes. I had already created a table of course.

But when I run command cake bake model, I do not get table Notes on the list. I can add it manually, but after that I get some errors when running cake bake controller and cake bake view.

Can you give me some clue why I have those problems, and how to add that new model?

CakePHP, MAMP y el socket de Mysql

En una entrada anterior ya he comentado el tema de como ajustar las cosas para que CakePHP pueda comunicarse con Mysql. Para ello, hay que crear un enlace simbólico del socket /Applications/MAMP/tmp/mysql/mysql.sock en el lugar adecuado, que en el artículo señalado era /var/mysql/mysql.sock.Hace poco, tras varias actualizaciones los shells empezaron a "pedir" un socket en /tmp/mysql.sock, por lo que creé un nuevo enlace, pero olvidé la opción -s y creé un enlace duro en lugar de simbólico.Pues bien, que sepas que los enlaces duros no valen para el caso y los shells no eran capaces de conectar a la base de datos. Ha sido cambiarlo a enlace simbólico y volver a funcionar todo como es debido.

Making HABTM relationships unique in CakePHP

I have two models, called Book and Tag, which are in a HABTM relationship. I want a couple (book, tag) to be saved only once. In my models I have

var $hasAndBelongsToMany = array(
    'Tag' => array(
        'className' => 'Tag',
        'joinTable' => 'books_tags',
        'foreignKey' => 'book_id',
        'associationForeignKey' => 'tag_id',
        'unique' => true
    )
);

and viceversa, but the Unique flag does not help me; I can still save two times the same couple.

How do I do this in CakePHP? Should I declare the couple (book, tag) unique in the database directly, or will this make CakePHP go nuts? Is there a Cakey way to handle this situation?

EDIT: I tried making the couple unique with the query (I'm using MySQL)

New Versions: Uploader 2.5, Gears 2.0

I have been working on the following versions for over a month and deemed them worthy enough of release. Enjoy!Uploader v2.5http://www.milesj.me/resources/script/uploader-pluginhttp://github.com/milesj/uploader

cakephp error how to clear this error

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wp_generator' was given in

plugin.php on line 339

which cakephp relationship should be used for groups of users? can haveMany use array for foreign_ID?

In my tennis application, my 'match' table has two players (obviously). I've used player1_id and player2_id as a way to track the user ids. I haven't included a user_id foreign key though.

There is also a 'user' table where I want to pull player's names from.

Because 'match' has more than one user and users have more than one model, I'm wondering if the following model configuration will work:

I've setup the user model like this:

var $name = 'User';
var $hasMany = array(
'Match' => array(
'className' => 'Match',
'foreignKey' => array( 'player1_id', 'player2_id'),
'dependent' => true,
)

and the match model like this:

HABTM Data Corrupted During __saveMulti()?

I'm using Cake 1.2.6 and last night I noticed that a HABTM relationship wasn't being saved when I submit a form.

I have a HABTM relationship between Committee and Volunteer. The primary key for a Volunteer is a UUID while the primary key for a Committee is a human readable string (e.g. BOARDOFDIRECTORS, FAIRCOMMITTEE, FAIRASSOCIATES, etc.). I have a form to create/edit volunteers and that form includes a select box whose options are exactly what you'd expect and are populated with options returned from Cake's find( 'list' ) method. Although I can't think of a reason it would matter, only one committee can be selected for a volunteer (the HABTM is for expected future needs).

NINJAS!


A friend tipped us off that Abduzeedo had a Friday post on the Awesomeness of Ninjas, mentioning the article probably deserved a spot on the dojo blog. I couldn’t agree more.

Sharpening the Blades: Styling Forms, Problem with Passwords and HTML5 in IE9

This edition of Sharpening the Blades features an article from Mike about using jQuery, CSS and image sprites to create stylish forms, an article from Benjam about Passwords on the web and Mark chimes in with an article about the possibility of HTML5 in Internet Explorer 9.

Syndicate content