Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™
Author Message
brentnhunter
Client


Joined: Sep 10, 2004
Posts: 166

PostPosted: Tue Nov 02, 2004 1:04 pm Reply with quote

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
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Tue Nov 02, 2004 1:13 pm Reply with quote

You mean like I have on my front page in the drop down block?
 
View user's profile Send private message
brentnhunter
PostPosted: Tue Nov 02, 2004 1:19 pm Reply with quote

I'm not sure what drop-down block you are referring to. On the front page of Only registered users can see links on this board! Get registered or login! The only drop down I see is for selecting the theme. ???
 
brentnhunter
PostPosted: Tue Nov 02, 2004 1:22 pm Reply with quote

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
PostPosted: Tue Nov 02, 2004 1:31 pm Reply with quote

In the Forums block in the center. See the xml/sybdication image?
 
JRSweets
Worker
Worker


Joined: Aug 06, 2004
Posts: 192

PostPosted: Tue Nov 02, 2004 2:50 pm Reply with quote

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&amp;file=viewtopic&amp;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
 
View user's profile Send private message
brentnhunter
PostPosted: Tue Nov 02, 2004 3:51 pm Reply with quote

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 Only registered users can see links on this board! Get registered or login!
 
JRSweets
PostPosted: Tue Nov 02, 2004 5:14 pm Reply with quote

I am not sure. I have never used My Yahoo. The link should show like this: Only registered users can see links on this board! Get registered or login!

Post what the link looks like here.
 
brentnhunter
PostPosted: Tue Nov 02, 2004 5:38 pm Reply with quote

Here is the URL it tries to go to:
Only registered users can see links on this board! Get registered or login!

Like I said in my previous post, there is a bunch of stuff from Yahoo being inserted before my URL, which is:
Only registered users can see links on this board! Get registered or login!

And that part works. Is there any way anyone can see if this works for you?
Only registered users can see links on this board! Get registered or login!

Thank you!

Brent
 
brentnhunter
PostPosted: Tue Nov 02, 2004 9:19 pm Reply with quote

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 Only registered users can see links on this board! Get registered or login!

Thanks,

Brent
 
Raven
PostPosted: Tue Nov 02, 2004 10:04 pm Reply with quote

That's what that does Smile - If you point your headlines to that url that pulls my forum headlines.
 
JRSweets
PostPosted: Tue Nov 02, 2004 10:09 pm Reply with quote

brentnhunter wrote:
Here is the URL it tries to go to:
Only registered users can see links on this board! Get registered or login!

Like I said in my previous post, there is a bunch of stuff from Yahoo being inserted before my URL, which is:
Only registered users can see links on this board! Get registered or login!

And that part works. Is there any way anyone can see if this works for you?
Only registered users can see links on this board! Get registered or login!

Thank you!

Brent


I would try one of two things...

Either goto you nuke admin and go to the configuration and remove the Only registered users can see links on this board! Get registered or login! in front of your site url, or take the code I posted and change all instances of
Code:
http://$nukeurl

and change it to just
Code:
$nukeurl


If you goto Only registered users can see links on this board! Get registered or login! you will see it shows the link with an extra Only registered users can see links on this board! Get registered or login!
Code:
<link>http://http://www.EarthCommCenter.com/modules.php?name=Forums&file=viewtopic&t=13</link> 

 
brentnhunter
PostPosted: Tue Nov 02, 2004 10:18 pm Reply with quote

Raven wrote:
That's what that does Smile - 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
PostPosted: Tue Nov 02, 2004 10:30 pm Reply with quote

JRSweets wrote:
brentnhunter wrote:
Here is the URL it tries to go to:
Only registered users can see links on this board! Get registered or login!

Like I said in my previous post, there is a bunch of stuff from Yahoo being inserted before my URL, which is:
Only registered users can see links on this board! Get registered or login!

And that part works. Is there any way anyone can see if this works for you?
Only registered users can see links on this board! Get registered or login!

Thank you!

Brent


I would try one of two things...

Either goto you nuke admin and go to the configuration and remove the Only registered users can see links on this board! Get registered or login! in front of your site url, or take the code I posted and change all instances of
Code:
http://$nukeurl

and change it to just
Code:
$nukeurl


If you goto Only registered users can see links on this board! Get registered or login! you will see it shows the link with an extra Only registered users can see links on this board! Get registered or login!
Code:
<link>http://http://www.EarthCommCenter.com/modules.php?name=Forums&file=viewtopic&t=13</link> 



Thanks jrsweets. I removed the Only registered users can see links on this board! Get registered or login! 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:
Only registered users can see links on this board! Get registered or login!

Thank you!

Brent
 
Raven
PostPosted: Tue Nov 02, 2004 11:00 pm Reply with quote

brentnhunter wrote:
Raven wrote:
That's what that does Smile - 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
PostPosted: Tue Nov 02, 2004 11:06 pm Reply with quote

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
PostPosted: Tue Nov 02, 2004 11:16 pm Reply with quote

Put your backend link in your Your Account news reader and see if it reads ok.
 
brentnhunter
PostPosted: Tue Nov 02, 2004 11:21 pm Reply with quote

Great idea, it works!

Thank you!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©