<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Modifica a Script per gli ultimi 10 topic]]></title><description><![CDATA[<p dir="auto">Salve a tutti, per il mio forum di discussione phpBB uso un piccolo script che mi permette di stampare gli ultimi 10 topic.<br />
Mi domandavo come faccio a non far apparire anche i topic privati? ossia quelli che riguardano i forum privati e non al pubblico?</p>
<p dir="auto">Lo script è il seguente:<br />
codice PHP:</p>
<pre><code>// Basic Configuration 
// How Many Topics you want to display? 
$topicnumber = 10; 
// Scrolling towards up or down? 
$scroll = "up"; 
// Change this to your phpBB path 
$urlPath = "http://www/forum"; 

// Database Configuration &amp;#40;Where your phpBB config.php file is located 
include './forum/config.php'; 

// Connecting &amp; Selecting Databases 
$table_topics = $table_prefix. "topics"; 
$table_forums = $table_prefix. "forums"; 
$table_posts = $table_prefix. "posts"; 
$table_users = $table_prefix. "users"; 
$link = mysql_connect&amp;#40;"$dbhost", "$dbuser", "$dbpasswd"&amp;#41; or die&amp;#40;"Could not connect"&amp;#41;; 
mysql_select_db&amp;#40;"$dbname"&amp;#41; or die&amp;#40;"Could not select database"&amp;#41;; 

// Perform Sql Query 
$query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username 
FROM $table_topics t, $table_forums f, $table_posts p, $table_users u 
WHERE t.topic_id = p.topic_id AND 
f.forum_id = t.forum_id AND 
t.topic_status &lt;&gt; 2 AND 
p.post_id = t.topic_last_post_id AND 
p.poster_id = u.user_id 
ORDER BY p.post_id DESC LIMIT $topicnumber"; 
$result = mysql_query&amp;#40;$query&amp;#41; or die&amp;#40;"Query failed"&amp;#41;; 

// Outcome of the HTML 
// Be carefull when you edit these! 
while &amp;#40;$row = mysql_fetch_array&amp;#40;$result, MYSQL_ASSOC&amp;#41;&amp;#41; &amp;#123; 
$topic_title=substr&amp;#40;"$row&amp;#91;topic_title&amp;#93;", 0, 24&amp;#41;; 
$topic_title = preg_replace&amp;#40;"/&lt;&amp;#40;.*?&amp;#41;&gt;/","",$topic_title&amp;#41;; 
$topic_title = ereg_replace&amp;#40; "&lt;&amp;#91;^&lt;&gt;&amp;#93;+&gt;", "", $topic_title &amp;#41;; 
$topic_title = str_replace&amp;#40;"\"","&amp;#34;",$topic_title&amp;#41;; 
print "&lt;ul&gt;"; 
echo  "* &lt;a href=\"$urlPath/viewtopic.php?topic=$row&amp;#91;topic_id&amp;#93;&amp;forum=$row&amp;#91;forum_id&amp;#93;\" title=\"Forum Cellulari\"&gt;» $topic_title " . 
".." . 
" &lt;/a&gt;&lt;img src=\"http&amp;#58;//www.cellulartopic.com/images/ico_topics.gif\" alt=\"vai al topic sul cellulare\" /&gt;"; 
print ""; 
&amp;#125; 

// Free Result 
mysql_free_result&amp;#40;$result&amp;#41;; 

// Close the Connection 
mysql_close&amp;#40;$link&amp;#41;;
</code></pre>
<p dir="auto">Grazie mille</p>
]]></description><link>https://connect.gt/topic/9661/modifica-a-script-per-gli-ultimi-10-topic</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 22:18:39 GMT</lastBuildDate><atom:link href="https://connect.gt/topic/9661.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 23 Apr 2006 20:09:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Modifica a Script per gli ultimi 10 topic on Wed, 03 Mar 2010 19:00:34 GMT]]></title><description><![CDATA[<p dir="auto">risollevo il topic</p>
]]></description><link>https://connect.gt/post/316810</link><guid isPermaLink="true">https://connect.gt/post/316810</guid><dc:creator><![CDATA[roberto17]]></dc:creator><pubDate>Wed, 03 Mar 2010 19:00:34 GMT</pubDate></item><item><title><![CDATA[Reply to Modifica a Script per gli ultimi 10 topic on Sun, 10 Jan 2010 19:11:49 GMT]]></title><description><![CDATA[<p dir="auto">Salve mi associo pure io.<br />
Ho creato in html la home del mio sito e vorrei inserire nella home gli ultimi messaggi 5 o 10 dal forum in phpbb, come posso fare?<br />
Grazie</p>
]]></description><link>https://connect.gt/post/316809</link><guid isPermaLink="true">https://connect.gt/post/316809</guid><dc:creator><![CDATA[roberto17]]></dc:creator><pubDate>Sun, 10 Jan 2010 19:11:49 GMT</pubDate></item><item><title><![CDATA[Reply to Modifica a Script per gli ultimi 10 topic on Thu, 27 Apr 2006 12:13:35 GMT]]></title><description><![CDATA[<p dir="auto">Grazie mille giorgio <img src="https://connect.gt/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=4as8rolt52f" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":)" alt="🙂" /></p>
]]></description><link>https://connect.gt/post/316799</link><guid isPermaLink="true">https://connect.gt/post/316799</guid><dc:creator><![CDATA[ethandane]]></dc:creator><pubDate>Thu, 27 Apr 2006 12:13:35 GMT</pubDate></item><item><title><![CDATA[Reply to Modifica a Script per gli ultimi 10 topic on Mon, 24 Apr 2006 13:07:05 GMT]]></title><description><![CDATA[<p dir="auto">Ciao EthanDane,</p>
<p dir="auto">nellla query quando estrapoli i topic basta dirgli di non prenderli dall'ID del forum che vuoi.</p>
<p dir="auto">Se il tuo forum privato ha un id 15 allora aggiundi</p>
<p dir="auto">AND forum_id!=15</p>
<p dir="auto"><img src="https://connect.gt/plugins/nodebb-plugin-emoji/emoji/customizations/54a3bffb-5e4a-4eb8-81dc-99b2072e5d05-175.gif?v=4as8rolt52f" class="not-responsive emoji emoji-customizations emoji--ciauz" title=":ciauz:" alt=":ciauz:" /></p>
]]></description><link>https://connect.gt/post/316788</link><guid isPermaLink="true">https://connect.gt/post/316788</guid><dc:creator><![CDATA[giorgiotave]]></dc:creator><pubDate>Mon, 24 Apr 2006 13:07:05 GMT</pubDate></item><item><title><![CDATA[Reply to Modifica a Script per gli ultimi 10 topic on Sun, 23 Apr 2006 20:09:02 GMT]]></title><description><![CDATA[<p dir="auto">Salve a tutti, per il mio forum di discussione phpBB uso un piccolo script che mi permette di stampare gli ultimi 10 topic.<br />
Mi domandavo come faccio a non far apparire anche i topic privati? ossia quelli che riguardano i forum privati e non al pubblico?</p>
<p dir="auto">Lo script è il seguente:<br />
codice PHP:</p>
<pre><code>// Basic Configuration 
// How Many Topics you want to display? 
$topicnumber = 10; 
// Scrolling towards up or down? 
$scroll = "up"; 
// Change this to your phpBB path 
$urlPath = "http://www/forum"; 

// Database Configuration &amp;#40;Where your phpBB config.php file is located 
include './forum/config.php'; 

// Connecting &amp; Selecting Databases 
$table_topics = $table_prefix. "topics"; 
$table_forums = $table_prefix. "forums"; 
$table_posts = $table_prefix. "posts"; 
$table_users = $table_prefix. "users"; 
$link = mysql_connect&amp;#40;"$dbhost", "$dbuser", "$dbpasswd"&amp;#41; or die&amp;#40;"Could not connect"&amp;#41;; 
mysql_select_db&amp;#40;"$dbname"&amp;#41; or die&amp;#40;"Could not select database"&amp;#41;; 

// Perform Sql Query 
$query = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username 
FROM $table_topics t, $table_forums f, $table_posts p, $table_users u 
WHERE t.topic_id = p.topic_id AND 
f.forum_id = t.forum_id AND 
t.topic_status &lt;&gt; 2 AND 
p.post_id = t.topic_last_post_id AND 
p.poster_id = u.user_id 
ORDER BY p.post_id DESC LIMIT $topicnumber"; 
$result = mysql_query&amp;#40;$query&amp;#41; or die&amp;#40;"Query failed"&amp;#41;; 

// Outcome of the HTML 
// Be carefull when you edit these! 
while &amp;#40;$row = mysql_fetch_array&amp;#40;$result, MYSQL_ASSOC&amp;#41;&amp;#41; &amp;#123; 
$topic_title=substr&amp;#40;"$row&amp;#91;topic_title&amp;#93;", 0, 24&amp;#41;; 
$topic_title = preg_replace&amp;#40;"/&lt;&amp;#40;.*?&amp;#41;&gt;/","",$topic_title&amp;#41;; 
$topic_title = ereg_replace&amp;#40; "&lt;&amp;#91;^&lt;&gt;&amp;#93;+&gt;", "", $topic_title &amp;#41;; 
$topic_title = str_replace&amp;#40;"\"","&amp;#34;",$topic_title&amp;#41;; 
print "&lt;ul&gt;"; 
echo  "* &lt;a href=\"$urlPath/viewtopic.php?topic=$row&amp;#91;topic_id&amp;#93;&amp;forum=$row&amp;#91;forum_id&amp;#93;\" title=\"Forum Cellulari\"&gt;» $topic_title " . 
".." . 
" &lt;/a&gt;&lt;img src=\"http&amp;#58;//www.cellulartopic.com/images/ico_topics.gif\" alt=\"vai al topic sul cellulare\" /&gt;"; 
print ""; 
&amp;#125; 

// Free Result 
mysql_free_result&amp;#40;$result&amp;#41;; 

// Close the Connection 
mysql_close&amp;#40;$link&amp;#41;;
</code></pre>
<p dir="auto">Grazie mille</p>
]]></description><link>https://connect.gt/post/316798</link><guid isPermaLink="true">https://connect.gt/post/316798</guid><dc:creator><![CDATA[ethandane]]></dc:creator><pubDate>Sun, 23 Apr 2006 20:09:02 GMT</pubDate></item></channel></rss>