Page 1 of 2

Bug - News

Posted: 28. January 2008 01:17
by wolferey
I got a bug in the news. It shows the last post in the topic, not the first, so when I post a news item, and someone comment on it, it will show the comment instead of the newspost. See: http://www.timespin.net/spillmodding/

its in norwegian, but you can compare top news post with last comment and see it displays the same.

Re: Bug - News

Posted: 28. January 2008 01:53
by NeoOoeN
Mmmh... You Should do like me:

Go to your administration page:
>Mods > News : Don't display. > Global announcements : Display , Max length of global announcements: 0 .

Then, in your forum, make your post that you want to see it on your portal to an announce. In the administration page, refere your block at your desire forum.... and that's all.



( I know, my english is horrible... )

Re: Bug - News

Posted: 28. January 2008 02:05
by wolferey
I would prefer to have the news block working rather than coming up with a workaround. I'd hate to have to make every newspost on the portal to an announcement just to make it display correctly.

Re: Bug - News

Posted: 28. January 2008 12:23
by Kevin
This is not a bug. It's wanted that way.
e.g. if you have a topic started a year ago, containg 100 replies, someone is posting a reply and it shows up the first post - where is the "news"?

But it's no problem to change it, so that the first post is shown, like in the announcements.
I'll post the code change for you when i'm back home (at work right now).

Re: Bug - News

Posted: 28. January 2008 12:39
by wolferey
I always consider news as news, and comments as comments, not comments as news O,o
Is it possible to atleast have an option for it then, to switch between the first post showing up as news, and the last post showing up as news?

Re: Bug - News

Posted: 28. January 2008 12:41
by Kevin
I've edited my post before. :wink:
Kevin wrote:But it's no problem to change it, so that the first post is shown, like in the announcements.
I'll post the code change for you when i'm back home (at work right now).

Re: Bug - News

Posted: 28. January 2008 13:30
by Ice
I'd have to agree with wolferey here, the current action seems odd to me too.

Re: Bug - News

Posted: 28. January 2008 13:56
by wolferey
Thanks Kevin, appreciate it :)

Re: Bug - News

Posted: 28. January 2008 19:30
by Kevin
open:
portal/includes/functions.php

search:

Code: Select all

						 ORDER BY
			t.topic_last_post_time DESC';
replace with:

Code: Select all

						 ORDER BY
			t.topic_time DESC';
search:

Code: Select all

$posts[$i]['topic_time'] = $user->format_date($row['topic_last_post_time']);
replace with:

Code: Select all

$posts[$i]['topic_time'] = $user->format_date($row['topic_time']);
That should be all. :wink:

Re: Bug - News

Posted: 28. January 2008 20:50
by wolferey
It worked, but that's not what I meant. Look at the news post "Dette er en test" On http://www.timespin.net/spillmodding/ the news text is "hehe, du blir fort vant til det egentlig :p", which is the last post/reply in that topic. It should say "Virker det?...", which is the first post in that topic.

Re: Bug - News

Posted: 28. January 2008 21:28
by Kevin
Ah - i'm sorry, forgot something.
Also in functions.php

search:

Code: Select all

				t.topic_last_poster_id = u.user_id AND
				t.topic_last_post_id = p.post_id AND
replace with:

Code: Select all

				t.topic_poster = u.user_id AND
				t.topic_first_post_id = p.post_id AND

Re: Bug - News

Posted: 29. January 2008 00:41
by wolferey
there we go! :D
thanks! :D

Re: Bug - News

Posted: 14. February 2008 00:35
by spreck
first off.. great mod..

when doing this news fix.. does it format all the forums in the board index to display this way? or does it olny format it for the news block?

EDIT: sorry... i thought it was the main functions file.. didn't see it was the portal function file.. figured it out myself

thanks

Re: Bug - News

Posted: 23. April 2008 18:22
by el_Vindicador
ok....i try to apply this change....but..in i cant find these senstences in portal/includes/functions.php

what can i do?
the codes are correct?
i have de lastest version.

Re: Bug - News

Posted: 23. April 2008 18:25
by Ice