November192009

Phing: How to export defined properties to file

I’ve been very annoyed that I have to define properties in 2 different places. Given the following scenario:

* config target gets called, does a bunch of property prompts
* writeConfig target gets called, writes properties to file

You’d have to have a template file with the properties already defined, then you’d have to copy that file to a config file with the filter expand properties.

But that sucks, I only want to call propertyprompts and have those properties saved to files, so I wrote a custom task exactly for that.

You can grab this custom task from Snipplr

To use it:

<taskdef name=”ExportProperties” classname=”Path.To.Phing.Task.ExportProperties” />
<ExportProperties targetFile=”phing.properties” />

Enjoy!

11AM

TYPO3: Generate url to page from id

First thing:

$url = $GLOBALS[‘TSFE’]->cObj->getTypoLink_URL($pageId);

Also:

I can’t believe how many fundamental things in TYPO3 are not documented, or on Google. Is no one actually developing on TYPO3 anymore, or are you all just keeping things to yourself?

November182009
November122009
slimr:

I’m really happy for you and I’m ‘a let you finish your search, but did you mean: beyonce

slimr:

I’m really happy for you and I’m ‘a let you finish your search, but did you mean: beyonce

November82009

DOMElement to html

Here is a quick way to get HTML from a DOMElement in PHP

function getHtmlFromDomElement($element) {
    $doc = new DOMDocument();
    foreach($element->childNodes as $child)
    {
        $doc->appendChild($doc->importNode($child, true));
    }         
    return $doc->saveHTML();
}
November22009
Little Apikot reaching for a hug.

Little Apikot reaching for a hug.

October302009
October262009
Today’s xkcd Geocities-tribute redesign is historically accurate down to the smallest details.

via @marco

Today’s xkcd Geocities-tribute redesign is historically accurate down to the smallest details.

via @marco
October72009
World of snorecraft, welcome to gaming
(via cristianciofu)

World of snorecraft, welcome to gaming

(via cristianciofu)

7AM

We’ve started working on our most important project yet. I’m very excited.

Should go live end of the month.

← Older Entries Page 1 of 12
www.flickr.com
This is a Flickr badge showing public photos and videos from Extraordinaire.Me. Make your own badge here.