EllisLab Community Forums http://ellislab.com/forums/ EllisLab Community Forums en Copyright 2013 2013-05-22T02:20:13-05:00 Refresh &amp; no expiration cookie http://ellislab.com/forums/viewthread/235539/ http://ellislab.com/forums/viewthread/235539/#When:11:04:16Z <p>Hello all!<br /> I have created a codeigniter + bootstrap + ion auth web app. Now I have to show a part of this web app into a monitor. The page shown is refreshed every 2 minutes. However to view this page I have to enter username and password. <br /> How can I update the session cookie so that it never expires?<br /> There are other methods?</p> <p>Thanks for your help!!!</p> 2013-05-21T11:04:16-05:00 Error in extending the helper http://ellislab.com/forums/viewthread/235555/ http://ellislab.com/forums/viewthread/235555/#When:01:52:42Z <p>I am extending the url_helper <br /> this is the extended helper</p><div class="codeblock"><code><span style="color: #000000"> <span style="color: #f5f8cc">&lt;?php<br /><br /></span><span style="color: #479fd1">//returns&nbsp;the&nbsp;site&nbsp;name<br /></span><span style="color: #91f291">function&nbsp;</span><span style="color: #f5f8cc">site_name&nbsp;</span><span style="color: #91f291">()&nbsp;</span><span style="color: #f5f8cc">{<br />&nbsp;$CI&nbsp;</span><span style="color: #91f291">=&amp;&nbsp;</span><span style="color: #f5f8cc">get_instance</span><span style="color: #91f291">();<br />&nbsp;return&nbsp;</span><span style="color: #f5f8cc">$CI</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">config</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">item</span><span style="color: #91f291">(</span><span style="color: #FFFFFF">'site_name'</span><span style="color: #91f291">);<br /></span><span style="color: #f5f8cc">}&nbsp;</span> </span> </code></div> <p>but the problem is, when i call it in the controller, it will only return the site name and kill the page, it will not show the view. but if i’ll change my extended url_helper, it works fine. what happen to this one? tnx<br /> <code></p> <p> function index () {<br /> &nbsp; echo site_name();<br /> &nbsp; <br /> &nbsp; $this-&gt;display();<br /> }<br /> <code></p> 2013-05-22T01:52:42-05:00 Google Analytics - help! http://ellislab.com/forums/viewthread/235532/ http://ellislab.com/forums/viewthread/235532/#When:10:09:09Z <p>Hi all.</p> <p>This is my first post on the forum, and I’m hoping to receive quick helping hand from someone about implementing Google Analytics tracking in a CodeIgniter website.</p> <p>Basically, we had our website developed in CodeIgniter and our developers had forgotten to implement the Google Analytics tracking.&nbsp; Being relatively comfortable with editing a few lines of PHP, I figured this can’t be too difficult.&nbsp; However, finding a plethora of topics on implementing hooks and redirects and access rights has made me too scared to touch anything.</p> <p>Would someone <strong>please</strong> help illustrate to me where I should paste the Google Analytics tracking script (e.g. in the header.php file, which is called for every page, or in a separate PHP file as Google suggests - but where do I link it?)</p> <p>Any advice would be greatly apprecaited.&nbsp; Thanks everyone <img src="http://ellislab.com/asset/images/smileys/smile.gif" width="19" height="19" alt="smile" style="border:0;" /></p> 2013-05-21T10:09:09-05:00 Internal Links problem http://ellislab.com/forums/viewthread/235499/ http://ellislab.com/forums/viewthread/235499/#When:06:06:38Z <p>I am trying to use html internal links in codeigniter web application.</p> <p>at the top of the page I used</p><div class="codeblock"><code><span style="color: #000000"> <span style="color: #91f291">&lt;</span><span style="color: #f5f8cc">a&nbsp;name</span><span style="color: #91f291">=</span><span style="color: #FFFFFF">'editable'</span><span style="color: #91f291">&gt;&lt;/</span><span style="color: #f5f8cc">a</span><span style="color: #91f291">&gt;&nbsp;</span> </span> </code></div> <p>at the bottom of the page i used</p><div class="codeblock"><code><span style="color: #000000"> <span style="color: #91f291">&lt;</span><span style="color: #f5f8cc">a&nbsp;href</span><span style="color: #91f291">=</span><span style="color: #FFFFFF">'#editable'</span><span style="color: #91f291">&gt;</span><span style="color: #f5f8cc">Click&nbsp;Here</span><span style="color: #91f291">&lt;/</span><span style="color: #f5f8cc">a</span><span style="color: #91f291">&gt;&nbsp;</span> </span> </code></div> <p>When i click on the click here, it is not navigating to the top.</p> <p>What did i do wrong.<br /> I can post the whole code but it is way big.</p> 2013-05-20T06:06:38-05:00 How can I get active records NOT to add single quotes to int values? http://ellislab.com/forums/viewthread/235519/ http://ellislab.com/forums/viewthread/235519/#When:18:42:43Z <div class="codeblock"><code><span style="color: #000000"> <span style="color: #f5f8cc">$this</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">db</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">select</span><span style="color: #91f291">(</span><span style="color: #FFFFFF">'products_table.id,&nbsp;code,&nbsp;class,&nbsp;category,&nbsp;status,&nbsp;price,&nbsp;production_date,&nbsp;products_status.title&nbsp;AS&nbsp;STATUS'</span><span style="color: #91f291">);<br /></span><span style="color: #f5f8cc">$this</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">db</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">from</span><span style="color: #91f291">(</span><span style="color: #FFFFFF">'products_table'</span><span style="color: #91f291">);<br /></span><span style="color: #f5f8cc">$this</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">db</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">join</span><span style="color: #91f291">(</span><span style="color: #FFFFFF">'products_status'</span><span style="color: #91f291">,&nbsp;</span><span style="color: #FFFFFF">'products_status.id&nbsp;=&nbsp;products_table.status'</span><span style="color: #91f291">);<br /></span><span style="color: #479fd1">//$this-&gt;db-&gt;order_by('products_table.id');<br /></span><span style="color: #f5f8cc">$this</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">db</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">where</span><span style="color: #91f291">(</span><span style="color: #FFFFFF">'products_table.id&nbsp;&gt;'</span><span style="color: #91f291">,&nbsp;</span><span style="color: #f5f8cc">$record_start</span><span style="color: #91f291">);<br /></span><span style="color: #f5f8cc">$this</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">db</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">where</span><span style="color: #91f291">(</span><span style="color: #f5f8cc">$data</span><span style="color: #91f291">);<br /></span><span style="color: #f5f8cc">$this</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">db</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">limit</span><span style="color: #91f291">(</span><span style="color: #f5f8cc">10</span><span style="color: #91f291">);<br /></span><span style="color: #f5f8cc">$query&nbsp;</span><span style="color: #91f291">=&nbsp;</span><span style="color: #f5f8cc">$this</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">db</span><span style="color: #91f291">-&gt;</span><span style="color: #f5f8cc">get</span><span style="color: #91f291">();&nbsp;</span> </span> </code></div><p>The code above creates the query below. The type of the column <strong>class</strong> is INT but it adds the single quotes and I don’t want single quotes for type INT in MySql. How can I stop active records to add single quotes to int columns?</p> <p>Thanks</p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #f5f8cc">SELECT&nbsp;</span><span style="color: #91f291">`</span><span style="color: #FFFFFF">products_table</span><span style="color: #91f291">`.`</span><span style="color: #FFFFFF">id</span><span style="color: #91f291">`,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`</span><span style="color: #FFFFFF">code</span><span style="color: #91f291">`,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`</span><span style="color: #FFFFFF">class</span><span style="color: #91f291">`,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`</span><span style="color: #FFFFFF">category</span><span style="color: #91f291">`,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`</span><span style="color: #FFFFFF">status</span><span style="color: #91f291">`,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`</span><span style="color: #FFFFFF">price</span><span style="color: #91f291">`,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`</span><span style="color: #FFFFFF">production_date</span><span style="color: #91f291">`,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`</span><span style="color: #FFFFFF">products_status</span><span style="color: #91f291">`.`</span><span style="color: #FFFFFF">title</span><span style="color: #91f291">`&nbsp;AS&nbsp;</span><span style="color: #f5f8cc">STATUS<br />FROM&nbsp;&nbsp;&nbsp;products_table<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;JOIN&nbsp;</span><span style="color: #91f291">`</span><span style="color: #FFFFFF">products_status</span><span style="color: #91f291">`<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #f5f8cc">ON&nbsp;</span><span style="color: #91f291">`</span><span style="color: #FFFFFF">products_status</span><span style="color: #91f291">`.`</span><span style="color: #FFFFFF">id</span><span style="color: #91f291">`&nbsp;=&nbsp;`</span><span style="color: #FFFFFF">products_table</span><span style="color: #91f291">`.`</span><span style="color: #FFFFFF">status</span><span style="color: #91f291">`<br /></span><span style="color: #f5f8cc">WHERE&nbsp;&nbsp;</span><span style="color: #91f291">`</span><span style="color: #FFFFFF">products_table</span><span style="color: #91f291">`.`</span><span style="color: #FFFFFF">id</span><span style="color: #91f291">`&nbsp;&gt;&nbsp;</span><span style="color: #f5f8cc">0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #91f291">AND&nbsp;`</span><span style="color: #FFFFFF">class</span><span style="color: #91f291">`&nbsp;=&nbsp;</span><span style="color: #FFFFFF">'2'<br /></span><span style="color: #f5f8cc">LIMIT&nbsp;&nbsp;10&nbsp;</span> </span> </code></div> 2013-05-20T18:42:43-05:00 Most complete syntax highlighting for ExpressionEngine now available http://ellislab.com/forums/viewthread/235554/ http://ellislab.com/forums/viewthread/235554/#When:00:18:04Z <p>I’ve just finished an overhaul of syntax highlighting for ExpressionEngine code in the Sublime Text editor. I believe this is now the most detailed syntax highlighter available for EE at this point:</p> <p>&nbsp; <a href="https://github.com/fcgrx/ExpressionEngine2-Sublime-Text-3-Bundle">https://github.com/fcgrx/ExpressionEngine2-Sublime-Text-3-Bundle</a></p> <p>If you’ve already got Sublime Text, just disable any previous EE package, and then add and install the above repository.</p> <p>You may find that your color theme is not comprehensive enough to display the full level of detail available with this setup. The readme includes more detail on that.</p> <p>I’d appreciate feedback on this.</p> 2013-05-22T00:18:04-05:00 A PHP Error was encountered in simple commerce. http://ellislab.com/forums/viewthread/235553/ http://ellislab.com/forums/viewthread/235553/#When:22:50:48Z <p>In admin control panel, by click “Add purchase”, a PHP Error was encountered.</p> <blockquote> <p>A PHP Error was encountered</p> <p>Serverity: Notice<br /> Message: Undefined property: Simple_commerce_mcp::$localize<br /> Filename: simple_commerce/mcp.simple_commerce.php<br /> Line Number: 1097</p> <p>Fatal error: Call to a member function format_date() on a non-object in D:\PHP\wwwroor\system\expressionengine\modules\simple_commerce\mcp.simple_commerce.php on line 1097</p> </blockquote> 2013-05-21T22:50:48-05:00 Relationship List with headers http://ellislab.com/forums/viewthread/235552/ http://ellislab.com/forums/viewthread/235552/#When:22:45:06Z <p>Hey Everyone,</p> <p>I’m struggling a bit trying to create a list of entries with relationships.</p> <p>My client is a home developer and they would like a list of their communities that are separated by the quadrant they exist in. For example:</p> <p><strong>North West<br /> Community Name<br /> Community Name</p> <p>South<br /> Community Name</p> <p>West<br /> Community Name</strong></p> <p>I’m not having any issues creating list. The problem I’m having is: when there isn’t a community related to a quadrant I don’t want the Quadrant title to show and I’m finding it difficult to find a solution. </p> <p>Here is a sample of my code:</p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #f5f8cc">{exp</span><span style="color: #91f291">:</span><span style="color: #f5f8cc">channel</span><span style="color: #91f291">:</span><span style="color: #f5f8cc">entries&nbsp;channel</span><span style="color: #91f291">=</span><span style="color: #FFFFFF">"quadrants"&nbsp;</span><span style="color: #f5f8cc">site</span><span style="color: #91f291">=</span><span style="color: #FFFFFF">"home"</span><span style="color: #f5f8cc">}<br />&nbsp;&nbsp;{if&nbsp;parents</span><span style="color: #91f291">:</span><span style="color: #f5f8cc">no_results}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #91f291">&lt;</span><span style="color: #f5f8cc">h2</span><span style="color: #91f291">&gt;</span><span style="color: #f5f8cc">{quadrant_title}</span><span style="color: #91f291">&lt;/</span><span style="color: #f5f8cc">h2</span><span style="color: #91f291">&gt;<br />&nbsp;&nbsp;</span><span style="color: #f5f8cc">{</span><span style="color: #91f291">/</span><span style="color: #f5f8cc">if}<br />&nbsp;&nbsp;{parents&nbsp;field</span><span style="color: #91f291">=</span><span style="color: #FFFFFF">"quadrant"</span><span style="color: #f5f8cc">}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #91f291">&lt;</span><span style="color: #f5f8cc">a&nbsp;href</span><span style="color: #91f291">=</span><span style="color: #FFFFFF">"{path=communities/details/{parents:url_title}}"</span><span style="color: #91f291">&gt;</span><span style="color: #f5f8cc">{parents</span><span style="color: #91f291">:</span><span style="color: #f5f8cc">community_title}</span><span style="color: #91f291">&lt;/</span><span style="color: #f5f8cc">a</span><span style="color: #91f291">&gt;&lt;</span><span style="color: #f5f8cc">br</span><span style="color: #91f291">&gt;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #f5f8cc">{</span><span style="color: #91f291">/</span><span style="color: #f5f8cc">parents}<br />{</span><span style="color: #91f291">/</span><span style="color: #f5f8cc">exp</span><span style="color: #91f291">:</span><span style="color: #f5f8cc">channel</span><span style="color: #91f291">:</span><span style="color: #f5f8cc">entries}&nbsp;</span> </span> </code></div> <p>Right now the conditional is showing all Quadrant titles that currently <em>don’t</em> have a community attached and I would like it to do the opposite.</p> <p>I realize this is probably pretty simple but I’ve been banging my head against it for too long now. Any help would be greatly appreciated.</p> <p>Thanks All!</p> 2013-05-21T22:45:06-05:00 CI is ignoring what I sent the index page to http://ellislab.com/forums/viewthread/235551/ http://ellislab.com/forums/viewthread/235551/#When:20:10:57Z <p>In config.php I made it so my index page should be local_index.php</p> <div class="codeblock"><code><span style="color: #000000"> <span style="color: #91f291">|--------------------------------------------------------------------------<br />|&nbsp;</span><span style="color: #f5f8cc">Index&nbsp;File<br /></span><span style="color: #91f291">|--------------------------------------------------------------------------<br />|<br />|&nbsp;</span><span style="color: #f5f8cc">Typically&nbsp;this&nbsp;will&nbsp;be&nbsp;your&nbsp;index</span><span style="color: #91f291">.</span><span style="color: #f5f8cc">php&nbsp;file</span><span style="color: #91f291">,&nbsp;</span><span style="color: #f5f8cc">unless&nbsp;you</span><span style="color: #FFFFFF">'ve&nbsp;renamed&nbsp;it&nbsp;to<br />|&nbsp;something&nbsp;else.&nbsp;If&nbsp;you&nbsp;are&nbsp;using&nbsp;mod_rewrite&nbsp;to&nbsp;remove&nbsp;the&nbsp;page&nbsp;set&nbsp;this<br />|&nbsp;variable&nbsp;so&nbsp;that&nbsp;it&nbsp;is&nbsp;blank.<br />|<br />*/&nbsp;<br />$config['</span><span style="color: #f5f8cc">index_page</span><span style="color: #FFFFFF">']&nbsp;=&nbsp;'</span><span style="color: #f5f8cc">local_index</span><span style="color: #91f291">.</span><span style="color: #f5f8cc">php</span><span style="color: #FFFFFF">';&nbsp;</span> </span> </code></div> <p>It’s still loading index.php Any ideas as to why?</p> <p>&nbsp;</p> 2013-05-21T20:10:57-05:00 Rich Text Editor - line breaks disappear http://ellislab.com/forums/viewthread/217397/ http://ellislab.com/forums/viewthread/217397/#When:06:58:01Z <p>I just tried the new Rich Text Editor of ExpressionEngine, but somehow all line breaks (br) disappear on te front-end of the web site. Paragraphs are working fine.</p> <p>When I click view code in the publish-form, I can see all br’s and p’s looking good. When I view the output HTML on the site, all br-tags seem to be removed.</p> <p>Any idea what could cause this?</p> 2012-05-17T06:58:01-05:00