<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>e107</title>
        <description> I want to put the latest posts on my e107 front page.
How is this possible?
Zack </description>
        <link>https://www.phorum.org/support/read.php?28,134942,134942#msg-134942</link>
        <lastBuildDate>Sun, 13 Sep 2026 21:25:16 -0500</lastBuildDate>
        <generator>Phorum 6.0.4</generator>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135576#msg-135576</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135576#msg-135576</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Diego</strong><br />
About docs, I swear that tried to find for that function, but as far as i know there is no search feature on there. <br />
Is this something could be incorporated? I can&#039;t see why it is not possible to search on docs! :)</div></blockquote>
<br />
This has been sitting in the back of my head for a while.  Google is my &quot;quick and easy&quot; answer for this.  Try a search on &quot;site:www.phorum.org/docs your search terms&quot; (ie. [<a href="http://www.google.com/search?hl=en&amp;q=site%3Awww.phorum.org%2Fdocs+phorum_get_url" target="_blank"  rel="nofollow">www.google.com</a>]).  <br />
<br />
If the Phorum devs like this, they might place a Google search form on the documentation pages with the site variable prefilled. *wink wink*]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Mon, 22 Dec 2008 09:03:07 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135325#msg-135325</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135325#msg-135325</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Diego</strong><br />
[code=&quot;php&quot;]<br />
<br />
    foreach ($msgs as $msg_id =&gt; $data) {<br />
    $msgs[$msg_id][&quot;URL&quot;][&quot;READ&quot;] = phorum_get_url(PHORUM_READ_URL, $data[&#039;thread&#039;], $data[&#039;message_id&#039;]);}<br />
    <br />
	foreach ($msgs as $msg_id =&gt; $data) {<br />
    $msgs[$msg_id][&quot;formatted_date&quot;] = phorum_date($date_format, $date[&quot;datestamp&quot;]);}<br />
    <br />
 [/code]</div></blockquote>
<br />
You could/should put the stuff inside one foreach as the loop is exaclty the same.]]></description>
            <dc:creator>Panu</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Tue, 09 Dec 2008 08:04:08 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135313#msg-135313</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135313#msg-135313</link>
            <description><![CDATA[ it worked :)<br />
<br />
now it is working exacty as expected in a really clean and easy way.<br />
[<a href="http://u2eastlink.com/phorun/list.php?5" target="_blank"  rel="nofollow">u2eastlink.com</a>]<br />
<br />
Thanks so much! :)]]></description>
            <dc:creator>Diego</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Mon, 08 Dec 2008 15:37:15 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135312#msg-135312</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135312#msg-135312</link>
            <description><![CDATA[ It appears that the last row of the $msgs returned by phorum_db_get_recent_messages() is actually an array of users.  You should be able to add the following (with lines included for positioning):<br />
[code=&quot;php&quot;]<br />
$msgs = phorum_db_get_recent_messages(6,0,$PHORUM[&quot;DATA&quot;][&quot;FORUM_ID&quot;],0,LIST_RECENT_MESSAGES);<br />
<br />
if (isset($msgs[&quot;users&quot;])) unset($msgs[&quot;users&quot;]);<br />
 <br />
foreach ($msgs as $msg_id =&gt; $data) {<br />
[/code]]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Mon, 08 Dec 2008 15:30:58 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135311#msg-135311</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135311#msg-135311</link>
            <description><![CDATA[ yeah, I somehow overlooked that too. Probably my brain thought there was nothing wrong in a var called date :)<br />
<br />
now works fine (combined those too). Any idea why do I get an extra line when looping? <br />
<br />
<br />
About docs, I swear that tried to find for that function, but as far as i know there is no search feature on there. <br />
Is this something could be incorporated? I can&#039;t see why it is not possible to search on docs! :)<br />
<br />
Thanks again for all help]]></description>
            <dc:creator>Diego</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Mon, 08 Dec 2008 15:04:04 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135287#msg-135287</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135287#msg-135287</link>
            <description><![CDATA[ I&#039;m terribly sorry, my example showed $date[&quot;datestamp&quot;] rather than $<b>data</b>[&quot;datestamp&quot;].<br />
<br />
As for phorum_get_url(), you can read the docs <a href="http://www.phorum.org/docs/html/developer/ch02s03s06s02.html" target="_blank" >here</a>.  Some info is there, but you may want to simply browse the code as well (include/phorum_get_url.php).<br />
<br />
Looking at your code, you can also combine your two foreach $msgs loops into one loop.]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Sun, 07 Dec 2008 18:12:26 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135285#msg-135285</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135285#msg-135285</link>
            <description><![CDATA[ Excellent. Works fine except the date, which returns undefined date (01/01/1970). Any ideas? <br />
Is the phorum_get_url() documented anywhere? I feel sorry about asking so many questions but many times I am unable to find the right information on docs (no complain!)<br />
<br />
BTW I noticed too the loop generates an extra empty row. I am doing something wrong? <br />
<br />
This is the code I am currently using, and <a href="http://u2eastlink.com/phorun/list.php?5" target="_blank"  rel="nofollow">URL</a> where I use it <br />
<br />
[code=&quot;php&quot;]<br />
<br />
    &lt;?php<br />
    global $PHORUM;<br />
    $date_format = $PHORUM[&quot;short_date_time&quot;];<br />
    $msgs = phorum_db_get_recent_messages(6,0,$PHORUM[&quot;DATA&quot;][&quot;FORUM_ID&quot;],0,LIST_RECENT_MESSAGES);<br />
    <br />
    foreach ($msgs as $msg_id =&gt; $data) {<br />
    $msgs[$msg_id][&quot;URL&quot;][&quot;READ&quot;] = phorum_get_url(PHORUM_READ_URL, $data[&#039;thread&#039;], $data[&#039;message_id&#039;]);}<br />
    <br />
	foreach ($msgs as $msg_id =&gt; $data) {<br />
    $msgs[$msg_id][&quot;formatted_date&quot;] = phorum_date($date_format, $date[&quot;datestamp&quot;]);}<br />
    <br />
    $PHORUM[&quot;DATA&quot;][&quot;ULTIMOS&quot;] = $msgs;<br />
	?&gt;<br />
      <br />
<br />
	&lt;table&gt;<br />
    &lt;tr&gt;&lt;th&gt;Ultimos mensajes&lt;/th&gt;&lt;/tr&gt;<br />
    <br />
    {LOOP ULTIMOS}<br />
     &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;{ULTIMOS-&gt;URL-&gt;READ}&quot;&gt;{ULTIMOS-&gt;subject}&lt;/a&gt;&lt;/td&gt;<br />
     &lt;td&gt;{ULTIMOS-&gt;author}&lt;/td&gt;&lt;td&gt;{ULTIMOS-&gt;formatted_date}&lt;/td&gt;&lt;/tr&gt;<br />
    {/LOOP ULTIMOS}<br />
    &lt;/table&gt;<br />
[/code]]]></description>
            <dc:creator>Diego</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Sun, 07 Dec 2008 16:52:51 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135275#msg-135275</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135275#msg-135275</link>
            <description><![CDATA[ You are looking for two functions:<br />
<br />
phorum_get_url():<br />
[code=&quot;php&quot;]<br />
foreach ($msgs as $msg_id =&gt; $data) {<br />
    $msgs[$msg_id][&quot;URL&quot;][&quot;READ&quot;] = phorum_get_url(PHORUM_READ_URL, $data[&#039;thread&#039;], $data[&#039;message_id&#039;]);<br />
}<br />
[/code]<br />
<br />
This would be accessed in your loop as  {ULTIMOS-&gt;URL-&gt;READ}.<br />
<br />
and phorum_date():<br />
[code=&quot;php&quot;]<br />
// first pull in the date format you want to use (set in your language file)<br />
// here I pull in the short_date_time, the long_date_time is also an option<br />
// NOTE: this is after your global $PHORUM call.<br />
$date_format = $PHORUM[&quot;short_date_time&quot;];<br />
<br />
foreach ($msgs as $msg_id =&gt; $data) {<br />
    $msgs[$msg_id][&quot;formatted_date&quot;] = phorum_date($date_format, $data[&quot;datestamp&quot;]); <br />
}<br />
[/code]<br />
<br />
Again this can be accessed as {ULTIMOS-&gt;formatted_date}.  This also has the advantage of adjusting the date to the current user&#039;s timezone.]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Sun, 07 Dec 2008 07:07:40 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135272#msg-135272</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135272#msg-135272</link>
            <description><![CDATA[ Yeah I pointed wrong thread but Joe&#039;s post was EXACTLY what I was looking for.<br />
<br />
<br />
[code=&quot;php&quot;]<br />
    &lt;?php<br />
    global $PHORUM;<br />
    $msgs = phorum_db_get_recent_messages(6,0,$PHORUM[&quot;DATA&quot;][&quot;FORUM_ID&quot;],0,LIST_RECENT_MESSAGES);<br />
    $PHORUM[&quot;DATA&quot;][&quot;ULTIMOS&quot;] = $msgs;<br />
	?&gt;<br />
<br />
	&lt;table&gt;<br />
    &lt;tr&gt;<br />
    &lt;th&gt;Last messages&lt;/th&gt;<br />
    &lt;/tr&gt;<br />
<br />
    {LOOP ULTIMOS}<br />
     &lt;tr&gt;&lt;td&gt;{ULTIMOS-&gt;subject}&lt;/td&gt;&lt;td&gt;{ULTIMOS-&gt;author}&lt;/td&gt;&lt;td&gt;{ULTIMOS-&gt;datestamp}&lt;/td&gt;&lt;/tr&gt;<br />
    {/LOOP ULTIMOS}<br />
     &lt;/table&gt;<br />
[/code]<br />
<br />
<br />
Really clean way to show what I wanted.<br />
Just two additional questions<br />
<br />
The generated array is sort of limited field selection compared to normal listing. Normal list arrays have an useful subarray URL. I know I could generate via PHP full URL (base phorum url + read.php + [phorum id] + [thread]).<br />
Is there a &quot;cleaner&quot; way to show full message URL, either in the same way is done in normal templates (MESSAGES-&gt;URL-&gt;PROFILE) or any other Phorum function. <br />
<br />
Same with date, I got datestamp wich is the raw date, what is the actual function I should use to do proper date formatting?<br />
<br />
Thanks again, big help :)]]></description>
            <dc:creator>Diego</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Sun, 07 Dec 2008 03:11:48 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135077#msg-135077</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135077#msg-135077</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>quiznos</strong><br />
I want to put the latest posts on my e107 front page.<br />
How is this possible?</div></blockquote>
<br />
I don&#039;t know what e107 is or does it even matter<br />
<br />
[<a href="http://www.phorum.org/phorum5/read.php?16,4214" target="_blank" >www.phorum.org</a>]<br />
[<a href="http://www.phorum.org/phorum5/read.php?16,5350" target="_blank" >www.phorum.org</a>]<br />
[<a href="http://www.phorum.org/phorum5/read.php?16,15606" target="_blank" >www.phorum.org</a>]]]></description>
            <dc:creator>Panu</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Wed, 26 Nov 2008 11:45:55 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135051#msg-135051</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135051#msg-135051</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Diego</strong><br />
My questions are:<br />
<br />
1. What should I use instead of $forum_id? Syntax is clear but I don&#039;t know the variable I should use here (is there a list of global variables? couldnt find it on the docs</div></blockquote>
It looks like you are only adding this to the list pages, so you can use $PHORUM[&quot;forum_id&quot;] after calling global $PHORUM;<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />
2. Once I have the $msg captured, what would be optimal way to do it? I used simply (and dangerous) PHP code to show it but I know this could be much more efficient. What should I use here?</div></blockquote>
<br />
I would suggest using a modified version of the code from earlier in the list.tpl where the messages are listed in the main section of the page and also looking at the relevant code in list.php for creating the variables (especially the read url).]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Tue, 25 Nov 2008 23:15:39 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135050#msg-135050</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135050#msg-135050</link>
            <description><![CDATA[ Changing to LIST_RECENT_MESSAGES makes no difference. Basically i still get the messages but from the whole phorum. <br />
<br />
I guess this is not the optimal to do it. I am not a coder so I do everything as I can<br />
This time I did a shameless copy past from my old script from Phorum 3. <br />
So far I can get the array via phorum_db_get_recent_messages<br />
<br />
My questions are:<br />
<br />
1. What should I use instead of $forum_id? Syntax is clear but I don&#039;t know the variable I should use here (is there a list of global variables? couldnt find it on the docs<br />
<br />
2. Once I have the $msg captured, what would be optimal way to do it? I used simply (and dangerous) PHP code to show it but I know this could be much more efficient. What should I use here? <br />
<br />
Thanks]]></description>
            <dc:creator>Diego</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Tue, 25 Nov 2008 22:39:06 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135016#msg-135016</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135016#msg-135016</link>
            <description><![CDATA[ Change LIST_RECENT_MESSAGES to LIST_UPDATED_THREADS. Sounds like that is what you&#039;re looking for.<br />
<br />
Note that you are introducing an XSS security leak here. <i>Never</i> print code directly to the browser without formatting it first or without knowing for sure that this is not required. If people now enter some &lt;script&gt; code in their message subjects, it will execute in the browser when looking at your list. At least put an htmlspecialchars() call around the fields that contain user input (in this case &quot;subject&quot; and &quot;author&quot;).]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Tue, 25 Nov 2008 03:11:52 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135010#msg-135010</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135010#msg-135010</link>
            <description><![CDATA[ did you check that $forum_id is set there at all? I really doubt that.]]></description>
            <dc:creator>Thomas Seifert</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Tue, 25 Nov 2008 02:32:31 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,135007#msg-135007</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,135007#msg-135007</link>
            <description><![CDATA[ I use the following code to get latest 6 post in the bottom of my forum (<a href="http://www.u2eastlink.com/phorun/list.php?5" target="_blank"  rel="nofollow">http://www.u2eastlink.com/phorun/list.php?5</a>)<br />
However, it always shows latest updated messages for the complete forum, while I only want the updated ones from that specific forum. What should I change in the phorum_db_get_recent_messages string (forum id) to get those I want?<br />
<br />
Second question. Is this the most optimal way (speed, performance, clean code) to do this?<br />
<br />
Thanks :)<br />
<br />
[code=&quot;php&quot;]<br />
&lt;? <br />
    <br />
    <br />
    <br />
    $msgs = phorum_db_get_recent_messages(6,0,$forum_id,0,LIST_RECENT_MESSAGES);<br />
    foreach ($msgs as $onemsg)<br />
    {<br />
     if ($onemsg[&#039;subject&#039;])<br />
     {<br />
      $datestamp = $onemsg[&#039;modifystamp&#039;] ? $onemsg[&#039;modifystamp&#039;] : $onemsg[&#039;datestamp&#039;] ;<br />
      echo &quot;&lt;tr&gt;&lt;td&gt;&lt;a href=\&quot;read.php?&quot;.$onemsg[&#039;forum_id&#039;].&quot;,&quot;.$onemsg[&#039;thread&#039;].&quot;,&quot;.$onemsg[&#039;message_id&#039;].&quot;#msg-&quot;.$onemsg[&#039;message_id&#039;].&quot;\&quot;&gt;&quot;.$onemsg[&#039;subject&#039;].&quot;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&quot;.$onemsg[&#039;author&#039;].&quot;&lt;/td&gt;&lt;td&gt;&quot;.date(&quot; d M H:m&quot;,$onemsg[&#039;datestamp&#039;]).&quot;&lt;/td&gt;&lt;/tr&gt;&quot;;<br />
     }<br />
    }<br />
    <br />
    ?&gt;<br />
[/code]]]></description>
            <dc:creator>Diego</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Tue, 25 Nov 2008 02:23:51 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,134944#msg-134944</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,134944#msg-134944</link>
            <description><![CDATA[ $sql = &quot;select phorum_messages.* from phorum_messages, phorum_forums <br />
WHERE phorum_messages.forum_id = phorum_forums.forum_id and phorum_forums.pub_perms&gt;0 and phorum_messages.status=2 and phorum_messages.moved=0 ORDER BY phorum_messages.datestamp desc limit $num&quot;;<br />
<br />
This will also pick up the latest num posts from the forum.]]></description>
            <dc:creator>DavidVB</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Mon, 24 Nov 2008 06:54:51 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,134943#msg-134943</guid>
            <title>Re: e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,134943#msg-134943</link>
            <description><![CDATA[ Use an RSS script to read the Phorum RSS feed and let that present the latest posts on your front page.]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Mon, 24 Nov 2008 06:47:00 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?28,134942,134942#msg-134942</guid>
            <title>e107</title>
            <link>https://www.phorum.org/support/read.php?28,134942,134942#msg-134942</link>
            <description><![CDATA[ I want to put the latest posts on my e107 front page.<br />
How is this possible?<br />
Zack <img src="http://www.clipartforteachers.com/images/MATH/MENU_ART/SUB_SANDWICH.gif" class="bbcode" border="0" />]]></description>
            <dc:creator>quiznos</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Mon, 24 Nov 2008 06:38:57 -0600</pubDate>
        </item>
    </channel>
</rss>
