 |
publi |
[RSS] di un forum |
28-02-2006 21:37 |
|
 |
publi |
.grande:maestro.

Registered: Jun 2002
Posts: 885 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 8 Days, 6:51:22 [...]
Status: Offline
Edit | Report | IP: Logged |
[RSS] di un forum
Ho un forum in phpbb come posso creare un RSS dei nuovi argomenti che vengono creati dagli utenti?
__________________
Acchiappasogni
|
28-02-2006 21:37 |
|
|
|  |
 |
yeah |
Direttamente da PhpBB o come aggiunta? ... |
28-02-2006 22:04 |
|
 |
yeah |
.grande:maestro.

Registered: Nov 2003
Posts: 1644 (0.21 al dì)
Location: Cologno Monzese
Corso: Informatica Magistrale
Anno: II
Time Online: 12 Days, 21:36:41 [...]
Status: Offline
Edit | Report | IP: Logged |
Direttamente da PhpBB o come aggiunta?
__________________
?
|
28-02-2006 22:04 |
|
|
|  |
 |
mrcnet |
|
 |
mrcnet |
dsy developer

Registered: Oct 2002
Posts: 1160 (0.14 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno:
Time Online: 9 Days, 5:44:55 [...]
Status: Offline
Edit | Report | IP: Logged |
PHP:
<?php
///////////////////////////////////////////////////////////////////////////////
// ACTIVE_TOPICS.PHP
///////////////////////////////////////////////////////////////////////////////
// Copyright: (C) 2002 Matthijs van de Water <matthijs@beryllium.net>
// Version: 1.1
// Date: 03/02/2002
///////////////////////////////////////////////////////////////////////////////
// Show phpBB 2.0 Active Topics List
// Output format can be any HTML or XML
// This script must be able to access vital phpBB 2.0 configuration scripts
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// CUSTOM SETTINGS
///////////////////////////////////////////////////////////////////////////////
// Amount of active topics to show
define("TOPIC_COUNT", $last);
// Path to the phpBB 2.0 root directory
define("PHPBB_PATH", "../forum/");
// URL to the phpBB 2.0 installation
define("PHPBB_LOCATION", "http://www.mrcnetwork.it/cms/forum/");
// Time format to output the date/time (for format see PHP manual)
define("TIME_FORMAT", "U");
// Title of the phpBB 2.0 installation (used for XML RDF)
// If you don't use this, you forget about this
define("PHPBB_TITLE", "mRcNEtwORK.it");
// Description of the phpBB 2.0 installation (used for XML RDF)
// If you don't use this, you forget about this
define("PHPBB_DESCRIPTION", "Ultimi messaggi Forum");
///////////////////////////////////////////////////////////////////////////////
// Includes of phpBB scripts
$phpbb_root_path = PHPBB_PATH;
if ( !defined('IN_PHPBB') )
{
define('IN_PHPBB', true);
include(PHPBB_PATH . 'extension.inc');
include(PHPBB_PATH . 'config.'.$phpEx);
include(PHPBB_PATH . 'includes/constants.'.$phpEx);
include(PHPBB_PATH . 'includes/db.'.$phpEx);
}
///////////////////////////////////////////////////////////////////////////////
// HTML header start
///////////////////////////////////////////////////////////////////////////////
// make sure this displays as XML
header("Content-type: application/xml");
header("Pragma: no-cache");
echo "<?xml version="1.0" encoding="ISO-8859-1"?>\n\n";
echo "<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"\n";
echo " "http://my.netscape.com/publish/formats/rss-0.91.dtd">\n\n";
echo "<rss version="0.91">\n\n";
echo "<channel>\n";
echo "<title>mRcNEtwORK.it</title>\n<link><a href="http://www.mrcnetwork.it/cms/index.php" target="_blank">http://www.mrcnetwork.it/cms/index.php</a></link>\n<description>Portale in espansione</description>\n";
echo "<language>it</language>\n\n";
?>
<item>
<title><?php echo PHPBB_TITLE; ?></title>
<link><a href="http://www.mrcnetwork.it" target="_blank">http://www.mrcnetwork.it</a></link>
<description><?php echo PHPBB_DESCRIPTION; ?></description>
</item>
<?php
///////////////////////////////////////////////////////////////////////////////
// HTML header end
///////////////////////////////////////////////////////////////////////////////
// sql statement to fetch active topics of public forums
$sql = "SELECT DISTINCT t.topic_title, t.topic_last_post_id, p.post_time, f.forum_name
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f
WHERE
t.forum_id = f.forum_id
AND f.auth_view = " . AUTH_ALL . "
AND p.topic_id = t.topic_id
AND p.post_id = t.topic_last_post_id
ORDER BY p.post_time DESC LIMIT " . TOPIC_COUNT;
$nt_result = $db->sql_query($sql);
if(!$nt_result)
{
die("Failed obtaining list of active topics".mysql_error());
}
else
{
$nt_data = $db->sql_fetchrowset($af_result);
}
if ( count($nt_data) == 0 )
{
die("No topics found");
}
else
{
// $nt_data contains all interesting data
for ($i = 0; $i < count($nt_data); $i++)
{
$title = $nt_data[$i]['topic_title'];
$url = PHPBB_LOCATION . 'viewtopic.' . $phpEx . "?" . POST_POST_URL . "=" . $nt_data[$i]['topic_last_post_id'] . "#" . $nt_data[$i]['topic_last_post_id'];
// As of now you can actually do anything with the data
// I chose to output in XML
///////////////////////////////////////////////////////////////////////////////
// Item HTML start
///////////////////////////////////////////////////////////////////////////////
?>
<item>
<title><?php echo $title; ?></title>
<link><?php echo $url; ?></link>
</item>
<?php
///////////////////////////////////////////////////////////////////////////////
// Item HTML end
///////////////////////////////////////////////////////////////////////////////
}
}
///////////////////////////////////////////////////////////////////////////////
// Footer HTML start
///////////////////////////////////////////////////////////////////////////////
?>
</channel>
</rss>
<?php
///////////////////////////////////////////////////////////////////////////////
// Footer HTML end
///////////////////////////////////////////////////////////////////////////////
// EOF
?>
in pratica non ho fato altro che modificare lo script dei thread attivi, poi ho aggiunto una variabile last in modo che è l'utente stesso a decidere quanti post visualizzare, per capirci:
http://www.mrcnetwork.it/cms/forum/feedrss.php?last=15
comodissimo da aggiungere in firefox con segnalibro live per tenere tutto sotto controllo..
__________________
www.mrcnetwork.it
|
28-02-2006 22:47 |
|
|
|  |
 |
publi |
Mille Grazie :D ... |
28-02-2006 23:31 |
|
 |
publi |
.grande:maestro.

Registered: Jun 2002
Posts: 885 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 8 Days, 6:51:22 [...]
Status: Offline
Edit | Report | IP: Logged |
Mille Grazie 
__________________
Acchiappasogni
|
28-02-2006 23:31 |
|
|
|  |
 |
publi |
mi sto incasinando con i link e i nomi perchè io ... |
01-03-2006 00:15 |
|
 |
publi |
.grande:maestro.

Registered: Jun 2002
Posts: 885 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 8 Days, 6:51:22 [...]
Status: Offline
Edit | Report | IP: Logged |
mi sto incasinando con i link e i nomi perchè io lo uso all'interno di phpNuke O_o
__________________
Acchiappasogni
|
01-03-2006 00:15 |
|
|
|  |
 |
mrcnet |
ma non lo dovevi usare con phpbb? con il nuke puoi ... |
01-03-2006 09:52 |
|
 |
mrcnet |
dsy developer

Registered: Oct 2002
Posts: 1160 (0.14 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno:
Time Online: 9 Days, 5:44:55 [...]
Status: Offline
Edit | Report | IP: Logged |
ma non lo dovevi usare con phpbb? con il nuke puoi farlo sfruttando il backend.php
__________________
www.mrcnetwork.it
|
01-03-2006 09:52 |
|
|
|  |
 |
publi |
come faccio col backend.php? ... |
01-03-2006 09:56 |
|
 |
publi |
.grande:maestro.

Registered: Jun 2002
Posts: 885 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 8 Days, 6:51:22 [...]
Status: Offline
Edit | Report | IP: Logged |
come faccio col backend.php?
__________________
Acchiappasogni
|
01-03-2006 09:56 |
|
|
|  |
 |
mrcnet |
in che senso scusa? il backend sforna già |
01-03-2006 12:04 |
|
 |
mrcnet |
dsy developer

Registered: Oct 2002
Posts: 1160 (0.14 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno:
Time Online: 9 Days, 5:44:55 [...]
Status: Offline
Edit | Report | IP: Logged |
in che senso scusa? il backend sforna già <rss version="0.91">
__________________
www.mrcnetwork.it
|
01-03-2006 12:04 |
|
|
|  |
 |
publi |
il backend mi mostra gli rss degli articoli non i ... |
01-03-2006 12:41 |
|
 |
publi |
.grande:maestro.

Registered: Jun 2002
Posts: 885 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 8 Days, 6:51:22 [...]
Status: Offline
Edit | Report | IP: Logged |
il backend mi mostra gli rss degli articoli non i messaggi del forum...
__________________
Acchiappasogni
|
01-03-2006 12:41 |
|
|
|  |
 |
mrcnet |
appunto ti dicevo che non c'entra nulla.. per quel ... |
01-03-2006 15:36 |
|
 |
mrcnet |
dsy developer

Registered: Oct 2002
Posts: 1160 (0.14 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno:
Time Online: 9 Days, 5:44:55 [...]
Status: Offline
Edit | Report | IP: Logged |
appunto ti dicevo che non c'entra nulla.. per quelli del forum ti basta il codice che ho postato prima
__________________
www.mrcnetwork.it
|
01-03-2006 15:36 |
|
|
|  |
 |
publi |
io invece ho modificato un po' il backend.php e ad ... |
01-03-2006 15:41 |
|
 |
publi |
.grande:maestro.

Registered: Jun 2002
Posts: 885 (0.10 al dì)
Location:
Corso:
Anno:
Time Online: 8 Days, 6:51:22 [...]
Status: Offline
Edit | Report | IP: Logged |
io invece ho modificato un po' il backend.php e adesso funziona come RSS del forum.
Grazie per le dritte, mi sono state utilissime!
__________________
Acchiappasogni
|
01-03-2006 15:41 |
|
|
|  |
 |
mrcnet |
di nulla ;)
... |
01-03-2006 15:54 |
|
 |
mrcnet |
dsy developer

Registered: Oct 2002
Posts: 1160 (0.14 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno:
Time Online: 9 Days, 5:44:55 [...]
Status: Offline
Edit | Report | IP: Logged |
di nulla
ps. adesso dallo in pasto a google come sitemap e sei a posto
__________________
www.mrcnetwork.it
|
01-03-2006 15:54 |
|
|
|  |
 |
All times are GMT. The time now is 13:18. |
|
|
 |
|
 |
|
|
|  |
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|