Tag Archives: symfony 1.2

Loading helpers from an action or model in Symfony 1.2

Just quick post today about loading helpers in symfony 1.2 from an action or model.

Previously I would use the sfLoader class to load a helper, but it now says:

The sfLoader::loadHelpers() method is deprecated. Please use the same method from sfApplicationConfiguration.

So, from the action you should now use:

$this->getContext()->getConfiguration()->loadHelpers('Url');

From the model you can use:

sfContext::getInstance()->getConfiguration()->loadHelpers('Url');

multiple TinyMCE editors with sfWidgetFormTextareaTinyMCE

I noticed the other day that when using the sfWidgetFormTextareaTinyMCE widget which is part of the sfFormExtraPlugin plugin, it wouldnt display more than 1 editor on a page. After looking at the class and comparing the javascript to the javascript that was generated by the old textarea_tag() function I noticed a few differences.

To fix this, copy \plugins\sfFormExtraPlugin\lib\widget\sfWidgetFormTextareaTinyMCE.class.php to \lib\widgets\ and make the following change to the javascript:

<script type="text/javascript">
  tinyMCE.init({
    mode:                              "exact",
    theme:                             "%s",
    elements:                          "%s",
    %s
    %s
    theme_advanced_toolbar_location:   "top",
    theme_advanced_toolbar_align:      "left",
    theme_advanced_statusbar_location: "bottom",
    theme_advanced_resizing:           true
    %s
  });
</script>

You will probably have to create the \lib\widget directory. Dont forget to clear your cache.

Running multiple Symfony versions on the same server

If you want to start learning symfony 1.2 but only have 1 server, this guide will show you how to run multple versions.

http://symfonynerds.com/blog/?p=123

If you are running windows, this forum post explains an alternative method to using symlinks.

Jobeet – New Symfony 1.2 tutorial

Jobeet

Symfony have started a new tutorial for 1.2 similar to the Askeet tutorial for Symfony 1.0.

Jobeet is a set of 24 short tutorials, 1 being released every day between December 1st  and Christmas. Each tutorial is meant to only take 1 hour to complete.

This is something I definitely need to look into when I have some time off later this month.

View the tutorial

Symfony 1.20 released

Symfony 1.20 was officially released yesterday.

Read about it here

Guess I have some learning to do when I eventually get time. Especially considering I skipped version 1.1