@ 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.
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?
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!
PHP Code:
...votetotal, forum.title AS forumname FROM thread...
$threads=$DB_site->query("SELECT threadid,thread.title AS title,thread.lastpost,thread.replycount,postusername,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!
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?
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?
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.