Mutton Birds and Front Lawn, Bootleg Central
areligionofakind: here, and here. Below, Don Visits Harry:
Some of the stuff on that site is pretty amazing. Witness: Andy with Neil Finn, or The Queen's English with the Auckland Chamber Orchestra.
areligionofakind: here, and here. Below, Don Visits Harry:
Some of the stuff on that site is pretty amazing. Witness: Andy with Neil Finn, or The Queen's English with the Auckland Chamber Orchestra.
Amazing idea: Slydial. Lets you leave answering machine messages for someone without their phone ever ringing.
Symfony 1.1's tasks are pretty nice. They let you centralise all the administration of your website that would usually happen through a myriad of batch scripts. When you're writing a task, you'll probably define a command line option as follows:
$this->addOption('env', null, sfCommandOption::PARAMETER_OPTIONAL,
'Changes the environment this task is run in', 'prod');
But if you're running Windows, any attempt to use your new command line option will be met with failure:
>symfony se:build-search --env="test"
The execution of task "se:build-search" failed.
- Too many arguments ("se:build-search test" given).
symfony se:build-search [--env[="..."]] [--force[="..."]]
The gotcha is that Symfony's example syntax for using the command line argument/option won't work with Windows' cmd.exe, because it considers the "=" sign to be an argument separator. To use an option, you'll want to do this:
>symfony se:build-search "--env=test"
That is, enclose the whole option, including the option name, in speech marks. That'll escape the equals sign.
What is oozing out of our ground that creates this sort of effect? Not just around our sun and moon any more. Everywhere we look. This cannot be natural. We all know it wasn't something that happened 20 years ago. We, as a nation, have got to ask ourselves "what the hell is going on?"
I was pretty amazed to discover that there doesn't seem to be a rich text editor widget for the new Symfony 1.1 forms framework. The forms part of the new version is fairly controversial, and it's not intended to be anything like backward compatible with 1.0 forms/validators, but I was genuinely suprised to see there wasn't a rich text editor out-of-the-box. Here's how to get one, fairly easily:
Install TinyMCE the same way you would in Symfony 1.0. This involves downloading TinyMCE, and making it web accessible. Then you have to uncomment and edit the rich_text_js_dir directive in your app's settings.yml.
To check you have TinyMCE installed correctly, before continuing, create a template with:
<?php use_helper('Form') ?>
<?php echo textarea_tag('some', 'content',
array('rich' => true)) ?>
Then view the template. You should see the TinyMCE editor. Now we just need to get it working with the new forms system. Introducing myWidgetFormRichTextarea:
/**
* myWidgetFormRichTextarea represents a rich text editor.
*
* @author Dominic Scheirlinck <[email protected]>
*/
class myWidgetFormRichTextarea extends sfWidgetFormTextarea
{
/**
* @param array $options An array of options
* @param array $attributes An array of default HTML attributes
*
* @see sfWidgetForm
*/
protected function configure($options = array(), $attributes = array())
{
$this->addOption('editor', 'tinymce');
$this->addOption('tinymce_options', '');
$this->addOption('tinymce_gzip', false);
$this->addOption('css', false);
parent::configure($options, $attributes);
}
/**
* @param string $name The element name
* @param string $value The value displayed in this widget
* @param array $attributes An array of HTML attributes to be merged with the default HTML attributes
* @param array $errors An array of errors for the field
*
* @return string An HTML tag string
*
* @see sfWidgetForm
*/
public function render($name, $value = null, $attributes = array(), $errors = array())
{
$editorClass = 'sfRichTextEditor' . $this->toCanonicalCase($this->getOption('editor'));
if (!class_exists($editorClass)) {
throw new sfConfigurationException(sprintf('The rich text editor "%s" does not exist.', $editorClass));
}
$editor = new $editorClass();
if (!in_array('sfRichTextEditor', class_parents($editor))) {
throw new sfConfigurationException(sprintf('The editor "%s" must extend sfRichTextEditor.', $editor));
}
$attributes = array_merge($attributes, $this->getOptions());
$editor->initialize($name, $value, $attributes);
return $editor->toHTML();
}
/**
* Converts a lower-case editor name to its canonical case
*
* @param string $editor
* @return string
*/
private function toCanonicalCase($editor)
{
switch ($editor) {
case 'tinymce':
return 'TinyMCE';
case 'fck':
return 'FCK';
}
}
}
If you're just using it to replace a textarea, you don't need to do anything much to use the rich widget – it'll use your existing rows and cols html attributes, and make the rich editor the right size automatically.
This might not work with future versions of Symfony, because it relies on the sfRichTextEditorTinyMCE class, which I think is only used to provide backward compatibility with 1.0.
I like this sentence, from a recent Boing Boing post:
Just another skirmish in the war against photography, as the brave security guards of the world prevent the theft of photons from our poor, helpless inanimate objects.
There isn't much that retains its magic once reductionism has had its way.
Got a spare 15 minutes? The Danish Poet won an Oscar for best animated short film in 2007. It's fantastic.
The music, the animation style and especially the story: very cool. If you click through to the Youtube detail page, you can watch it in high quality.
What's wrong with banning the publication of names from the internet, but not other forms of media? Well, if it works, nothing. It's a good step to take, for all the reasons Judge Harvey outlines, and for all the reasons outlined in other commentary.
But here's the thing: it won't work. It can't work. Perhaps it might have had a chance ten years ago, but now? Nope.
That his idea won't work should be reason enough to condemn Judge Harvey's actions. But it's worse than that. Judge Harvey has shown that he's aware of the viral nature of the internet. Surely, then, he would have realised that a suppression order like the one he issued would draw more attention, more discussion than one that didn't relegate online expression to second-class status. It actively hurts the accused, and has the opposite effect than that stated.