<?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[Codice php da modificare ?]]></title><description><![CDATA[<p dir="auto">Ragazzi poiché non mastico php qualcuno mi aiutare per modificare questo blocco per nuke per visualizzare i post del forum in homepage, questo che allego é per il forum interno  ma io vorrei modificarlo<br />
perché il mio forum risiede su database esterno.</p>
<p dir="auto">Ho provato a smanettare per aggiungere il codice di connessione e le query ma non riesco proprio, ormai mi sono arreso ma ci terrei<br />
a ottenere un risultato.</p>
<p dir="auto">CODICE BLOCCO:</p>
<p dir="auto">&lt;?php</p>
<p dir="auto">if( eregi( "block-phpBB_Forums.php", $_SERVER['PHP_SELF'])) {<br />
Header("Location: index.php");<br />
die();<br />
}</p>
<p dir="auto">global $prefix, $user_prefix, $db, $sitename, $bgcolor1, $bgcolor2;</p>
<p dir="auto">/<em><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><em>/<br />
/</em>                                <em>/<br />
/</em> Configuration parameters       <em>/<br />
/</em>                                <em>/<br />
/</em></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></em>/<br />
// When set to 1 then Forums permissions which View and/or Read are NOT set to 'ALL' will NOT be displayed in the center block<br />
$HideViewReadOnly = 1;<br />
// Show only 5 last new topics<br />
$Last_New_Topics  = 5;<br />
// Icon that is displayed in Center Block in front of Topic<br />
$IconPath         = "modules/Forums/templates/subSilver/images/icon_mini_message.gif";</p>
<p dir="auto">/<em><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong><em>/<br />
/</em>                                <em>/<br />
/</em> Don't Edit Below !             <em>/<br />
/</em>                                <em>/<br />
/</em></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></em>/<br />
$border           = 0;<br />
$cellspacing      = 0;<br />
$cellstyle        = "style="border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom-style: dotted; border-bottom-width: 1"";</p>
<p dir="auto">/* Total Amount of Topics */<br />
$result = $db-&gt;sql_query( "SELECT * FROM ".$prefix."_bbtopics" );<br />
$Amount_Of_Topics = $db-&gt;sql_numrows( $result );</p>
<p dir="auto">/* Total Amount of Posts */<br />
$result = $db-&gt;sql_query( "SELECT * FROM ".$prefix."_bbposts" );<br />
$Amount_Of_Posts = $db-&gt;sql_numrows( $result );</p>
<p dir="auto">/* Total Amount of Topic Views */<br />
$Amount_Of_Topic_Views = 0;<br />
$result = $db-&gt;sql_query( "SELECT topic_views FROM ".$prefix."_bbtopics" );<br />
while( list( $topic_views ) = $db-&gt;sql_fetchrow( $result ) )<br />
{<br />
$Amount_Of_Topic_Views = $Amount_Of_Topic_Views + $topic_views;<br />
}</p>
<p dir="auto">/* Total Amount of Topic Replies */<br />
$Amount_Of_Topic_Replies = 0;<br />
$result = $db-&gt;sql_query( "SELECT topic_replies FROM ".$prefix."_bbtopics" );<br />
while( list( $topic_replies ) = $db-&gt;sql_fetchrow( $result ) )<br />
{<br />
$Amount_Of_Topic_Replies = $Amount_Of_Topic_Replies + $topic_replies;<br />
}</p>
<p dir="auto">/* Total Amount of Members */<br />
$result = $db-&gt;sql_query( "SELECT * FROM ".$user_prefix."_users" );<br />
$Amount_Of_Members = $db-&gt;sql_numrows( $result ) - 1;</p>
<p dir="auto">/* Last X New Topics */<br />
$Count_Topics = 0;<br />
$Topic_Buffer = "";<br />
$result1 = $db-&gt;sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC" );<br />
while( list( $topic_id, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result1, $dbi ) )<br />
{<br />
$skip_display = 0;<br />
if( $HideViewReadOnly == 1 )<br />
{<br />
$result5 = $db-&gt;sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_bbforums where forum_id = '$forum_id'" );<br />
list( $auth_view, $auth_read ) = $db-&gt;sql_fetchrow( $result5 );<br />
if( ( $auth_view != 0 ) or ( $auth_read != 0 ) ) { $skip_display = 1; }<br />
}</p>
<p dir="auto">if( $topic_moved_id != 0 )<br />
{<br />
// Shadow Topic !!<br />
$skip_display = 1;<br />
}</p>
<p dir="auto">if( $skip_display == 0 )<br />
{<br />
$Count_Topics += 1;<br />
$result2 = $db-&gt;sql_query( "SELECT topic_id, poster_id, FROM_UNIXTIME( post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id = '$topic_last_post_id'" );<br />
list( $topic_id, $poster_id, $post_time ) = $db-&gt;sql_fetchrow( $result2 );</p>
<pre><code>  $result3 = $db-&gt;sql_query( "SELECT username, user_id FROM ".$user_prefix."_users where user_id='$poster_id'" );
  list( $uname, $uid ) = $db-&gt;sql_fetchrow( $result3 );
  $LastPoster = "&lt;A HREF=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$uid\"STYLE=\"text-decoration: none\"&gt; $uname &lt;/a&gt;";
  
  $result4 = $db-&gt;sql_query( "SELECT username, user_id FROM ".$user_prefix."_users where user_id='$topic_poster'" );
  list( $uname, $uid ) = $db-&gt;sql_fetchrow( $result4 );
  $OrigPoster = "&lt;A HREF=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$uid\"STYLE=\"text-decoration: none\"&gt; $uname &lt;/a&gt;";

  $TopicImage = "&lt;img src=\"$IconPath\" border=\"0\" alt=\"\"&gt;";
  $TopicTitleShow = "&lt;a href=\"modules.php?name=Forums&amp;amp;file=viewtopic&amp;amp;p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\"&gt;$topic_title&lt;/a&gt;";

  $Topic_Buffer .= "&lt;tr height=20 onmouseover=\"this.style.backgroundColor='#eeeeee'\" onmouseout=\"this.style.backgroundColor=''\"&gt;&lt;td $cellstyle&gt;$TopicImage&lt;/td&gt;&lt;td $cellstyle&gt;$TopicTitleShow&lt;/td&gt;&lt;td $cellstyle&gt;&lt;div align=\"center\"&gt;$OrigPoster&lt;/div&gt;&lt;/td&gt;&lt;td $cellstyle&gt;&lt;div align=\"center\"&gt;**$topic_views**&lt;/div&gt;&lt;/td&gt;&lt;td $cellstyle&gt;&lt;div align=\"center\"&gt;**$topic_replies**&lt;/div&gt;&lt;/td&gt;&lt;td $cellstyle align=\"center\"&gt;$LastPoster
</code></pre>
<p dir="auto">&lt;font size="-2"&gt;<em>$post_time</em>&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;";<br />
}</p>
<p dir="auto">if( $Last_New_Topics == $Count_Topics ) { break 1; }</p>
<p dir="auto">}</p>
<p dir="auto">/* Write Table to Screen <em>/<br />
$content  = "&lt;table width="100%" border="$border"  cellspacing="$cellspacing" bordercolor="$bgcolor2" bgcolor="$bgcolor1"&gt;";<br />
$content .= "&lt;tr&gt;&lt;td height="21" align="center" colspan="6" bgcolor="$bgcolor2"&gt;<strong>$sitename</strong>&lt;/td&gt;&lt;/tr&gt;";<br />
$content .= "&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td align="center"&gt;"._BBFORUM_NEWTOPICS."&lt;/td&gt;&lt;td align="center"&gt;"._BBFORUM_POSTER."&lt;/td&gt;&lt;td align="center"&gt;"._BBFORUM_VIEWS."&lt;/td&gt;&lt;td align="center"&gt;"._BBFORUM_REPLIES."&lt;/td&gt;&lt;td align="center"&gt;"._BBFORUM_LASTPOSTER."&lt;/td&gt;&lt;/tr&gt;";<br />
$content .= "$Topic_Buffer";<br />
$content .= "&lt;tr&gt;&lt;td align="center" colspan="6"&gt;"._BBFORUM_TOTTOPICS."**$Amount_Of_Topics</em>***|<strong>"._BBFORUM_TOTPOSTS."</strong>$Amount_Of_Posts****|<strong>"._BBFORUM_TOTVIEWS."</strong>$Amount_Of_Topic_Views****|<strong>"._BBFORUM_TOTREPLIES."</strong>$Amount_Of_Topic_Replies****|<strong>&lt;a href="modules.php?name=Members_List"&gt;"._BBFORUM_TOTMEMBERS."&lt;/a&gt;</strong>$Amount_Of_Members**&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;";<br />
$content .= "&lt;tr&gt;&lt;td align="center" colspan="6"&gt;[ &lt;a href="modules.php?name=Forums"&gt;"._BBFORUM_FORUM."&lt;/a&gt; ][ &lt;a href="modules.php?op=modload&amp;name=Forums&amp;file=search"&gt;"._BBFORUM_SEARCH."&lt;/a&gt; ]&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;";<br />
$content .= "&lt;/table&gt;";</p>
<p dir="auto">?&gt;</p>
]]></description><link>https://dev.connect.gt/topic/3410/codice-php-da-modificare</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 20:24:26 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/3410.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Sep 2005 21:15:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Codice php da modificare ? on Sun, 18 Sep 2005 21:29:42 GMT]]></title><description><![CDATA[<p dir="auto">Allora tuono premetto che io uso phpnuke, le tabelle in questione del forum esterno dovrebbero essere:</p>
<p dir="auto">phpbb_posts e phpbb_posts_text</p>
<p dir="auto">Io vorrei avere un codice dove nella stesso file ci sia il codice di connessione al database esterno e poco sotto la query per i post e poi pero' tutto questo codice non saprei dove inserirlo.</p>
<p dir="auto">Avevo provato alla lettere tutto quello scritto da Giorgio Tave ma non ha funzionato, cioé dopo avere inserito tutti i parametri alla fine in home page non viene fuori assolutamente niente.</p>
<p dir="auto">Piu sopra ho allegato il codice blocco bisognerebbe aggiungere il codice per la connessione e modificare le query che ci sono sotto ma io non riesco, perché non so dove intervenire.</p>
<p dir="auto">Se puoi aiutarmi mi faresti un grande favore.</p>
]]></description><link>https://dev.connect.gt/post/274557</link><guid isPermaLink="true">https://dev.connect.gt/post/274557</guid><dc:creator><![CDATA[windy]]></dc:creator><pubDate>Sun, 18 Sep 2005 21:29:42 GMT</pubDate></item><item><title><![CDATA[Reply to Codice php da modificare ? on Sun, 18 Sep 2005 20:23:58 GMT]]></title><description><![CDATA[<p dir="auto">Ovviamente non va perchè avrai le tabelle che si chiameranno in modo diverso...</p>
<p dir="auto">Dovresti dirmi i nomi delle tabelle e dei campi dove memorizzi i post.</p>
<p dir="auto">CIAO!</p>
]]></description><link>https://dev.connect.gt/post/274558</link><guid isPermaLink="true">https://dev.connect.gt/post/274558</guid><dc:creator><![CDATA[tuonorosso]]></dc:creator><pubDate>Sun, 18 Sep 2005 20:23:58 GMT</pubDate></item><item><title><![CDATA[Reply to Codice php da modificare ? on Sun, 18 Sep 2005 10:12:18 GMT]]></title><description><![CDATA[<p dir="auto">Ti ringrazio tuono ma non funziona da me, boh non so più cosa fare.</p>
]]></description><link>https://dev.connect.gt/post/274556</link><guid isPermaLink="true">https://dev.connect.gt/post/274556</guid><dc:creator><![CDATA[windy]]></dc:creator><pubDate>Sun, 18 Sep 2005 10:12:18 GMT</pubDate></item><item><title><![CDATA[Reply to Codice php da modificare ? on Fri, 16 Sep 2005 22:33:46 GMT]]></title><description><![CDATA[<p dir="auto">non mi son messo a leggere tutto il codice.</p>
<p dir="auto">Ti faccio vedere quello che uso io con PhpBB2</p>
<pre><code>&lt;?php

            $querystrForum = "SELECT * FROM phpbb_topics ORDER BY topic_id DESC";
            $resultForum = mysql_query&amp;#40;$querystrForum,$dbForum&amp;#41;;
            if &amp;#40;$frowForum = mysql_fetch_array&amp;#40;$resultForum&amp;#41;&amp;#41; &amp;#123;
               $foundForum = true;
               &amp;#125;
           $iForum=0;
               do &amp;#123;
        $iForum=$iForum + 1;
        $topic_title=$frowForum&amp;#91;"topic_title"&amp;#93;;
        $topic_id=$frowForum&amp;#91;"topic_id"&amp;#93;;
      echo "&lt;a  href=/video/viewtopic.php?t=" . $topic_id . " title = \" Video $topic_title\"&gt;" . $topic_title . "&lt;/a&gt;
";

               &amp;#125; while &amp;#40;$frowForum = mysql_fetch_array&amp;#40;$resultForum&amp;#41; and $iForum&lt;20&amp;#41;;

        &amp;#125;

  ?&gt;
</code></pre>
<p dir="auto">Con questo tiro fuori gli ultimi 20 topic scritti nel forum...</p>
<p dir="auto">Spero possa esserti utile</p>
<p dir="auto">Ciao!</p>
]]></description><link>https://dev.connect.gt/post/274555</link><guid isPermaLink="true">https://dev.connect.gt/post/274555</guid><dc:creator><![CDATA[tuonorosso]]></dc:creator><pubDate>Fri, 16 Sep 2005 22:33:46 GMT</pubDate></item></channel></rss>