Latest News 1st post not last

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

Topic author
spongeweb
Active Member
Posts: 21
Joined: 15. April 2008 12:19

Latest News 1st post not last

Post by spongeweb »

Ive noticed that on phpbb3portal the latest news shows the first post from each topic (what I want)

Ive moved to board3 as its more supported and modified it a bit,

but my php isnt up to scratch yet, so how can I make news.php show the first post from every thread and not the last?


thanks and great work so far.
http;//www.websponge.net
Sarcasm in bundles
User avatar

Topic author
spongeweb
Active Member
Posts: 21
Joined: 15. April 2008 12:19

Re: Latest News 1st post not last

Post by spongeweb »

anyone help please?
http;//www.websponge.net
Sarcasm in bundles
User avatar

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

Re: Latest News 1st post not last

Post by Ice »

Open portal/includes/functions.php

Find (Tip: There's 2, change them both.)

Code: Select all

			$user_link = 't.topic_last_poster_id = u.user_id';
			$post_link = 't.topic_last_post_id = p.post_id';
Replace with

Code: Select all

			$user_link = 't.topic_poster = u.user_id';
			$post_link = 't.topic_first_post_id = p.post_id';
Board3 Portal Dev & English Tech Support
User avatar

Topic author
spongeweb
Active Member
Posts: 21
Joined: 15. April 2008 12:19

Re: Latest News 1st post not last

Post by spongeweb »

found the two lines, thanks,

it had no effect at all! which I find rather suprising, I purged cache and refreshed template??
http;//www.websponge.net
Sarcasm in bundles
User avatar

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

Re: Latest News 1st post not last

Post by Ice »

Are you sure you edited them then? Both, where it says 'news' and 'news_all'? 'cause that's all there is to order the posts. Have the news posts got replies at all?
Board3 Portal Dev & English Tech Support
User avatar

Topic author
spongeweb
Active Member
Posts: 21
Joined: 15. April 2008 12:19

Re: Latest News 1st post not last

Post by spongeweb »

Yes, I editted both lines, it did make a change, but it didnt show the first posts, for some reason it still shows the last post, but from completely differnet threads lower down inthe forum...

most odd!
http;//www.websponge.net
Sarcasm in bundles
User avatar

Topic author
spongeweb
Active Member
Posts: 21
Joined: 15. April 2008 12:19

Re: Latest News 1st post not last

Post by spongeweb »

and i re-ediited and I get this: (I only changes the last line the first time to experiment)

Code: Select all

SQL ERROR [ mysql4 ]

Unknown column 't.topic_poster_id' in 'on clause' [1054]
here is the code:

Code: Select all

				case "news":

					$topic_type = 't.topic_type = ' . POST_NORMAL;
					$str_where = 'AND (' . substr($str_where, 0, -4) . ')';
					$user_link = 't.topic_last_poster_id = u.user_id';
					$post_link = 't.topic_last_post_id = p.post_id';
					$topic_order = 't.topic_time DESC';

				break;
				case "news_all":

					$topic_type = '( t.topic_type != ' . POST_ANNOUNCE . ' ) AND ( t.topic_type != ' . POST_GLOBAL . ')';
					$str_where = 'AND (' . substr($str_where, 0, -4) . ')';
					$user_link = 't.topic_last_poster_id = u.user_id';
					$post_link = 't.topic_last_post_id = p.post_id';
					$topic_order = 't.topic_time DESC';

				break;
			}
http;//www.websponge.net
Sarcasm in bundles
User avatar

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

Re: Latest News 1st post not last

Post by Ice »

I apologise it should be

Code: Select all

$user_link = 't.topic_poster = u.user_id'; 
Board3 Portal Dev & English Tech Support
User avatar

Topic author
spongeweb
Active Member
Posts: 21
Joined: 15. April 2008 12:19

Re: Latest News 1st post not last

Post by spongeweb »

Ok, Ill try this when I get home,

I have noticed, if I make a new topic it diesnt show in the portal anyway, surely it should do this straight away as its become the latest topic? is there a time lag for the information or something?
http;//www.websponge.net
Sarcasm in bundles
User avatar

Topic author
spongeweb
Active Member
Posts: 21
Joined: 15. April 2008 12:19

Re: Latest News 1st post not last

Post by spongeweb »

No difference here :(
http;//www.websponge.net
Sarcasm in bundles
User avatar

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

Re: Latest News 1st post not last

Post by Ice »

Are you sure you refreshed your cache? Because that is all I changed on my portal.
Board3 Portal Dev & English Tech Support

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

Re: Latest News 1st post not last

Post by el_Vindicador »

ok, i did the change and

it's works!!!

now: when i use the no-compact style for the News....

i see some bbcodes thats not works... like align or font

i use advance bbcode.

somre help¿
User avatar

Topic author
spongeweb
Active Member
Posts: 21
Joined: 15. April 2008 12:19

Re: Latest News 1st post not last

Post by spongeweb »

100% code change, 100% refresh

no change... it doesnt even get the topics in the rught order!

http://www.websponge.net center block,


EDIT :oops: i MISSED A "_first" sorry......
http;//www.websponge.net
Sarcasm in bundles
User avatar

Topic author
spongeweb
Active Member
Posts: 21
Joined: 15. April 2008 12:19

Re: Latest News 1st post not last

Post by spongeweb »

My bad, all works now, thankyou for your patience,

it doesnt pull them in right order though? some threads are lower downm even though they should be top.

but thanks again..
http;//www.websponge.net
Sarcasm in bundles
User avatar

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

Re: Latest News 1st post not last

Post by Ice »

What order would you want them pulled in, last posted or last replied?
Board3 Portal Dev & English Tech Support
Locked

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