<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JEKA.RU &#187; CKFinder</title>
	<atom:link href="http://jeka.ru/tag/ckfinder/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeka.ru</link>
	<description>Жизнь в мире IT</description>
	<lastBuildDate>Sat, 28 Aug 2010 11:40:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Symfony, расширение визуального редактора (symfony 1.0)</title>
		<link>http://jeka.ru/2008/08/04/symfony-rasshirenie-vizualnogo-redaktora/</link>
		<comments>http://jeka.ru/2008/08/04/symfony-rasshirenie-vizualnogo-redaktora/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 17:47:56 +0000</pubDate>
		<dc:creator>Jeka</dc:creator>
				<category><![CDATA[Программирование]]></category>
		<category><![CDATA[CKFinder]]></category>
		<category><![CDATA[fckeditor]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://jeka.ru/?p=11</guid>
		<description><![CDATA[Понадобилось мне встроить в FCKeditor (http://www.fckeditor.net/), файл менеджер CKFinder (http://www.ckfinder.com/).
Из php встраивается он таким способом:

$fckeditor = new FCKeditor( 'FCKeditor1' ) ;
CKFinder::SetupFCKeditor( $fckeditor, '../../' ) ;

Также можно черех JS конфиг, но при каждом создании редактора, пришлось бы все время совершать лишние телодвижения, от которых хочется избавится.
Для этого можно сделать такой трюк, копируем файл sfRichTextEditorFCK.class.php в каталог [...]]]></description>
			<content:encoded><![CDATA[<p>Понадобилось мне встроить в <strong>FCKeditor</strong> (<a href="http://www.fckeditor.net/" target="_blank">http://www.fckeditor.net/</a>), файл менеджер <strong>CKFinder</strong> (<a href="http://www.ckfinder.com/" target="_blank">http://www.ckfinder.com/</a>).</p>
<p>Из php встраивается он таким способом:</p>
<pre class="brush: php;">
$fckeditor = new FCKeditor( 'FCKeditor1' ) ;
CKFinder::SetupFCKeditor( $fckeditor, '../../' ) ;
</pre>
<p>Также можно черех JS конфиг, но при каждом создании редактора, пришлось бы все время совершать лишние телодвижения, от которых хочется избавится.</p>
<p>Для этого можно сделать такой трюк, копируем файл <strong>sfRichTextEditorFCK.class.php</strong> в каталог lib<br />
<code><br />
cp symfony_dir/lib/helper/sfRichTextEditorFCK.class.php my_project/lib/<br />
</code><br />
Добавляем в файл my_project/lib/sfRichTextEditorFCK.class.php, строку</p>
<pre class="brush: php;">
CKFinder::SetupFCKeditor($fckeditor) ;
</pre>
<p>В методе toHTML(), перед строкой</p>
<pre class="brush: php;">
$content = $fckeditor-&gt;CreateHtml();
</pre>
<p>В итоге мы получаем:</p>
<pre class="brush: php;">
CKFinder::SetupFCKeditor($fckeditor) ;

$content = $fckeditor-&gt;CreateHtml();

// fix for http://trac.symfony-project.com/ticket/732
// fields need to be of type text to be picked up by fillin. they are hidden by inline css anyway:
//
&lt;input id=&quot;name&quot; style=&quot;display:none&quot; name=&quot;name&quot; type=&quot;hidden&quot; value=&quot;&lt;p&gt;default&lt;/p&gt; &lt;p&gt;&quot; /&gt;
$content = str_replace('type=&quot;hidden&quot;','type=&quot;text&quot;',$content);

return $content;
}
</pre>
<p>Такимже образом можно добавить другие глобальные настройки редактора, для дальнейшего использования. Например, в редактор можно добавить стили сайта:</p>
<pre class="brush: php;">
$fckeditor-&gt;Config['EditorAreaCSS']='/css/main.css,/css/inner.css';
$fckeditor-&gt;Config['EditorAreaStyles']='body{ padding: 10px; }';
</pre>
<p>P.S. Есть еще способ, через конфиги, но так мне было сделать проще и удобней.<br />
P.P.S Любой критике в комментах, буду благодарен, так как не считаю себя знатоком symfony.</p>
]]></content:encoded>
			<wfw:commentRss>http://jeka.ru/2008/08/04/symfony-rasshirenie-vizualnogo-redaktora/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
