<?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>x + 3 &#187; modules</title>
	<atom:link href="http://xplus3.net/tag/modules/feed/" rel="self" type="application/rss+xml" />
	<link>http://xplus3.net</link>
	<description></description>
	<lastBuildDate>Fri, 19 Aug 2011 01:05:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>How to Install FCKeditor on Drupal</title>
		<link>http://xplus3.net/2008/05/29/how-to-install-fckeditor-on-drupal/</link>
		<comments>http://xplus3.net/2008/05/29/how-to-install-fckeditor-on-drupal/#comments</comments>
		<pubDate>Thu, 29 May 2008 17:05:09 +0000</pubDate>
		<dc:creator>Jonathan Brinley</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[modules]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://xplus3.net/2008/05/29/how-to-install-fckeditor-on-drupal/</guid>
		<description><![CDATA[After some trouble lately getting everything working, I finally have the FCKeditor WYSIWYG editor installed and working on Drupal. The official documentation leaves a little to be desired, so it seems prudent to document and share what I had to do to make it work. I&#8217;m using Drupal 6.2, the FCKeditor module 6.x-1.2-1, and FCKeditor 2.6. Installation Install Drupal See &#8230; <a href="http://xplus3.net/2008/05/29/how-to-install-fckeditor-on-drupal/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After some trouble lately getting everything working, I finally have the FCKeditor WYSIWYG editor installed and working on Drupal. The official documentation leaves a little to be desired, so it seems prudent to document and share what I had to do to make it work.</p>
<p>I&#8217;m using Drupal 6.2, the FCKeditor module 6.x-1.2-1, and FCKeditor 2.6.<span id="more-42"></span></p>
<h3>Installation</h3>
<ol>
<li>
<h4>Install Drupal</h4>
<p>See the <a href="http://drupal.org/getting-started">Getting Started guide</a>. Installing Drupal is beyond this scope of this tutorial.</li>
<li>
<h4>Get the module</h4>
<p>Grab it from the <a href="http://drupal.org/project/FCKeditor">FCKeditor project page</a>. Unzip the files to the <code>sites/all/modules</code> directory.</li>
<li>
<h4>Get FCKeditor</h4>
<p>The module plugs the editor into Drupal, so you still need to <a href="http://www.fckeditor.net/download">get the actual editor</a>. Unzip the files to the <code>sites/all/modules/fckeditor</code> directory, creating an <code>fckeditor</code> directory inside of the <code>fckeditor</code> directory.</li>
<li>
<h4>Enable the module</h4>
</li>
</ol>
<h3>Configuration</h3>
<ol>
<li>
<h4>Grant permissions</h4>
<p>Go to http://example.com/admin/user/permissions. The FCKeditor module permissions are pretty self explanatory. Just make sure that the user account you&#8217;re using to set this up has all of the permissions, and that you give appropriate permissions to any other roles that you want using the editor.</li>
<li>
<h4>Adjust filters</h4>
<p>FCKeditor likely will create markup that will be stripped out by Drupals &#8220;Filtered HTML&#8221; filter. To adjust the filter, go to http://example.com/admin/settings/filters and configure that filter to allow the following tags: <code>&lt;a&gt; &lt;p&gt; &lt;span&gt; &lt;div&gt; &lt;h1&gt; &lt;h2&gt; &lt;h3&gt; &lt;h4&gt; &lt;h5&gt; &lt;h6&gt; &lt;img&gt; &lt;img /&gt; &lt;map&gt; &lt;area&gt; &lt;hr&gt; &lt;br&gt; &lt;br /&gt; &lt;ul&gt; &lt;ol&gt; &lt;li&gt; &lt;dl&gt; &lt;dt&gt; &lt;dd&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;em&gt; &lt;b&gt; &lt;u&gt; &lt;i&gt; &lt;strong&gt; &lt;font&gt; &lt;del&gt; &lt;ins&gt; &lt;sub&gt; &lt;sup&gt; &lt;quote&gt; &lt;blockquote&gt; &lt;pre&gt; &lt;address&gt; &lt;code&gt; &lt;cite&gt; &lt;embed&gt; &lt;object&gt; &lt;strike&gt; &lt;caption&gt;</code>.</li>
<li>
<h4>Customize the toolbars</h4>
<p>Out of the box, the toolbar is a little unweildy. I like to pare it down to the some of the more useful functions.</p>
<p><img src="http://xplus3.net/wp-content/uploads/2008/05/fcktoolbar.png" alt="FCKeditor Revised Toolbar" /></p>
<p>To do this, edit the file <code>sites/all/modules/fckeditor/fckeditor.config.js</code>. The easiest option is to just revise one of the pre-existing toolbars defined in this file; I usually pick the &#8220;DrupalFiltered&#8221; toolbar. The following code will give you the toolbar pictured above:</p>
<pre>FCKConfig.ToolbarSets["DrupalFiltered"] = [
  ['Source', 'ShowBlocks'],
  ['Cut','Copy','Paste', '-','PasteText','PasteWord'],
  ['Undo','Redo','-','Replace','-','RemoveFormat'],
  '/',
  ['Link','Unlink','Anchor'],
  ['Image','Table','SpecialChar'],
  '/',
  ['FontFormat'],
  ['Bold','Italic','StrikeThrough'],
  ['OrderedList','UnorderedList','-','Blockquote'],
] ;</pre>
</li>
<li>
<h4>Setup profiles</h4>
<p>The FCKeditor module allows different profiles for different user roles. For a user to use the editor, that user&#8217;s role must be associated with a profile <em>in addition</em> to having the &#8220;access fckeditor&#8221; permission. Set up profiles at http://example.com/admin/settings/fckeditor.</p>
<p>Edit the &#8220;Global Settings&#8221; to tell the module, first, the precedence of the roles for determining which profiles will be seen by users with multiple roles. Under &#8220;Visibility settings&#8221;, I highly recommend adding &#8220;admin/*&#8221; to &#8220;Paths to exclude&#8221;, so you don&#8217;t have WYSIWYG editors popping up in unexpected places in the administration screens.</p>
<p>Next, select one of the profiles to edit.</p>
<ul>
<li>Again, make sure that all roles that you want using the editor are selected under &#8220;Roles allowed to use this profile&#8221;.</li>
<li>Under &#8220;Editor appearance&#8221;, set the toolbar to the one you edited earlier (&#8220;DrupalFiltered&#8221;).</li>
<li>Depending on your users, you may want to limit the font formats under &#8220;Cleanup and output&#8221; to prevent the use of certain tags that don&#8217;t fit with your site&#8217;s style.</li>
<li>Things can sometimes get a little buggy if you let the editor try to apply your theme&#8217;s CSS to the editor display. You&#8217;re probably better off setting the editor CSS to &#8220;FCKeditor default&#8221; under &#8220;CSS&#8221; (or see the <a href="http://drupal.fckeditor.net/tricks">Tips &amp; Tricks page</a> for a way to fix it).</li>
<li>If you&#8217;re going to allow file uploads (which we&#8217;ll cover in a moment), make sure to enable file management (both basic and advanced) under &#8220;File browser settings&#8221;.</li>
</ul>
</li>
<li>
<h4>File uploads</h4>
<p>Out of the box, file uploads and the file browser don&#8217;t quite work.</p>
<p>To enable the file browser, edit <code>sites/all/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php</code>. Find the line containing <code>$Config['UserFilesAbsolutePath'] = '' ;</code>. Add the following line after that:</p>
<pre>require_once "../../../../../filemanager.config.php";</pre>
<p>Then locate your Drupal settings file (probably at <code>sites/default/settings.php</code>). Uncomment the line with the <code>$cookie_domain</code> variable and set it to your site&#8217;s domain.</p>
<p>Next, fix a bug to enable quick uploads. Edit <code>sites/all/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/io.php</code>, replacing the line that says <code>var test = window.top.opener.document.domain ;</code> with one that says <code>var test = window.parent.OnUploadCompleted ;</code>.</p>
<p>The quick uploader, by default, puts all of its files in the directory above that which the file browser can access. To fix this, go back to <code>sites/all/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php</code>. Replace the following lines:</p>
<pre>$Config['QuickUploadPath']['File']         = $Config['UserFilesPath'] ;
$Config['QuickUploadAbsolutePath']['File'] = $Config['UserFilesAbsolutePath'] ;</pre>
<p>with:</p>
<pre>$Config['QuickUploadPath']['File']         = $Config['UserFilesPath'] . 'file/' ;
$Config['QuickUploadAbsolutePath']['File'] = ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;</pre>
<p>Repeat three more times, for &#8220;Image&#8221;, &#8220;Flash&#8221;, and &#8220;Media&#8221;.</li>
</ol>
<p>And there you have it: a fully operational installation of FCKeditor on Drupal.</p>
<p><strong>Update (2009-02-18):</strong> If you followed the above instructions and you&#8217;re getting a short text box where you would expect to find FCKeditor, the problem might be with your theme. Open up <code>page.tpl.php</code> and look for the following line near the end:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="php"><pre class="de1"><span class="sy0">&lt;</span> ?php <span class="kw1">print</span> <span class="re0">$closure</span><span class="sy0">;</span> <span class="sy1">?&gt;</span></pre></div></div></div></div></div></div></div>


<p>If you don&#8217;t see that, FCKeditor won&#8217;t work. Add that line, and you should have a bit more success.</p>
]]></content:encoded>
			<wfw:commentRss>http://xplus3.net/2008/05/29/how-to-install-fckeditor-on-drupal/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
	</channel>
</rss>

