FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » How to display latest post/topic on another page
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
How to display latest post/topic on another page [message #16366] Tue, 27 January 2004 09:04 Go to next message
d95mbo is currently offline  d95mbo   Sweden
Messages: 3
Registered: April 2003
Karma: 0
Junior Member
I have a homepage.

I have a fud-forum.

I want to display the latest topic from a forum (like "news") on my homepage.

Is there an easy way to do this? My homepage is already php.
Re: How to display latest post/topic on another page [message #16370 is a reply to message #16366] Tue, 27 January 2004 17:52 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Use FUDforum RDF/XML feed.

FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16436 is a reply to message #16366] Fri, 30 January 2004 11:39 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
I have som problems with this funcitonally. If I start with

http://www.elodie-online.com/FUDforum2/rdf.php

I get a german error message which is translated in "XML-Input cannot be shown when using Stylesheet XSL...."

When I start with all parameters as the link in the bottom of the page "RDF Feed Configuration" I get un output in XML but that is not readable for my visitors.

When I start with:

http://www.elodie-online.com/FUDforum2/FUDforum/scripts/rdf_parser.php

I get the following error message:

Fatal error: Call to undefined function: file_get_contents() in /srv/www/htdocs/elodie-online/FUDforum2/FUDforum/scripts/rdf_parser.php on line 215


Finally the question what have I to do to include a working link in the homepage of my site.

[Updated on: Fri, 30 January 2004 11:58]

Report message to a moderator

Re: How to display latest post/topic on another page [message #16441 is a reply to message #16436] Fri, 30 January 2004 15:32 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
1) When I tried to get RDF feed from your site I got an error from the forum indicating that the RDF is disabled. You need to able it.

2) The sample script was written with PHP 4.3.0 in mind, I'll add a work-around for older PHP installs.


FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16483 is a reply to message #16441] Sun, 01 February 2004 14:43 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
I have PHP 4.2.2. on my server. To allow you to test I switched on the rdf functionallity.

Here the other link with the xml output:

http://www.elodie-online.com/FUDforum2/rdf.php?mode=m&l=1&n=10& basic=1
Re: How to display latest post/topic on another page [message #16491 is a reply to message #16483] Tue, 03 February 2004 00:03 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The rdf_parser script has been modified with a work around for older PHPs lacking file_get_contents() function.

FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16500 is a reply to message #16491] Tue, 03 February 2004 11:07 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
Thanks a lot for your changing this file.

But now I have a new problem: I found the difference file in the change log. I understand the changings I have to do principally, but I am too afraid to change the file manually. So I ask you to put the new file in the download section that I could download a working file.
Re: How to display latest post/topic on another page [message #16512 is a reply to message #16500] Tue, 03 February 2004 15:41 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You'll need to wait for the new FUDforum release or you can just download the complete file from the CVS and use that.

FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16515 is a reply to message #16512] Tue, 03 February 2004 16:21 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
I visited http://cvs.prohost.org/c/viewcvs.cgi/ but I cant find a new file rdf.php. I cannot even find files newer the 4 days. Is the adress ok? What must I do to find the file?
Re: How to display latest post/topic on another page [message #16527 is a reply to message #16515] Wed, 04 February 2004 01:03 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Here it is.

FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16532 is a reply to message #16527] Wed, 04 February 2004 09:42 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
Thanks a lot. I exchanged the old rdf_parser.php by your new one. But I must do something wrong because it dosn't work as it should.

Withhttp://www.elodie-online.com/FUDforum2/FUDforum/scripts/rdf_parser.php I get now a blank output and with http://www.elodie-online.com/FUDforum2/rdf.php?mode=m&l=1&n=10& basic=1 I still have the xml output.

So please could you tell me what have I to do exactley.

Thanks for your patience with a dummy user
Eddie
Re: How to display latest post/topic on another page [message #16600 is a reply to message #16532] Mon, 09 February 2004 19:25 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Did you modify the rdf parser script to read data from your forum?

FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16602 is a reply to message #16366] Mon, 09 February 2004 20:47 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
I tryd it out but without success. What must I do?

I have seen there is a string $path_to_rdf and I filled it with the url of the forum, later with the path but nothing works.

[Updated on: Mon, 09 February 2004 20:51]

Report message to a moderator

Re: How to display latest post/topic on another page [message #16612 is a reply to message #16602] Tue, 10 February 2004 00:33 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
That variable should have a URL like
http://www.elodie-online.com/FUDforum2/rdf.php?mode=m&l=1&n=10& basic=1
in it.


FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16622 is a reply to message #16366] Tue, 10 February 2004 10:19 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
I changed as you did say, but I got no output, so I changed the script at the end to see if the string is set correct
Quote:

print $path_to_rdf;
$xml->parse($path_to_rdf);
?>



If I start with the content of the string I get an outpout XML, if I start the script I get just the test output.

Here the two test links:

http://www.elodie-online.com/FUDforum2/FUDforum/scripts/rdf_parser.php

http://www.elodie-online.com/FUDforum2/rdf.php?mode=m&l=1&n=10& basic=1
Re: How to display latest post/topic on another page [message #16632 is a reply to message #16622] Tue, 10 February 2004 16:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Here is what you need to do:

remove the &basic=1 from the URL and insert the URL into the $path_to_rdf variable at the top of the script. once that is done, running that script should output relevant HTML.

(works for me here with your rdf feed.)


FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16633 is a reply to message #16366] Tue, 10 February 2004 16:54 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
With me it dosn't work. If I try out http://www.elodie-online.com/FUDforum2/rdf.php?mode=m&l=1&n=10 I get un other XML-output, but the changed script does not work either. Look at http://www.elodie-online.com/FUDforum2/FUDforum/scripts/rdf_parser.php. You see that ther is no longer the part basic=1 but no output.....
Re: How to display latest post/topic on another page [message #16634 is a reply to message #16633] Tue, 10 February 2004 17:01 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I am not sure what you did, the script you are running is printing some URL instead of the data.

FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16636 is a reply to message #16366] Tue, 10 February 2004 17:06 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
As I told this morning I changed the code of the script so that one can see the content of the string $path_to_rdf which I have defined at the top of this script.

TOP:

Quote:

$path_to_rdf = "http://www.elodie-online.com/FUDforum2/rdf.php?mode=m&l=1&n=10";


BOTTOM:

Quote:

print $path_to_rdf;
$xml->parse($path_to_rdf);
?>


I did it that you can control what I have done.
Re: How to display latest post/topic on another page [message #16637 is a reply to message #16636] Tue, 10 February 2004 17:13 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, I can tell you is that it works for me...

It could be that your webserver is rejecting local connection or something don't know... But I tried your RDF output with rdf_parser.php from CVS and it worked fine...


FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16638 is a reply to message #16366] Tue, 10 February 2004 17:25 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
I send you back my changed file. Could you please review if I did what I should have done. If yes could you please compare that script file with your actual script file or could you try out this script on your server.

What means the server is rejecting local connection. If there is anything to do with the apache configuration tell me what and I will try it out.
Re: How to display latest post/topic on another page [message #16639 is a reply to message #16638] Tue, 10 February 2004 17:35 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I ran your script and got the following (correct) HTML output:
Elodie <a href="http://www.elodie-online.com/FUDforum2/index.php?t=rview&amp;frm_id=6">teste</a> &raquo; <a href="http://www.elodie-online.com/FUDforum2/index.php?t=rview&amp;th=5&amp;goto=7">teste</a><br /><b>Author: </b><a href="http://www.elodie-online.com/FUDforum2/index.php?t=usrinfo&amp;id=2">eddie</a><br /><b>Message:</b><br /><blockquote>
test<a href="http://www.star-academy3.org" target="_blank">http://www.star-academy3.org</a><br /> <img src="images/smiley_icons/icon_eek.gif" border=0 alt="Shocked"> <img src="images/smiley_icons/icon_surprised.gif" border=0 alt="Surprised"> <img src="images/smiley_icons/icon_smile.gif" border=0 alt="Smile"> <img src="images/smiley_icons/icon_cry.gif" border=0 alt="Crying or Very Sad"> <img src="images/smiley_icons/icon_evil.gif" border=0 alt="Evil or Very Mad"> <img src="images/smiley_icons/icon_twisted.gif" border=0 alt="Twisted Evil"> <img src="images/smiley_icons/icon_rolleyes.gif" border=0 alt="Rolling Eyes"> <img src="images/smiley_icons/icon_mad.gif" border=0 alt="Mad"> <img src="images/smiley_icons/icon_lol.gif" border=0 alt="Laughing"> <img src="images/smiley_icons/icon_lol.gif" border=0 alt="Laughing"> <img src="images/smiley_icons/icon_lol.gif" border=0 alt="Laughing"> <img src="images/smiley_icons/icon_lol.gif" border=0 alt="Laughing">
</blockquote><br />


FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16640 is a reply to message #16366] Tue, 10 February 2004 17:39 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
OK it must be anythin on my server - but what??? Have you any idea how to change the server configuration?

[Updated on: Tue, 10 February 2004 17:39]

Report message to a moderator

Re: How to display latest post/topic on another page [message #16642 is a reply to message #16640] Tue, 10 February 2004 17:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I can only guess at what could be the problem, since the script itself is fine and so is the rdf feed itself. My only guess atm is that your server maybe rejecting connections from itself. Which is why the script running on yourdomain.com cannot fetch rdf feed from yourdomain.com.

FUDforum Core Developer
Re: How to display latest post/topic on another page [message #16644 is a reply to message #16366] Tue, 10 February 2004 17:53 Go to previous messageGo to next message
Eddie is currently offline  Eddie   Germany
Messages: 40
Registered: March 2003
Karma: 0
Member
I have several virtual hosts. I tested the script under another domain but on the same server:

http://www.kreutzonline.com/rdf_parser.php. The result is the same.

[Updated on: Tue, 10 February 2004 17:57]

Report message to a moderator

Re: How to display latest post/topic on another page [message #16645 is a reply to message #16644] Tue, 10 February 2004 18:00 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
It is likely the blocking is done for all local IPs...

Try this, download the rdf page and then use the script on the downloaded xml.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: wrapping smilies
Next Topic: Using fudforum throughout a website
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 14:09:44 GMT 2024

Total time taken to generate the page: 0.03059 seconds