debuggable

 
Contact Us
 
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22

Cleaning Html with this HtmlCleaner for CakePHP

Posted on 14/12/08 by Tim Koschützki

Hey folks,

one of the problems we faced back when we merged our old blogs thinkingphp.org and php-coding-practices.com, was this little "Recent Comments" feature in the right navbar. It shows syntax-highlighted code, but makes use of Cake's TextHelper's truncate() method at the same time. The problem is obvious: Html can get cut off, totally screwing the page layout.

One day I sat down to solve this problem. The result of this is the following ViewHelper "HtmlCleaner", which could be an easy-to-use alternative for HtmlTidy.

You can find the code including tests on Debuggable Scraps / CakePHP / Helpers. Suggestions and feedback are always welcome.

Usage is very simple:

<?php
$bogusHtml = $htmlCleaner->clean($bogusHtml);
?>

Enjoy!

-- Tim Koschuetzki aka DarkAngelBGE

 

People who thought ...

Posted on 14/12/08 by Felix Geisendörfer

Sorry to those who felt offended, this was really just meant as a joke.

-- Felix Geisendörfer aka the_undefined

 

Cake vs Zend vs Symfony vs Igniter

Posted on 12/12/08 by Felix Geisendörfer

Just in case you need to explain this to somebody at some point ; ).

-- Felix Geisendörfer aka the_undefined.

 

Your CakePHP application's Homepage

Posted on 12/12/08 by Felix Geisendörfer

Rob Wilkerson and I just talked about what the best place is to put your homepage in CakePHP. My answer was the following:

If your homepage is static, just use your PagesController to render a home.ctp view.

If your homepage is dynamic, add a homepage method to your PagesController:

class PagesController extends AppController {
    public function view() {
        // Your normal pages
    }

    public function homepage() {
        $posts = ClassRegistry::init('Post')->find('all');
        $this->set(compact('posts'));
    }
}

Don't forget to update your routes. Some apps may also simply point their home route to the index function of another controller. How do you handle homepages in your app?

-- Felix Geisendörfer aka the_undefined

 

CakeFest Buenos Aires 2008

Posted on 9/12/08 by Felix Geisendörfer

Hey folks,

this is just a very brief post about the latest cakefest. If you are coming for downloading the pictures, scroll down : ). First to all of you who missed Tim at the fest and in the pictures: He couldn't attend the conference because he broke his knee in a couple of nasty ways when playing soccer and is still recovering : /.

---

So I just came back from Buenos Aires where Mariano Iglesias
organized an amazing CakePHP conference. Earlier this year we already had a fest in Orlando which was unofficially labeled "beerfest" by its attendes. This years conference is probably going to be remembered as either the meat or tubes fest.

Why meat? Well a picture says more then I ever could:

It may also be the tubefest as one of our the main activities was to find tubes wherever we went as it was hard to get online during the conference.

Thanks to mariano the entire event had full i18n support. Everything from the website, down to the attendee cards was bi-lingual.

All talks where simultaneously translated by an excellent team of translators who did an amazing job at breaking the language barrier (but may have shortened their live expectancy considerably due to some very fast baking at the stage). In this pic you can see a bunch of us listening to a spanish talk:

One night we had a team dinner, this picture was taken afterwards and shows Mariano, Garrett, Nate, Me, Jeff, Renan and Mark:

Here you can see Garrett showing off some cool console features:

Jim gave an amazing talk about how he and the company he works for used CakePHP to build a massive document processing application that helps people to clear their criminal records.

This was at the last day of the 4 day event, you can see all the presenters and as we're holding up the sponsor logos:

And last but not least a nice group shot of fancy dinner we had : ). Btw. if you're looking for that picture of me asleep in the restaurant and the wine bottles next to me, download the full image pack : ).

So all in all CakeFest Buenos Aires was a huge success and I really enjoyed meeting everybody and seeing the spanish CakePHP community in action. A special thanks also goes to all of those who travelled the long way from Australia, New Zealand, Canada and elsewhere to attend the event!

Now, as promised, here is the full download to all 307 pictures, most of which were taken by Claudia (Mariano's Girlfriend) who really deserves a big applause for all the great help and work she did behind the scenes.

-- Felix Geisendörfer aka the_undefined

PS: Why so serious Mariano?


 
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22