Firefox PHP

How to show a list of latest topics of my Phorum on another Web page

Posted by jack333 
How to show a list of latest topics of my Phorum on another Web page
February 14, 2009 09:02AM
Hi guys,

I have setup my phorum. My Phorum is part of a larger website. On the website main page, I would like to show the last 5 or 10 last topics of my Phorum so that Users can click directly from there.

Any ideas how to do this?

Thank you,

Philippe



Edited 1 time(s). Last edit at 02/14/2009 09:02AM by jack333.
Re: How to show a list of latest topics of my Phorum on another Web page
February 14, 2009 10:59AM
Re: How to show a list of latest topics of my Phorum on another Web page
February 14, 2009 11:04AM
Here is some code I have written to print out a block of recent messages. I have to thank Maurice Makaay for his work with the code to actually retrieve the messages from the database.

The only variables you need to change are in lines 6-30. I tried to add enough comments to make the variables clear, but you can let me know if you have any questions.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Attachments:
open | download - recent_messages.php (6.9 KB)
Re: How to show a list of latest topics of my Phorum on another Web page
February 15, 2009 05:03PM
Dear Joe,

Thank you very much for your code. I have modified it a little bit and I have achieved something nice for my website to show the recent messages. It works!

Perhaps that later I will adapt it again to show the recent topics instead of recent messages. However I think that for now it is very good like that.

Thank you,

Philippe
Re: How to show a list of latest topics of my Phorum on another Web page
February 15, 2009 05:43PM
That can easily be achieved by changing this variable:
Language: PHP
  1. $view_type = 0;
  2. // 0 for posts, 1 for threads
Perhaps that should have read "0 for messages, 1 for topics"


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: How to show a list of latest topics of my Phorum on another Web page
February 25, 2009 10:28PM
How do we get the links to open in a new window.

I am using an iframe to show this php page on my sites homepage, and currently, if I click on the recent messages links, they open inside the iframe. I would rather they open either in a new page, or the whole page, not just the uframe window.

What do I need to add to the code to make this happen?

Thanks.
Sorry, only registered users may post in this forum.

Click here to login