Latest X Posts in a templated Phorum-Page
Posted by Thomas Seifert
Re: Latest X Posts in a templated Phorum-Page September 16, 2004 03:27PM |
Admin Registered: 22 years ago Posts: 9,240 |
noe, thats not as simple as it sounds and numerous queries are needed to achieve that.
you would first need to retrieve all newflags (which is an array of all posts read) and then you have to retrieve the number of messages you wanted which are NOT in this array already and which have no message-id less than the minimum read-id in the forum.
so a lot of stuff to think about, have fun ;).
Thomas Seifert
you would first need to retrieve all newflags (which is an array of all posts read) and then you have to retrieve the number of messages you wanted which are NOT in this array already and which have no message-id less than the minimum read-id in the forum.
so a lot of stuff to think about, have fun ;).
Thomas Seifert
Re: Latest X Posts in a templated Phorum-Page September 21, 2004 06:20AM |
Registered: 20 years ago Posts: 13 |
Re: Latest X Posts in a templated Phorum-Page September 21, 2004 07:04AM |
Registered: 23 years ago Posts: 1,076 |
noe Wrote:
-------------------------------------------------------
> Does anyone know how to hack this script, so that
> there are the latest x *unread* Posts shown only?
>
> Would be great if anyone could help me!
You may want to check my mod:
[phorum.org]
that shows count of new mesages in a thread. Not a rocket science (yes I can say that after 5 bugfix versions) :) so I think it can be adopted to Thomas's mod easily?
---
-=[ Panu ]=-
-------------------------------------------------------
> Does anyone know how to hack this script, so that
> there are the latest x *unread* Posts shown only?
>
> Would be great if anyone could help me!
You may want to check my mod:
[phorum.org]
that shows count of new mesages in a thread. Not a rocket science (yes I can say that after 5 bugfix versions) :) so I think it can be adopted to Thomas's mod easily?
---
-=[ Panu ]=-
Re: Latest X Posts in a templated Phorum-Page September 21, 2004 07:18AM |
Admin Registered: 22 years ago Posts: 9,240 |
Re: Latest X Posts in a templated Phorum-Page September 21, 2004 09:38AM |
Registered: 23 years ago Posts: 1,076 |
ok, sorry, but anyway I think the code can help to get the messageid's of the unread messages. (and that isn't that difficult as I mentioned).
So if your mode shows a list of messages based on message id's and my mod has the code to provide a list of messageid's then combining those to equal the solution to his problem? I haven't looked at your mod thou so maybe I'm wrong...
---
-=[ Panu ]=-
So if your mode shows a list of messages based on message id's and my mod has the code to provide a list of messageid's then combining those to equal the solution to his problem? I haven't looked at your mod thou so maybe I'm wrong...
---
-=[ Panu ]=-
Re: Latest X Posts in a templated Phorum-Page September 22, 2004 02:16PM |
Registered: 20 years ago Posts: 50 |
Ok, sounds like a lot of work...;)
I found this when searching in the Phorum 3 phorums, (that would be exactly what i'm looking for), but I think it won't work with Phorum 5 anymore...(?).
[phorum.org]
Edited 2 time(s). Last edit at 09/22/2004 02:18PM by noe.
I found this when searching in the Phorum 3 phorums, (that would be exactly what i'm looking for), but I think it won't work with Phorum 5 anymore...(?).
[phorum.org]
Edited 2 time(s). Last edit at 09/22/2004 02:18PM by noe.
Re: Latest X Posts in a templated Phorum-Page September 22, 2004 04:10PM |
Registered: 20 years ago Posts: 5 |
I'm trying to convert this script to display only the most recent topics as opposed to it displaying the most recent posts.
I had a similar script for my 3.4.6 phorum & this had an option to display most recent topics instead of posts.
I've compared the two (old & new script) & hoped that it would be just be a matter of selecting the correct table or something along those lines but so far my best guess has created some interesting results!
I think this is the part of the code that querys the database & drags the posts out? :
result = mysql_query("select * from $table m, $forum_table f where m.forum_id = f.forum_id order by m.datestamp desc limit $number") or die("Failed Query of " . $result. mysql_error());
I just cant seem to hit on the right addition to the code to give me my 'topics'. If anyone could suggest any pointers or suggestions as to how I could acheive my 'last topics' i'd be most grateful.
I had a similar script for my 3.4.6 phorum & this had an option to display most recent topics instead of posts.
I've compared the two (old & new script) & hoped that it would be just be a matter of selecting the correct table or something along those lines but so far my best guess has created some interesting results!
I think this is the part of the code that querys the database & drags the posts out? :
result = mysql_query("select * from $table m, $forum_table f where m.forum_id = f.forum_id order by m.datestamp desc limit $number") or die("Failed Query of " . $result. mysql_error());
I just cant seem to hit on the right addition to the code to give me my 'topics'. If anyone could suggest any pointers or suggestions as to how I could acheive my 'last topics' i'd be most grateful.
Re: Latest X Posts in a templated Phorum-Page September 22, 2004 04:10PM |
Registered: 23 years ago Posts: 1,076 |
noe Wrote:
-------------------------------------------------------
> Does anyone know how to hack this script, so that
> there are the latest x *unread* Posts shown only?
Haven't tested this and I'm not planning to...
around row 80:
and row 86:
The stuff with the newflags may still work differently than I think it does so this may or may not work...
---
-=[ Panu ]=-
-------------------------------------------------------
> Does anyone know how to hack this script, so that
> there are the latest x *unread* Posts shown only?
Haven't tested this and I'm not planning to...
around row 80:
$rows[$key]["new"]=$PHORUM["DATA"]["LANG"]["newflag"]; becomes: $rows[$key]["new"]=$PHORUM["DATA"]["LANG"]["newflag"]; $newrows[$key]=$rows[$key];
and row 86:
$PHORUM["DATA"]["ROWS"] = $rows; becomes: $PHORUM["DATA"]["ROWS"] = $newrows;
The stuff with the newflags may still work differently than I think it does so this may or may not work...
---
-=[ Panu ]=-
Re: Latest X Posts in a templated Phorum-Page December 29, 2004 03:40PM |
Registered: 20 years ago Posts: 15 |
Great template. I've integrated it successfully.
One simple question: Currently, newest10.tpl only allows a link back to the current forum if the transferred phorum_id is greater then 0.
How to make newest10.tpl allow a link back to the calling forum even if it shows messages from all forums (when the forum_id parameter is zero)?
(Currently, I've removed the link).
Thanks
Amnon
One simple question: Currently, newest10.tpl only allows a link back to the current forum if the transferred phorum_id is greater then 0.
How to make newest10.tpl allow a link back to the calling forum even if it shows messages from all forums (when the forum_id parameter is zero)?
(Currently, I've removed the link).
Thanks
Amnon
Re: Latest X Posts in a templated Phorum-Page January 19, 2005 10:27AM |
Registered: 19 years ago Posts: 99 |
Sorry, only registered users may post in this forum.