Bug - News

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.

Topic author
wolferey
Active Member
Posts: 16
Joined: 26. January 2008 21:00

Bug - News

Post 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.

NeoOoeN
Active Member
Posts: 4
Joined: 28. January 2008 01:46

Re: Bug - News

Post 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... )

Topic author
wolferey
Active Member
Posts: 16
Joined: 26. January 2008 21:00

Re: Bug - News

Post 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.
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Bug - News

Post 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).
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
wolferey
Active Member
Posts: 16
Joined: 26. January 2008 21:00

Re: Bug - News

Post 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?
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Bug - News

Post 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).
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Ice
Former Team Member
Posts: 359
Joined: 20. January 2008 23:43
Location: England, United Kingdom

Re: Bug - News

Post by Ice »

I'd have to agree with wolferey here, the current action seems odd to me too.
Board3 Portal Dev & English Tech Support

Topic author
wolferey
Active Member
Posts: 16
Joined: 26. January 2008 21:00

Re: Bug - News

Post by wolferey »

Thanks Kevin, appreciate it :)
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Bug - News

Post 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:
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
wolferey
Active Member
Posts: 16
Joined: 26. January 2008 21:00

Re: Bug - News

Post 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.
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Bug - News

Post 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
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
wolferey
Active Member
Posts: 16
Joined: 26. January 2008 21:00

Re: Bug - News

Post by wolferey »

there we go! :D
thanks! :D

spreck
Active Member
Posts: 1
Joined: 13. February 2008 23:42

Re: Bug - News

Post 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

el_Vindicador
Active Member
Posts: 13
Joined: 8. February 2008 17:16

Re: Bug - News

Post 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.
User avatar

Ice
Former Team Member
Posts: 359
Joined: 20. January 2008 23:43
Location: England, United Kingdom

Re: Bug - News

Post by Ice »

Board3 Portal Dev & English Tech Support
Locked

Return to “board3 Portal 1.0.x - English Support”