| Author |
Message |
Black_Skorpio
Joined: Dec 15, 2003
Posts: 56
Location: Gothenburg, Sweden
Status: Offline
|
  Posted:
Feb 15, 2004 - 12:14 AM |
|
Just one suggestion
Why not offer a RSS feed from your forum?
Right now i'm feeding NetNewsWire with your ordinary backend url, bot would love to be able to also read your forum that way....
I have actually added this to my PNphpBB2 forum;
http://www.postnuke-sweden.com/backendforum.php
The code for it is (this can also be found in the PNphpBB.com's forums| Code: | <?php
// File: $Id: backendforum.php.php,v 1.0 2001/09/25 02:20:42 Exp Axe $ $Name: $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Francisco Burzi
// Converted for use with PNphpBB2 by: rudyvarner (http://www.planetrockabilly.com)
// Purpose of file: Syndicate PNphpBB2 Forum Posts
// Modified by: Axe (http://www.reptilerooms.com - October 1st 2003)
// Purpose of file : Syndicate most recently commented on PNphpBB2 threads
// ----------------------------------------------------------------------
global $prefix;
include 'includes/pnAPI.php';
pnInit();
$dbhost = pnConfigGetVar('dbhost');
$dbuname = pnConfigGetVar('dbuname');
$dbpass = pnConfigGetVar('dbpass');
$dbname = pnConfigGetVar('dbname');
$showreplies = true; // Change this to false to not show number of replies to the thread in the thread title
$nukeurl = pnGetBaseURL();
$count = ( isset($HTTP_GET_VARS['c']) ) ? intval($HTTP_GET_VARS['c']) : 25;
$count = ( $count == 0 ) ? 25 : $count;
header("Content-Type: text/xml");
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";
$title = pnVarPrepForDisplay(pnConfigGetVar('sitename'));
$link = pnVarPrepForDisplay(pnGetBaseURL());
$title = stripslashes($title);
echo "<title>$title Forums</title>\n";
$Furl = pnVarPrepForDisplay(pnGetBaseURL()."index.php?name=PNphpBB2");
echo "<link>$Furl</link>\n";
// echo "<link>$nukeurl/index.php?name=PNphpBB2</link>\n";
echo "<description>Forum Topics</description>\n";
$sql = "SELECT t.topic_id, t.topic_title, t.topic_replies, u.user_id AS user2, u2.user_id AS id2, p2.post_time FROM ".$prefix."_phpbb_topics t, ".$prefix."_phpbb_users u, ".$prefix."_phpbb_posts p, ".$prefix."_phpbb_posts p2, ".$prefix."_phpbb_users u2 WHERE t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id ORDER BY p2.post_time desc LIMIT 0,".$count;
$result = mysql_query($sql);
while (list($tid, $subject, $replies, $tposter_id, $lposter_id, $dateline) = mysql_fetch_row($result)) {
$subject = pnVarPrepHTMLDisplay($subject);
// if (strlen($subject) >50 ) { $subject = substr ( $subject,0,50 )." ..."; }
$Purl = pnVarPrepForDisplay(pnGetBaseURL()."index.php?name=PNphpBB2&file=viewtopic&t=$tid");
// $Purl = pnVarPrepForDisplay(pnGetBaseURL()."forumtopic-$tid.html");
if ($showreplies) $subject .= " (".$replies.")";
echo "<item>\n";
echo "<title>".$subject."</title>\n";
echo "<link>$Purl</link>\n";
echo "</item>\n\n";
}
echo "</channel>\n";
echo "</rss>";
?> |
|
_________________ ----===~~oOo~~===----
// Bjarne Varoystrand aka Black Skorpio
Do to others what you want them to do to you
PostNuke Sweden - Swedish PostNuke Support and development |
|
 |
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Feb 15, 2004 - 01:40 AM |
|
Here you go :
http://dev.pnconcept.com/pnphpbb2rss.php
| Code: |
<?php
// File: $Id: backendforum.php.php,v 1.0 2001/09/25 02:20:42 Exp Axe $ $Name: $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file: Francisco Burzi
// Converted for use with PNphpBB2 by: rudyvarner (http://www.planetrockabilly.com)
// Purpose of file: Syndicate PNphpBB2 Forum Posts
// Modified by: Axe (http://www.reptilerooms.com - October 1st 2003)
// Simplified by: Chestnut (http://www.PNConcept.com - Febuary 2004)
// Purpose of file : Syndicate most recently commented on PNphpBB2 threads
// ----------------------------------------------------------------------
global $prefix;
include 'includes/pnAPI.php';
pnInit();
$prefix = pnConfigGetVar('prefix');
$showreplies = true; // Change this to false to not show number of replies to the thread in the thread title
$nukeurl = pnGetBaseURL();
$count = ( isset($HTTP_GET_VARS['c']) ) ? intval($HTTP_GET_VARS['c']) : 25;
$count = ( $count == 0 ) ? 25 : $count;
header("Content-Type: text/xml");
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";
$title = pnVarPrepForDisplay(pnConfigGetVar('sitename'));
$link = pnVarPrepForDisplay(pnGetBaseURL());
$title = stripslashes($title);
echo "<title>$title Forums</title>\n";
$Furl = pnVarPrepForDisplay(pnGetBaseURL()."PNphpBB2.html");
echo "<link>$Furl</link>\n";
echo "<description>Forum Topics</description>\n";
// Database setup to be pnadodb compliant
list($dbconn) = pnDBGetConn();
$tbltopics = $prefix."_phpbb_topics";
$tblusers = $prefix."_phpbb_users";
$tblposts = $prefix."_phpbb_posts";
$sql = "SELECT t.topic_id,
t.topic_title,
t.topic_replies,
u.user_id AS user2,
u2.user_id AS id2,
p2.post_time
FROM $tbltopics t,
$tblusers u,
$tblusers u2,
$tblposts p,
$tblposts p2
WHERE t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
ORDER BY p2.post_time desc LIMIT 0, ".$count;
$result = $dbconn->Execute($sql);
if ($dbconn->ErrorNo() != 0) {
echo $dbconn->ErrorMsg();
} else {
while (list($tid, $subject, $replies, $tposter_id, $lposter_id, $dateline) = $result->fields) {
$result->MoveNext();
$subject = pnVarPrepHTMLDisplay($subject);
$Purl = pnVarPrepForDisplay(pnGetBaseURL()."PNphpBB2-viewtopic-t-$tid.html");
if ($showreplies) $subject .= " (".$replies.")";
echo "<item>\n";
echo "<title>".$subject."</title>\n";
echo "<link>$Purl</link>\n";
echo "</item>\n\n";
}
}
echo "</channel>\n";
echo "</rss>";
?>
|
As you can see, I've made some modification, one for the DB call, and I could've use the SelectLimit... but was too lazy, and the other only to have the same short url setup for my site.  |
|
|
 |
 |
Black_Skorpio
Joined: Dec 15, 2003
Posts: 56
Location: Gothenburg, Sweden
Status: Offline
|
  Posted:
Feb 15, 2004 - 01:56 AM |
|
Your da man
Thats the way to go  |
_________________ ----===~~oOo~~===----
// Bjarne Varoystrand aka Black Skorpio
Do to others what you want them to do to you
PostNuke Sweden - Swedish PostNuke Support and development |
|
 |
 |
Bag
Joined: May 27, 2005
Posts: 1
Status: Offline
|
  Posted:
May 27, 2005 - 05:25 PM |
|
question, how do I keep people from seeing forums topics that they do not have access to? |
|
|
|
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
May 27, 2005 - 11:42 PM |
|
This post is kind of old... didn't they include a rssfeed yet ? |
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
|
|
|