Displaying newest posts on home page?

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Get Involved
Post Reply
Jobertim
Registered User
Posts: 235
Joined: Wed Dec 28, 2011 2:25 pm

Displaying newest posts on home page?

Post by Jobertim » Fri Dec 15, 2017 10:14 am

I want to create a custom home page where I display for example the 6 top posts my forums (meaning the ones that got replied to most recently).

Is there an extension for phpBB 3.1 or phpBB 3.2? I found an article at area 51 but don't know for which version of phpBB it was written? (https://wiki.phpbb.com/Practical.Displa ... rnal_pages)

Thanks!

User avatar
Ger
Recognised Extension Developer
Posts: 1556
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Displaying newest posts on home page?

Post by Ger » Fri Dec 15, 2017 11:05 am

I think that article is about right. There's no extension that I'm aware of since most people want this to be displayed outside of phpBB. If you want it on the forum index, you're probably best off using recent topics extension.
My extensions: Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update and Modern Quote
Newest: Quoted Where + anonymize

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

Jobertim
Registered User
Posts: 235
Joined: Wed Dec 28, 2011 2:25 pm

Re: Displaying newest posts on home page?

Post by Jobertim » Fri Dec 15, 2017 12:02 pm

Ok thanks a lot. I'll give it a show using the techniques in that article then!

Jobertim
Registered User
Posts: 235
Joined: Wed Dec 28, 2011 2:25 pm

Re: Displaying newest posts on home page?

Post by Jobertim » Fri Dec 15, 2017 2:02 pm

So I tried example 4 by copy/pasting the code from Header, Functions, Forum and topic information, Database call (example 4), and Footer and conclusion.

Here's the error I have:
General Error
SQL ERROR [ mysqli ]

Unknown column 't.topic_approved' in 'where clause' [1054]

SQL

SELECT p.*, t.*, u.username, u.user_colour FROM (phpbb3_posts p) LEFT JOIN phpbb3_users u ON (u.user_id = p.poster_id) LEFT JOIN phpbb3_topics t ON (p.topic_id = t.topic_id) WHERE t.forum_id IN (1, 4, 5, 8, 9, 10, 11, 13, 14, 17, 21, 26, 27, 28, 29, 30, 31, 33, 41, 42, 45, 48, 49) AND t.topic_status <> 2 AND t.topic_approved = 1 ORDER BY p.post_id DESC LIMIT 5

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/mysql_base.php
LINE: 45
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 261
CALL: phpbb\db\driver\mysql_base->_sql_query_limit()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 321
CALL: phpbb\db\driver\driver->sql_query_limit()

FILE: /home4/canva5q/public_html/home.php
LINE: 140
CALL: phpbb\db\driver\factory->sql_query_limit()

User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3375
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Re: Displaying newest posts on home page?

Post by bonelifer » Fri Dec 15, 2017 3:42 pm

Jobertim wrote:
Fri Dec 15, 2017 10:14 am
I want to create a custom home page where I display for example the 6 top posts my forums (meaning the ones that got replied to most recently).

Is there an extension for phpBB 3.1 or phpBB 3.2? I found an article at area 51 but don't know for which version of phpBB it was written? (https://wiki.phpbb.com/Practical.Displa ... rnal_pages)

Thanks!
You need to re-read that as it has a note that addresses what to change:
Note: If you are using phpBB 3.1.x references to topic_approved in the following examples must be changed to topic_visibility
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

Jobertim
Registered User
Posts: 235
Joined: Wed Dec 28, 2011 2:25 pm

Re: Displaying newest posts on home page?

Post by Jobertim » Sat Dec 16, 2017 10:10 am

Indeed! Thanks very much, I no longer get any errors. Now I have to figure out how to write a template...

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: Mick and 10 guests