<?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>EE Insider Tips</title>
    <link>http://eeinsider.com/tips</link>
    <description>Community created tips and tutorials on developing websites with ExpressionEngine.</description>
    <dc:language>en</dc:language>
    <dc:creator>mz91184</dc:creator>
    <dc:rights>Copyright 2011</dc:rights>
    <dc:date>2011-07-03T17:04:03+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    

    <item>
      <title>Search EE Docs in Chrome URL Bar with an alias</title>
      <link>http://eeinsider.com/tips/view/search-ee-docs-in-chrome-url-bar-with-an-alias/</link>
      <guid>http://eeinsider.com/tips/view/search-ee-docs-in-chrome-url-bar-with-an-alias/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2011-07-03T16:04:03+00:00</dc:date>
      <content:encoded><![CDATA[<p>I search the EE Docs, EE Forums and CI Docs all the time.&nbsp; I created a short alias in the Chrome for each site to save time.&nbsp; Chrome allows you to create custom search engine options.&nbsp; You can see how here.</p>

<p><a href="http://www.google.com/support/chrome/bin/answer.py?answer=95653">http://www.google.com/support/chrome/bin/answer.py?answer=95653</a></p>

<p>Use this code for your custom search: <a href="http://www.google.com/search?q=%s&amp;as_sitesearch=expressionengine.com%2Fuser_guide%2F&amp;x=0&amp;y=0">http://www.google.com/search?q=%s&amp;as_sitesearch=expressionengine.com%2Fuser_guide%2F&amp;x=0&amp;y=0</a></p>

<p>Now when you type the short alias (EE in my case) then space, add your query and it will search the EE Docs.&nbsp; Great way to save time while searching EE Docs, EE Forums, or whatever custom EE query you want to build.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Add rel=“nofollow” to all auto generated links in a weblog entry</title>
      <link>http://eeinsider.com/tips/view/add-relnofollow-to-all-auto-generated-links-in-a-weblog-entry/</link>
      <guid>http://eeinsider.com/tips/view/add-relnofollow-to-all-auto-generated-links-in-a-weblog-entry/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2011-02-17T19:27:29+00:00</dc:date>
      <content:encoded><![CDATA[<p>File: core.typography.php, for version 1.6.x</p>

<p>This will add rel=&#8220;nofollow&#8221; to all of your auto generated links in weblog entries.</p>

<p>Line 902:</p>

<p>change:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$str&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">$matches&#91;</span><span style="color: #DD0000">'0'</span><span style="color: #0000BB">&#93;&#91;$i&#93;</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$bounce</span><span style="color: #007700">.</span><span style="color: #0000BB">trim</span><span style="color: #007700">(</span><span style="color: #0000BB">$url</span><span style="color: #007700">).</span><span style="color: #DD0000">'"'</span><span style="color: #007700">.</span><span style="color: #0000BB">$extra</span><span style="color: #007700">.</span><span style="color: #DD0000">'&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">$matches&#91;</span><span style="color: #DD0000">'2'</span><span style="color: #0000BB">&#93;&#91;$i&#93;</span><span style="color: #007700">.</span><span style="color: #DD0000">"&lt;/a&gt;"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$str</span><span style="color: #007700">);&nbsp;</span>
</span>
</code></div>

<p>to:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$str&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">$matches&#91;</span><span style="color: #DD0000">'0'</span><span style="color: #0000BB">&#93;&#91;$i&#93;</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$bounce</span><span style="color: #007700">.</span><span style="color: #0000BB">trim</span><span style="color: #007700">(</span><span style="color: #0000BB">$url</span><span style="color: #007700">).</span><span style="color: #DD0000">'"'</span><span style="color: #007700">.</span><span style="color: #0000BB">$extra</span><span style="color: #007700">.</span><span style="color: #DD0000">'&nbsp;rel="nofollow"&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">$matches&#91;</span><span style="color: #DD0000">'2'</span><span style="color: #0000BB">&#93;&#91;$i&#93;</span><span style="color: #007700">.</span><span style="color: #DD0000">"&lt;/a&gt;"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$str</span><span style="color: #007700">);&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>Disallowed Key Characters</title>
      <link>http://eeinsider.com/tips/view/disallowed-key-characters/</link>
      <guid>http://eeinsider.com/tips/view/disallowed-key-characters/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2011-01-20T11:55:02+00:00</dc:date>
      <content:encoded><![CDATA[<p>I&#8217;ve had this twice now on my Freeforms so thought it may help someone else.</p>

<p>One of my form element names had a leading space which caused this error.</p>

<p>How I found it was to add a little debugging to the core.</p>

<p>In the file: core.input.php (EE v1.7.0) there is a method called: clean_input_keys on approx line 444. The method exits if the preg_match fails with &#8216;Disallowed Key Characters&#8217;. I changed the exit to give us a little info from:</p>

<p>exit(&#8216;Disallowed Key Characters.&#8217;);<br />
to<br />
exit(&#8220;Disallowed Key Characters: $str&#8221;);
</p>]]></content:encoded>

    </item>

    <item>
      <title>A generic User Message Template</title>
      <link>http://eeinsider.com/tips/view/a-generic-user-message-template/</link>
      <guid>http://eeinsider.com/tips/view/a-generic-user-message-template/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-12-09T18:06:36+00:00</dc:date>
      <content:encoded><![CDATA[<p>Here&#8217;s a simple, generic User Message Template that&#8217;s gentler on the eyes than the EE default. Easy to customize as well to match your site&#8217;s colours if you&#8217;re so inclined!</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">&lt;!</span><span style="color: #0000BB">DOCTYPE&nbsp;html&nbsp;</span><span style="color: #007700">PUBLIC&nbsp;</span><span style="color: #DD0000">"-//W3C//DTD&nbsp;XHTML&nbsp;1.0&nbsp;Transitional//EN"<br />&nbsp;&nbsp;&nbsp;&nbsp;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">html&nbsp;xmlns</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://www.w3.org/1999/xhtml"&nbsp;</span><span style="color: #0000BB">xml</span><span style="color: #007700">:</span><span style="color: #0000BB">lang</span><span style="color: #007700">=</span><span style="color: #DD0000">"en"&nbsp;</span><span style="color: #0000BB">lang</span><span style="color: #007700">=</span><span style="color: #DD0000">"en"</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">head</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">meta&nbsp;http</span><span style="color: #007700">-</span><span style="color: #0000BB">equiv</span><span style="color: #007700">=</span><span style="color: #DD0000">"Content-Type"&nbsp;</span><span style="color: #0000BB">content</span><span style="color: #007700">=</span><span style="color: #DD0000">"text/html;&nbsp;charset=utf-8"&nbsp;</span><span style="color: #007700">/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;meta_refresh&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">style&nbsp;type</span><span style="color: #007700">=</span><span style="color: #DD0000">"text/css"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">body&nbsp;&#123;&nbsp;background</span><span style="color: #007700">:&nbsp;</span><span style="color: #FF8000">#F3F3F3;&nbsp;color:&nbsp;#666;&nbsp;font:&nbsp;normal&nbsp;14px/19px&nbsp;Arial,&nbsp;Helvetica,&nbsp;sans;&nbsp;padding:&nbsp;50px;&nbsp;text-align:&nbsp;center;&nbsp;&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#content&nbsp;&#123;&nbsp;background:&nbsp;#FFF;&nbsp;-moz-border-radius:&nbsp;5px;&nbsp;-webkit-border-radius:&nbsp;5px;&nbsp;border-radius:&nbsp;5px;&nbsp;-moz-box-shadow:&nbsp;0px&nbsp;0px&nbsp;10px&nbsp;#CCC;&nbsp;-webkit-box-shadow:&nbsp;0px&nbsp;0px&nbsp;10px&nbsp;#CCC;&nbsp;box-shadow:&nbsp;0px&nbsp;0px&nbsp;10px&nbsp;#CCC;&nbsp;margin:&nbsp;0&nbsp;auto;&nbsp;padding:&nbsp;25px&nbsp;50px;&nbsp;text-align:&nbsp;left;&nbsp;width:&nbsp;700px;&nbsp;&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">h1&nbsp;&#123;&nbsp;color</span><span style="color: #007700">:&nbsp;</span><span style="color: #FF8000">#000;&nbsp;font-size:&nbsp;32px;&nbsp;line-height:&nbsp;36px;&nbsp;&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">a&nbsp;&#123;&nbsp;color</span><span style="color: #007700">:&nbsp;</span><span style="color: #FF8000">#000;&nbsp;&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">a</span><span style="color: #007700">:</span><span style="color: #0000BB">hover&nbsp;&#123;&nbsp;text</span><span style="color: #007700">-</span><span style="color: #0000BB">decoration</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">none</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">style</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">head</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">body</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">div&nbsp;id</span><span style="color: #007700">=</span><span style="color: #DD0000">"content"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">h1</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;heading&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">h1</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;content&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;link&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">div</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">body</span><span style="color: #007700">&gt;<br />&lt;/</span><span style="color: #0000BB">html</span><span style="color: #007700">&gt;&nbsp;</span>
</span>
</code></div>

<p>Here&#8217;s an example: <a href="http://i51.tinypic.com/154j4hs.png" title="http://i51.tinypic.com/154j4hs.png">http://i51.tinypic.com/154j4hs.png</a>
</p>]]></content:encoded>

    </item>

    <item>
      <title>Javascript Pagination with Matrix / MX Calc and jQuery</title>
      <link>http://eeinsider.com/tips/view/javascript-pagination-with-matrix-mx-calc-and-jquery/</link>
      <guid>http://eeinsider.com/tips/view/javascript-pagination-with-matrix-mx-calc-and-jquery/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-09-27T19:23:09+00:00</dc:date>
      <content:encoded><![CDATA[<p>I ran into a situation where I couldn&#8217;t use generic slider-scripts due to their fixed width/height nature and absolute positioning, so I had to concoct my own. You&#8217;ll need Matrix (obviously) and MX Calc.</p>

<p>The template-tags:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;contentblocks&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">div&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"block&#123;if&nbsp;row_count&nbsp;==&nbsp;'1'&#125;&nbsp;active&#123;/if&#125;"&nbsp;</span><span style="color: #0000BB">id</span><span style="color: #007700">=</span><span style="color: #DD0000">"block_&#123;row_count&#125;"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;content_text&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;if&nbsp;total_rows&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #DD0000">'1'</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">p&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"nextprev"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;if&nbsp;row_count&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #DD0000">'1'</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"#block_&#123;exp:mx_calc&nbsp;expression='&#123;row_count&#125;-1'&#125;"&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"navigation"</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">img&nbsp;src</span><span style="color: #007700">=</span><span style="color: #DD0000">"/images/prev.png"&nbsp;</span><span style="color: #0000BB">alt</span><span style="color: #007700">=</span><span style="color: #DD0000">"Vorige"&nbsp;</span><span style="color: #007700">/&gt;&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;row_count&#125;&nbsp;</span><span style="color: #007700">/&nbsp;</span><span style="color: #0000BB">&#123;total_rows&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;if&nbsp;row_count&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">total_rows&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"#block_&#123;exp:mx_calc&nbsp;expression='&#123;row_count&#125;+1'&#125;"&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"navigation"</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">img&nbsp;src</span><span style="color: #007700">=</span><span style="color: #DD0000">"/images/next.png"&nbsp;</span><span style="color: #0000BB">alt</span><span style="color: #007700">=</span><span style="color: #DD0000">"Volgende"&nbsp;</span><span style="color: #007700">/&gt;&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">p</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">div</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">contentblocks&#125;&nbsp;</span>
</span>
</code></div>

<p>the jQuery</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">$(</span><span style="color: #DD0000">"a.navigation"</span><span style="color: #007700">).</span><span style="color: #0000BB">click</span><span style="color: #007700">(function(</span><span style="color: #0000BB">event</span><span style="color: #007700">)</span><span style="color: #0000BB">&#123;&nbsp;</span><span style="color: #FF8000">//&nbsp;Trigger&nbsp;click<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">$(</span><span style="color: #0000BB">this</span><span style="color: #007700">).</span><span style="color: #0000BB">parents</span><span style="color: #007700">(</span><span style="color: #DD0000">'.block'</span><span style="color: #007700">).</span><span style="color: #0000BB">removeClass</span><span style="color: #007700">(</span><span style="color: #DD0000">'active'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;Hide&nbsp;current&nbsp;block<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">$(</span><span style="color: #0000BB">this</span><span style="color: #007700">.</span><span style="color: #0000BB">hash</span><span style="color: #007700">).</span><span style="color: #0000BB">addClass</span><span style="color: #007700">(</span><span style="color: #DD0000">'active'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;Get&nbsp;next/previous&nbsp;block&nbsp;from&nbsp;link&nbsp;and&nbsp;show&nbsp;it<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;</span><span style="color: #007700">);&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>disappearing entries that suddenly reappear! DST!</title>
      <link>http://eeinsider.com/tips/view/disappearing-entries-that-suddenty-reappear-dst/</link>
      <guid>http://eeinsider.com/tips/view/disappearing-entries-that-suddenty-reappear-dst/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-07-06T12:39:00+00:00</dc:date>
      <content:encoded><![CDATA[<p>OK, this drove me mad over the last two days.</p>

<p>Ever had entries which you update on your site disappear after your update them? (and reappear later)</p>

<p>I thought something was caching - so turn caching off and cleared current cache. No joy.</p>

<p>The culprit was Daylight Saving Time setting on EE.</p>

<p>My entry date was one hour ahead of my server time so did not publish for an hour.</p>

<p>So - how do you absolutley set DST consistently?</p>

<p>1: Turn off daylight time saving in CP<br />
2: Turn off daylight time saving for all users who might be adding content<br />
3: Don’t let users edit their own daylight saving<br />
4: Ensure “Honor the Daylight Saving Time setting associated with each channel entry?” is set to No.<br />
5: Adjust and re-save any previously saved entries</p>

<p>A nod in the general direction of dp_miller from the EE forums for this, thought it was a big enough &#8216;gotcha&#8217; to warrant a post here.</p>

<p><a href="http://expressionengine.com/forums/viewthread/156835/">http://expressionengine.com/forums/viewthread/156835/</a>
</p>]]></content:encoded>

    </item>

    <item>
      <title>Add a &#123;last_segment&#125; global variable</title>
      <link>http://eeinsider.com/tips/view/add-a-last_segment-global-variable/</link>
      <guid>http://eeinsider.com/tips/view/add-a-last_segment-global-variable/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-06-28T12:41:53+00:00</dc:date>
      <content:encoded><![CDATA[<p>IMPORTANT UPDATE:<br />
EllisLab has added an official {last_segment} tag as of EE 2.1.1. See info here: <a href="http://expressionengine.com/blog/entry/2.1.1_release_what_will_be_there_what_will_not/">http://expressionengine.com/blog/entry/2.1.1_release_what_will_be_there_what_will_not/</a></p>

<p>&#8212;-</p>

<p>Sometimes it is quite handy to pull in the last segment of a URI. EE makes it easy to grab the first segment by using {segment_1} but there is no {last_segment}. With a little help from PHP and path.php we can change that. Add this to your path.php file at the global_vars array*.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;Get&nbsp;the&nbsp;last&nbsp;segment&nbsp;of&nbsp;the&nbsp;URL&nbsp;and&nbsp;make&nbsp;it&nbsp;a&nbsp;global&nbsp;var<br /></span><span style="color: #0000BB">$page_uri&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$_SERVER&#91;</span><span style="color: #DD0000">'REQUEST_URI'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;First&nbsp;we&nbsp;strip&nbsp;the&nbsp;last&nbsp;character&nbsp;of&nbsp;the&nbsp;URL&nbsp;if&nbsp;it&nbsp;is&nbsp;a&nbsp;trailing&nbsp;slash<br /></span><span style="color: #007700">if(</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">$page_uri</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;$page_uri&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">rtrim</span><span style="color: #007700">(</span><span style="color: #0000BB">$page_uri</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#125;<br /></span><span style="color: #FF8000">//&nbsp;now&nbsp;we&nbsp;explode&nbsp;the&nbsp;URI&nbsp;into&nbsp;array&nbsp;segments,&nbsp;then&nbsp;reverse&nbsp;them<br /></span><span style="color: #0000BB">$segments&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">array_reverse</span><span style="color: #007700">(</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">'/'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$page_uri</span><span style="color: #007700">));<br /></span><span style="color: #FF8000">//&nbsp;that&nbsp;makes&nbsp;our&nbsp;new&nbsp;"first"&nbsp;segment&nbsp;our&nbsp;actual&nbsp;last&nbsp;segment&nbsp;(which&nbsp;we&nbsp;make&nbsp;a&nbsp;global&nbsp;var&nbsp;below)<br /></span><span style="color: #0000BB">$last_segment&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$segments&#91;0&#93;</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;Global&nbsp;variables&nbsp;for&nbsp;our&nbsp;site<br /></span><span style="color: #0000BB">$global_vars&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"last_segment"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">$last_segment<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;&nbsp;</span>
</span>
</code></div>

<p>Now you can use {last_segment} across your site as needed.</p>

<p>* Note that you may need to merge this $global_vars array with your current $global_vars if you&#8217;ve already added your own.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Config Overrides for EE 1 and 2</title>
      <link>http://eeinsider.com/tips/view/config-overrides-for-ee-1-and-2/</link>
      <guid>http://eeinsider.com/tips/view/config-overrides-for-ee-1-and-2/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-06-17T12:07:08+00:00</dc:date>
      <content:encoded><![CDATA[<p>I don&#8217;t think I&#8217;ve seen this one before, but the EE Wiki contains a <a href="http://www.expressionengine.com/index.php?affiliate=ryanirelan&amp;page=/wiki/Config_Overrides/">full list of <code>config.php</code> overrides</a>, which are easily found by doing the following in a EE 1.6.x template with PHP enabled:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">global&nbsp;</span><span style="color: #0000BB">$PREFS</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$PREFS</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;&nbsp;</span>
</span>
</code></div>

<p>The list in the wiki is only for 1.6.7, so some may have changed or been added. </p>

<p>To get this to work in EE 2 you need to do it a little differently (again in a EE template with PHP enabled). EE 2 does away with the global $PREFS, so you need to print out the available config settings:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">EE</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">config</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">config</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;&nbsp;</span>
</span>
</code></div>

<p>This will output a long list of config settings that you should be able to use in your config.php file to override values stored in the database. <a href="http://www.expressionengine.com/index.php?affiliate=ryanirelan&amp;page=/wiki/EE_2_Config_Overrides/" title="Here's the list I came up with when checking against the beta">Here&#8217;s the list I came up with when checking against the beta</a>.
</p>]]></content:encoded>

    </item>

    <item>
      <title>The filetype you are attempting to upload has invalid content for its MIME type</title>
      <link>http://eeinsider.com/tips/view/the-filetype-you-are-attempting-to-upload-has-invalid-content-for-its-mime-/</link>
      <guid>http://eeinsider.com/tips/view/the-filetype-you-are-attempting-to-upload-has-invalid-content-for-its-mime-/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-04-28T12:33:07+00:00</dc:date>
      <content:encoded><![CDATA[<p>Well this one is different to the Freeform upload issue I added a week or so ago.</p>

<p>When a user uploads content EE attempts to filter that content against XSS - (Cross Site Scripting, a technique the bad guys use to compromise your site)</p>

<p>A logged in Super Admin automatically is trusted by EE and bypasses XSS filtering but your users get filtered. This lead to a situation where I could upload (as Super Admin) but other site members could not without seeing the error, &#8216;The filetype you are attempting to upload has invalid content for its MIME type&#8217;.</p>

<p>You can turn XSS filtering off completely&#8230;but that&#8217;s bad! you shouldn&#8217;t do that. The solutions is a Hidden Configuration Variable!</p>

<p>Get the ID&#8217;s of your trusted member groups you want to bypass XSS filtering and note them down.</p>

<p>Then open your config.php file and add the following:</p>

<p>$conf[&#8216;xss_clean_member_group_exception&#8217;] = &#8220;7,6&#8221;;</p>

<p>The above is a comma separated list of XSS member group exceptions, just add your trusted groups (in my case 7,6) and away you go.</p>

<p>jfp.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Add a dynamic page_uri global variable</title>
      <link>http://eeinsider.com/tips/view/add-a-dynamic-page_uri-global-variable/</link>
      <guid>http://eeinsider.com/tips/view/add-a-dynamic-page_uri-global-variable/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-04-14T14:50:35+00:00</dc:date>
      <content:encoded><![CDATA[<p>For some strange and odd reason, there is no full page_uri global variable built in to EE (that I&#8217;ve found at least). You can access each segment with segment variables but there&#8217;s not a way to get everything after your domain. We can easily add one by opening our path.php file and adding a global variable there. If you haven&#8217;t already created any global variables in your path.php file then it probably has this </p>

<div class="codeblock"><code><span style="color: #000000">
<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>We can add a variable like this:
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$global_vars&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">'current_uri'</span><span style="color: #007700">=&gt;</span><span style="color: #0000BB">$_SERVER&#91;</span><span style="color: #DD0000">'REQUEST_URI'</span><span style="color: #0000BB">&#93;</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;This&nbsp;array&nbsp;must&nbsp;be&nbsp;associative&nbsp;</span>
</span>
</code></div>

<p>This enables us the use of {current_uri} in our templates. On this page, for example, it would return <b>/tips/add-a-dynamic-page-uri-global-variable/</b>. </p>

<p><b>One Note:</b> This is using PHP, not EE so it will include anything after the domain. That means &#8220;index.php&#8221; would be part of it if you aren&#8217;t removing it from the URI in some fashion.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Dynamically display Year from entries not from this year</title>
      <link>http://eeinsider.com/tips/view/dynamically-display-year-from-entries-not-from-this-year/</link>
      <guid>http://eeinsider.com/tips/view/dynamically-display-year-from-entries-not-from-this-year/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-04-14T14:06:44+00:00</dc:date>
      <content:encoded><![CDATA[<p>I personally hate going to blog sites and not knowing when an article was published. I often see &#8220;June 2&#8221; but no year. Sometimes I&#8217;m actually interested in whether or not that means this June 2nd or last June second, or even an June from years ago.</p>

<p>Here is a simple way to automagically display the year once the entry is from &#8220;last year&#8221;. It&#8217;s just a simple conditional check against the date.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;entry_date&nbsp;format</span><span style="color: #007700">=</span><span style="color: #DD0000">"%D&nbsp;%M&nbsp;%d"</span><span style="color: #0000BB">&#125;&#123;if&nbsp;&#123;current_time&nbsp;format</span><span style="color: #007700">=</span><span style="color: #DD0000">'%y'</span><span style="color: #0000BB">&#125;&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">&#123;entry_date&nbsp;format</span><span style="color: #007700">=</span><span style="color: #DD0000">'%y'</span><span style="color: #0000BB">&#125;&#125;&#123;entry_date&nbsp;format</span><span style="color: #007700">=</span><span style="color: #DD0000">',&nbsp;%Y'</span><span style="color: #0000BB">&#125;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>The filetype you are attempting to upload is not allowed</title>
      <link>http://eeinsider.com/tips/view/the-filetype-you-are-attempting-to-upload-is-not-allowed/</link>
      <guid>http://eeinsider.com/tips/view/the-filetype-you-are-attempting-to-upload-is-not-allowed/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-04-09T04:52:47+00:00</dc:date>
      <content:encoded><![CDATA[<p>Having a problem uploading an certain filetype and seeing this error message?</p>

<p>I had this today with a Freeform file upload field when trying to upload a .tif file.</p>

<p>Solution:<br />
edit your mimes.php file.</p>

<p>Find it in /system/lib/mimes.php and edit the $mimes array.</p>

<p>My $mimes array now finishes like this.</p>

<p>...snip</p>

<p>&nbsp; &#8216;aac&#8217;&nbsp;  =>&nbsp;  &nbsp;  &#8216;audio/aac&#8217;,<br />
&nbsp; &#8216;tiff&#8217;&nbsp; =>&nbsp;  &nbsp;  &#8216;image/tiff&#8217;,<br />
&nbsp; &#8216;tif&#8217;&nbsp;  =>&nbsp;  &nbsp;  &#8216;image/tiff&#8217;<br />
);</p>

<p>Note: if you cannot figure what to do once you view the file then you really shouldn&#8217;t be doing it. <img src="http://eeinsider.com/images/smileys/wink.gif" width="19" height="19" alt="wink" style="border:0;" />
</p>]]></content:encoded>

    </item>

    <item>
      <title>Gotcha: remember to hide your memberlist</title>
      <link>http://eeinsider.com/tips/view/gotcha-remember-to-hide-your-memberlist/</link>
      <guid>http://eeinsider.com/tips/view/gotcha-remember-to-hide-your-memberlist/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-04-05T07:47:46+00:00</dc:date>
      <content:encoded><![CDATA[<p>Once you have set up your site you may find that your memberslist with screen_name is visible to all. To test this visit:<br />
<a href="http://www.YOURDOMAIN.com/member/memberlist">http://www.YOURDOMAIN.com/member/memberlist</a></p>

<p>Horrible isn&#8217;t it.</p>

<p>Anyway, to turn this off you have to do it per member group, in the back end go to:<br />
CP Home› Admin› Members and Groups› Member Groups› Edit Member Group› Guests (or other member group)</p>

<p>Now click on &#8220;Member Account Privileges&#8221; and set &#8220;Can view public profiles&#8221; to &#8220;No&#8221;</p>

<p>Do this for all member groups you don&#8217;t want to see that page.</p>

<p>Another way is to change the trigger word:<br />
CP Home› Admin› Members and Groups› Membership Preferences<br />
then change the &#8220;Profile Triggering Word&#8221; to something random. The first method is best as this way only obfuscates the memberlist.&nbsp; </p>

<p>Personally I think this should be set to &#8216;No&#8217; in a default install, but it&#8217;s not.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Quote your variable when using within an if condition</title>
      <link>http://eeinsider.com/tips/view/quote-your-variable-when-using-within-an-if-condition/</link>
      <guid>http://eeinsider.com/tips/view/quote-your-variable-when-using-within-an-if-condition/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-03-09T10:24:22+00:00</dc:date>
      <content:encoded><![CDATA[<p>This has just caught me out&#8230;</p>

<p>Basically if your using a variable within an <code>if</code> condition ensure you quote it.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;assign_variable</span><span style="color: #007700">:</span><span style="color: #0000BB">my_entry_id</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;segment_3&#125;"</span><span style="color: #0000BB">&#125;<br />&#123;assign_variable</span><span style="color: #007700">:</span><span style="color: #0000BB">sendit</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;segment_4&#125;"</span><span style="color: #0000BB">&#125;<br /><br />&#123;if&nbsp;</span><span style="color: #DD0000">"&#123;sendit&nbsp;&#125;"&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #DD0000">"true"</span><span style="color: #0000BB">&#125;&nbsp;&#123;</span><span style="color: #007700">!--&nbsp;&lt;=&nbsp;if&nbsp;</span><span style="color: #0000BB">&#123;sendit&#125;&nbsp;is&nbsp;not&nbsp;quoted&nbsp;it&nbsp;the&nbsp;logic&nbsp;fails&nbsp;</span><span style="color: #007700">--</span><span style="color: #0000BB">&#125;<br /><br />&nbsp;&nbsp;This&nbsp;is&nbsp;true<br />&#123;if</span><span style="color: #007700">:</span><span style="color: #0000BB">else&#125;<br /><br />&nbsp;&nbsp;This&nbsp;is&nbsp;not<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>Better handling of comment list and comment form display</title>
      <link>http://eeinsider.com/tips/view/better-handling-of-comment-list-and-comment-form-display/</link>
      <guid>http://eeinsider.com/tips/view/better-handling-of-comment-list-and-comment-form-display/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-02-13T12:29:04+00:00</dc:date>
      <content:encoded><![CDATA[<p>First, I suggest making your comment form and comment list markup into distinct templates, which accept a single embedded variable (&#8220;weblog&#8221;). This allows you to reuse these templates wherever you allow comments on your site. Say these are located at <b>embeds/comment_list</b> and <b>embeds/comment_form</b>.</p>

<p>Then, use this code at the end of your entries, where you want comments to display:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;if&nbsp;comment_total&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #DD0000">"0"&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">allow_comments&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;embed</span><span style="color: #007700">=</span><span style="color: #DD0000">"embeds/comment_list"&nbsp;</span><span style="color: #0000BB">weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"blog"</span><span style="color: #0000BB">&#125;<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br /><br />&#123;if&nbsp;allow_comments&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;embed</span><span style="color: #007700">=</span><span style="color: #DD0000">"embeds/comment_form"&nbsp;</span><span style="color: #0000BB">weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"blog"</span><span style="color: #0000BB">&#125;<br />&#123;if</span><span style="color: #007700">:</span><span style="color: #0000BB">else&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">p&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"no-comments"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Comments&nbsp;are&nbsp;now&nbsp;closed</span><span style="color: #007700">.&lt;/</span><span style="color: #0000BB">p</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;&nbsp;</span>
</span>
</code></div>

<p>This technique circumvents the generic &#8220;Commenting is not available in this weblog entry&#8221; message that appears when comments are closed. Note that this must be placed within your weblog:entries loop.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Using EE’s XID in Ajax</title>
      <link>http://eeinsider.com/tips/view/using-ees-xid-in-ajax/</link>
      <guid>http://eeinsider.com/tips/view/using-ees-xid-in-ajax/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-02-02T09:28:01+00:00</dc:date>
      <content:encoded><![CDATA[<p>If you&#8217;re submitting data in the EE CP through Ajax you may run into some issues where you&#8217;re constantly 302 redirected back to the homepage. One reason for this is you&#8217;re not submitting an XID hash to ensure the security of your form.</p>

<p>To fix this simply add the following somewhere in the data to-be-submitted:</p>

<pre>
{...'XID': '&lt;?=$FNS->add_form_security_hash('{ XID_HASH }')?&gt;'...}
</pre>

<p>[Note: Remove the spaces from around XID_HASH, keeping them in was breaking the display.]</p>

<p>That should ensure you get past the XID check.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Using view files in custom extensions</title>
      <link>http://eeinsider.com/tips/view/using-view-files-in-custom-extensions/</link>
      <guid>http://eeinsider.com/tips/view/using-view-files-in-custom-extensions/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-11-11T08:10:02+00:00</dc:date>
      <content:encoded><![CDATA[<p>With EE 1.6.8, we now have the ability to use <strong>view files</strong> in modules and that&#8217;s great news for add-on developers. Recently I wanted to use view files for an extension I was developing, but the EE docs do not list a way to do that. Specifically, I wanted to use view files for the extension <em>settings form</em> and for the <em>contents of the publish tab</em> for the extension. Here&#8217;s a snippet of how to use view files in a custom extension:</p>

<p>
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$DSP</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">body&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #0000BB">$DSP</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">view</span><span style="color: #007700">(</span><span style="color: #0000BB">PATH_EXT</span><span style="color: #007700">.</span><span style="color: #DD0000">'ext_widget/ext_settings.php'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$vars</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TRUE</span><span style="color: #007700">);&nbsp;</span>
</span>
</code></div>

<p>I created a folder called <em>ext_widget</em> to hold my view files, keeping the view file separated from other extension files.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Make embedded params tag params.</title>
      <link>http://eeinsider.com/tips/view/make-embedded-params-tag-params/</link>
      <guid>http://eeinsider.com/tips/view/make-embedded-params-tag-params/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-11-08T19:40:55+00:00</dc:date>
      <content:encoded><![CDATA[<p>You can access embed params directly in your plugin code. This is super useful when you include a plugin / module inside an embedded template and need to pass through params.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;<br />&nbsp;<br /></span><span style="color: #FF8000">//&nbsp;http://gist.github.com/204612<br /><br /></span><span style="color: #0000BB">make_embed_params_tag_params</span><span style="color: #007700">()<br /></span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;the&nbsp;valid&nbsp;params&nbsp;for&nbsp;the&nbsp;tag<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$valid_params&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'entry_id'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'weblog_id'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'url_title'<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">);<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;for&nbsp;each&nbsp;of&nbsp;the&nbsp;embedded&nbsp;params<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">foreach&nbsp;(</span><span style="color: #0000BB">$TMPL</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">embed_vars&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$key&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">$value</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;parse&nbsp;the&nbsp;param&nbsp;key<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;embed:&nbsp;...&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$param_key&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">$key</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">6</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;is&nbsp;the&nbsp;tag&nbsp;param&nbsp;actually&nbsp;set?<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">isset(</span><span style="color: #0000BB">$TMPL</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">tagparams&#91;$param_key&#93;</span><span style="color: #007700">)&nbsp;===&nbsp;</span><span style="color: #0000BB">FALSE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;is&nbsp;the&nbsp;embbed&nbsp;param&nbsp;in&nbsp;the&nbsp;valid&nbsp;params&nbsp;array?<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">$param_key</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$valid_params</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;add&nbsp;the&nbsp;embed&nbsp;param&nbsp;to&nbsp;the&nbsp;tag&nbsp;param<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$TMPL</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">tagparams&#91;$real_key&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$value</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br />&#125;&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>Cover Image with FF matrix gallery</title>
      <link>http://eeinsider.com/tips/view/cover-image-with-ff-matrix-gallery/</link>
      <guid>http://eeinsider.com/tips/view/cover-image-with-ff-matrix-gallery/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-11-07T20:43:44+00:00</dc:date>
      <content:encoded><![CDATA[<p>Making a gallery using FF Matrix and Ngen file field is a very popular way to make a gallery. I made a gallery like this but wanted to pull one image from each gallery into the sidebar and also using the same image as a post image in a news item.</p>

<p>Now the client can change the cover photo easily without having to reorder the matrix.</p>

<p>To ensure that the image pulled was the same one and chosen by the client I added a checkbox to the matrix. and then used the following code.</p>

<p>Sidebar Gallery
</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">"gallery"&nbsp;</span><span style="color: #0000BB">dynamic</span><span style="color: #007700">=</span><span style="color: #DD0000">"off"&nbsp;</span><span style="color: #0000BB">limit</span><span style="color: #007700">=</span><span style="color: #DD0000">"9&nbsp;orderby="</span><span style="color: #0000BB">random</span><span style="color: #DD0000">"&nbsp;disable="</span><span style="color: #0000BB">trackback</span><span style="color: #007700">|</span><span style="color: #0000BB">member_data</span><span style="color: #007700">|</span><span style="color: #0000BB">comments</span><span style="color: #DD0000">"&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;gallery&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;if&nbsp;cover&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;exp:imgsizer:size&nbsp;src="</span><span style="color: #0000BB">&#123;photo&#125;</span><span style="color: #DD0000">"&nbsp;width="</span><span style="color: #0000BB">73</span><span style="color: #DD0000">"&nbsp;height="</span><span style="color: #0000BB">73</span><span style="color: #DD0000">"&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a&nbsp;href="</span><span style="color: #0000BB">&#123;title_permalink</span><span style="color: #007700">=</span><span style="color: #0000BB">photos</span><span style="color: #007700">/</span><span style="color: #0000BB">gallery</span><span style="color: #DD0000">"&#125;"</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">img&nbsp;src</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;sized&#125;"&nbsp;</span><span style="color: #0000BB">width</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;width&#125;"&nbsp;</span><span style="color: #0000BB">height</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;height&#125;"&nbsp;</span><span style="color: #0000BB">alt</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;caption&#125;"&nbsp;</span><span style="color: #007700">/&gt;&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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">imgsizer</span><span style="color: #007700">:</span><span style="color: #0000BB">size&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">gallery&#125;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#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>and using related entry on the news page</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;related_entries&nbsp;id</span><span style="color: #007700">=</span><span style="color: #DD0000">"gallery_relationship"</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;gallery&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;if&nbsp;cover&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">imgsizer</span><span style="color: #007700">:</span><span style="color: #0000BB">size&nbsp;src</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;photo&#125;"&nbsp;</span><span style="color: #0000BB">width</span><span style="color: #007700">=</span><span style="color: #DD0000">"550"&nbsp;</span><span style="color: #0000BB">height</span><span style="color: #007700">=</span><span style="color: #DD0000">"300"</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">img&nbsp;src</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;sized&#125;"&nbsp;</span><span style="color: #0000BB">width</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;width&#125;"&nbsp;</span><span style="color: #0000BB">height</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;height&#125;"&nbsp;</span><span style="color: #0000BB">alt</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;caption&#125;"&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"newsBgThumb"&nbsp;</span><span style="color: #007700">/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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">imgsizer</span><span style="color: #007700">:</span><span style="color: #0000BB">size&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">gallery&#125;&nbsp;&nbsp;<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">related_entries&#125;&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>Managing comments</title>
      <link>http://eeinsider.com/tips/view/view-all-comments/</link>
      <guid>http://eeinsider.com/tips/view/view-all-comments/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-10-30T09:12:31+00:00</dc:date>
      <content:encoded><![CDATA[<p>Just learned this from a client(!). To view a list of all comments on your site, from the Edit screen, leave the keywords field blank, choose &#8220;Comments&#8221; from the &#8220;Search In&#8221; dropdown, and search.&nbsp; You can also use the Weblog filter to view comments from one specific weblog.</p>

<p>(This is actually in the docs, but who reads those anyway?)</p>

<p>You can then add a &#8220;Manage Comments&#8221; tab by adding the following URL in the Tab Manager.</p>

<p><code>http://yoursite.com/system/index.php?C=edit&amp;M=view_entries&amp;search_in=comments</code>
</p>]]></content:encoded>

    </item>

    
    </channel>
</rss>
