Case Study: Phorum Article / Comments system
Posted by sheik
October 02, 2006 12:31AM |
Registered: 18 years ago Posts: 32 |
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:
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 03:21AM by DarkKlown.
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 03:21AM by DarkKlown.
October 06, 2006 11:39AM |
Registered: 21 years ago Posts: 687 |
>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
>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

October 06, 2006 11:41AM |
Registered: 21 years ago Posts: 687 |
>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
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

January 02, 2008 04:35PM |
Registered: 17 years ago Posts: 122 |
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
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.