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

Home » FUDforum » How To » Issue with rdf.php and rdf_parser.php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Issue with rdf.php and rdf_parser.php [message #23335] Sun, 13 March 2005 01:03 Go to previous message
kenjb is currently offline  kenjb   United States
Messages: 67
Registered: September 2004
Karma:
Member
First let me say how much I enjoy using FUD forum. Thank you for all of your hard work and the input of all of your loyal users. Smile

I'm attempting to use the rdf to post last posted messages of my own FUD forum to my main page. Although I seem to have it working and tweaked to match my site as far as output goes, it doesn't seem to be showing the last posted messages. Rather, it shows the messages just starting from the top of the message forum and down by "n".

Here is the top of my rdf_parser.php file:

<?php
/* path to the rdf file you wish to read */
    
$path_to_rdf = "http://www.mysite.com/forums/rdf.php?mode=t&|=1&n=8";
    
/* parsing mode, what are we parsing, 'message', 'topic' or 'user' data */
    
$mode = 'message';
?>


of course "mysite" has the domain name in it instead of what I typed here. I made a small edit to not show the actuall message text here:

<?php
if (!isset($this->reply_to_id) && $this->reply_to_title != $this->title) {
            echo
'&nbsp;<b>In Reply To:</b> <a href="'.$this->forum_url.'?t=rview&amp;th='.$this->topic_id.'&amp;id='.$this->reply_to_id.'" class="body2"> '.$this->reply_to_title.'</a><br />';
        }
        
/* commented out next line to not show the message for side block kjb Also added the <hr> tag below */
        /*echo "<b>Message:</b><br /><blockquote>\n".$this->body."\n</blockquote><br />";*/
        
echo '<hr size="1" color="#000000">';
?>


The output is acceptable in all ways except by NOT showing the last posted messages. I do have a small exception and might suggest that creating a cache for 60 minutes might also be helpful so as not to query the database on every load. Maybe that is included in the code and I'm not aware of it, please advise.

I'll attach a screenshot of the output in the browser.

I can hack some code but I'm not the best php programmer around, so using code that has been posted elsewhere on the FUDforum to show the last posted messages was not helpful to me, although interesting. I did play with that code for a couple of hours and never got that to work, at all.

Thank you in advance for your time
  • Attachment: output.gif
    (Size: 26.48KB, Downloaded 771 times)


kenjb
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: urgent, lost the files under forum directory :(
Next Topic: Renaming index.php and wrapping forums
Goto Forum:
  

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

Current Time: Sat Nov 23 01:12:32 GMT 2024

Total time taken to generate the page: 0.05769 seconds