![]() |
![]() |
This project is not completely dead. I've just started work on localisation. If you're getting a "Deprecated" error message, follow the instructions here URGENT Security Patch for ≤ v2.2.6 A security hole has been discovered, follow the instructions and download the patch at the topic page. Did the patch break your search page? Search Patch
|
![]() UPB Team Member
Posts: 1036
Registered: 2006-11-14 |
its suppose to be, i'll have to move it to the new sourceforge download page, sorry.
Tim Hoeppner
UPB Programmer B. Sc. in Electrical Engineering |
![]() UPB Team Member
Posts: 1036
Registered: 2006-11-14 |
Tim Hoeppner
UPB Programmer B. Sc. in Electrical Engineering |
![]()
Posts: 21
Registered: 2007-10-08 |
I am installing this mod, really great!
I found a workaround for puting the news page on a different directory than upb: on the php code, I grab the current path,change path, then include the newsmod, then get back to the original path $wd_was = getcwd(); chdir("./upb"); include('mynews.php'); //php code that grabs the latest news using mod_news chdir($wd_was); Still, I find a bug with the mod_news code: if someone posts a comment on a very old topic, this topic will display again. It seems like the "sort by date" filters without distinguishing original post's and comment's date. any ideas? ThX! |
![]() UPB Team Member
Posts: 1036
Registered: 2006-11-14 |
Hmm yea, that is a bit of a problem. not very easily solved either... mod news is just pulling the topics out in the same order as viewforum.php does, because they are sorted like that. I could suggest pulling all the topics from that forum and resorting them manually, would work for smaller forums.
Tim Hoeppner
UPB Programmer B. Sc. in Electrical Engineering |
![]()
Posts: 21
Registered: 2007-10-08 |
can I dare ask you how to do so?
I first thought of something that would like display last 10 topics (topics are numbered in sequence). We would need to "get" the last topic number, and then just do a display from $lasttopic - 10 to $lasttopic..... I'm very "noob" in programing, so your help would be more than extremly thanked! |
![]()
Posts: 21
Registered: 2007-10-08 |
I guess an option would be to actually just display last created topics (that's just what I need).
do something like: for($i=count($topics)-5, count($topics), $i++) { // display $topic($i).[subject] // display $topic($i).[first post] // link to $topic($i).[comments] } my coding is horrible, I just mean to give ideas, and see if that is possible to do. thanks for your support. |
![]()
Posts: 21
Registered: 2007-10-08 |
I haven't found a way to do that myself.... could someone help me?
thanks, Allan. |
![]() UPB Team Member
Posts: 837
Registered: 2006-11-22 |
I'll take a look if I have time.
myUPB Developer |
![]() UPB Team Member
Posts: 837
Registered: 2006-11-22 |
![]() Does this work for you??? It reads the topics into a temp array using the timestamps as keys, sorts by the timestamps in reverse order so the latest topic comes first and then creates the news array from the sorted temp_array Edit: You can remove the commented lines (if you wish) which is the original output which I left in case I screwed up ![]() myUPB Developer |
|
Last edited by: Clark on Dec 07, 2007 2:44:38 pm
| |
![]()
Posts: 21
Registered: 2007-10-08 |
YOU ARE GREAT!!!!
that's exactly what I needed. man you rule! I'm sorry for all those hyperlatives and superlatives, but I really mean it. Thanks to this version of mod_news, it is now possible to build a complete portal, with single login and posting possibility, and levels to let only certain users post News and all the others reply... I love it! ![]() ![]() ![]() |