<?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>johnniefp</dc:creator>
    <dc:rights>Copyright 2010</dc:rights>
    <dc:date>2010-07-06T18:39:00+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    

    <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-06T17: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-28T17:41:10+00:00</dc:date>
      <content:encoded><![CDATA[<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-17T17: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-28T17: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-14T19: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-14T19: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-09T09: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-05T12: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-09T16: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-13T18: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-02T15: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-11T14: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-09T01: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-08T02: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-30T14: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>

    <item>
      <title>Dynamic Monthly Date Parameters</title>
      <link>http://eeinsider.com/tips/view/monthly-dynamic-start-and-stop-parameters/</link>
      <guid>http://eeinsider.com/tips/view/monthly-dynamic-start-and-stop-parameters/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-10-28T21:44:34+00:00</dc:date>
      <content:encoded><![CDATA[<p>For a recent &#8216;events&#8217; based site I needed to show current month events only but not when on a &#8216;dated&#8217; URL i.e. ...events/2009/10</p>

<p>The <a href="http://expressionengine.com/docs/modules/weblog/parameters.html#par_year" title="link to EE docs">documentation</a> explains the option of year=, month= and day=, but hard codes the examples.</p>

<p>So, 
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">year</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;current_time&nbsp;format='%Y'&#125;"&nbsp;</span><span style="color: #0000BB">month</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;current_time&nbsp;format='%m'&#125;"&nbsp;</span>
</span>
</code></div><p>
slipped into the parameters will mean that your month is always the current one. </p>

<p>This could obviously be extended to years or days in a similar way.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Embed an Embed within Itself?</title>
      <link>http://eeinsider.com/tips/view/embed-an-embed-within-itself/</link>
      <guid>http://eeinsider.com/tips/view/embed-an-embed-within-itself/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-10-17T16:34:55+00:00</dc:date>
      <content:encoded><![CDATA[<p>I just wrote <a href="http://trevordavis.net/blog/tutorial/expressionengine-embed-an-embed-within-itself/">a blog article about this</a>, but I figure it would be good to share here too.</p>

<p>We wanted to be able to show an entry that was tagged with a certain category, and if no entries were found, just show an entry with any or no category. I couldn&#8217;t think of a good way to do this, and I knew I couldn&#8217;t nest exp:weblog:entries tags. </p>

<p>The code we were working with was already in an embed file, so we just embedded the same embed within the embed without the category parameter. Even though <a href="http://expressionengine.com/docs/templates/embedding_templates.html">the documentation (notes section)</a> says you can&#8217;t do this, we knew that we would never be creating an infinite loop, so it worked. </p>

<p>Here is the code from our embed:</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">channel_name</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;embed:channel&#125;"</span><span style="color: #0000BB">&#125;<br />&#123;assign_variable</span><span style="color: #007700">:</span><span style="color: #0000BB">category_id</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;embed:category&#125;"</span><span style="color: #0000BB">&#125;<br />&#123;assign_variable</span><span style="color: #007700">:</span><span style="color: #0000BB">show_expired</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;embed:show_expired&#125;"</span><span style="color: #0000BB">&#125;<br /><br />&#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">"&#123;channel_name&#125;"&nbsp;</span><span style="color: #0000BB">category</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;category_id&#125;"&nbsp;</span><span style="color: #0000BB">show_future_entries</span><span style="color: #007700">=</span><span style="color: #DD0000">"yes"&nbsp;</span><span style="color: #0000BB">show_expired</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;show_expired&#125;"&nbsp;</span><span style="color: #0000BB">limit</span><span style="color: #007700">=</span><span style="color: #DD0000">"1"&nbsp;</span><span style="color: #0000BB">disable</span><span style="color: #007700">=</span><span style="color: #0000BB">“category_fields</span><span style="color: #007700">|</span><span style="color: #0000BB">custom_fields</span><span style="color: #007700">|</span><span style="color: #0000BB">member_data</span><span style="color: #007700">|</span><span style="color: #0000BB">pagination</span><span style="color: #007700">|</span><span style="color: #0000BB">trackbacks”&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</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 />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">p&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"rightSide"</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;url_title_path="</span><span style="color: #0000BB">&#123;embed</span><span style="color: #007700">:</span><span style="color: #0000BB">template_path&#125;</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;events_feature_image&#125;"&nbsp;</span><span style="color: #0000BB">alt</span><span style="color: #007700">=</span><span style="color: #DD0000">""&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;events_summary&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&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">"&#123;url_title_path="</span><span style="color: #0000BB">&#123;embed</span><span style="color: #007700">:</span><span style="color: #0000BB">template_path&#125;</span><span style="color: #DD0000">"&#125;"&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"more"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Read&nbsp;more&nbsp;»</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;if&nbsp;no_results&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;embed</span><span style="color: #007700">=</span><span style="color: #0000BB">“site</span><span style="color: #007700">/.</span><span style="color: #0000BB">events”&nbsp;channel</span><span style="color: #007700">=</span><span style="color: #0000BB">“events”&nbsp;show_expired</span><span style="color: #007700">=</span><span style="color: #0000BB">“yes”&nbsp;template_path</span><span style="color: #007700">=</span><span style="color: #0000BB">“news</span><span style="color: #007700">-</span><span style="color: #0000BB">events</span><span style="color: #007700">/</span><span style="color: #0000BB">events”&#125;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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 then you would include that embed file by doing this:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;embed</span><span style="color: #007700">=</span><span style="color: #0000BB">“site</span><span style="color: #007700">/.</span><span style="color: #0000BB">events”&nbsp;channel</span><span style="color: #007700">=</span><span style="color: #0000BB">“events”&nbsp;category</span><span style="color: #007700">=</span><span style="color: #0000BB">“7”&nbsp;show_expired</span><span style="color: #007700">=</span><span style="color: #0000BB">“no”&nbsp;template_path</span><span style="color: #007700">=</span><span style="color: #0000BB">“news</span><span style="color: #007700">-</span><span style="color: #0000BB">events</span><span style="color: #007700">/</span><span style="color: #0000BB">events”&#125;&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>Flexible weblog entry searching by passing URL segments.</title>
      <link>http://eeinsider.com/tips/view/flexible-weblog-entry-searching-by-passing-url-segments/</link>
      <guid>http://eeinsider.com/tips/view/flexible-weblog-entry-searching-by-passing-url-segments/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-10-07T18:09:11+00:00</dc:date>
      <content:encoded><![CDATA[<p>Inspired by <a href="http://eeinsider.com/tips/view/dont-forget-the-power-of-passing-variables-through-the-url-url-segments/">Justin&#8217;s tip</a> passing variables via the URL, something similar I&#8217;ve used is for an album review site to give additional search options:</p>

<p>a weblog for the album review may also include other info, eg label, artist, year, city, country whic you may then want to be links that take you to a page of all other albums by that artist, on the same label, from teh same city.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">Artist</span><span style="color: #007700">:&nbsp;&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://eeinsider.com/albums/search/artist/&#123;artist/"</span><span style="color: #0000BB">&#125;</span><span style="color: #DD0000">"&gt;&#123;artist&#125;&lt;/a&gt;<br />Label:&nbsp;&lt;a&nbsp;href="</span><span style="color: #0000BB">http</span><span style="color: #007700">:</span><span style="color: #FF8000">//eeinsider.com/albums/search/label/&#123;label/"&#125;"&gt;&#123;label&#125;&lt;/a&gt;<br /></span><span style="color: #0000BB">City</span><span style="color: #007700">:&nbsp;&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://eeinsider.com/albums/search/city/&#123;city/"</span><span style="color: #0000BB">&#125;</span><span style="color: #DD0000">"&gt;&#123;city&#125;&nbsp;</span>
</span>
</code></div>

<p>then on the next page, display results using a simple weblog entries and the search parameter:</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">"albums"&nbsp;</span><span style="color: #0000BB">search</span><span style="color: #007700">:</span><span style="color: #0000BB">&#123;segment_3&#125;</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;segment_4&#125;"&nbsp;</span><span style="color: #0000BB">disable</span><span style="color: #007700">=</span><span style="color: #DD0000">"pagination|trackbacks"&nbsp;</span><span style="color: #0000BB">orderby</span><span style="color: #007700">=</span><span style="color: #DD0000">"title"&nbsp;</span><span style="color: #0000BB">sort</span><span style="color: #007700">=</span><span style="color: #DD0000">"asc"</span><span style="color: #0000BB">&#125;&nbsp;</span>
</span>
</code></div>

<p>the downside of using the URLs to pass variables to pages, is the 404 issue - not sure how well you could manage those as you need the flexability to have URLs not relating to pages.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Installing EE 1.x above webroot</title>
      <link>http://eeinsider.com/tips/view/installing-ee-1.x-above-webroot/</link>
      <guid>http://eeinsider.com/tips/view/installing-ee-1.x-above-webroot/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-09-28T19:08:00+00:00</dc:date>
      <content:encoded><![CDATA[<p>Although it&#8217;s been long rumoured to be possible in the 1.x branch, the documentation isn&#8217;t entirely clear on this. It turns out that it&#8217;s quite easy:</p>

<p>1. Install EE as normal within a web-accessible directory</p>

<p>2. Manually move the entire system (or whatever you renamed it) to your preferred location</p>

<p>3. Edit the system_path variable in path.php to reflect the new location of your system folder</p>

<p>4. Now follow the EE docs instructions for <a href="http://expressionengine.com/docs/installation/masked_cp_access.html">Masking Access to the Control Panel</a></p>

<p>5. Er, there is no step 5!
</p>]]></content:encoded>

    </item>

    <item>
      <title>Use Gypsy to migrate entries between weblogs</title>
      <link>http://eeinsider.com/tips/view/use-gypsy-to-migrate-entries-between-weblogs/</link>
      <guid>http://eeinsider.com/tips/view/use-gypsy-to-migrate-entries-between-weblogs/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-09-18T16:42:42+00:00</dc:date>
      <content:encoded><![CDATA[<p>Use Brandon Kelly&#8217;s brilliant Gypsy extension to migrate content between weblogs that are not in the same field group.</p>

<p>Set your destination fields as gypsy fields, and mark them to appear in your source weblog.</p>

<p>Edit each entry, and copy/paste the content to their new destination fields.<br />
On the server, you may have to move some uploaded files around as your field upload directories may have changed.</p>

<p>When you&#8217;re done editing, disable gypsy, or unmark those specific fields. Your content should now be in your new destination weblog.</p>

<p>Note: This doesn&#8217;t work well with FF Matrix fields.
</p>]]></content:encoded>

    </item>

    
    </channel>
</rss>