Latest X Posts in a templated Phorum-Page
Posted by Thomas Seifert
Re: Latest X Posts in a templated Phorum-Page May 16, 2005 05:38PM |
Registered: 19 years ago Posts: 135 |
ts77 Wrote:
-------------------------------------------------------
> irob, can you tell us what you changed/enhanced?
ok, I edited [phorum.org]
-------------------------------------------------------
> irob, can you tell us what you changed/enhanced?
ok, I edited [phorum.org]
May 16, 2005 06:36PM |
Registered: 21 years ago Posts: 793 |
July 10, 2005 01:19PM |
Registered: 21 years ago Posts: 793 |
Re: phorum 5.0.16 - newest V 1.1. (download) July 10, 2005 06:08PM |
Registered: 22 years ago Posts: 1,076 |
rheo Wrote:
-------------------------------------------------------
> > hm. i guess we'll just have to install it to
> find out.
>
>
> anyone thought about doing a "most recent threads"
> perhaps that would only list the threads most
> recently posted to rather than every post?
Well I have tried a little, but there's no easy way of getting that information. Or the way I would like to get it.
---
-=[ Panu ]=-
-------------------------------------------------------
> > hm. i guess we'll just have to install it to
> find out.
>
>
> anyone thought about doing a "most recent threads"
> perhaps that would only list the threads most
> recently posted to rather than every post?
Well I have tried a little, but there's no easy way of getting that information. Or the way I would like to get it.
---
-=[ Panu ]=-
How to include the recent threads September 05, 2005 04:35PM |
Registered: 18 years ago Posts: 34 |
The script newest10.php working perfectly.
But how can I get the recent threads on the frontpage of my side, I have tried to include the newest10.php page by doing this:
<?php
include("newest10.php");
?>
but then I get this error:
Warning: Cannot modify header information - headers already sent by (output started at .....phorum/new.php:2) in ....../phorum/include/users.php on line 70
How can I get the newest threads on the front of my webpage?
Troels
But how can I get the recent threads on the frontpage of my side, I have tried to include the newest10.php page by doing this:
<?php
include("newest10.php");
?>
but then I get this error:
Warning: Cannot modify header information - headers already sent by (output started at .....phorum/new.php:2) in ....../phorum/include/users.php on line 70
How can I get the newest threads on the front of my webpage?
Troels
Re: How to include the recent threads September 06, 2005 10:32AM |
Registered: 22 years ago Posts: 1,076 |
dragonbook Wrote:
-------------------------------------------------------
> The script newest10.php working perfectly.
>
> But how can I get the recent threads on the
> frontpage of my side, I have tried to include the
> newest10.php page by doing this:
[phorum.org]
---
-=[ Panu ]=-
-------------------------------------------------------
> The script newest10.php working perfectly.
>
> But how can I get the recent threads on the
> frontpage of my side, I have tried to include the
> newest10.php page by doing this:
[phorum.org]
---
-=[ Panu ]=-
Re: Latest X Posts in a templated Phorum-Page October 02, 2005 07:14AM |
Registered: 18 years ago Posts: 4 |
How do I modify newest11.php to display the SUBJECT data for PARENT_ID = 0 for each item in the list?
I want the display to not only list the message subject but also the subject of the fist message in the thread.
The subsequent messages subject lines in a thread quite often do not bear any obvious relation to the original subject of the thread. I want to be able to display the original subject along with the current message subject to help identify messages that might be of interest to the user.
I know I have to modify the newest11.tpl file to display the information and I have to modify the newest11.php file to collect the data but I am having trouble getting it right.
For each message I think I would have to look up the SUBJECT for THREAD number, FORUM number, and Parent_ID==0
Would this put an extreme load on the system?
The output I want would look like this (without the dots):
--------------------------------------------------------
Subject of first message in thread
...Subject of this message..............Author......Date
--------------------------------------------------------
Subject of first message in thread
...Subject of this message..............Author......Date
--------------------------------------------------------
Subject of first message in thread
...Subject of this message..............Author......Date
--------------------------------------------------------
Thank you
I want the display to not only list the message subject but also the subject of the fist message in the thread.
The subsequent messages subject lines in a thread quite often do not bear any obvious relation to the original subject of the thread. I want to be able to display the original subject along with the current message subject to help identify messages that might be of interest to the user.
I know I have to modify the newest11.tpl file to display the information and I have to modify the newest11.php file to collect the data but I am having trouble getting it right.
For each message I think I would have to look up the SUBJECT for THREAD number, FORUM number, and Parent_ID==0
Would this put an extreme load on the system?
The output I want would look like this (without the dots):
--------------------------------------------------------
Subject of first message in thread
...Subject of this message..............Author......Date
--------------------------------------------------------
Subject of first message in thread
...Subject of this message..............Author......Date
--------------------------------------------------------
Subject of first message in thread
...Subject of this message..............Author......Date
--------------------------------------------------------
Thank you
Re: Latest X Posts in a templated Phorum-Page October 02, 2005 05:23PM |
Registered: 22 years ago Posts: 1,076 |
cwayne Wrote:
-------------------------------------------------------
> How do I modify newest11.php to display the
> SUBJECT data for PARENT_ID = 0 for each item in
> the list?
>
> I want the display to not only list the message
> subject but also the subject of the fist message
> in the thread.
> Subject of first message in thread
> ...Subject of this
> message..............Author......Date
Check the link above your message, you can use the queries in that script to get the result you want.
---
-=[ Panu ]=-
-------------------------------------------------------
> How do I modify newest11.php to display the
> SUBJECT data for PARENT_ID = 0 for each item in
> the list?
>
> I want the display to not only list the message
> subject but also the subject of the fist message
> in the thread.
> Subject of first message in thread
> ...Subject of this
> message..............Author......Date
Check the link above your message, you can use the queries in that script to get the result you want.
---
-=[ Panu ]=-
Re: Latest X Posts in a templated Phorum-Page October 03, 2005 05:20AM |
Registered: 18 years ago Posts: 4 |
Panu,
Thank you for your post.
I have tried to apply the queries you cited, but have not been able to figure it out. I seem to have it almost right, but I get the current subject twice rather than the original subject and current subject.
Could you tell me exactly which part I should place in newest11.php and where to put it?
Much appreciated,
Wayne
Thank you for your post.
I have tried to apply the queries you cited, but have not been able to figure it out. I seem to have it almost right, but I get the current subject twice rather than the original subject and current subject.
Could you tell me exactly which part I should place in newest11.php and where to put it?
Much appreciated,
Wayne
Re: Latest X Posts in a templated Phorum-Page October 03, 2005 11:41AM |
Registered: 22 years ago Posts: 1,076 |
cwayne Wrote:
-------------------------------------------------------
> I have tried to apply the queries you cited, but
> have not been able to figure it out. I seem to
> have it almost right, but I get the current
> subject twice rather than the original subject and
> current subject.
select * from $table where parent_id = 0 and status = 2 order by datestamp desc limit $number
Is the query. But...
> Could you tell me exactly which part I should
> place in newest11.php and where to put it?
newest11.php uses Phorums internal API to get the information, and the script uses direct sql queries so there a fundamental difference and propably they can't be combined in a easy way.
I can't remember if there's a api call to get thread starter for a message, if not then you have to code it yourself :) It isn't that hard I think, try
I think you can put this before the last }
May or may not work.
You have to have code that enables direct mysql connection somewhere before the queries, check the script for an example.
---
-=[ Panu ]=-
Edited 1 time(s). Last edit at 10/03/2005 11:42AM by Panu.
-------------------------------------------------------
> I have tried to apply the queries you cited, but
> have not been able to figure it out. I seem to
> have it almost right, but I get the current
> subject twice rather than the original subject and
> current subject.
select * from $table where parent_id = 0 and status = 2 order by datestamp desc limit $number
Is the query. But...
> Could you tell me exactly which part I should
> place in newest11.php and where to put it?
newest11.php uses Phorums internal API to get the information, and the script uses direct sql queries so there a fundamental difference and propably they can't be combined in a easy way.
I can't remember if there's a api call to get thread starter for a message, if not then you have to code it yourself :) It isn't that hard I think, try
select subject from messages where message_id thread = $row['thread']
I think you can put this before the last }
$query = "select subject from messages where message_id = ".$row['thread']; $res = mysql_query($query); while($srow = mysql_fetch_assoc($res)){ $rows[$key]['subject'] = $srow['subject']; }
May or may not work.
You have to have code that enables direct mysql connection somewhere before the queries, check the script for an example.
---
-=[ Panu ]=-
Edited 1 time(s). Last edit at 10/03/2005 11:42AM by Panu.
Sorry, only registered users may post in this forum.