Recent Posts of Frog CMS in Comment Plugin (0.9.3) http://forum.madebyfrog.com/rss en-us 25 Comment Plugin (0.9.3) <p>That is a help ... but it is even easier that this looks! In the documentation on <a href="http://www.madebyfrog.com/docs/how-to/display-the-date-of-the-page.html">displaying the date of a page</a> you can see some date setting code. In the default installation, you get this on the "Articles" page, for example:</p> <pre><code>&lt;?php echo $article-&gt;date(); ?&gt; </code></pre> <p>You can simply insert mtylerb's code into this line:</p> <pre><code>&lt;?php echo $article-&gt;date('at %I:%M %p on %a, %e %b %Y'); ?&gt; </code></pre> <p>I have noticed one little "problem" with pages that have not been updated. Instead of getting nothing, or the create date, you get 1 Jan 1970 ... or <em>some</em> date from 1970, anyway! To solve this problem for my site where I have a little <a href="http://erajad.byethost10.com/">"This page last updated:"</a> line on every page, I have this:</p> <pre><code>&lt;?php if ($this-&gt;date('%Y','updated') != '1970'): ?&gt; &lt;p style="color:#ccc"&gt;&lt;small&gt; This page last updated: &lt;?php echo $this-&gt;date('%a, %e %b %Y', 'updated'); ?&gt; &lt;/small&gt;&lt;/p&gt; &lt;?php endif; ?&gt; </code></pre> <p>There is probably a more elegant way of doing it, but that works for me! Learning all the time...!! :)</p> Sat, 02 Aug 2008 09:34:22 +0000 http://forum.madebyfrog.com/topic/404?page=1#post_2195 David http://forum.madebyfrog.com/topic/404?page=1#post_2195 Comment Plugin (0.9.3) <p>I'm not sure if anyone cares. It took me a few to figure out how the dates under each of the comments, using the new comment plugin, are created. So, I figured I'd post something to save someone else a headache.</p> <p>In your file:</p> <p>/frog/plugins/comment/index.php</p> <p>Find the line that looks like (approximately line 160):</p> <pre><code> function date($format='%a, %e %b %Y') </code></pre> <p>Currently that formats a page to look like:</p> <p>Fri, 1 Jan 2008</p> <p>It is formatted according to the <a href="http://ca.php.net/manual/en/function.strftime.php" title="php.net Documentation">strftime()</a> standards. Therefore,</p> <pre><code> function date($format='at %I:%M %p on %a, %e %b %Y') </code></pre> <p>Will produce results that look like:</p> <p>at 01:25 pm on Fri, 1 Jan 2008</p> <p>Hope that helps someone.</p> Sat, 02 Aug 2008 08:58:41 +0000 http://forum.madebyfrog.com/topic/404?page=1#post_2194 mtylerb http://forum.madebyfrog.com/topic/404?page=1#post_2194