Firefox PHP

Case Study: Phorum Article / Comments system

Posted by sheik 
Re: Case Study: Phorum Article / Comments system
October 02, 2006 06:31AM
great walkthru, very helpful in explaining how i could easily convert our existing forum into phorum's format.

now to use the article for what it was designed for.. moving our comments system into phorum =D

Btw instead of rewriting a whole new read.php to view all the comments:

// this is a hardcoded thread id for example purposes
$message_id = '42334';

$array = phorum_db_get_messages($message_id);

$messages = phorum_hook("read", $array);

// format messages
$messages = phorum_format_messages($messages);

// I don't include this because i've already sent my heading information, tho you might 
// want to and then setup a template for the articles (this also calls in the required 
// css stuff.
//
//    $PHORUM["DATA"]["MESSAGE"] = $messages[$message_id];
//    $PHORUM["DATA"]["MESSAGES"] = $messages;
//
//    include phorum_get_template("header");
//    phorum_hook("after_header");
//    include phorum_get_template("read");

With the above code you now have an array $messages that contains all messages from your thread for you to insert as comments into your html output.



Edited 1 time(s). Last edit at 10/02/2006 09:21AM by DarkKlown.
Re: Case Study: Phorum Article / Comments system
October 06, 2006 05:39PM
>Just checking this, does this still work good for ya with
>the latest version of Phorum and the 5.x followers as well?

Yes, my code didn't need altering at all when I upgraded to 5.16a
This must mean that all the API calls I mention have not changed in basic operation.
Additionally, my code has been expanded beyond the original article, so comments are displayed inline to reviews etc, and all this continued to work as well.

You can take a look at the current site to see how everything is integrated.

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: Case Study: Phorum Article / Comments system
October 06, 2006 05:41PM
>Btw instead of rewriting a whole new read.php to view all the comments:

Yes, I believe I did something similar to output the comments.
I can dig out my code if anyone needs it, but from memory it didn't take long to figure out at all.

/\dam

--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: Case Study: Phorum Article / Comments system
January 02, 2008 10:35PM
Hey Adam,

This is what I intend on doing with Phorum on my sites, I dislike blog type comments.

Just wanted to thank you for taking the time to post this and saving me a lot of researching.

--
Bert Garcia - When all you have is a keyboard
Sorry, only registered users may post in this forum.

Click here to login