MyUPB.com Discussion forums
You are not logged in. Please Register or Login.

Announcements

This project is not completely dead. I've just started work on localisation.
Please email me at clark@NOSPAMmyupb.com once you've registered so I can activate your account (remove "NOSPAM" from the email address)
~~~~ Clark


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

Download myUPB
Version 2.2.7 Released - 24th December 2010


Pages (5): 3
Posted: Sep 22, 2007 6:16:12 pm
Pilot



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

Posted: Sep 23, 2007 9:49:13 pm
Pilot



Tim Hoeppner

UPB Programmer
B. Sc. in Electrical Engineering

Posted: Oct 08, 2007 8:29:34 pm
DJ_Spray



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!

Posted: Oct 09, 2007 12:35:04 pm
Pilot



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

Posted: Oct 09, 2007 1:55:09 pm
DJ_Spray



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!

Posted: Oct 10, 2007 2:40:37 pm
DJ_Spray



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.

Posted: Dec 06, 2007 2:05:00 pm
DJ_Spray



I haven't found a way to do that myself.... could someone help me?

thanks,

Allan.

Posted: Dec 07, 2007 1:26:30 pm
Clark



I'll take a look if I have time.
myUPB Developer

Posted: Dec 07, 2007 2:42:16 pm
Clark



Attachment: mod_news.php

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 (C)
myUPB Developer

Posted: Dec 07, 2007 3:52:38 pm
DJ_Spray



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!(C)(C)(C)

Pages (5): 3
Powered by myUPB v2.2.6  ·   © PHP Outburst 2002 - 2013

Creative Commons License