<?xml version="1.0" encoding="utf-8"?>	
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title>ExpressionEngine Wiki</title>
    <link>http://expressionengine.com/wiki</link>
    <description>ExpressionEngine Wiki</description>
    <dc:language>en</dc:language>
    <dc:creator>support@expressionengine.com</dc:creator>
    <dc:rights>Copyright 2007</dc:rights>
    <dc:date>2012-01-02T18:08:06+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://www.pmachine.com/" />
    

    <item>
      <title>Parse Order</title>
      <link>http://expressionengine.com/wiki/Parse_Order</link>
      <guid>http://expressionengine.com/wiki/Parse_Order</guid>
      <description><![CDATA[<h3 id='Question.3A'>Question:</h3><p> </p>

<p>In what order does EE parse a template? </p>

<h3 id='Answer.3A'>Answer:</h3><p> </p>

<p>for EE 2.x see <a href="http://loweblog.com/downloads/ee-parse-order.pdf">http://loweblog.com/downloads/ee-parse-order.pdf</a></p>

<p>(&gt;= v 1.5.2) </p>

<p>&raquo; Return <a href="http://expressionengine.com/docs/cp/templates/template_preferences.html">Static Template</a> <br />
&raquo; Replace deprecated &#8220;not_logged_in&#8221; variables (now <a href="http://expressionengine.com/docs/templates/globals/conditionals.html#cond_logged_in">logged_in / logged_out</a>) <br />
&raquo; URI <a href="http://expressionengine.com/docs/templates/globals/url_segments.html">Segment variables</a> &#123;segment_x&#125; <br />
&raquo; <a href="http://expressionengine.com/docs/templates/embedding_templates.html">&#123;embed:foo&#125;</a> variable tags (sub-templates only) <br />
&raquo; <a href="http://expressionengine.com/docs/templates/globals/pathphp_globals.html">path.php Global Variables</a><br />
&raquo; Parse <a href="http://expressionengine.com/docs/templates/date_variable_formatting.html">Date Formatting &#8220;Constants&#8221;</a><br />
&raquo; Parse <a href="http://expressionengine.com/docs/templates/globals/single_variables.html#var_current_time">&#123;current_time&#125; variables</a><br />
&raquo; Retrieve <a href="http://expressionengine.com/docs/general/caching.html#template_caching">Cached Template</a> <br />
&nbsp; &rarr; Retrieve <a href="http://expressionengine.com/docs/templates/globals/conditionals.html">Advanced Conditionals</a> <br />
&nbsp; &rarr; Return completed template <br />
&raquo; <a href="http://expressionengine.com/docs/templates/php_templates.html">PHP (Input Stage)</a> <br />
&raquo; Conditionals (non-advanced) <br />
&nbsp; &rarr; URI <a href="http://expressionengine.com/docs/templates/globals/conditionals.html#cond_url_segment">Segment conditionals</a> <br />
&nbsp; &rarr; <a href="http://expressionengine.com/docs/templates/embedding_templates.html">Embedded variable</a> conditionals <br />
&nbsp; &rarr; <a href="http://expressionengine.com/docs/templates/globals/conditionals.html">Global Conditionals</a> <br />
&raquo; <a href="http://expressionengine.com/docs/templates/globals/assign_variable.html">Dynamically Assigned Global Variables</a> &#123;assign_variable:foo=&#8220;bar&#8221;&#125; <br />
&raquo; Main Parsing - Process all &#123;exp:...&#125; tags in order encountered. <br />
&raquo; <a href="http://expressionengine.com/docs/templates/php_templates.html">PHP (Output Stage)</a> <br />
&raquo; Write new <a href="http://expressionengine.com/docs/general/caching.html#template_caching">cache file</a> <br />
&raquo; Uncacheable Forms <br />
&nbsp; &rarr; <a href="http://expressionengine.com/docs/modules/comment/form.html">Comment Forms</a> <br />
&nbsp; &rarr; <a href="http://expressionengine.com/docs/modules/weblog/entry_form.html">Stand-Alone Entry Forms</a> <br />
&nbsp; &rarr; <a href="http://expressionengine.com/docs/modules/trackback/index.html">Trackback Hashes</a> <br />
&raquo; <a href="http://expressionengine.com/docs/templates/globals/conditionals.html">Advanced Conditionals</a> <br />
&raquo; Process <a href="http://expressionengine.com/docs/templates/embedding_templates.html">sub-templates</a> &#123;embed=template_group/template_name&#125; <br />
&raquo; <a href="http://expressionengine.com/docs/templates/globals/single_variables.html">Standard</a> and <a href="http://expressionengine.com/docs/templates/globals/user_defined.html">User-Defined</a> Global Variables (including path and stylesheet) <br />
&raquo; Return completed template</p>

<p>
Note: &#123;redirect=&#125; tags are &#8220;parsed&#8221; as part of main parsing, but the actual redirection doesn&#8217;t happen until the final step when the template is returned. So that means that all embedded templates and all conditionals get parsed before redirection actually happens.</p>

<p>
<a href="http://expressionengine.com/wiki/Category:Templates" title="Category:Templates">Category:Templates</a></p>

<p><a href="http://expressionengine.com/wiki/Category:EE1" title="Category:EE1">Category:EE1</a></p>]]></description>
      <dc:subject>Parse Order</dc:subject>
      <dc:date>2012-01-02T18:08:06+00:00</dc:date>
    </item>

    <item>
      <title>Config</title>
      <link>http://expressionengine.com/wiki/Config</link>
      <guid>http://expressionengine.com/wiki/Config</guid>
      <description><![CDATA[<h3 id='Question.3A'>Question:</h3><p> </p>

<p>I was upgrading EE and I accidentally overwrote the config.php file. How can I recover? </p>

<h3 id='Answer.3A'>Answer: </h3><p> </p>

<p>You should always make sure you backup your config.php and path.php files before upgrading - as is clearly stated in the documentation. However, if you haven&#8217;t, here are some sample config.php files for various versions of EE to get you started. </p>

<p><a href="http://expressionengine.com/wiki/Config.php_for_v1.5.1" title="Config.php_for_v1.5.1">Config.php for v1.5.1</a></p>

<p>
You will need to customize the sample files so that they are applicable for your installation. In particular, make sure you update all the preferences that have &#8220;****&#8221; to reflect the correct values for your site. You&#8217;ll also probably want to go through the Control Panel and make sure the settings are the way you want. </p>

<p>In addition, there is now a configuration check utility that will check your existing config.php file against the current variables and return a list of missing settings as well as depreciated settings.&nbsp; Simply download, unzip, upload config_check.php to your system folder- then open it in the browser (mysite.com/system/config_check.php), select a version to compare to, then edit your existing config.php to incorporate the changes.&nbsp; Be certain to edit your version number if it needs updating.</p>

<p><a href="http://expressionengine.com/wiki/File:config-check.zip" title="File:config-check.zip" class="noArticle">File:config-check.zip</a></p>

<p>Note- some modules (such as the simple commerce module) may add additional variables not covered.&nbsp; This version is current as of EE 1.5.1.&nbsp; This is not an official EE product- use at your own risk.</p>

<p><a href="http://expressionengine.com/wiki/Category:Troubleshooting" title="Category:Troubleshooting">Category:Troubleshooting</a> <a href="http://expressionengine.com/wiki/Category:Upgrading" title="Category:Upgrading">Category:Upgrading</a></p>

<p><a href="http://expressionengine.com/wiki/Category:EE1" title="Category:EE1">Category:EE1</a></p>]]></description>
      <dc:subject>Config</dc:subject>
      <dc:date>2011-11-28T19:54:08+00:00</dc:date>
    </item>

    <item>
      <title>Relationships &#45; Under the Hood</title>
      <link>http://expressionengine.com/wiki/Relationships_&#45;_Under_the_Hood</link>
      <guid>http://expressionengine.com/wiki/Relationships_&#45;_Under_the_Hood</guid>
      <description><![CDATA[<p>This article seeks to demystify how EE (as of 1.6) creates relationships between channels (or sections) with the &#8220;Relationship&#8221; field type. It also details how to create relationships manually by directly accessing EE database tables.</p>

<p>
<b>The exp_relationships Table</b><br />
The exp_relationships table holds the bulk of the data required to establish relationships between channels. In addition to an exp_relationships record, a relationship also requires that one field be set in the exp_channel_data record of the parent entry.</p>

<p>The structure of the exp_relationships table is as follows.</p>

<p>rel_id: a unique id for the relationship record (this is auto-generated by MySQL)<br />
rel_parent_id: the entry_id for the parent record<br />
rel_child_id: the entry_id for the related child record<br />
rel_type: the type of relationship (i.e. “blog&#8221;)<br />
rel_data: auto-generated cache data to speed up regular relationship page builds<br />
reverse_rel_data: similar cache data for reverse relationship pages</p>

<p><b>Manually Creating a Relationship</b><br />
To establish a channel or section relationship, only the first FOUR fields must be populated. EE generates the cached data as required.</p>

<p>In addition, the parent’s exp_channel_data record must be set to contain the rel_id value of the exp_relationships record. This value is set in the field_id_### field that corresponds to the parent channel’s relationship field.</p>

<p><b>Relationships Example</b><br />
On a magazine site, two distinct channels hold articles and authors. A relationship field (&#8220;author&#8221;) is added to the article channel to point to the corresponding author record. This relationship field is field_id_23.</p>

<p>The article “The New iBlender” (articles channel, entry_id 332) was written by Ken Mac (authors channel, entry_id 75).</p>

<p>In this example, the final relationship is established by the following field data:</p>

<p>&lt;u&gt;exp_relationships&lt;/u&gt;<br />
rel_id: 783 (auto-generated)<br />
rel_parent_id: 332 (article record entry_id)<br />
rel_child_id: 75 (author record entry_id)<br />
rel_type: “blog”</p>

<p>&lt;u&gt;exp_channel_data&lt;/u&gt; (for parent entry_id 332, in the article channel’s “author” field)<br />
field_id_23: 783 (rel_id value from exp_relationships)</p>

<p><a href="http://expressionengine.com/wiki/Category:Database" title="Category:Database">Category:Database</a></p>

<p><a href="http://expressionengine.com/wiki/Category:EE1" title="Category:EE1">Category:EE1</a></p>]]></description>
      <dc:subject>Relationships &#45; Under the Hood</dc:subject>
      <dc:date>2011-11-26T17:35:33+00:00</dc:date>
    </item>

    <item>
      <title>Fighting registration spam</title>
      <link>http://expressionengine.com/wiki/Fighting_registration_spam</link>
      <guid>http://expressionengine.com/wiki/Fighting_registration_spam</guid>
      <description><![CDATA[<p>This article is a checklist of resources, tips, and tricks for <b>fighting registration spam</b> on your EE installation.</p>

<h2 id='1._Utilize_EEs_built-in_spam_protection_features.'>1. Utilize EE&#8217;s built-in spam protection features.</h2>

<p>EE provides out-of-the-box support for Blacklists/Whitelists, CAPTCHAs, interval filtering, rank denial, denying duplicate data, and secure form submissions. You should make sure you are using these features to their full potential.</p>

<p><b>EE1 docs:</b> <a href="http://expressionengine.com/legacy_docs/general/spam_protection.html">Spam Protection</a><br />
<b>EE2 docs:</b> <a href="http://expressionengine.com/user_guide/general/spam_protection.html">Spam Protection</a></p>

<h2 id='2._Disable_member_registration_if_you_arent_using_it.'>2. Disable member registration if you aren&#8217;t using it.</h2>

<p>If you do not use member registration on your site, you should disable it altogether.</p>

<p>This is accomplished by disabling the <b><i>Allow New Member Registrations?</i></b> setting in the <b>Membership Preferences</b>.</p>

<p><b>EE1 docs:</b> <a href="http://expressionengine.com/legacy_docs/cp/admin/members_and_groups/membership_preferences.html">Membership Preferences</a><br />
<b>EE2 docs:</b> <a href="http://expressionengine.com/user_guide/cp/members/membership_preferences.html">Membership Preferences</a></p>

<h2 id='3._Disable_public_access_to_profile_pages.'>3. Disable public access to profile pages.</h2>

<p>You can stop your member and member list pages from being indexed by turning off the Guest Member Group’s ability to view Public Profiles.</p>

<p>This is accomplished by editing the <b><i>Can view public profiles</i></b> setting in the <b>Member Account Privileges</b> section of the member group settings.</p>

<p><b>EE1 docs:</b> <a href="http://expressionengine.com/legacy_docs/cp/admin/members_and_groups/member_groups_edit.html">Member Groups - Create/Edit</a><br />
<b>EE2 docs:</b> <a href="http://expressionengine.com/user_guide/cp/members/member_groups_edit.html">Member Groups - Create/Edit</a></p>

<h2 id='4._Change_the_default_member-page_trigger_word.'>4. Change the default member-page trigger word.</h2>

<p>Changing the Member Profile Trigger Word can hinder spammers that are using automated tools to look for <i>example.com/index.php/member/register</i>.</p>

<p>This is accomplished by editing the <b><i>Member Profile Trigger Word</i></b> setting in the <b>Membership Preferences</b>.</p>

<p><i><b>Note:</b> The effectiveness of changing the Member Profile Trigger Word is decreasing as spammers concoct more advanced methods for sniffing out specific CMS systems, and changing the URL for member functions may make the user experience less intuitive.</i></p>

<p><b>EE1 docs:</b> <a href="http://expressionengine.com/legacy_docs/cp/admin/members_and_groups/membership_preferences.html">Membership Preferences</a><br />
<b>EE2 docs:</b> <a href="http://expressionengine.com/user_guide/cp/members/membership_preferences.html">Membership Preferences</a></p>

<h2 id='5._Remove_the_ExpressionEngine_footprint_from_your_profile_themes.'>5. Remove the ExpressionEngine footprint from your profile themes.</h2>

<p>Probably the most common way for spammers to find your site is to search for tell-tale footprints of the CMS. The default profile theme includes a copyright line in the footer that makes EE-powered sites easy to find:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://expressionengine.com/"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Powered&nbsp;by&nbsp;ExpressionEngine</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;&nbsp;</span>
</span>
</code></div>
<p>(A simple Google search easily produces a <a href="http://www.google.com/search?q=Powered+by+ExpressionEngine+registration+inurl:/register/">list of pages with this code</a>.)</p>

<p>You can make it harder for spammers to find your site by removing these lines from the theme pages.</p>

<p>The default member profile theme is located in the <b>/themes/profile_themes/default</b> directory. Copyright lines can be found in two files: <b>copyright.html</b> and <b>html_footer.html</b></p>

<h2 id='6._Replace_EEs_CAPTCHA_with_something_stronger.'>6. Replace EE&#8217;s CAPTCHA with something stronger.</h2>

<p>A CAPTCHA is a program that can tell whether its user is a human or a computer. Common instantiations of CAPTCHAs are the colorful images with distorted text found at the bottom of Web registration forms. Websites use CAPTCHA tests to prevent abuse from &#8220;bots&#8221; (automated programs usually written to generate spam). No computer program can read distorted text as well as humans can, so bots cannot navigate sites protected by CAPTCHAs.</p>

<p>ExpressionEngine has built-in CAPTCHA test images, but because EE is so popular, the default CAPTCHA images are well-known and easy to break.</p>

<p>There are several popular options for replacing the default CAPTCHA with a strong variant:</p>

<h3 id='reCAPTCHA'>reCAPTCHA</h3>

<p><a href="http://www.google.com/recaptcha/learnmore">reCAPTCHA</a> is a Google-powered CAPTCHA system that provides a nearly endless supply of unique CAPTCHA tests:</p>

<p><b>EE1 extension</b>: <a href="http://devot-ee.com/add-ons/ja-recaptcha/">Jaspaul Aggarwal&#8217;s JA-reCAPTCHA</a><br />
<b>EE2 extension</b>: <a href="http://devot-ee.com/add-ons/recaptcha/">Brandon Jones&#8217;s reCAPTCHA</a></p>

<h3 id='kCAPTCHA'>kCAPTCHA</h3>

<p><a href="http://www.captcha.ru/en/">kCAPTCHA</a> is a script which outputs CAPTCHA images very usable for humans but hard to decipher for spambots. Images produced by kCAPTCHA are as strong as those produced by reCAPTCHA but can be much more easily understood by humans.</p>

<p><b>EE1/EE2 extension</b>: <a href="http://devot-ee.com/add-ons/ajax-captcha/">AJAX Captcha</a> is kCAPTCHA implementation capable using AJAX for refreshing and validation. </p>

<h3 id='Custom_questionanswer_pairs'>Custom question/answer pairs</h3>

<p>In lieu of distorted words and graphics, you can replace the default CAPTCHA tests with simple question/answer pairs that you provide:</p>

<p><b>EE1/EE2 extension</b>: <a href="http://devot-ee.com/add-ons/accessible-captcha/">Accessible Captcha, by Greg Salt (a.k.a. Purple Dogfish)</a></p>

<h2 id='7._Validate_registrations_with_registrationinvitation_codes.'>7. Validate registrations with registration/invitation codes.</h2>

<p>If it is feasible to communicate a code or phrase to legitimate users, you can restrict registrations on your site to only users with valid registration/invitation codes:</p>

<p><b>EE2 extension</b>: <a href="http://devot-ee.com/add-ons/registration-codes/">RogEE Registration Codes</a></p>

<p><b>Solspace User Module</b>: <a href="http://www.solspace.com/docs/detail/user_key/">Invitation Key Feature</a></p>

<h2 id='8._Fight_SPAM_site-wide_not_just_for_member_registrations.21'>8. Fight SPAM site-wide, not just for member registrations!</h2>

<p>ExpressionEngine’s <a href="http://expressionengine.com/user_guide/development/extension_hooks/module/member_register/">member registration hooks</a> allow addons to utilize services such as <a href="http://defensio.com/">Defensio</a> and <a href="http://akismet.com/">Akismet</a>.</p>

<p>A plethora of anti-spam add-ons are available:</p>

<p><b>EE1/EE2 anti-spam addons</b>: <a href="http://devot-ee.com/search/tags/tag/anti-spam/">&#8220;Anti-spam&#8221; add-ons at Devot:ee</a></p>

<h2 id='9._More_resources_and_discussion'>9. More resources and discussion</h2>

<p><a href="http://devot-ee.com/add-ons/profile-antispam/">Member Profile AntiSpam</a> is EE1.x extension which displays a panel containing list of suspected profile spammers in Control Panel&#8217;s home page and simplifies their banning.</p>

<p><a href="http://www.purple-dogfish.co.uk/buy-stuff/member-utilities">Purple Dogfish&#8217;s Member Utilities</a> is useful for fighting registration spam in EE1x.</p>

<p><a href="http://5by5.tv/eepodcast/23">This episode of the EE Podcast discusses registration spam</a>.</p>

<p>This checklist was born as a <a href="http://expressionengine.com/forums/viewthread/154740/P36/">forum discussion</a> in response to Lisa&#8217;s blog post, &#8220;<a href="http://expressionengine.com/blog/entry/fighting_registration_spam/">Fighting Registration Spam</a>.&#8221;</p>

<p>...<br />
<a href="http://expressionengine.com/wiki/Category:Spam" title="Category:Spam">Category:Spam</a><br />
<a href="http://expressionengine.com/wiki/Category:Spam::Registration_spam" title="Category:Spam::Registration_spam">Category:Spam -&gt; Registration spam</a><br />
<a href="http://expressionengine.com/wiki/Category:Security" title="Category:Security">Category:Security</a><br />
<a href="http://expressionengine.com/wiki/Category:EE1" title="Category:EE1">Category:EE1</a><br />
<a href="http://expressionengine.com/wiki/Category:EE2" title="Category:EE2">Category:EE2</a></p>]]></description>
      <dc:subject>Fighting registration spam</dc:subject>
      <dc:date>2011-11-25T07:19:31+00:00</dc:date>
    </item>

    <item>
      <title>RSS Template for EE2</title>
      <link>http://expressionengine.com/wiki/RSS_Template_for_EE2</link>
      <guid>http://expressionengine.com/wiki/RSS_Template_for_EE2</guid>
      <description><![CDATA[<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">rss</span><span style="color: #007700">:</span><span style="color: #0000BB">feed&nbsp;channel</span><span style="color: #007700">=</span><span style="color: #DD0000">"YOUR&nbsp;CHANNELS&nbsp;OR&nbsp;CHANNEL&nbsp;IN&nbsp;HERE"&nbsp;</span><span style="color: #0000BB">debug</span><span style="color: #007700">=</span><span style="color: #DD0000">"yes"&nbsp;</span><span style="color: #0000BB">status</span><span style="color: #007700">=</span><span style="color: #DD0000">"THE&nbsp;STATUS&nbsp;OF&nbsp;THE&nbsp;POSTS&nbsp;YOU&nbsp;WANT&nbsp;TO&nbsp;LIST"</span><span style="color: #0000BB">&#125;<br />&lt;?xml&nbsp;version</span><span style="color: #007700">=</span><span style="color: #DD0000">"1.0"&nbsp;</span><span style="color: #0000BB">encoding</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;encoding&#125;"</span><span style="color: #0000BB">?&gt;<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">rss&nbsp;version</span><span style="color: #007700">=</span><span style="color: #DD0000">"2.0"<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">xmlns</span><span style="color: #007700">:</span><span style="color: #0000BB">dc</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://purl.org/dc/elements/1.1/"<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">xmlns</span><span style="color: #007700">:</span><span style="color: #0000BB">sy</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://purl.org/rss/1.0/modules/syndication/"<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">xmlns</span><span style="color: #007700">:</span><span style="color: #0000BB">admin</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://webns.net/mvcb/"<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">xmlns</span><span style="color: #007700">:</span><span style="color: #0000BB">rdf</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://www.w3.org/1999/02/22-rdf-syntax-ns#"<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">xmlns</span><span style="color: #007700">:</span><span style="color: #0000BB">content</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://purl.org/rss/1.0/modules/content/"<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">xmlns</span><span style="color: #007700">:</span><span style="color: #0000BB">atom</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://www.w3.org/2005/Atom"</span><span style="color: #007700">&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">channel</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">atom</span><span style="color: #007700">:</span><span style="color: #0000BB">link&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"YOUR&nbsp;RSS&nbsp;FEED"&nbsp;</span><span style="color: #0000BB">rel</span><span style="color: #007700">=</span><span style="color: #DD0000">"self"&nbsp;</span><span style="color: #0000BB">type</span><span style="color: #007700">=</span><span style="color: #DD0000">"application/rss+xml"&nbsp;</span><span style="color: #007700">/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">title</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">YOUR&nbsp;TITLE</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">title</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">link</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">YOUR&nbsp;URL</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">link</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">description</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">YOUR&nbsp;DESCRIPTION</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">description</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">dc</span><span style="color: #007700">:</span><span style="color: #0000BB">language</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;channel_language&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">dc</span><span style="color: #007700">:</span><span style="color: #0000BB">language</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">dc</span><span style="color: #007700">:</span><span style="color: #0000BB">creator</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;email&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">dc</span><span style="color: #007700">:</span><span style="color: #0000BB">creator</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">dc</span><span style="color: #007700">:</span><span style="color: #0000BB">rights</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Copyright&nbsp;&#123;gmt_date&nbsp;format</span><span style="color: #007700">=</span><span style="color: #DD0000">"%Y"</span><span style="color: #0000BB">&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">dc</span><span style="color: #007700">:</span><span style="color: #0000BB">rights</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">dc</span><span style="color: #007700">:</span><span style="color: #0000BB">date</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;gmt_date&nbsp;format</span><span style="color: #007700">=</span><span style="color: #DD0000">"%Y-%m-%dT%H:%i:%s%Q"</span><span style="color: #0000BB">&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">dc</span><span style="color: #007700">:</span><span style="color: #0000BB">date</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">admin</span><span style="color: #007700">:</span><span style="color: #0000BB">generatorAgent&nbsp;rdf</span><span style="color: #007700">:</span><span style="color: #0000BB">resource</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://expressionengine.com/"&nbsp;</span><span style="color: #007700">/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">channel</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;channel</span><span style="color: #007700">=</span><span style="color: #DD0000">"YOUR&nbsp;CHANNELS&nbsp;OR&nbsp;CHANNEL&nbsp;IN&nbsp;HERE"&nbsp;</span><span style="color: #0000BB">limit</span><span style="color: #007700">=</span><span style="color: #DD0000">"10"&nbsp;</span><span style="color: #0000BB">dynamic_start</span><span style="color: #007700">=</span><span style="color: #DD0000">"on"&nbsp;</span><span style="color: #0000BB">disable</span><span style="color: #007700">=</span><span style="color: #DD0000">"member_data"</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">item</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">title</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">xml_encode&#125;&#123;title&#125;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">xml_encode&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">title</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">link</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;comment_url_title_auto_path&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">link</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">guid</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;comment_url_title_auto_path&#125;</span><span style="color: #FF8000">#When:&#123;gmt_entry_date&nbsp;format="%H:%i:%sZ"&#125;&lt;/guid&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">description</span><span style="color: #007700">&gt;&lt;!</span><span style="color: #0000BB">&#91;CDATA&#91;&#123;body&#125;&#93;&#93;</span><span style="color: #007700">&gt;&lt;/</span><span style="color: #0000BB">description</span><span style="color: #007700">&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">dc</span><span style="color: #007700">:</span><span style="color: #0000BB">date</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;gmt_entry_date&nbsp;format</span><span style="color: #007700">=</span><span style="color: #DD0000">"%Y-%m-%dT%H:%i:%s%Q"</span><span style="color: #0000BB">&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">dc</span><span style="color: #007700">:</span><span style="color: #0000BB">date</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/</span><span style="color: #0000BB">item</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">channel</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">channel</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">rss</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">rss</span><span style="color: #007700">:</span><span style="color: #0000BB">feed&#125;&nbsp;</span>
</span>
</code></div>

<p>Note: You&#8217;ll need to put your own text or variable where I have put capital letters. I have added a couple things to the feed:<br />
- atom:link (this makes it valid to W3C)<br />
- status=&#8221;&#8221; within the rss tag at the top (many people reporting issues with RSS and this seems to help)<br />
<a href="http://expressionengine.com/wiki/Category:EE2" title="Category:EE2">Category:EE2</a></p>]]></description>
      <dc:subject>RSS Template for EE2</dc:subject>
      <dc:date>2011-11-23T16:37:34+00:00</dc:date>
    </item>

    <item>
      <title>Migrate To EE</title>
      <link>http://expressionengine.com/wiki/Migrate_To_EE</link>
      <guid>http://expressionengine.com/wiki/Migrate_To_EE</guid>
      <description><![CDATA[<p>This page is intended as a list of tools to help migrate from other Blog &amp; CMS packages to ExpressionEngine. </p>

<p>By and large these will work by helping you get your information into MT format for importing. </p>

<p><strong>Table of Contents</strong></p>
<ul id='toc' title='Table of Contents'>
	<li><a href='#Random'>Random</a></li>
	<li><a href='#Blogger'>Blogger</a></li>
	<li><a href='#Textpattern'>Textpattern</a></li>
	<li><a href='#Wordpress'>Wordpress</a></li>
	<li><a href='#Serendipity_s9y'>Serendipity (s9y)</a></li>
	<li><a href='#SMF_-_SimpleMachines_Forum'>SMF - SimpleMachines Forum</a></li>
	<li><a href='#LiveJournal'>LiveJournal</a></li>
	<li><a href='#PHPBB'>PHPBB</a></li>
	<li><a href='#Postnuke'>Postnuke</a></li>
</ul>
<hr />


<h3 id='Random'>Random</h3><p> </p>

<p>* If you have your entries in RSS/ATOM feeds, CSV files or XML files check out <a href="http://brandnewbox.co.uk/products/details/datagrab">DataGrab</a><br />
* If you have your entries in RSS format, check out this <a href="http://www.kbcafe.com/rss/rss2mt.aspx">RSS to MT Format</a> thingo. </p>

<p>* If you have your entries in CSV format, check out <a href="http://expressionengine.com/forums/viewthread/41783/P54/#327319">Plugin: CSV Grab</a></p>

<p>MovableType is not included as it has an export feature built-in. <a href="http://www.movabletype.org/docs/mtimport.html">Details on MT Import format</a>. </p>

<h3 id='Blogger'>Blogger</h3>

<p>* <a href="http://code.google.com/p/google-blog-converters-appengine/">Google Blog Converter</a> has a python script that will convert Blogger XML to MovableType Import Format. </p>

<p>* <a href="http://www.hopstudios.com/nep/unvarnished/item/importing_blogger_into_expression_engine/">Importing Blogger into Expression Engine</a> (And see also MT steps) </p>

<h3 id='Textpattern'>Textpattern</h3><p> </p>

<p>* <a href="http://expressionengine.com/forums/viewthread/52585/">Export via template</a> *This is a broken link <br />
* <a href="http://www.flipsidejones.net/files/export-movabletype.php.txt">txp to MT format</a> (<a href="http://forum.textpattern.com/viewtopic.php?id=3096">txp support forum thread &lt;&#8212;broken link</a>) </p>

<h3 id='Wordpress'>Wordpress</h3><p> </p>

<p>* <a href="http://code.google.com/p/google-blog-converters-appengine/">Google Blog Converter</a> has a python script that will convert WordPress eXtended RSS (WXR) to MovableType Import Format. (Currently, you have to go through Blogger format.)</p>

<p>* <a href="http://www.bloggingexpertise.com/plugins/wordpress-export-to-movable-type-or-typepad/">MT Export theme</a> Blogging Expertise has a theme package that displays Wordpress content in MT Export format. It may require some tweaking to work with newer versions, but it&#8217;s easier to tweak this than an export script.</p>

<p>* <a href="http://davidrussell.org/article/migration-to-expressionengine/">Wordpress to EE export process</a> David Russell describes how he moved content from Wordpress to Expression Engine (from July 2008).</p>

<p>* <a href="http://projects.codemonkeyramblings.com/2007/03/wordpress-to-movable-type-expo-1.php">WordPress To Movable Type Export Script 1.2</a> Note that this script was written for Wordpress 2.1 and may not be compatible with later versions.<br />
* <a href="http://www.papascott.de/archives/2004/09/01/export-from-wordpress/">Wordpress Exporter</a> This script was last updated in 2005 and should not be used unless you have a very old version of Wordpress.</p>

<h3 id='Serendipity_s9y'>Serendipity (s9y)</h3>
<p>* <a href="http://bie.no/blog/expressionengine/2007/09/exporting-s9y-to-mt/">Serendipity to Movable Type export</a> - use this to export your blogposts, categories and comments to a MT textfile which EE can import. Forum user &#8220;bjornbjorn&#8221; used this successfully to convert <a href="http://www.skitx.com">his blog</a> (s9y 1.1 to EE 1.6.0)</p>

<h3 id='SMF_-_SimpleMachines_Forum'>SMF - SimpleMachines Forum</h3>

<p>* <a href="http://bie.no/blog/expressionengine/2007/09/converting-from-smf-to-expressionengine-forum/">Converting from SMF to ExpressionEngine Forum</a></p>

<p><b>Note</b> The SMF import utility leaves problems with the database.&nbsp; The member tables are not updated properly and this could lead to unusual outcomes.</p>

<h3 id='LiveJournal'>LiveJournal</h3>

<p>* <a href="http://code.google.com/p/google-blog-converters-appengine/">Google Blog Converter</a> has a python script that will convert a LiveJournal export to MovableType Import Format. (Currently, you have to go through Blogger format.)</p>

<h3 id='PHPBB'>PHPBB</h3><p> </p>

<p>* <a href="http://expressionengine.com/wiki/PHPBB_Import" title="PHPBB_Import">PHPBB Import</a></p><h3 id='Postnuke'>Postnuke</h3><p> </p>

<p>* <a href="http://expressionengine.com/wiki/PostNuke_Conversion" title="PostNuke_Conversion">PostNuke Conversion</a> </p>

<p><a href="http://expressionengine.com/wiki/Category:Import" title="Category:Import">Category:Import</a></p>

<p><a href="http://expressionengine.com/wiki/Category:EE1" title="Category:EE1">Category:EE1</a></p>]]></description>
      <dc:subject>Migrate To EE</dc:subject>
      <dc:date>2011-10-18T19:11:25+00:00</dc:date>
    </item>

    <item>
      <title>Pages Quick Start Guide</title>
      <link>http://expressionengine.com/wiki/Pages_Quick_Start_Guide</link>
      <guid>http://expressionengine.com/wiki/Pages_Quick_Start_Guide</guid>
      <description><![CDATA[<p><b>Please note that the information shown below is for the 1.x branch of ExpressionEngine. Tag code shown below will therefore not work within a 2.x install</b></p>

<p>
There have been some questions about how to utilize the EE Pages module. Here is a quick-start tutorial. (Make sure the module is installed; otherwise, the &#8216;Pages&#8217; tab will not appear in your &#8216;Publish&#8217; window.)</p>

<p>The EE Pages module uses the weblog entries tag. </p>

<p>So, at its most basic:</p>

<p>Create a totally blank template in the “site” template group and call it “animalia”.&nbsp; Put this code into the template:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"default_site"&nbsp;</span><span style="color: #0000BB">limit</span><span style="color: #007700">=</span><span style="color: #DD0000">"1"&nbsp;</span><span style="color: #0000BB">rdf</span><span style="color: #007700">=</span><span style="color: #DD0000">"off"&nbsp;</span><span style="color: #0000BB">disable</span><span style="color: #007700">=</span><span style="color: #DD0000">"trackbacks"</span><span style="color: #0000BB">&#125;<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">h2</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;title&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">h2</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&#123;body&#125;<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&#125;&nbsp;</span>
</span>
</code></div>

<p>or</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"default_site"&nbsp;</span><span style="color: #0000BB">show_pages</span><span style="color: #007700">=</span><span style="color: #DD0000">"yes"&nbsp;</span><span style="color: #0000BB">rdf</span><span style="color: #007700">=</span><span style="color: #DD0000">"off"&nbsp;</span><span style="color: #0000BB">disable</span><span style="color: #007700">=</span><span style="color: #DD0000">"trackbacks"</span><span style="color: #0000BB">&#125;<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">h2</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;title&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">h2</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&#123;body&#125;<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&#125;&nbsp;</span>
</span>
</code></div>

<p>Now, create a Page, any page.&nbsp; Lets call it “wolves rock”. (You can do this either by selecting &#8216;Create a New Page&#8217; from the module window or normally via &#8216;Publish&#8217;.)</p>

<p>If the module is installed (it comes standard starting with version 1.6), you&#8217;ll see a &#8216;Pages&#8217; tab at the top of the entry editing window, next to Categories, Options, etc.&nbsp; Click there and put in any URI.&nbsp; For example:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">/</span><span style="color: #0000BB">animals</span><span style="color: #007700">/</span><span style="color: #0000BB">canine</span><span style="color: #007700">/</span><span style="color: #0000BB">feral</span><span style="color: #007700">/</span><span style="color: #0000BB">wolves</span><span style="color: #007700">/&nbsp;</span>
</span>
</code></div>

<p>Below, that - still in the &#8216;Pages&#8217; tab - enter the page template. Choose site/animalia.(*)</p>

<p>In the Title of the Publish form, enter this:</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">All&nbsp;About&nbsp;Wolves&nbsp;</span>
</span>
</code></div>

<p>In the Body of the Publish form, enter this:</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">Wolves&nbsp;are&nbsp;the&nbsp;best&nbsp;animals&nbsp;ever</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

<p>Click the Submit button.</p>

<p>
Now, go to http://www.example.com/index.php/animals/canine/feral/wolves</p>

<p>You should see:</p>

<p><img src="http://expressionengine.com/wiki/55924a2d1c522d7c9b3769c680efe8db" alt=""  /></p>

<p>Style as you want, use that template for whatever Pages you want, set the URL as needed.&nbsp; It works with any template that has a weblog entries tag in it, as long as you haven’t specifically restricted that weblog entries tag from showing pages.</p>

<p>See <a href="http://expressionengine.com/docs/cp/publish/index.html#tab_pages">here</a> and <a href="http://expressionengine.com/docs/modules/pages/manage_page_content.html">here</a> for more information from the user guide.</p>

<p><a href="http://expressionengine.com/wiki/Category:Modules::Pages" title="Category:Modules::Pages">Category:Modules -&gt; Pages</a></p>

<p>(*)Note; If you have a template group such as &#8220;animals&#8221;, and choose a URI for a particular page that is identical, the template assigned to that paticular page will appear instead of the default index file for a template group.</p>

<p><a href="http://expressionengine.com/wiki/Category:EE1" title="Category:EE1">Category:EE1</a></p>]]></description>
      <dc:subject>Pages Quick Start Guide</dc:subject>
      <dc:date>2011-10-18T14:51:51+00:00</dc:date>
    </item>

    <item>
      <title>TinyMCE and ExpressionEngine Integrated File Upload Management</title>
      <link>http://expressionengine.com/wiki/TinyMCE_and_ExpressionEngine_Integrated_File_Upload_Management</link>
      <guid>http://expressionengine.com/wiki/TinyMCE_and_ExpressionEngine_Integrated_File_Upload_Management</guid>
      <description><![CDATA[<p><a href="http://expressionengine.com/wiki/Category:Extensions::WYSIWYG" title="Category:Extensions::WYSIWYG">Category:Extensions -&gt; WYSIWYG</a></p>

<p>I installed <a href="http://expressionengine.com/wiki/TinyMCE" title="TinyMCE">TinyMCE</a> recently and freakin love it, great job to the folks who did the extension for it!</p>

<p>However, it appears that in order to handle file mamagement, folks were installing iBrowser and there was no good way to integrate EE&#8217;s file upload and file management into TinyMCE. I did some poking around and found out that there was a way to send an image list to TinyMCE via the <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/external_image_list_url">external_image_list_url</a> option. This is basically just a javascript array that the TinyMCE image manager will read and if it exists will add in a dropdown box for the /files/images specified in this array. </p>

<p>For this you need the following TinyMCE settings, I&#8217;m using relative URL&#8217;s for TinyMCE, so I set that up first, go to the EE Extensions manager for TinyMCE and update the settings with these two options:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">relative_urls&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">,<br /></span><span style="color: #0000BB">document_base_url&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"/"</span><span style="color: #007700">,&nbsp;</span>
</span>
</code></div>

<p>For this explanation I&#8217;m going to assume that you will be using relative URL&#8217;s, if anyone does not then I can provide config info on how to proceed without using relative URL&#8217;s.</p>

<p>The next option that needs to get set in the TinyMCE configs is the &#8220;external_image_list_url&#8221; setting, for this I set it as such:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">external_image_list_url&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"/site/scripts/imagelist.js/"&nbsp;</span>
</span>
</code></div>

<p>Here is where the coolness starts for this little trick, the above just points to an EE template group called &#8220;scripts&#8221; and template &#8220;imagelist.js&#8221;, you can name either anything you want. The desire here is to use EE&#8217;s file upload management system and as such you can have multiple upload locations and those locations can be restricted by the member group of the person doing the posting. So the assumption for the following code is that if you can&#8217;t upload to it then you ain&#8217;t supposed to be seeing what&#8217;s in any directories that you don&#8217;t have access to upload to, with that in mind here&#8217;s the code.</p>

<p>To make this work, you will have to have a nested query and thus you&#8217;ll actually have two templates due to the nature of in which EE handles nested queries.</p>

<p><span style="font-size:14px;"><b>imagelist.js source</b></span></p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;<br /></span><span style="color: #007700">print&nbsp;</span><span style="color: #DD0000">"var&nbsp;tinyMCEImageList&nbsp;=&nbsp;new&nbsp;Array("</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;<br /><br />&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">query&nbsp;sql</span><span style="color: #007700">=</span><span style="color: #DD0000">"SELECT&nbsp;a.upload_id,&nbsp;p.server_path<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FROM&nbsp;exp_upload_no_access&nbsp;a<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LEFT&nbsp;JOIN&nbsp;exp_upload_prefs&nbsp;p&nbsp;ON&nbsp;p.id&nbsp;=&nbsp;a.upload_id<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;a.member_group&nbsp;!=&nbsp;'&#123;group_id&#125;'"</span><span style="color: #0000BB">&#125;<br /><br />&#123;if&nbsp;server_path&#125;<br />&lt;?php&nbsp;<br /><br />$imagepath&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #DD0000">"&#123;server_path&#125;"</span><span style="color: #007700">,</span><span style="color: #0000BB">2</span><span style="color: #007700">,</span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$PATH&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$_SERVER&#91;</span><span style="color: #DD0000">'DOCUMENT_ROOT'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$d</span><span style="color: #007700">=</span><span style="color: #0000BB">$PATH</span><span style="color: #007700">.</span><span style="color: #0000BB">$imagepath</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">#define&nbsp;which&nbsp;dir&nbsp;you&nbsp;want&nbsp;to&nbsp;read<br /><br /></span><span style="color: #0000BB">$dir&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">opendir</span><span style="color: #007700">(</span><span style="color: #0000BB">$d</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">#open&nbsp;directory<br /></span><span style="color: #007700">while&nbsp;(</span><span style="color: #0000BB">$f&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">readdir</span><span style="color: #007700">(</span><span style="color: #0000BB">$dir</span><span style="color: #007700">))&nbsp;<br /></span><span style="color: #0000BB">&#123;<br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">eregi</span><span style="color: #007700">(</span><span style="color: #DD0000">"\.jpg"</span><span style="color: #007700">,</span><span style="color: #0000BB">$f</span><span style="color: #007700">)&nbsp;OR&nbsp;</span><span style="color: #0000BB">eregi</span><span style="color: #007700">(</span><span style="color: #DD0000">"\.gif"</span><span style="color: #007700">,</span><span style="color: #0000BB">$f</span><span style="color: #007700">))<br /></span><span style="color: #0000BB">&#123;&nbsp;<br />&nbsp;</span><span style="color: #007700">print&nbsp;</span><span style="color: #DD0000">"&#91;\"</span><span style="color: #0000BB">$imagepath$f\</span><span style="color: #DD0000">",&nbsp;\"</span><span style="color: #0000BB">$imagepath$f\</span><span style="color: #DD0000">"&#93;,"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#125;<br />&#125;<br />closedir</span><span style="color: #007700">(</span><span style="color: #0000BB">$dir</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br /><br />&#123;if&nbsp;no_results&#125;<br /><br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br /><br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">query&#125;<br /><br />&lt;?php&nbsp;<br />&nbsp;</span><span style="color: #007700">print&nbsp;</span><span style="color: #DD0000">"&#91;\"</span><span style="color: #0000BB">\</span><span style="color: #DD0000">",\"</span><span style="color: #0000BB">\</span><span style="color: #DD0000">"&#93;);"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;&nbsp;</span>
</span>
</code></div>

<p><span style="font-size:14px;"><b>nested-query source</b></span></p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">query&nbsp;sql</span><span style="color: #007700">=</span><span style="color: #DD0000">"SELECT&nbsp;server_path&nbsp;FROM&nbsp;exp_upload_prefs"</span><span style="color: #0000BB">&#125;<br /><br />&lt;?php&nbsp;<br /><br />$imagepath&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #DD0000">"&#123;server_path&#125;"</span><span style="color: #007700">,</span><span style="color: #0000BB">2</span><span style="color: #007700">,</span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$PATH&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$_SERVER&#91;</span><span style="color: #DD0000">'DOCUMENT_ROOT'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$d</span><span style="color: #007700">=</span><span style="color: #0000BB">$PATH</span><span style="color: #007700">.</span><span style="color: #0000BB">$imagepath</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">#define&nbsp;which&nbsp;dir&nbsp;you&nbsp;want&nbsp;to&nbsp;read<br /><br /></span><span style="color: #0000BB">$dir&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">opendir</span><span style="color: #007700">(</span><span style="color: #0000BB">$d</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">#open&nbsp;directory<br /></span><span style="color: #007700">while&nbsp;(</span><span style="color: #0000BB">$f&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">readdir</span><span style="color: #007700">(</span><span style="color: #0000BB">$dir</span><span style="color: #007700">))&nbsp;<br /></span><span style="color: #0000BB">&#123;<br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">eregi</span><span style="color: #007700">(</span><span style="color: #DD0000">"\.jpg"</span><span style="color: #007700">,</span><span style="color: #0000BB">$f</span><span style="color: #007700">)&nbsp;OR&nbsp;</span><span style="color: #0000BB">eregi</span><span style="color: #007700">(</span><span style="color: #DD0000">"\.gif"</span><span style="color: #007700">,</span><span style="color: #0000BB">$f</span><span style="color: #007700">))<br /></span><span style="color: #0000BB">&#123;&nbsp;<br />&nbsp;</span><span style="color: #007700">print&nbsp;</span><span style="color: #DD0000">"&#91;\"</span><span style="color: #0000BB">$imagepath$f\</span><span style="color: #DD0000">",&nbsp;\"</span><span style="color: #0000BB">$imagepath$f\</span><span style="color: #DD0000">"&#93;,"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#125;<br />&#125;<br />closedir</span><span style="color: #007700">(</span><span style="color: #0000BB">$dir</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">query&#125;&nbsp;</span>
</span>
</code></div>

<p>I&#8217;m going to try to net the above out, in the EE table &#8220;exp_upload_no_access&#8221; is a list of the groups that don&#8217;t have access to particular upload directories, so the code pulls anything from that table that is not equal to current users &#8220;group_id&#8221; and this query joins to the &#8220;exp_upload_prefs table based on those results and outputs the &#8220;server_path&#8221; field in that table. The second part checks to see if there were no results, this means that either an admin is posting or the current user is allowed to access all upload paths, and if so then we just need to get all the &#8220;server_paths&#8221; from table &#8220;exp_upload_prefs&#8221;, thus the entire reason for the nested query.</p>

<p>This code just gets image files that end in &#8220;.jpg&#8221; and &#8220;.gif&#8221; so you&#8217;ll need to adjust if you want all files or other image files, this is done in the code  </p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">eregi</span><span style="color: #007700">(</span><span style="color: #DD0000">"\.jpg"</span><span style="color: #007700">,</span><span style="color: #0000BB">$f</span><span style="color: #007700">)&nbsp;OR&nbsp;</span><span style="color: #0000BB">eregi</span><span style="color: #007700">(</span><span style="color: #DD0000">"\.gif"</span><span style="color: #007700">,</span><span style="color: #0000BB">$f</span><span style="color: #007700">))&nbsp;</span>
</span>
</code></div>

<p>For the above code the output is:</p>

<blockquote><p>var tinyMCEImageList = new Array( [&#8221;/images/uploads/smalltreefrog.gif&#8221;, &#8220;/images/uploads/smalltreefrog.gif&#8221;],[&#8221;/images/uploads/crane2.jpg&#8221;, &#8220;/images/uploads/crane2.jpg&#8221;], [&#8221;/images/uploads/webhosting/smalltreefrog.gif&#8221;, &#8220;/images/uploads/webhosting/smalltreefrog.gif&#8221;],[&#8221;/images/uploads/webhosting/newcrane2.jpg&#8221;, &#8220;/images/uploads/webhosting/newcrane2.jpg&#8221;],[&#8221;/images/uploads/webhosting/newsmalltreefrog.gif&#8221;, &#8220;/images/uploads/webhosting/newsmalltreefrog.gif&#8221;],[&#8221;/images/uploads/webhosting/crane2.jpg&#8221;, &#8220;/images/uploads/webhosting/crane2.jpg&#8221;], [&#8221;&#8220;,&#8221;&#8220;]);</p>
</blockquote>

<p>This was rendered by me an admin, thus the output is all file upload directories and all images under them for the &#8220;/images/uploads&#8221; directory and the &#8220;/images/uploads/webhosting&#8221; directory.</p>

<p>That&#8217;s it, it works great, it accesses all of the files from EE&#8217;s file upload management system and will even give you a nice preview in the preview pane of TinyMCE&#8217;s image dialog and from there you can do anything you like to the image, resize it, align it, add borders, do mouseover image swaps, ets, all based on the files/images in the EE file upload management system, heck, with this code you could even have the images from your gallery accessable right in your weblog publishing area.</p>

<p>
<span style="font-size:16px;"><b>Alternative Script &mdash; February 2009</b></span><br />
(From another Author)</p>

<p><span style="font-size:14px;"><b>For use with the &#8220;Image&#8221; button</b></span></p>

<p>For the imagelist.js, you have to go into the template group preferences and select &#8220;Allow PHP&#8221; for this particular template, which of course is a security problem. I tried setting the template as either a &#8220;javascript&#8221; or a &#8220;web page&#8221; and both worked once &#8220;Allow PHP&#8221; was selected. Since tinyMCE needs to see the output as a javascript then the .js extension seems like a good practice for your template name.</p>

<p>Using &#8220;View Rendered Template&#8221; you can see if the template is generating a valid array variable with the content of your images/uploads directory listed.</p>

<p>The php code in the original example is wrapped inside of an &#8220;exp:query&#8221; block of code. The stated intention is to control what directories the user has access to. However the sql query does not seem to work. Perhaps the current design of EE makes this sql code no longer correct? At any rate I had to remove the EE portion of the script in order to get a valid array as output.</p>

<p>The variable &#123;server_path&#125; seems to no longer exist in the version of EE that I have. Does anyone know of a replacement? I had to hardcode the &#8220;imagepath&#8221; variable. &#8220;/images/uploads/&#8221; is fairly standard now in EE.</p>

<p>I pulled the following script from the moxiecode site on the  <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/external_image_list_url">external_image_list_url</a>&nbsp; page, altered the &#8220;directory&#8221; variable to what is shown, and it works with EE. Improvements need to be made to filter out non-image files as the script below will list everything in the directory, including the index.html file.</p>

<p>For settings in the EE Extension manager I used the following FULL URL with NO relative URLs setting:</p>

<p><span style="font-size:11px;"><b>Extension Manager Settings</b></span></p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #FF8000">//&nbsp;Settings&nbsp;to&nbsp;work&nbsp;with&nbsp;EE&nbsp;file&nbsp;upload&nbsp;system.<br /></span><span style="color: #0000BB">relative_urls&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB">document_base_url&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"http://www.mywebsite.com/index.php/"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB">external_image_list_url&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"http://www.mywebsite.com/index.php/script/imagelist.js"</span><span style="color: #007700">,&nbsp;</span>
</span>
</code></div>

<p>Also, I turned off the relative URLs setting because if your EE directory is not at the top, root level of your site there seems to be a problem with broken URLs for images.</p>

<p>Following is the source code for the EE template.</p>

<p><span style="font-size:14px;"><b>imagelist.js source</b></span></p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #FF8000">//&nbsp;this&nbsp;must&nbsp;be&nbsp;the&nbsp;very&nbsp;first&nbsp;line&nbsp;in&nbsp;your&nbsp;PHP&nbsp;file!<br /><br />//&nbsp;You&nbsp;can't&nbsp;simply&nbsp;echo&nbsp;everything&nbsp;right&nbsp;away&nbsp;because&nbsp;we&nbsp;need&nbsp;to&nbsp;set&nbsp;some&nbsp;headers&nbsp;first!<br /></span><span style="color: #0000BB">$output&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;Here&nbsp;we&nbsp;buffer&nbsp;the&nbsp;JavaScript&nbsp;code&nbsp;we&nbsp;want&nbsp;to&nbsp;send&nbsp;to&nbsp;the&nbsp;browser.<br /></span><span style="color: #0000BB">$delimiter&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;for&nbsp;eye&nbsp;candy...&nbsp;code&nbsp;gets&nbsp;new&nbsp;lines<br /><br /></span><span style="color: #0000BB">$output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'var&nbsp;tinyMCEImageList&nbsp;=&nbsp;new&nbsp;Array('</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$directory&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"images/uploads"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;Use&nbsp;your&nbsp;correct&nbsp;(relative!)&nbsp;path&nbsp;here<br /><br />//&nbsp;Since&nbsp;TinyMCE3.x&nbsp;you&nbsp;need&nbsp;absolute&nbsp;image&nbsp;paths&nbsp;in&nbsp;the&nbsp;list...<br /></span><span style="color: #0000BB">$abspath&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">preg_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'~^/?(.*)/&#91;^/&#93;+$~'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'/\\1'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$_SERVER&#91;</span><span style="color: #DD0000">'SCRIPT_NAME'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">);<br /><br />if&nbsp;(</span><span style="color: #0000BB">is_dir</span><span style="color: #007700">(</span><span style="color: #0000BB">$directory</span><span style="color: #007700">))&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;$direc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">opendir</span><span style="color: #007700">(</span><span style="color: #0000BB">$directory</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;(</span><span style="color: #0000BB">$file&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">readdir</span><span style="color: #007700">(</span><span style="color: #0000BB">$direc</span><span style="color: #007700">))&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">'~^\.~'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$file</span><span style="color: #007700">))&nbsp;</span><span style="color: #0000BB">&#123;&nbsp;</span><span style="color: #FF8000">//&nbsp;no&nbsp;hidden&nbsp;files&nbsp;/&nbsp;directories&nbsp;here...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">is_file&#40;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$directory</span><span style="color: #DD0000">/</span><span style="color: #0000BB">$file</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#41;</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;We&nbsp;got&nbsp;ourselves&nbsp;a&nbsp;file!&nbsp;Make&nbsp;an&nbsp;array&nbsp;entry:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #0000BB">$delimiter<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'&#91;"'<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">utf8_encode</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;</span><span style="color: #DD0000">'",&nbsp;"'<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">utf8_encode</span><span style="color: #007700">(</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$abspath</span><span style="color: #DD0000">/</span><span style="color: #0000BB">$directory</span><span style="color: #DD0000">/</span><span style="color: #0000BB">$file</span><span style="color: #DD0000">"</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&#93;,'</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;$output&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">$output</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;remove&nbsp;last&nbsp;comma&nbsp;from&nbsp;array&nbsp;item&nbsp;list&nbsp;(breaks&nbsp;some&nbsp;browsers)<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #0000BB">$delimiter</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">closedir</span><span style="color: #007700">(</span><span style="color: #0000BB">$direc</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#125;<br /><br />$output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">');'</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;Finish&nbsp;code:&nbsp;end&nbsp;of&nbsp;array&nbsp;definition.&nbsp;Now&nbsp;we&nbsp;have&nbsp;the&nbsp;JavaScript&nbsp;code&nbsp;ready!<br /><br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-type:&nbsp;text/javascript'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;Make&nbsp;output&nbsp;a&nbsp;real&nbsp;JavaScript&nbsp;file!<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">$output</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;Now&nbsp;we&nbsp;can&nbsp;send&nbsp;data&nbsp;to&nbsp;the&nbsp;browser&nbsp;because&nbsp;all&nbsp;headers&nbsp;have&nbsp;been&nbsp;set!<br /><br /></span><span style="color: #0000BB">?&gt;&nbsp;</span>
</span>
</code></div>

<p><span style="font-size:14px;"><b>For use with the &#8220;Link&#8221; button</b></span></p>

<p>There is also an extension to tinyMCE that allows you to provide a list of files in your upload directory when using the &#8220;Link&#8221; button. You have to upload the files first using EE&#8217;s &#8220;File Upload&#8221; button (You can&#8217;t insert the EE generated URL into a tinyMCE field which is the problem this is meant to work around). To do this use the same setup as the above script but the array name in the javascript template needs to be changed to <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/external_link_list_url">&#8220;external_link_list_url&#8221;</a>. So you have the following settings in the Extensions manager in EE:</p>

<p><span style="font-size:11px;"><b>Extension Manager Settings</b></span></p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #FF8000">//&nbsp;Settings&nbsp;to&nbsp;work&nbsp;with&nbsp;EE&nbsp;file&nbsp;upload&nbsp;system.<br /></span><span style="color: #0000BB">relative_urls&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB">document_base_url&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"http://www.mywebsite.com/index.php/"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB">external_image_list_url&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"http://www.mywebsite.com/index.php/script/imagelist.js"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB">external_link_list_url&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"http://www.mywebsite.com/index.php/script/filelist.js"</span><span style="color: #007700">,&nbsp;</span>
</span>
</code></div>

<p>Create another template in EE, as explained above, called filelist.js and duplicate the above PHP code with the slight change of:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'var&nbsp;tinyMCELinkList&nbsp;=&nbsp;new&nbsp;Array('</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<p><a href="http://expressionengine.com/wiki/Category:EE1" title="Category:EE1">Category:EE1</a></p>]]></description>
      <dc:subject>TinyMCE and ExpressionEngine Integrated File Upload Management</dc:subject>
      <dc:date>2011-10-12T16:19:50+00:00</dc:date>
    </item>

    <item>
      <title>Multi Site Login</title>
      <link>http://expressionengine.com/wiki/Multi_Site_Login</link>
      <guid>http://expressionengine.com/wiki/Multi_Site_Login</guid>
      <description><![CDATA[<p><b>Question:</b> </p>

<p>I&#8217;m using MSM to host multiple Sites (each with their own domain name) pointing to a single ExpressionEngine installation. When someone logs in, their account is only logged in on the particular Site which hosts the form they filled out. How can I have them logged into all Sites at once? </p>

<p><b>Answer:</b> </p>

<p>You can set EE up to log you in to multiple Sites if you need by following the steps below.</p>

<p><strong>Table of Contents</strong></p>
<ul id='toc' title='Table of Contents'>
	<li><a href='#Multi_Site_Login_for_EE2'>Multi Site Login for EE2</a></li>
	<li><a href='#Multi_Site_Login_for_EE1'>Multi Site Login for EE1</a></li>
</ul>
<hr />


<h3 id='Multi_Site_Login_for_EE2'>Multi Site Login for EE2</h3><p> <br />
The login routine can set cookies for multiple domains if needed. This allows users who run separate domains for each Site to have a way to enable users to log-in once and remain logged-in across domains. These instructions assume you are using the <a href="http://expressionengine.com/user_guide/cp/sites/index.html">Multiple Site Manager</a>. <i>(Info taken from the top of system/expressionengine/modules/member/mod.member.php)</i></p>

<p>In each Site&#8217;s index.php file &#40;which is located in each Site&#8217;s web root&#41;, make sure the system path is set correctly, and make sure following settings are filled out in a similar way:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$assign_to_config&#91;</span><span style="color: #DD0000">'site_name'</span><span style="color: #0000BB">&#93;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'default_site'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$assign_to_config&#91;</span><span style="color: #DD0000">'cp_url'</span><span style="color: #0000BB">&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'http://example.com/admin.php'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$assign_to_config&#91;</span><span style="color: #DD0000">'site_url'</span><span style="color: #0000BB">&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'http://example.com'</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<p>Under Admin &gt; Security and Privacy &gt; Security and Sessions, ensure that <b>Control Panel Session Type</b> is set to <i>Cookies and session ID</i> and <b>User Session Type</b> is set to <i>Cookies Only</i>.</p>

<p>Leave all setting fields blank under Admin &gt; Security and Privacy &gt; Cookie Settings so they can be automatically set by EE.</p>

<p>Next, add the following to your <b>config.php</b> file, modified according to the domain names used by your Sites: </p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$config&#91;</span><span style="color: #DD0000">'multi_login_sites'</span><span style="color: #0000BB">&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"http://www.example.com/index.php|http://www.sitetwo.com/index.php|http://www.sitethree.com/index.php"</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<p><b>Note:</b> If you are <a href="http://expressionengine.com/user_guide/general/remove_index.php.html">removing index.php from your URI</a>, do not include index.php in your <i>multi_login_sites</i> array. It should look like this instead:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$config&#91;</span><span style="color: #DD0000">'multi_login_sites'</span><span style="color: #0000BB">&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"http://www.example.com/|http://www.sitetwo.com/|http://www.sitethree.com/"</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<p><b>Note:</b> If you are running your MSM Sites as sub-folders of your main domain (as opposed to subdomains or separate domains entirely), you must additionally use a unique <i>$assign_to_config[&#8216;cookie_prefix&#8217;]</i> variable in the index.php that sits in each of your Sites&#8217; web roots:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$assign_to_config&#91;</span><span style="color: #DD0000">'cookie_prefix'</span><span style="color: #0000BB">&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'example'</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>
<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$assign_to_config&#91;</span><span style="color: #DD0000">'cookie_prefix'</span><span style="color: #0000BB">&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'site2'</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<p>...and so on. Since each separate Site has the same base domain name, EE will set the same cookie for each Site without this config variable, effectively causing the browser to overwrite each cookie so only the last Site in the <i>multi_login_sites</i> array will have a valid cookie.</p>

<h3 id='Multi_Site_Login_for_EE1'>Multi Site Login for EE1</h3><p> <br />
The login routine can set cookies for multiple domains if needed. This allows users who run separate domains for each Site to have a way to enable users to log-in once and remain logged-in across domains. <i>(Info taken from the top of system/modules/member/mod.member.php)</i></p>

<p>NOTE: In order to use this feature this array index must be added to your <b>config.php</b> file: </p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$conf&#91;</span><span style="color: #DD0000">'multi_login_sites'</span><span style="color: #0000BB">&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"http://www.example.com/|http://www.sitetwo.com"</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<p>Separate each domain with a pipe. </p>

<p>If using <a href="http://expressionengine.com/docs/cp/sites/index.html">MSM</a>, you should include index.php at the end of each domain:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$conf&#91;</span><span style="color: #DD0000">'multi_login_sites'</span><span style="color: #0000BB">&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"http://www.example.com/index.php|http://www.sitetwo.com/index.php"</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<p>Also be sure to set the following to &#8220;y&#8221; ONLY IF <a href="http://expressionengine.com/docs/cp/sites/index.html">MSM</a> IS INSTALLED:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$conf&#91;</span><span style="color: #DD0000">'multiple_sites_enabled'</span><span style="color: #0000BB">&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"y"</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<p>You must make sure to empty the Cookie Domain field and turn on Cookies Only in the Session Preferences.<br />
You must be sure that all needed fields in the alternate domain&#8217;s PATH.PHP are set:</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$template_group&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"site"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$template&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"index"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$site_url&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"http://example.com/"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$site_index&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"index.php"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$site_404&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$global_vars&nbsp;</span><span style="color: #007700">=&nbsp;array();&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;array&nbsp;must&nbsp;be&nbsp;associative&nbsp;</span>
</span>
</code></div>

<p>Without site_url and site_index, you&#8217;ll have issues with login on the alternate domain and logout on the primary.</p>

<p>You&#8217;ll also probably want to make sure you leave the &#8220;Cookie Domain&#8221; setting blank under &#8216;Admin &gt; Cookie Settings&#8217; if you go this route. </p>

<p>
<a href="http://expressionengine.com/wiki/Category:Tricks" title="Category:Tricks">Category:Tricks</a><br />
<a href="http://expressionengine.com/wiki/Category:Multiple_Site_Manager" title="Category:Multiple_Site_Manager">Category:Multiple Site Manager</a><br />
<a href="http://expressionengine.com/wiki/Category:EE2" title="Category:EE2">Category:EE2</a><br />
<a href="http://expressionengine.com/wiki/Category:EE1" title="Category:EE1">Category:EE1</a></p>]]></description>
      <dc:subject>Multi Site Login</dc:subject>
      <dc:date>2011-09-23T18:28:36+00:00</dc:date>
    </item>

    <item>
      <title>Multiple Domain Login</title>
      <link>http://expressionengine.com/wiki/Multiple_Domain_Login</link>
      <guid>http://expressionengine.com/wiki/Multiple_Domain_Login</guid>
      <description><![CDATA[<p>This article has been moved to <a href="http://expressionengine.com/wiki/Multi_Site_Login" title="Multi_Site_Login">Multi Site Login</a>.</p>]]></description>
      <dc:subject>Multiple Domain Login</dc:subject>
      <dc:date>2011-09-23T18:28:18+00:00</dc:date>
    </item>

    
    </channel>
</rss>
