<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Creating a preview-area on a website</title>
        <description> Hey everyone,

first of all, I&amp;#039;m very new to this whole thing, so maybe some of my questions may be silly or lack essential information - in that case, please just ask!

I&amp;#039;m currently tasked with finding a solution for the following problem:

The university website I work for has been using Phorum for a while now and is currently in the process of developing a new intranet. A planned small feature of this new intranet will be a &amp;quot;classifieds&amp;quot; section, i.e. sort of a &amp;quot;trading post&amp;quot;, allowing for small ads to buy and/or sell stuff.
Since Phorum seems to be a solid backbone for this (and it is already working with the central user database) I was thinking about using it for this task.
However, I was asked if there is any way to create a small &amp;quot;preview&amp;quot;-area on the new intranet starting page that displays the 3-5 latest postings of the two sub-forums (Buying / Selling), containing not much more than the thread title, user name and date, as well as a link to the Phorum thread.

Is there a plugin, script or something alike that can help me solve this task?

Thanks a lot for your time!</description>
        <link>https://www.phorum.org/phorum5/read.php?28,153281,153281#msg-153281</link>
        <lastBuildDate>Sun, 08 Mar 2026 14:22:34 -0400</lastBuildDate>
        <generator>Phorum 5.2.22</generator>
        <item>
            <guid>https://www.phorum.org/phorum5/read.php?28,153281,153301#msg-153301</guid>
            <title>Re: Creating a preview-area on a website</title>
            <link>https://www.phorum.org/phorum5/read.php?28,153281,153301#msg-153301</link>
            <description><![CDATA[ Be aware that this script does not format any of the output. This might be a potential security risk, since it opens up the site for XSS attacks, because users can write plain HTML and javascript code in the subject and have it render on the page that uses this code.<br />
<br />
Please add the following to the script code:<br />
<pre class="bbcode">
                $subj = trim(strip_tags($subj));
		$auth = trim(strip_tags($auth));
 
		if(!$subj) $subj = &quot;- No Subject -&quot;;
		if(!$auth) $auth - &quot;- No Author -&quot;;
 
                <span style="color:#009900">$subj = htmlentities($subj);
                $auth = htmlentities($auth);</span></pre>
<br />
That should make the code safe.]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Sat, 09 Feb 2013 05:50:04 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/phorum5/read.php?28,153281,153297#msg-153297</guid>
            <title>Re: Creating a preview-area on a website</title>
            <link>https://www.phorum.org/phorum5/read.php?28,153281,153297#msg-153297</link>
            <description><![CDATA[ Great, thank you very much! :)]]></description>
            <dc:creator>KnutBoehmer</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Fri, 08 Feb 2013 06:30:27 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/phorum5/read.php?28,153281,153283#msg-153283</guid>
            <title>Re: Creating a preview-area on a website</title>
            <link>https://www.phorum.org/phorum5/read.php?28,153281,153283#msg-153283</link>
            <description><![CDATA[ Simple php/mysql query<br />
<br />
max is number of items to display<br />
buy, sell are the numeric  forum id numbers<br />
phorum5/read.php?28,153281 - link to message<br />
parent_id=0 thread starter<br />
<br />
<pre class="php bbcode_geshi"><div class="head">Language: PHP</div>	<span class="re0">$sql</span> <span class="sy0">=</span> <span class="st0">&quot;select * from phorum_messages WHERE  (forum_id=buy or  forum_id=sell)  and parent_id=0 and status=2 and moved=0 ORDER BY datestamp desc limit <span class="es4">$max</span>&quot;</span><span class="sy0">;</span>
&nbsp;
	<a href="http://www.php.net/mysql_select_db"><span class="kw3">mysql_select_db</span></a><span class="br0">&#40;</span><span class="st0">&quot;phorum5&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
	<span class="re0">$res</span> <span class="sy0">=</span> <a href="http://www.php.net/mysql_query"><span class="kw3">mysql_query</span></a><span class="br0">&#40;</span><span class="re0">$sql</span><span class="sy0">,</span> resource <span class="re0">$link_identifier</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
	<span class="kw1">while</span><span class="br0">&#40;</span><span class="re0">$row</span> <span class="sy0">=</span> <a href="http://www.php.net/mysql_fetch_object"><span class="kw3">mysql_fetch_object</span></a><span class="br0">&#40;</span><span class="re0">$res</span><span class="br0">&#41;</span><span class="br0">&#41;</span>
	<span class="br0">&#123;</span>
		<span class="kw1">print</span> <span class="st0">&quot;&lt;li&gt;&quot;</span><span class="sy0">;</span>
&nbsp;
		<span class="re0">$mid</span> <span class="sy0">=</span> <span class="re0">$row</span><span class="sy0">-&gt;</span><span class="me1">message_id</span><span class="sy0">;</span>
		<span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$row</span><span class="sy0">-&gt;</span><span class="me1">thread</span><span class="br0">&#41;</span> <span class="re0">$mid</span><span class="sy0">=</span><span class="re0">$row</span><span class="sy0">-&gt;</span><span class="me1">thread</span><span class="sy0">;</span>
&nbsp;
		<span class="re0">$subj</span> <span class="sy0">=</span> trimstring<span class="br0">&#40;</span><span class="re0">$row</span><span class="sy0">-&gt;</span><span class="me1">subject</span><span class="sy0">,</span><span class="nu0">50</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
		<span class="re0">$auth</span> <span class="sy0">=</span> <span class="re0">$row</span><span class="sy0">-&gt;</span><span class="me1">author</span><span class="sy0">;</span>
&nbsp;
&nbsp;
		<span class="re0">$subj</span> <span class="sy0">=</span> <a href="http://www.php.net/trim"><span class="kw3">trim</span></a><span class="br0">&#40;</span><a href="http://www.php.net/strip_tags"><span class="kw3">strip_tags</span></a><span class="br0">&#40;</span><span class="re0">$subj</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
		<span class="re0">$auth</span> <span class="sy0">=</span> <a href="http://www.php.net/trim"><span class="kw3">trim</span></a><span class="br0">&#40;</span><a href="http://www.php.net/strip_tags"><span class="kw3">strip_tags</span></a><span class="br0">&#40;</span><span class="re0">$auth</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
		<span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span><span class="re0">$subj</span><span class="br0">&#41;</span> <span class="re0">$subj</span> <span class="sy0">=</span> <span class="st0">&quot;- No Subject -&quot;</span><span class="sy0">;</span>
		<span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span><span class="re0">$auth</span><span class="br0">&#41;</span> <span class="re0">$auth</span> <span class="sy0">-</span> <span class="st0">&quot;- No Author -&quot;</span><span class="sy0">;</span>
&nbsp;
		<span class="kw1">print</span> <span class="st0">&quot;&lt;a href=<span class="es1">\&quot;</span>phorum5/read.php?<span class="es4">$forum_id</span>,<span class="es4">$thread</span><span class="es1">\&quot;</span>&gt;&lt;b&gt;<span class="es4">$subj</span>&lt;/b&gt;&quot;</span><span class="sy0">;</span>
&nbsp;
		<span class="kw1">print</span> <a href="http://www.php.net/date"><span class="kw3">date</span></a><span class="br0">&#40;</span><span class="st0">&quot;H:i jS M Y&quot;</span><span class="sy0">,</span><span class="re0">$row</span><span class="sy0">-&gt;</span><span class="me1">datestamp</span><span class="br0">&#41;</span><span class="sy0">;</span>
		<span class="kw1">print</span> <span class="st0">&quot; - posted by <span class="es4">$auth</span>&quot;</span><span class="sy0">;</span>
		<span class="kw1">print</span> <span class="st0">&quot;&lt;/a&gt;&lt;/li&gt;&quot;</span><span class="sy0">;</span>
&nbsp;
	<span class="br0">&#125;</span></pre>]]></description>
            <dc:creator>DavidVonB</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Wed, 06 Feb 2013 12:24:17 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/phorum5/read.php?28,153281,153281#msg-153281</guid>
            <title>Creating a preview-area on a website</title>
            <link>https://www.phorum.org/phorum5/read.php?28,153281,153281#msg-153281</link>
            <description><![CDATA[ Hey everyone,<br />
<br />
first of all, I&#039;m <i>very</i> new to this whole thing, so maybe some of my questions may be silly or lack essential information - in that case, please just ask!<br />
<br />
I&#039;m currently tasked with finding a solution for the following problem:<br />
<br />
The university website I work for has been using Phorum for a while now and is currently in the process of developing a new intranet. A planned small feature of this new intranet will be a &quot;classifieds&quot; section, i.e. sort of a &quot;trading post&quot;, allowing for small ads to buy and/or sell stuff.<br />
Since Phorum seems to be a solid backbone for this (and it is already working with the central user database) I was thinking about using it for this task.<br />
However, I was asked if there is any way to create a small &quot;preview&quot;-area on the new intranet starting page that displays the 3-5 latest postings of the two sub-forums (Buying / Selling), containing not much more than the thread title, user name and date, as well as a link to the Phorum thread.<br />
<br />
Is there a plugin, script or something alike that can help me solve this task?<br />
<br />
Thanks a lot for your time!]]></description>
            <dc:creator>KnutBoehmer</dc:creator>
            <category>Phorum Integration</category>
            <pubDate>Wed, 06 Feb 2013 06:29:46 -0500</pubDate>
        </item>
    </channel>
</rss>
