View Full Version : RDF-Feed from your Forums
Dontom
01-26-2003, 10:00 PM
Just change db-details and drop this file into your forums directory - it will output a RDF-file with the last x posts on your forums...
As '&' in URLs is not allowed in RDF put this rewrite rule into the directory you put this script.
RewriteEngine on
RewriteRule ^tl([0-9]+)\.html$ showthread.php?s=&goto=lastpost&threadid=$1[L]
it will send the user to the lastpost of the thread.
Demo:
you need a rdf- parser to view it . Knews under KDE or Netscape > 6, PHP-Nuke, Post-Nuke...
http://www.mtb-news.de/forum/rdf.php
Areku
01-27-2003, 08:58 AM
Excuse me, but what's a RDF file?
Dontom
01-27-2003, 09:22 AM
http://www.w3.org/RDF/
http://www.xml.com/pub/a/2001/01/24/rdf.html
Resource Description Framework (RDF)
Smirks
01-27-2003, 02:44 PM
This shows posts from all forums. Is there any way to restrict it to public forums only? I have a few private forums who's posts I don't want to be displayed in the RDF.
Dontom
01-27-2003, 02:50 PM
i excluded forum # 13 - you can also change the query to
AND forum.forumid <> 13 AND forum.forumid <> 93 etc to exclude 13, 93 and so on...
tom
VeoMorphine
01-27-2003, 04:42 PM
how about a file that can also parse RDF be included here so you can show rdf's on any other page.
Dontom
01-27-2003, 06:13 PM
there already exist lots of scripts to to this...
http://www.hotscripts.com/search/?bool=AND&query=rdf&category=PHP
Some of the larger packeges (postnuke/phpnuke) already have it built in
Tom
I used an other approach to exclude private forums.
See it here: Latest Threads in RSS Feed (need help) (https://vborg.vbsupport.ru/showthread.php?postid=330473#post330473)
Minots
01-27-2003, 11:22 PM
In June 2002 I?ve done this kind of hack/addOn for vbPortal-User.
It works great since 6 month! :D
Request @ vBulletin Germany.com (http://www.vbulletin-germany.com/forum/showthread.php?s=&threadid=2380)
Public Release @ vbPortal.com (http://www.vbportal.com/forums/showthread.php?threadid=5181)
Short time later, Bierhasser (https://vborg.vbsupport.ru/member.php?s=&action=getinfo&userid=6574) (from KOKSA-Community (http://koksaboard.com)) and my person
have done the first version for "vBulletin-without-vbPortal".
Demos:
http://www.d0x.de offers latest news from http://www.minots.de
(PHPNuke <--> vbPortal)
http://www.minots.de offers latest news from http://www.koksaboard.com
(vbPortal <--> vBulletin)
In the attachment of this post you can find 2 files.
backend.php (for vbPortal)
vBbackend.php (for vBulletin)
Install:
Just open the one you need and edit the few configuration-strings. After that, save & upload it to your www-root-folder. ;)
Greetings,
Dontom
01-28-2003, 03:59 AM
Minots,
Fein - ich hatte nach was passendem gesucht aber nix gefunden...
Nice - i searched for something like this but didn't find it - i made it myself...
Tom
Minots
01-28-2003, 04:58 AM
@ Dontom
Ich finde es klasse, dass Du Dir auch die M?he gemacht hast,
etwas derartiges zu coden. Darum sehe mein Posting bitte
nicht als Konkurenz-Angebot, sondern vielmehr als
eine weitere m?gliche L?sung, die Dir frei zur Verf?gung steht. :)
Liebe Gr??e,
It probably adds another query, but how can I also add the forum title to it? Do I also need an extra LEFT JOIN on forum USING(forumid)? Can someone point me in the right direction?
Thanks!
- djr
Originally posted by djr
It probably adds another query, but how can I also add the forum title to it? Do I also need an extra LEFT JOIN on forum USING(forumid)? Can someone point me in the right direction?
Thanks!
- djr
It is already in there!
...votetotal, forum.title AS forumname FROM thread...
You can use it as $rows[forumname].
Sorry, wasn't clear :( I use your version, because it's easier to work with. But you use a LEFT JOIN on forumpermission instead of forum.
- djr
Then you should have asked in the other thread. ;)
$threads=$DB_site->query("SELECT threadid,thread.title AS title,thread.lastpost,thread.replycount,postuserna me,thread.forumid,forum.title AS forumtitle
FROM thread
LEFT JOIN forumpermission USING(forumid)
LEFT JOIN forum ON forum.forumid = thread.forumid
WHERE forumpermission.forumid IS NULL
ORDER BY lastpost DESC LIMIT ".$showthreadnumber);
You should also release yours as hack. Nothing against Dontom's one, but I feel a 'lil insecure when I have to include my db-details in a seperate php-file. I'd rather use a version which uses global.php.
Again, sorry for posting in the wrong thread and muchos thanks for the update query. Works like a charm!
- djr
Sketch
01-28-2003, 05:29 PM
Originally posted by Areku
Excuse me, but what's a RDF file?
:rolleyes:
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=%22RDF+file%22
roxics
02-01-2003, 07:39 PM
Three questions.
1. How does RDF differ from RSS? I'm foggy on these XML filetypes. Or are they pretty much the same thing.
2. Is there a way to get it to just take news from one forum rather then all of them?
3. Why does this hack seem so much simpler then the vbsyndicate hack available?
Here's what I'm looking to do. I have my forums located at one URL and my main site at another. I want to get news from one forum onto the main page of my site. I figured RSS/RDF might be the best (only) way. It would also be a bonus if others could get that news on their site.
If I understand this hack correctly that is what this does right?
Dontom
02-01-2003, 08:06 PM
Originally posted by roxics
Three questions.
1. How does RDF differ from RSS? I'm foggy on these XML filetypes. Or are they pretty much the same thing.
### ahem - no idea ;) very foggy here, too
2. Is there a way to get it to just take news from one forum rather then all of them?
### sure, just change the select -statement to below and change 999 to the forum you want to use
SELECT thread.title AS threadtitle, threadid, dateline, postusername, postuserid, thread.replycount, thread.lastposter, views, thread.forumid AS threadforumid, thread.lastpost AS lastpost, votenum, votetotal, forum.title AS forumname FROM thread LEFT JOIN forum ON forum.forumid = thread.forumid WHERE thread.visible = 1 AND thread.open AND forum.forumid = 999 ORDER BY LASTPOST DESC LIMIT 15
3. Why does this hack seem so much simpler then the vbsyndicate hack available?
### vbsyndicate generates afaik a javascript output, which is written periodically to you server
Here's what I'm looking to do. I have my forums located at one URL and my main site at another. I want to get news from one forum onto the main page of my site. I figured RSS/RDF might be the best (only) way. It would also be a bonus if others could get that news on their site.
### this hack should do this perfectly
If I understand this hack correctly that is what this does right?
roxics
02-01-2003, 11:31 PM
Ok the feed works. My only problem is that if you look at the feed on another site it shows up. But when you click on the headline it takes you to a 404 error on my site.
Here is the feed on another site (ve news up top) (http://www.alienprophecy.com/postnuke/)
Here is my board (http://ve.roxics.com/board)
The forum it's drawing from is called Announcements & Classifieds
roxics
02-01-2003, 11:36 PM
Also it's only showing 5 headlines. Shouldn't it be showing 15?
Dontom
02-02-2003, 04:56 AM
like above:
As '&' in URLs is not allowed in RDF put this rewrite rule into .htaccess in the directory you put this script.
RewriteEngine on
RewriteRule ^tl([0-9]+)\.html$ showthread.php?s=&goto=lastpost&threadid=$1[L]
roxics
02-02-2003, 04:02 PM
Excellent. Great addition! Thank you. :D
But I do have a few more questions.
1. Is there any way to send the entire first post instead of just the post title? That way you can have the entire first post on another site and just have the title link it back to the original thread? Or does rdf not do that?
2. How do you get it to go to the first post rather then the last?
3. Any possiblity of doing multiple rdf streams. One for each forum selected. Maybe /rdf1.php, /rdf2.php, and so on?
Dontom
02-05-2003, 05:45 AM
Originally posted by roxics
Excellent. Great addition! Thank you. :D
But I do have a few more questions.
1. Is there any way to send the entire first post instead of just the post title? That way you can have the entire first post on another site and just have the title link it back to the original thread? Or does rdf not do that?
## i guess this would wor too, but all vb-stuff wouldnt work without more work (Links, images etc)
2. How do you get it to go to the first post rather then the last?
##change the part you have in you .htaccess and leave out the &goto=lastpost
3. Any possiblity of doing multiple rdf streams. One for each forum selected. Maybe /rdf1.php, /rdf2.php, and so on?
sure - upload multiple instances of rdf and just change the queried forumid. or assign the forumid with a variable in the url (e.g. rdf.php?forumid=1)
roxics
05-18-2003, 04:38 PM
As far as number 1 goes. Is that possible to get done? Having the entire post sent with a link back to the post on the forum itself?
I know Livejournal has RSS feeds that send the entire first 25 entires out. But they only do it for their paid users.
The reason this would be so great is so that you can update the news on the front page of your site easily. It would basically allow you to turn any new forum on your board into a new weblog.
I'm interested in it personally because my board is at one URL and my site is at another. So getting news froma news forum on my site to the main page of my site and thus far been impossible.
Not only that but I host several production forums on my board itself for other people. I know they'd be thrilled to have a new option to easily update the from page news of their site from within with forum.
It doesn't matter if any of the smilies show up or anything. Just so long as all the test and the proper formatting show up.
I know it's been a while but just wondered if this was possible and it your were willing to add a little more to the code for this?
thanks
Thomas P
01-07-2004, 06:51 PM
vBackend.php (for vBulletin)
I got an error :
Die XML-Seite kann nicht angezeigt werden
Die XML-Eingabe kann nicht angezeigt werden, wenn Stylesheet XSL verwendet wird. Beheben Sie den Fehler und klicken Sie dann auf Aktualisieren, oder wiederholen Sie den Vorgang sp?ter.
--------------------------------------------------------------------------------
Ein Semikolon wurde erwartet. Fehler beim Bearbeiten der Ressource 'http://www.mcseboard.de/mback.php'. Zeile 18, Position 89
<link>http://www.mcseboard.de/showthread.php?threadid=3379</link>
----------------------------------------------------------------------------------------^
What's going wrong here?
thx,
-Tom
Minots
01-08-2004, 06:49 PM
@Thomas P
Hmm, momentan kann ich Dir zwar nicht genau sagen woran das liegt, aber
sag mir bitte, ob Du folgende Seite problemlos sehen kannst:
http://www.minots.de/backend2.php
Sollte dem so sein, dann werde ich die neue Version meiner backend.php
auf http://d0x.de zum Download anbieten. ;)
P.S.:
Nettes Board, was Du betreibst. :)
Wie w?re es mit einer kleinen "Vorstellung" im Forum http://www.minots.de/forumdisplay.php?forumid=10 ?
Thomas P
01-09-2004, 03:47 PM
Aber gerne, wird gleich gemacht :)
Ja, oberes backend.php sehe ich ... (aber ich nutze ja vbackend.php (?))
Ja, bitte zum downloaden freigeben :)
Danke Dir!!
Minots
01-09-2004, 05:50 PM
OK, habe es der Kategorie "Sonstiges" hinzugef?gt. :)
http://www.d0x.de/downloads.php?cat=11
Minots
01-11-2004, 12:37 PM
Aber gerne, wird gleich gemacht :)
Ja, oberes backend.php sehe ich ... (aber ich nutze ja vbackend.php (?))
Ja, bitte zum downloaden freigeben :)
Danke Dir!!
@Thomas P
Funktioniert es jetzt bei Dir?
Thomas P
01-15-2004, 05:11 PM
Leider nein :(
Schicke Dir eine pm.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.