Author |
Message |
brentnhunter
Client
Joined: Sep 10, 2004
Posts: 166
|
Posted:
Tue Nov 02, 2004 1:04 pm |
|
I'm not sure if this is correct or not, but it seems that the backend.php file only allows other sites to read news articles from your site. Assuming this is the case (and someone please correct me if I'm wrong), is there something that can be used to allow other sites to read posts made in the forum areas?
Thank you!
Brent Hunter |
|
|
|
|
Raven
Site Admin/Owner
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Tue Nov 02, 2004 1:13 pm |
|
You mean like I have on my front page in the drop down block? |
|
|
|
|
brentnhunter
|
Posted:
Tue Nov 02, 2004 1:19 pm |
|
|
|
|
brentnhunter
|
Posted:
Tue Nov 02, 2004 1:22 pm |
|
By the way, I also tried backendforums.php, which successfully appears on My Yahoo, but if I click on any of the news articles, it gives a page not found error trying to display an HTML page that it is looking for on my site but that isn't there. |
|
|
|
|
Raven
|
Posted:
Tue Nov 02, 2004 1:31 pm |
|
In the Forums block in the center. See the xml/sybdication image? |
|
|
|
|
JRSweets
Worker
Joined: Aug 06, 2004
Posts: 192
|
Posted:
Tue Nov 02, 2004 2:50 pm |
|
Code:<?php
include("mainfile.php");
header("Content-Type: text/xml");
$sql = "SELECT t.topic_id, t.topic_title FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id and f.auth_view=0 ORDER BY t.topic_last_post_id DESC LIMIT 10";
if (!result) {
echo "An error occured";
} else {
$result = $db->sql_query($sql);
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>".htmlspecialchars($sitename)."</title>\n";
echo "<link>http://$nukeurl</link>\n";
echo "<description>".htmlspecialchars($backend_title)."</description>\n";
echo "<language>$backend_language</language>\n\n";
while ($row = $db->sql_fetchrow($result)) {
echo "<item>\n";
echo "<title>".htmlspecialchars($row[topic_title])."</title>\n";
echo "<link>http://$nukeurl/modules.php?name=Forums&file=viewtopic&t=$row[topic_id]</link>\n";
echo "</item>\n\n";
}
echo "</channel>\n";
echo "</rss>";
}
?>
|
Save this file as forumbackend.php
I think the error you are getting is because the one you are using is googletapped. So the links end in .html |
|
|
|
|
brentnhunter
|
Posted:
Tue Nov 02, 2004 3:51 pm |
|
Hey there Jr, thanks. I tried this on my site. I am getting closer but it still isn't working. Now after I added the RSS URL to My Yahoo and I click on one of the links, it still shows a page not found error. However this time the reason is different -- this time it looks like it has the forum URL correct but it has a long Yahoo URL preceding it followed by my forum URL. Any ideas on what to do next?
Brent
http://www.EarthCommCenter.com |
|
|
|
|
JRSweets
|
Posted:
Tue Nov 02, 2004 5:14 pm |
|
|
|
|
brentnhunter
|
Posted:
Tue Nov 02, 2004 5:38 pm |
|
|
|
|
brentnhunter
|
Posted:
Tue Nov 02, 2004 9:19 pm |
|
Raven wrote: | In the Forums block in the center. See the xml/sybdication image? |
I found it now. I didn;t realize you were calling that a dropdown but once I clicked on the Show/Hide button I see it. Anyway no that's not exactly what I was referring to. I want people on other websites to be able to pull a feed from my site but not for news articles, for posts in the forum area. The forumbackend.php script above seems to work but not completely. I'm not sure if the problem is at Yahoo or what though, since the topics shows up on my My Yahoo page just great, so I know it is reading the forum feed correctly but when I click on the link from there, it inserts a Yahoo URL before my URL and it breaks. But if I strip away the Yahoo part of the URL, it leaves the correct URL to the forum post. Do you have any way of reading it from your site to see if it works for you? It is http://www.EarthCommCenter.com/forumbackend.php
Thanks,
Brent |
|
|
|
|
Raven
|
Posted:
Tue Nov 02, 2004 10:04 pm |
|
That's what that does - If you point your headlines to that url that pulls my forum headlines. |
|
|
|
|
JRSweets
|
Posted:
Tue Nov 02, 2004 10:09 pm |
|
I would try one of two things...
Either goto you nuke admin and go to the configuration and remove the http:// in front of your site url, or take the code I posted and change all instances of
and change it to just
If you goto http://www.earthcommcenter.com/forumbackend.php you will see it shows the link with an extra http://
Code:<link>http://http://www.EarthCommCenter.com/modules.php?name=Forums&file=viewtopic&t=13</link>
|
|
|
|
|
|
brentnhunter
|
Posted:
Tue Nov 02, 2004 10:18 pm |
|
Raven wrote: | That's what that does - If you point your headlines to that url that pulls my forum headlines. |
I thought that my forumbackend.php script is there so that others can pull MY forums into THEIR site. Is that not what it does? |
|
|
|
|
brentnhunter
|
Posted:
Tue Nov 02, 2004 10:30 pm |
|
JRSweets wrote: |
I would try one of two things...
Either goto you nuke admin and go to the configuration and remove the http:// in front of your site url, or take the code I posted and change all instances of
and change it to just
If you goto http://www.earthcommcenter.com/forumbackend.php you will see it shows the link with an extra http://
Code:<link>http://http://www.EarthCommCenter.com/modules.php?name=Forums&file=viewtopic&t=13</link>
| |
Thanks jrsweets. I removed the http:// from the code in two places. I reloaded the file in My Yahoo but it still shows the same URL. But I think it does that because it caches the data, so I may not be able to test this again until sometime tomorrow when it refreshes my data. That is why i keep asking if there is any way someone can try to add the feed to their site, to see if it works. If anyone would like to do this (*smile*), the URL is:
http://www.EarthCommCenter.com/forumbackend.php
Thank you!
Brent |
|
|
|
|
Raven
|
Posted:
Tue Nov 02, 2004 11:00 pm |
|
brentnhunter wrote: | Raven wrote: | That's what that does - If you point your headlines to that url that pulls my forum headlines. |
I thought that my forumbackend.php script is there so that others can pull MY forums into THEIR site. Is that not what it does? | We're getting confused here. At some point you asked for a script to pull YOUR forums headline. I then replied asking if you meant like what I do with that syndication button. I was then going to post the script. |
|
|
|
|
brentnhunter
|
Posted:
Tue Nov 02, 2004 11:06 pm |
|
Sorry Raven, all I want to do is have a way for people to be able to read my forum posts without having to come to my site. I guess that is like what you are doing, I think. I saved the forumbackend.php script and to test if it worked, I used my account on Yahoo to pull the feed from my site. It read it OK, but when I click on the links, it gives me an invalid URL as I have described above. Does this make more sense? |
|
|
|
|
Raven
|
Posted:
Tue Nov 02, 2004 11:16 pm |
|
Put your backend link in your Your Account news reader and see if it reads ok. |
|
|
|
|
brentnhunter
|
Posted:
Tue Nov 02, 2004 11:21 pm |
|
Great idea, it works!
Thank you! |
|
|
|
|
|