[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Crafty_Shadow

I will assume that this question was directed to me.
And no, the library itself is not included, the insanely-big portion
of the code is dedicated to producing XHTML compliant output.

On Feb 26, 9:00 pm, Jan Schlosser  wrote:
> Hey,
>
> just out of curiosity: Did you include the TinyMCE Javascript (the  
> library) into the HTML source?
>
> Regards,
> Jan
>
> Am 26.02.2009 um 15:18 schrieb we-create:
>
> > when i try to call this function with:
>
> > 'inhoudnl' => new sfWidgetFormTextareaTinyMCE(
> >      array(
> >        'width'=>550,
> >        'height'=>350,
> >        'config'=>'theme_advanced_disable:
> > "anchor,image,cleanup,help"',
> >        'theme'   =>  sfConfig::get('app_tinymce_theme','advanced'),
> >      )
>
> > it shows this in the html:
>
> >      
> >        Inhoudnl
> >        
> >                     > id="pagina_inhoudnl">

html hier

> type="text/javascript"> > >  tinyMCE.init({ > >    mode:                              "textareas", > >    theme:                             "advanced", > >    editor_selector:                   "tiny_mce", > >    width:                             "550px", > >    height:                            "350px", > >    theme_advanced_toolbar_location:   "top", > >    theme_advanced_toolbar_align:      "left", > >    theme_advanced_statusbar_location: "bottom", > >    theme_advanced_resizing:           true > >    , > > theme_advanced_disable: "anchor,image,cleanup,help" > >  }); > >         > >       > > > but i don't get the content ... is this a known issue and does anyone > > knows a fix for this ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---

[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Jan Schlosser

Hey,

just out of curiosity: Did you include the TinyMCE Javascript (the  
library) into the HTML source?


Regards,
Jan

Am 26.02.2009 um 15:18 schrieb we-create:

> when i try to call this function with:
>
> 'inhoudnl' => new sfWidgetFormTextareaTinyMCE(
>  array(
>'width'=>550,
>'height'=>350,
>'config'=>'theme_advanced_disable:
> "anchor,image,cleanup,help"',
>'theme'   =>  sfConfig::get('app_tinymce_theme','advanced'),
>  )
>
> it shows this in the html:
>
>  
>Inhoudnl
>
> id="pagina_inhoudnl">

html hier

type="text/javascript"> > tinyMCE.init({ >mode: "textareas", >theme: "advanced", >editor_selector: "tiny_mce", >width: "550px", >height:"350px", >theme_advanced_toolbar_location: "top", >theme_advanced_toolbar_align: "left", >theme_advanced_statusbar_location: "bottom", >theme_advanced_resizing: true >, > theme_advanced_disable: "anchor,image,cleanup,help" > }); > > > > > but i don't get the content ... is this a known issue and does anyone > knows a fix for this ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---

[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Denis Fingonnet
works like a charm !

On Fri, Feb 27, 2009 at 4:23 PM, Crafty_Shadow  wrote:

>
> For i18n you should edit the representative form class;
> that is to say, in the main form, let's call it
> StaticPageForm.class.php you need:
>
> $this->embendI18n(array('en','fr')); //embends English and French
> //set labels so it's clearer
> $this->widgetSchema->setLabel('en', 'English');
> $this->widgetSchema->setLabel('fr', 'French');
>
>
> Then in StaticPageI18nForm.class.php
>
> $this->widgetSchema['content'] = new sfWidgetFormTextareaTinyMCE etc
>
>
> On Feb 27, 4:29 pm, Denis Fingonnet  wrote:
> > Does the tinyMCE widget used for a I18n field ?
> >
> > Because I managed to make the widget work without changing anything.
> > I was doing this for a translated field called texte :
> > $this->widgetSchema['texte'] = new
> > sfWidgetFormTextareaTinyMCE(array(
> >   'width'  => 550,
> >   'height' => 350,
> >   'config' => 'theme_advanced_disable:
> "anchor,image,cleanup,help"',
> > ), array(
> > 'class' => 'tinyMCE'
> > ));
> >
> > But if I do this :
> > $this->widgetSchema['fr']['texte'] = new
> > sfWidgetFormTextareaTinyMCE(array(
> >   'width'  => 550,
> >   'height' => 350,
> >   'config' => 'theme_advanced_disable:
> "anchor,image,cleanup,help"',
> > ), array(
> > 'class' => 'tinyMCE'
> > ));
> >
> > It works very well.
> > So it is not a bug but a lack of documentation about I18n and widget or I
> > didn't get it...
> >
> > And a bad error message.
> >
> > On Fri, Feb 27, 2009 at 2:28 PM, Denis Fingonnet  >wrote:
> >
> >
> >
> > > I'll keep an eye on it.
> >
> > > Thank you
> >
> > > On Fri, Feb 27, 2009 at 1:43 PM, Crafty_Shadow  >wrote:
> >
> > >> Ticket with patch created, the rest is up to fabien:
> >
> > >>http://trac.symfony-project.org/ticket/5986
> >
> > > --
> > > Denis Fingonnet
> >
> > --
> > Denis Fingonnet
> >
>


-- 
Denis Fingonnet

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Crafty_Shadow

For i18n you should edit the representative form class;
that is to say, in the main form, let's call it
StaticPageForm.class.php you need:

$this->embendI18n(array('en','fr')); //embends English and French
//set labels so it's clearer
$this->widgetSchema->setLabel('en', 'English');
$this->widgetSchema->setLabel('fr', 'French');


Then in StaticPageI18nForm.class.php

$this->widgetSchema['content'] = new sfWidgetFormTextareaTinyMCE etc


On Feb 27, 4:29 pm, Denis Fingonnet  wrote:
> Does the tinyMCE widget used for a I18n field ?
>
> Because I managed to make the widget work without changing anything.
> I was doing this for a translated field called texte :
>         $this->widgetSchema['texte'] = new
> sfWidgetFormTextareaTinyMCE(array(
>           'width'  => 550,
>           'height' => 350,
>           'config' => 'theme_advanced_disable: "anchor,image,cleanup,help"',
>         ), array(
>             'class' => 'tinyMCE'
>         ));
>
> But if I do this :
>         $this->widgetSchema['fr']['texte'] = new
> sfWidgetFormTextareaTinyMCE(array(
>           'width'  => 550,
>           'height' => 350,
>           'config' => 'theme_advanced_disable: "anchor,image,cleanup,help"',
>         ), array(
>             'class' => 'tinyMCE'
>         ));
>
> It works very well.
> So it is not a bug but a lack of documentation about I18n and widget or I
> didn't get it...
>
> And a bad error message.
>
> On Fri, Feb 27, 2009 at 2:28 PM, Denis Fingonnet wrote:
>
>
>
> > I'll keep an eye on it.
>
> > Thank you
>
> > On Fri, Feb 27, 2009 at 1:43 PM, Crafty_Shadow wrote:
>
> >> Ticket with patch created, the rest is up to fabien:
>
> >>http://trac.symfony-project.org/ticket/5986
>
> > --
> > Denis Fingonnet
>
> --
> Denis Fingonnet
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Denis Fingonnet
Does the tinyMCE widget used for a I18n field ?

Because I managed to make the widget work without changing anything.
I was doing this for a translated field called texte :
$this->widgetSchema['texte'] = new
sfWidgetFormTextareaTinyMCE(array(
  'width'  => 550,
  'height' => 350,
  'config' => 'theme_advanced_disable: "anchor,image,cleanup,help"',
), array(
'class' => 'tinyMCE'
));

But if I do this :
$this->widgetSchema['fr']['texte'] = new
sfWidgetFormTextareaTinyMCE(array(
  'width'  => 550,
  'height' => 350,
  'config' => 'theme_advanced_disable: "anchor,image,cleanup,help"',
), array(
'class' => 'tinyMCE'
));

It works very well.
So it is not a bug but a lack of documentation about I18n and widget or I
didn't get it...

And a bad error message.

On Fri, Feb 27, 2009 at 2:28 PM, Denis Fingonnet wrote:

> I'll keep an eye on it.
>
> Thank you
>
>
> On Fri, Feb 27, 2009 at 1:43 PM, Crafty_Shadow wrote:
>
>>
>> Ticket with patch created, the rest is up to fabien:
>>
>> http://trac.symfony-project.org/ticket/5986
>> >>
>>
>
>
> --
> Denis Fingonnet
>



-- 
Denis Fingonnet

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Denis Fingonnet
I'll keep an eye on it.

Thank you

On Fri, Feb 27, 2009 at 1:43 PM, Crafty_Shadow  wrote:

>
> Ticket with patch created, the rest is up to fabien:
>
> http://trac.symfony-project.org/ticket/5986
> >
>


-- 
Denis Fingonnet

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Crafty_Shadow

Ticket with patch created, the rest is up to fabien:

http://trac.symfony-project.org/ticket/5986
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Crafty_Shadow

This one is based off the original, with my custom patches. Original
didn't work for me either and it didn't have some of the functionality
I needed (esp generating XHTML valid code) so I went and created this
one.

There is only one thing I'm not happy with, and that's line 110, the
part of the GZip version that defines which languages to be included.
I should probably just rewrite that with sfContext::getInstance()-
>getUser()->getCulture() instead of the current "en/bg".

Taking into account the way symfony autoloading works, all you need to
do is create a sfWidgetFormTextareaTinyMCE.class.php file with the
widget in your lib folder. It superseeds the one in the
sfFormExtraPlugin. Also, this widget is thoroughly tested and is
working in several of my released applications. I could create
a .patch file for the sfFormExtraPlugin, but I don't think it'd make
it into the plugin. Probably if you guys support the changes ?



On Feb 27, 1:20 pm, Denis Fingonnet  wrote:
> Thanks for your custom widget.
>
> But I wish I could make the original sfWidgetFormTextareaTinyMCE works,
> because it is bundled with the sfFormExtraPlugin.
>
> I can say you're able to make it works and to provide a patch if there is a
> bug in it.
>
> Could you have a look or have you done a custom widget because you weren't
> able to make the original widget works ?
>
> On Fri, Feb 27, 2009 at 11:58 AM, Crafty_Shadow  wrote:
>
> > This is gonna be a pretty long, but here's my custom
> > sfWidgetFormTextareaTinyMCE.class.php
> > It works with TinyMCE 3 and up, and also produces fully XHTML
> > compatible output.
> > It also allows for gzip compression; Sample usage:
>
> >    $this->widgetSchema['content']      = new
> > sfWidgetFormTextareaTinyMCE(array('tinymce_gzip' => true),array
> > ('size'=>'102x30'));
>
> > class sfWidgetFormTextareaTinyMCE extends sfWidgetFormTextarea
> > {
>
> >  public function __construct($options = array(), $attributes = array
> > ())
> >  {
> >  /**
> >  * We need to override the constructor in order to be able to remove
> > keys from the $attributes array;
> >  * if we don't remove the pseudo key 'size', it results in invalid
> > xhtml markup
> >  */
> >    if (array_key_exists('size', $attributes))
> >    {
> >      //This code handles textarea size input in 140x30 format
> >      list ($cols, $rows) = explode ('x', $attributes['size']);
> >      unset ($attributes['size']);
> >      $attributes['cols'] = $cols;
> >      $attributes['rows'] = $rows;
> >      $this->setAttributes($attributes);
> >    }
>
> >    parent::__construct($options, $attributes);
> >  }
>
> >  /**
> >   * Constructor.
> >   *
> >   * Available options:
> >   *
> >   *  ** Options **
> >   *  * theme:  The Tiny MCE theme
> >   *  * width:  Width
> >   *  * height: Height
> >   *  * config: The javascript configuration
> >   *  * tinymce_gzip: Wether to use gzip compression for TinyMCE
> >   *  * file_browser_callback:  a JS callback function for embending a
> > file browser into TinyMCE
> >   *  * content_css:  A css file that will be applied to the editor
> > window; Should be the same css as the one used in the real output
> >   *
> >   *  ** Attributes **
> >   *  * cols/rows or size: sets the size of the TinyMCE window; size
> > is used in the format: COLSxROWS (100x30)
> >   *
> >   * @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('theme', 'advanced');
> >    $this->addOption('width');
> >    $this->addOption('height');
> >    $this->addOption('config', '');
> >    $this->addOption('tinymce_gzip');
> >    $this->addOption('file_browser_callback',
> > 'sfAssetsLibrary.fileBrowserCallBack');
> >    $this->addOption('content_css', '/js/tiny_mce/css/
> > default.css');
>
> >    if (!$this->getAttribute('cols') || !$this->getAttribute('rows'))
> >    {
> >      $this->setAttribute('cols', 140);
> >      $this->setAttribute('rows', 30 );
> >    }
> >  }
>
> >  /**
> >   * @param  string $name        The element name
> >   * @param  string $value       The value selected 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())
> >  {
> >    // use tinymce's gzipped js?
> >    $tinymce_file = $this->getOption('tinymce_gzip') ? '/
> > tiny_mce_gzip.js' : '/tiny_mce.js';
>
> >    // tinymce installed?
> >    $js_path = sfConfig::get('sf_rich_text_js_dir') ? '/'.sfConfig::get
> > ('sf_rich_text_js_dir').$tinymce_file : '/sf/tinymce/js'.
> > $tinymce_file;
> >    if (!is_readable(sfConfig::get('sf

[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Crafty_Shadow

This is gonna be a pretty long, but here's my custom
sfWidgetFormTextareaTinyMCE.class.php
It works with TinyMCE 3 and up, and also produces fully XHTML
compatible output.
It also allows for gzip compression; Sample usage:

$this->widgetSchema['content']  = new
sfWidgetFormTextareaTinyMCE(array('tinymce_gzip' => true),array
('size'=>'102x30'));





class sfWidgetFormTextareaTinyMCE extends sfWidgetFormTextarea
{

  public function __construct($options = array(), $attributes = array
())
  {
  /**
  * We need to override the constructor in order to be able to remove
keys from the $attributes array;
  * if we don't remove the pseudo key 'size', it results in invalid
xhtml markup
  */
if (array_key_exists('size', $attributes))
{
  //This code handles textarea size input in 140x30 format
  list ($cols, $rows) = explode ('x', $attributes['size']);
  unset ($attributes['size']);
  $attributes['cols'] = $cols;
  $attributes['rows'] = $rows;
  $this->setAttributes($attributes);
}

parent::__construct($options, $attributes);
  }

  /**
   * Constructor.
   *
   * Available options:
   *
   *  ** Options **
   *  * theme:  The Tiny MCE theme
   *  * width:  Width
   *  * height: Height
   *  * config: The javascript configuration
   *  * tinymce_gzip: Wether to use gzip compression for TinyMCE
   *  * file_browser_callback:  a JS callback function for embending a
file browser into TinyMCE
   *  * content_css:  A css file that will be applied to the editor
window; Should be the same css as the one used in the real output
   *
   *  ** Attributes **
   *  * cols/rows or size: sets the size of the TinyMCE window; size
is used in the format: COLSxROWS (100x30)
   *
   * @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('theme', 'advanced');
$this->addOption('width');
$this->addOption('height');
$this->addOption('config', '');
$this->addOption('tinymce_gzip');
$this->addOption('file_browser_callback',
'sfAssetsLibrary.fileBrowserCallBack');
$this->addOption('content_css', '/js/tiny_mce/css/
default.css');

if (!$this->getAttribute('cols') || !$this->getAttribute('rows'))
{
  $this->setAttribute('cols', 140);
  $this->setAttribute('rows', 30 );
}
  }

  /**
   * @param  string $nameThe element name
   * @param  string $value   The value selected 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())
  {
// use tinymce's gzipped js?
$tinymce_file = $this->getOption('tinymce_gzip') ? '/
tiny_mce_gzip.js' : '/tiny_mce.js';

// tinymce installed?
$js_path = sfConfig::get('sf_rich_text_js_dir') ? '/'.sfConfig::get
('sf_rich_text_js_dir').$tinymce_file : '/sf/tinymce/js'.
$tinymce_file;
if (!is_readable(sfConfig::get('sf_web_dir').$js_path))
{
  throw new sfConfigurationException('You must install TinyMCE to
use this widget (see rich_text_js_dir in settings.yml).');
}

sfContext::getInstance()->getResponse()->addJavascript
($js_path);

$gz_init = '
  tinyMCE_GZ.init({
plugins :
"safari,spellchecker,pagebreak,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager",
themes: "simple,advanced",
languages: "en,bg",
disc_cache: true,
debug: false
  });';


$js = sprintf(<<
//

EOF
,
  $this->getOption('tinymce_gzip') ? $gz_init : null,  // include
the gzip initialization
  $this->generateId($name),// set the
element to convert to TinyMCE area
  $this->getOption('theme'),   // set the
theme
  $culture = strtolower(substr(sfContext::getInstance()->getUser()-
>getCulture(),0,2)), //set the user culture
  $this->getOption('file_browser_callback'),   // set the
file browser callback function
  $this->getOption('content_css'), // set the
content css file
  $this->getOption('width')  ? sprintf
('width: "%spx",', $this->getOption
('width')) : '',
  $this->getOption('height') ? sprintf
('height:"%spx",', $this->getOption
('height')) : '',
  $this->getOption('config') ? ",\n".$this->getOption('config') :
''
);

$textarea = parent::render ($name, $value, $attributes, $errors);

return $textarea.$js;
  }
}

--~--~-

[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Denis Fingonnet
Hello Schorsch,

Could you tell us :
Where you put the tinyMCE dir ?
How you set up the TinyMCE dir in the app.yml ?
And what files you copy in the web/js dir ?

Thx

Denis

On Fri, Feb 27, 2009 at 11:29 AM, Schorsch  wrote:

>
> Hey,
>
> did you set up the TinyMCE Dir in the app.yml and copy the TinyMCE-
> Files in you web/js Folder?
> >
>


-- 
Denis Fingonnet

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-27 Thread Schorsch

Hey,

did you set up the TinyMCE Dir in the app.yml and copy the TinyMCE-
Files in you web/js Folder?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-26 Thread Denis Fingonnet
Hello,

Same thing here

On Thu, Feb 26, 2009 at 5:28 PM, Andrei Dziahel wrote:

> Hi,
>
> Look into this ticket - http://trac.symfony-project.org/ticket/4952
>
> On Thu, Feb 26, 2009 at 16:18, we-create  wrote:
>
>>
>> when i try to call this function with:
>>
>> 'inhoudnl' => new sfWidgetFormTextareaTinyMCE(
>>  array(
>>'width'=>550,
>>'height'=>350,
>>'config'=>'theme_advanced_disable:
>> "anchor,image,cleanup,help"',
>>'theme'   =>  sfConfig::get('app_tinymce_theme','advanced'),
>>  )
>>
>> it shows this in the html:
>>
>>  
>>Inhoudnl
>>
>>> id="pagina_inhoudnl">

html hier

> type="text/javascript"> >> tinyMCE.init({ >>mode: "textareas", >>theme: "advanced", >>editor_selector: "tiny_mce", >>width: "550px", >>height:"350px", >>theme_advanced_toolbar_location: "top", >>theme_advanced_toolbar_align: "left", >>theme_advanced_statusbar_location: "bottom", >>theme_advanced_resizing: true >>, >> theme_advanced_disable: "anchor,image,cleanup,help" >> }); >> >> >> >> >> but i don't get the content ... is this a known issue and does anyone >> knows a fix for this ? >> >> >> Kind regards, >> >> Jan De Coster >> >> >> > > > -- > With the best regards, Andy. > > > > -- Denis Fingonnet --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---

[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-26 Thread Jan De Coster
Andrei,

Thanks for this but i already tried to implement this ...

$this->setWidgets(array(
  'id'   => new sfWidgetFormInputHidden(),
  'naam' => new sfWidgetFormInput(),
  'inhoudnl' => new sfWidgetFormTextareaTinyMCE(
  array(
'width'=>550,
'height'=>350,
'config'=>'theme_advanced_disable: "anchor,image,cleanup,help"',
'theme'   =>  sfConfig::get('app_tinymce_theme','advanced'),
  ),
  array(
'class'   =>  'tiny_mce'
  )
)

that's the complete thing i have ...


Kind Regards,
Jan


Andrei Dziahel wrote:
> Hi,
>
> Look into this ticket - http://trac.symfony-project.org/ticket/4952
>
> On Thu, Feb 26, 2009 at 16:18, we-create  > wrote:
>
>
> when i try to call this function with:
>
> 'inhoudnl' => new sfWidgetFormTextareaTinyMCE(
>  array(
>'width'=>550,
>'height'=>350,
>'config'=>'theme_advanced_disable:
> "anchor,image,cleanup,help"',
>'theme'   =>  sfConfig::get('app_tinymce_theme','advanced'),
>  )
>
> it shows this in the html:
>
>  
>Inhoudnl
>
> id="pagina_inhoudnl">

html hier

type="text/javascript"> > tinyMCE.init({ >mode: "textareas", >theme: "advanced", >editor_selector: "tiny_mce", >width: "550px", >height:"350px", >theme_advanced_toolbar_location: "top", >theme_advanced_toolbar_align: "left", >theme_advanced_statusbar_location: "bottom", >theme_advanced_resizing: true >, > theme_advanced_disable: "anchor,image,cleanup,help" > }); > > > > > but i don't get the content ... is this a known issue and does anyone > knows a fix for this ? > > > Kind regards, > > Jan De Coster > > > > > > -- > With the best regards, Andy. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---

[symfony-users] Re: sfWidgetFormTextareaTinyMCE() not working

2009-02-26 Thread Andrei Dziahel
Hi,

Look into this ticket - http://trac.symfony-project.org/ticket/4952

On Thu, Feb 26, 2009 at 16:18, we-create  wrote:

>
> when i try to call this function with:
>
> 'inhoudnl' => new sfWidgetFormTextareaTinyMCE(
>  array(
>'width'=>550,
>'height'=>350,
>'config'=>'theme_advanced_disable:
> "anchor,image,cleanup,help"',
>'theme'   =>  sfConfig::get('app_tinymce_theme','advanced'),
>  )
>
> it shows this in the html:
>
>  
>Inhoudnl
>
> id="pagina_inhoudnl">

html hier

type="text/javascript"> > tinyMCE.init({ >mode: "textareas", >theme: "advanced", >editor_selector: "tiny_mce", >width: "550px", >height:"350px", >theme_advanced_toolbar_location: "top", >theme_advanced_toolbar_align: "left", >theme_advanced_statusbar_location: "bottom", >theme_advanced_resizing: true >, > theme_advanced_disable: "anchor,image,cleanup,help" > }); > > > > > but i don't get the content ... is this a known issue and does anyone > knows a fix for this ? > > > Kind regards, > > Jan De Coster > > > > -- With the best regards, Andy. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---

[symfony-users] Re: sfWidgetFormTextareaTinyMCE not working in admin

2009-01-29 Thread Sylvain - Com-Océan

Symfony 1.2 is well good but I don't undestand why it is so a mess to 
have a rich textarea (tinymce) in Admin Generator, it was so simple with 
Symfony 1.0.
More other, there is also no documentation (in the 2 books, wiki and 
cookbook) for doing it. No example showing how to simply have tinymce in 
admin generator.

I found only one way, by patching sfFormExtraPlugin (not very clean) :
http://forum.symfony-project.org/index.php/m/66906/?srch=tinymce+3+steps#msg_66906

I hope this will be resolve one day, it seems to be a kind of 
regression Maybe there is something I miss but I spent hours on it...

-- 
Sylvain Papet - Développeur Web
Agence de communication Com-Océan
www.com-ocean.com / +33 4 90 66 48 82



Tartaruga a écrit :
> I have generated an admin interface to a Model that contains i18n.
> Then in the form class I embedded i18n. If I use normal textarea
> everything works, if I switch to sfWidgetFormTextareaTinyMCE the
> textarea is always starting blank even when there is a value to show.
> Also when I insert a new object the value on textarea is taken blank.
>
> This is schema.yml
>
> Game:
>   actAs:
> Timestampable: ~
> Sluggable:
>   fields:  [name]
> I18n:
>   fields: [body, box_content]
>   columns:
> category_id:  { type: integer, notnull: true }
> name: { type: string, length: 255, unique: true }
> body: clob
> box_content:  clob
> active:   { type: boolean, notnull: true, default: false }
>   relations:
> Category:
>   local:category_id
>   foreign:  id
>   foreignAlias: Games
>
> Here is GameForm?.class.php
>
> class GameForm extends BaseGameForm
> {
>   public function configure()
>   {
> unset($this['created_at'], $this['updated_at']);
>
> $this->embedI18n(sfConfig::get('app_languages_list'));
>
>   }
> }
>
> Here is GameTranslationForm?.class.php
>
> class GameTranslationForm extends BaseGameTranslationForm
> {
>   public function configure()
>   {
>
> $this->widgetSchema['body'] = new sfWidgetFormTextareaTinyMCE(array
> (
>   'width' => 650,
>   'height' => 450,
>   ),
>   array('class' => 'tinymce',)
> );
>
> $this->widgetSchema['box_content'] = new
> sfWidgetFormTextareaTinyMCE(array(
>   'width' => 450,
>   'height' => 450,
>   ),
>   array('class' => 'tinymce',)
> );
>
>   }
> }
>
>
> >
>
>   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfWidgetFormTextareaTinyMCE not working in admin

2009-01-13 Thread Andrei Dziahel

Look at here.

http://trac.symfony-project.org/ticket/4918

On 30 дек 2008, 14:53, Tartaruga  wrote:
> I have generated an admin interface to a Model that contains i18n.
> Then in the form class I embedded i18n. If I use normal textarea
> everything works, if I switch tosfWidgetFormTextareaTinyMCEthe
> textarea is always starting blank even when there is a value to show.
> Also when I insert a new object the value on textarea is taken blank.
>
> This is schema.yml
>
> Game:
>   actAs:
>     Timestampable: ~
>     Sluggable:
>       fields:  [name]
>     I18n:
>       fields: [body, box_content]
>   columns:
>     category_id:  { type: integer, notnull: true }
>     name:         { type: string, length: 255, unique: true }
>     body:         clob
>     box_content:  clob
>     active:       { type: boolean, notnull: true, default: false }
>   relations:
>     Category:
>       local:        category_id
>       foreign:      id
>       foreignAlias: Games
>
> Here is GameForm?.class.php
>
> class GameForm extends BaseGameForm
> {
>   public function configure()
>   {
>     unset($this['created_at'], $this['updated_at']);
>
>     $this->embedI18n(sfConfig::get('app_languages_list'));
>
>   }
>
> }
>
> Here is GameTranslationForm?.class.php
>
> class GameTranslationForm extends BaseGameTranslationForm
> {
>   public function configure()
>   {
>
>     $this->widgetSchema['body'] = newsfWidgetFormTextareaTinyMCE(array
> (
>       'width' => 650,
>       'height' => 450,
>       ),
>       array('class' => 'tinymce',)
>     );
>
>     $this->widgetSchema['box_content'] = newsfWidgetFormTextareaTinyMCE(array(
>       'width' => 450,
>       'height' => 450,
>       ),
>       array('class' => 'tinymce',)
>     );
>
>   }
>
>
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfWidgetFormTextareaTinyMCE not working in admin

2009-01-13 Thread Andrei Dziahel

Hi.

I'm experiencing same thing. Module is generated with
DoctrineAdminGenerator too.

As far as I can see, TinyMCE just doesn't retrieve value from textarea
- even if it is filled, TinyMCE widget is empty.

Well, that's all by now.

On 30 дек 2008, 14:53, Tartaruga  wrote:
> I have generated an admin interface to a Model that contains i18n.
> Then in the form class I embedded i18n. If I use normal textarea
> everything works, if I switch tosfWidgetFormTextareaTinyMCEthe
> textarea is always starting blank even when there is a value to show.
> Also when I insert a new object the value on textarea is taken blank.
>
> This is schema.yml
>
> Game:
>   actAs:
>     Timestampable: ~
>     Sluggable:
>       fields:  [name]
>     I18n:
>       fields: [body, box_content]
>   columns:
>     category_id:  { type: integer, notnull: true }
>     name:         { type: string, length: 255, unique: true }
>     body:         clob
>     box_content:  clob
>     active:       { type: boolean, notnull: true, default: false }
>   relations:
>     Category:
>       local:        category_id
>       foreign:      id
>       foreignAlias: Games
>
> Here is GameForm?.class.php
>
> class GameForm extends BaseGameForm
> {
>   public function configure()
>   {
>     unset($this['created_at'], $this['updated_at']);
>
>     $this->embedI18n(sfConfig::get('app_languages_list'));
>
>   }
>
> }
>
> Here is GameTranslationForm?.class.php
>
> class GameTranslationForm extends BaseGameTranslationForm
> {
>   public function configure()
>   {
>
>     $this->widgetSchema['body'] = newsfWidgetFormTextareaTinyMCE(array
> (
>       'width' => 650,
>       'height' => 450,
>       ),
>       array('class' => 'tinymce',)
>     );
>
>     $this->widgetSchema['box_content'] = newsfWidgetFormTextareaTinyMCE(array(
>       'width' => 450,
>       'height' => 450,
>       ),
>       array('class' => 'tinymce',)
>     );
>
>   }
>
>
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---