<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">

    <title type="text">ExpressionEngine User Guide &#45; User Contributed Notes</title>
    <link rel="alternate" type="text/html" href="http://expressionengine.com/user_guide/" />
    <link rel="self" type="application/atom+xml" href="http://expressionengine.com/user_guide/feed" />
    <updated>2012-01-24T11:14:55Z</updated>
    <rights>Copyright (c) 2011, EE User Guide Bot</rights>
    <generator uri="http://expressionengine.com/" version="2.2.2">ExpressionEngine</generator>
    <id>tag:expressionengine.com,2011:10:26</id>


	
	<entry>
  	<title>/modules/safecracker/index.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/modules/safecracker/index.html#14064" />
	<published>2012-02-09T19:27:22Z</published>
	<id>tag:expressionengine.com,2012:/modules/safecracker/index.html/44.15956.14064</id>
	<updated>2012-02-09T19:27:22Z</updated>
    <author>
          <name>Hop Studios</name>
    </author>
	<content type="html"><![CDATA[
        <p>STATUS is also an acceptable parameter in the exp:safecracker tag&#8212;you don&#8217;t need to use a hidden field.</p>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/modules/channel/entry_tracking.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/modules/channel/entry_tracking.html#14055" />
	<published>2012-02-08T00:20:58Z</published>
	<id>tag:expressionengine.com,2012:/modules/channel/entry_tracking.html/44.10201.14055</id>
	<updated>2012-02-08T00:20:58Z</updated>
    <author>
          <name>Sean C. Smith</name>
    </author>
	<content type="html"><![CDATA[
        <p>If you are having trouble with view tracking be sure that you have enabled it by going to Admin &gt; Security &amp; Privacy &gt; Tracking Preferences</p>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/modules/safecracker/index.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/modules/safecracker/index.html#13871" />
	<published>2012-01-23T19:53:11Z</published>
	<id>tag:expressionengine.com,2012:/modules/safecracker/index.html/44.15956.13871</id>
	<updated>2012-01-23T19:53:11Z</updated>
    <author>
          <name>thefifthlion</name>
    </author>
	<content type="html"><![CDATA[
        <p>Just tried the custom_fields loop and was excited about the possibility of populating the form dynamically. But I got my hopes up too soon. </p>

<p>Everything seems to displayed in the form. However, I have two radio buttons and the label for the second button wraps all of the other inputs</p>

<p>I&#8217;m hoping Barret Newton has a few minutes to share his wisdom on how I could correct this. This channel has so many custom fields it would be a real time saver to use the loop if I could get it working.</p>

<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Update: there is an error in documentation above</p>

<p>&lt;label class=&#8220;checkbox&#8221;&gt; needs to be removed from the radio button conditional in the safecracker custom_fields documentation<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>



<p>&nbsp;</p>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/modules/channel/channel_info.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/modules/channel/channel_info.html#13862" />
	<published>2012-01-19T19:32:25Z</published>
	<id>tag:expressionengine.com,2012:/modules/channel/channel_info.html/44.16740.13862</id>
	<updated>2012-01-19T19:32:25Z</updated>
    <author>
          <name>Boyink!</name>
    </author>
	<content type="html"><![CDATA[
        <p>This is a non-looping tag pair intended to be used to retrieve into for one channel. Specifying multiple channels with pipes between channel names will cause the tag to not return anything.</p>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/templates/embedding.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/templates/embedding.html#13861" />
	<published>2012-01-19T18:43:01Z</published>
	<id>tag:expressionengine.com,2012:/templates/embedding.html/44.16864.13861</id>
	<updated>2012-01-19T18:43:01Z</updated>
    <author>
          <name>Ian Cook</name>
    </author>
	<content type="html"><![CDATA[
        <p>Important to note the MSM-enabled usage of embed, allowing you to embed templates from other MSM sites. See the docs:</p>

<p><a href="http://expressionengine.com/user_guide/cp/sites/code.html" rel="nofollow">http://expressionengine.com/user_guide/cp/sites/code.html</a></p>

<p>tl;dr</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;embed</span><span style="color: #007700">=</span><span style="color: #DD0000">"site_short_name:template_group/template"</span><span style="color: #0000BB">&#125;&nbsp;</span>
</span>
</code></div>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/development/reference/functions.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/development/reference/functions.html#13857" />
	<published>2012-01-19T04:40:20Z</published>
	<id>tag:expressionengine.com,2012:/development/reference/functions.html/44.9855.13857</id>
	<updated>2012-01-19T04:40:20Z</updated>
    <author>
          <name>Mark Huot</name>
    </author>
	<content type="html"><![CDATA[
        <p>Anyone trying to use `$this-&gt;EE-&gt;functions-&gt;form_declaration()` in the CP will run into trouble with the XID not being parsed. To fix this always use the `form_open()` helper function. It&#8217;s available in your view files by default.</p>

<p>It&#8217;s not really documented anywhere, but you can see it in action here:</p>

<p>* http://expressionengine.com/user_guide/development/module_tutorial.html#the-view-files<br />
* http://expressionengine.com/user_guide/development/extensions.html#view-file<br />
* http://expressionengine.com/user_guide/development/usage/cp.html#safe-refresh</p>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/modules/safecracker/index.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/modules/safecracker/index.html#13828" />
	<published>2012-01-12T21:18:06Z</published>
	<id>tag:expressionengine.com,2012:/modules/safecracker/index.html/44.15956.13828</id>
	<updated>2012-01-12T21:18:06Z</updated>
    <author>
          <name>Rob Sanchez</name>
    </author>
	<content type="html"><![CDATA[
        <p>If you&#8217;re using <a href="http://expressionengine.com/user_guide/modules/safecracker/index.html#error-my-field-name" rel="nofollow">inline errors</a>, you can create custom error messages by using the error conditional:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;if&nbsp;error</span><span style="color: #007700">:</span><span style="color: #0000BB">your_field&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;Your&nbsp;custom&nbsp;error&nbsp;message</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;&nbsp;</span>
</span>
</code></div>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/templates/globals/conditionals.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/templates/globals/conditionals.html#13805" />
	<published>2012-01-07T15:55:25Z</published>
	<id>tag:expressionengine.com,2012:/templates/globals/conditionals.html/44.9877.13805</id>
	<updated>2012-01-07T15:55:25Z</updated>
    <author>
          <name>siffring</name>
    </author>
	<content type="html"><![CDATA[
        <p>Also note that this is parsed as a simple conditional.</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;if&nbsp;segment_2&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #DD0000">"category"</span><span style="color: #0000BB">&#125;&nbsp;</span>
</span>
</code></div>

<p>While this is parsed as an advanced conditional.</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;if&nbsp;</span><span style="color: #DD0000">"&#123;segment_2&#125;"&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #DD0000">"category"</span><span style="color: #0000BB">&#125;&nbsp;</span>
</span>
</code></div>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/templates/date_variable_formatting.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/templates/date_variable_formatting.html#13800" />
	<published>2012-01-06T06:46:01Z</published>
	<id>tag:expressionengine.com,2012:/templates/date_variable_formatting.html/44.9884.13800</id>
	<updated>2012-01-06T06:46:01Z</updated>
    <author>
          <name>Hop Studios</name>
    </author>
	<content type="html"><![CDATA[
        <p>&#123;current_time&#125; is output and adjusted for the user&#8217;s specified timezone (under their member profile), or if not logged in, in the default member&#8217;s timezone settings, or if that&#8217;s not set, in the server&#8217;s actual time zone.</p>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/templates/date_variable_formatting.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/templates/date_variable_formatting.html#13799" />
	<published>2012-01-06T06:38:13Z</published>
	<id>tag:expressionengine.com,2012:/templates/date_variable_formatting.html/44.9884.13799</id>
	<updated>2012-01-06T06:38:13Z</updated>
    <author>
          <name>Hop Studios</name>
    </author>
	<content type="html"><![CDATA[
        <p>What is %O? It&#8217;s &#8220;Difference to Greenwich time (GMT) in hours&#8221; in PHP, so probably the same here&#8230;</p>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/templates/globals/preload_replacement.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/templates/globals/preload_replacement.html#13775" />
	<published>2012-01-02T20:16:32Z</published>
	<id>tag:expressionengine.com,2012:/templates/globals/preload_replacement.html/44.10015.13775</id>
	<updated>2012-01-02T20:16:32Z</updated>
    <author>
          <name>GDmac - expocom</name>
    </author>
	<content type="html"><![CDATA[
        <p><i>... Assignment and replacement occurs instantly when the template is loaded, before any tags are parsed&#8230;</i><br />
If you assign a value to the same preload variable multiple times, then only the first declaration will be used.<br />
The tag is, as mentioned, instantly replaced, leaving no other tag with the same name in the template to be replaced by a second declaration.</p>

<p>However, (hat-tip to Lodewijk), because of parse order, there are some tags that <i>are</i> parsed before preload_replace:<br />
these are snippets, segment_x, embed:var variables and simple conditionals, and global_vars declared in index.php,&nbsp; which we can use to our benefit (tested with EE 2.3.1). e.g.</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #FF8000">//&nbsp;simple&nbsp;conditionals&nbsp;allow&nbsp;you&nbsp;to&nbsp;override&nbsp;a&nbsp;preload&nbsp;var&nbsp;if&nbsp;a&nbsp;segment&nbsp;is&nbsp;set,&nbsp;remember,&nbsp;only&nbsp;the&nbsp;first&nbsp;preload&nbsp;in&nbsp;a&nbsp;template&nbsp;is&nbsp;used<br /></span><span style="color: #0000BB">&#123;if&nbsp;segment_3&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #0000BB">&#125;&#123;preload_replace</span><span style="color: #007700">:</span><span style="color: #0000BB">foo</span><span style="color: #007700">=</span><span style="color: #DD0000">"special"</span><span style="color: #0000BB">&#125;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br />&#123;preload_replace</span><span style="color: #007700">:</span><span style="color: #0000BB">foo</span><span style="color: #007700">=</span><span style="color: #DD0000">"default"</span><span style="color: #0000BB">&#125;<br /><br /></span><span style="color: #FF8000">//&nbsp;current_time&nbsp;is&nbsp;also&nbsp;parsed&nbsp;early,&nbsp;So&nbsp;you&nbsp;can&nbsp;use&nbsp;ee-tags,&nbsp;but&nbsp;always&nbsp;be&nbsp;careful&nbsp;to&nbsp;surround&nbsp;single&nbsp;quotes&nbsp;with&nbsp;double&nbsp;quotes!<br /></span><span style="color: #0000BB">&#123;preload_replace</span><span style="color: #007700">:</span><span style="color: #0000BB">party</span><span style="color: #007700">=</span><span style="color: #DD0000">"Welcome&nbsp;to&nbsp;the&nbsp;&#123;current_time&nbsp;format='%Y'&#125;&nbsp;pages"</span><span style="color: #0000BB">&#125;&nbsp;</span>
</span>
</code></div>

<p>&nbsp;</p>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/templates/globals/snippets.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/templates/globals/snippets.html#13772" />
	<published>2012-01-02T18:04:11Z</published>
	<id>tag:expressionengine.com,2012:/templates/globals/snippets.html/44.9843.13772</id>
	<updated>2012-01-02T18:04:11Z</updated>
    <author>
          <name>GDmac - expocom</name>
    </author>
	<content type="html"><![CDATA[
        <p>Re:ATTENTION by outline4, 22 march 2011.<br />
Tested Dec 2011 with 2.3.1. Global_vars from index.php ARE rendered within snippets!</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #FF8000">//&nbsp;index.php<br />&nbsp;&nbsp;</span><span style="color: #0000BB">$assign_to_config&#91;</span><span style="color: #DD0000">'global_vars'</span><span style="color: #0000BB">&#93;&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"my_global_var"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"testing&nbsp;global&nbsp;vars"<br />&nbsp;&nbsp;</span><span style="color: #007700">);&nbsp;<br /><br /></span><span style="color: #FF8000">//&nbsp;my_snippet<br /></span><span style="color: #0000BB">Looking&nbsp;</span><span style="color: #007700">for&nbsp;global&nbsp;var:&nbsp;</span><span style="color: #0000BB">&#123;my_global_var&#125;<br /><br /></span><span style="color: #FF8000">//&nbsp;template<br /></span><span style="color: #0000BB">&#123;my_snippet&#125;&nbsp;</span>
</span>
</code></div>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/installation/moving.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/installation/moving.html#13763" />
	<published>2011-12-30T01:08:47Z</published>
	<id>tag:expressionengine.com,2011:/installation/moving.html/44.15965.13763</id>
	<updated>2011-12-30T01:08:47Z</updated>
    <author>
          <name>Hop Studios</name>
    </author>
	<content type="html"><![CDATA[
        <p>In order to update all the paths and URLs at once for the options listed in step 9, consider using <a href="http://www.hopstudios.com/software/deeploy_helper/" rel="nofollow">http://www.hopstudios.com/software/deeploy_helper/</a>.&nbsp; It&#8217;s donation-ware.</p>

<p>The only paths it doesn&#8217;t update are those in some third-party modules.</p>

<p>TTFN<br />
Travis</p>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/modules/channel/channel_entries.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/modules/channel/channel_entries.html#13680" />
	<published>2011-12-12T20:39:25Z</published>
	<id>tag:expressionengine.com,2011:/modules/channel/channel_entries.html/44.10013.13680</id>
	<updated>2011-12-12T20:39:25Z</updated>
    <author>
          <name>Hop Studios</name>
    </author>
	<content type="html"><![CDATA[
        <p>Solution for truly excluding a category:</p>

<p>Don&#8217;t use category=&#8220;not 17&#8221;, because that will return items taht are in 17 AND anothe category.&nbsp; Instead, inside the entries loop, use PHP on output:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;$excludefrom&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'|&#123;categories&#125;&#123;category_id&#125;|&#123;/categories&#125;'</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;&nbsp;</span>
</span>
</code></div>

<p>this will give you a string like “|14|17|22|”</p>

<p>Then use a PHP conditional test and the substr_count function, which will return number of instances in which the sub-string exists in that string. Since we want 0 sub-strings of “|17|” to be in the string, the code is as follows:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">substr_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$excludefrom</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"|17|"</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)</span><span style="color: #0000BB">&#123;?&gt;&nbsp;</span>
</span>
</code></div>
<p>Display our entry</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;&#125;&nbsp;?&gt;&nbsp;</span>
</span>
</code></div>
      ]]></content>
	</entry>
	
	<entry>
  	<title>/cp/content/files/file_upload_preferences.html</title>
	<link rel="alternate" type="text/html" href="/user_guide/cp/content/files/file_upload_preferences.html#13679" />
	<published>2011-12-11T21:12:25Z</published>
	<id>tag:expressionengine.com,2011:/cp/content/files/file_upload_preferences.html/44.15967.13679</id>
	<updated>2011-12-11T21:12:25Z</updated>
    <author>
          <name>brankin</name>
    </author>
	<content type="html"><![CDATA[
        <p>Quick way to link to files, replace all but the file name with &#123;filedir_#&#125;, where # equals the ID of your upload directory.</p>

<p>&#123;filedir_5&#125;/your_file.png<br />
renders as<br />
http://www.yoursite.com/uploads/your_directory/your_file.png</p>
      ]]></content>
	</entry>
	
</feed>
