Last topic titles

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
ToonArmy
Registered User
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK
Contact:

Re: Last topic titles

Post by ToonArmy »

idiotnesia wrote:Personally, I don't like the idea switch on/off of last topic titles in acp. This is a basic feature just add it or leave it.
It should be left in, but configuring if the template shows it (and other things) could be part of the ACP for each template.
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image

Ashley.S.
Registered User
Posts: 4
Joined: Thu Jul 30, 2009 2:17 pm

Re: Last topic titles

Post by Ashley.S. »

I wasn't even aware that it was even in the core files, hense I installed a mod to get the feature, so perhaps you should add an acp switch for the option or document it somewhere to show how to enable it?

ToonArmy
Registered User
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK
Contact:

Re: Last topic titles

Post by ToonArmy »

Ashley.S. wrote:I wasn't even aware that it was even in the core files, hense I installed a mod to get the feature, so perhaps you should add an acp switch for the option or document it somewhere to show how to enable it?
Like I said it's there for template designers, there maybe a KB article on it though for prosilver.
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: Last topic titles

Post by MichaelC »

Well, I think just put it in prosilver by default is simple enough.

If we want to make everything with on/off buttons then lets do on/off buttons for who made the latest post, for the faq, for the memberlist link at the top or unanswered post page, viewonline.php being accessed by clicking Who Is Online?

Not everything needs an on/off button. I think its just a simple line of code to add in and thats it. No IFs ect.,

As its something built into the theme that needs doing, add it default for prosilver and most style authors will then realise about it and use it.
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: Last topic titles

Post by naderman »

I agree with Chris that a better solution might be to add some kind of configuration page for styles or allow each style to have a configuration page. We do however need to find a way to make the template engine understand these configuration options without too much logic in the templates. Maybe we can add some sort of helper/procedure syntax and the configuration can basically pick which particular file the helper/procedure is loaded from. This is particularly useful since template inheritance can be used more effectively for derived templates now.

An example:

Current viewforum_body.html solution:

Code: Select all

<!-- IF forumrow.LAST_POST_TIME -->
    {L_LAST_POST} {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
    <!-- IF S_SHOW_POST_SUBJECT -->{forumrow.LAST_POST_SUBJECT}<!-- ENDIF -->
<!-- ENDIF --> 
New viewforum_body.html:

Code: Select all

<!-- IF forumrow.LAST_POST_TIME -->
    <!-- INSERT LAST_POST(forumrow) -->
<!-- ENDIF --> 
New helper/last_post.html.

Code: Select all

<!-- DECLARE LAST_POST(forum) -->
{L_LAST_POST} {L_POST_BY_AUTHOR} {forum.LAST_POSTER_FULL}
 
New helper/last_post_with_subject.html.

Code: Select all

<!-- DECLARE LAST_POST(forum) -->
{L_LAST_POST} {L_POST_BY_AUTHOR} {forum.LAST_POSTER_FULL}
{forum.LAST_POST_SUBJECT}
 
For speed considerations these helpers could be compiled into a single template file with functions so it's not so many tiny PHP files. We could even extend the syntax to allow implementation of multiple alternatives per template file. That would mean that you do not need a separate file for each configuration which might become quite a lot. However that only really means sense if an inheriting template is able to override just some of the definitions of a template file without having to reimplement all the other parts, find an example below:

prosilver: helper/last_post.html

Code: Select all

<!-- DECLARE LAST_POST(forum) -->
{L_LAST_POST} {L_POST_BY_AUTHOR} {forum.LAST_POSTER_FULL}

<!-- DECLARE LAST_POST(forum) IF CONFIG_SHOW_SUBJECT -->
{L_LAST_POST} {L_POST_BY_AUTHOR} {forum.LAST_POSTER_FULL}
{forum.LAST_POST_SUBJECT}

<!-- DECLARE LAST_POST(forum) IF CONFIG_NO_AUTHOR -->
{L_LAST_POST} {forum.LAST_POST_SUBJECT}
 
single-line-style: helper/last_post.html

Code: Select all

<!-- INHERIT LAST_POST -->
<!-- DECLARE LAST_POST(forum) IF CONFIG_SHOW_SUBJECT -->
<a href="{forum.U_LAST_POST}" title="{forum.LAST_POST_SUBJECT}">{L_LAST_POST}</a> {L_POST_BY_AUTHOR} {forum.LAST_POSTER_FULL}
 
I've oversimplified this example a bit but I hope it gets the point across. I'm really not sure on what the syntax for this should be. I believe it should be as simple as possible and really simplify templates, not complicate them further.

idiotnesia
Registered User
Posts: 29
Joined: Thu May 22, 2008 2:46 am

Re: Last topic titles

Post by idiotnesia »

It's a good idea to have style configuration page. From this page perhaps admin can also change board logo, enable/disable quick reply, change user profile display position in view topic [left or right] and so on.
idiotnesia wuz here

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: Last topic titles

Post by imkingdavid »

idiotnesia wrote:It's a good idea to have style configuration page. From this page perhaps admin can also change board logo, enable/disable quick reply, change user profile display position in view topic [left or right] and so on.
This sounds like a great idea. :D
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: Last topic titles

Post by MichaelC »

idiotnesia wrote:It's a good idea to have style configuration page. From this page perhaps admin can also change board logo, enable/disable quick reply, change user profile display position in view topic [left or right] and so on.
That does sound like a quite good idea. But changing the logo can be done in the imageset in the styles tab (now deprecated I believe) but it could be given the option to like to an image off-site and have the same settings as avatars like, linking, uploading and choosing from the files already uploaded ect.,
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

User avatar
Meis2M
Registered User
Posts: 436
Joined: Fri Apr 23, 2010 10:18 am
Contact:

Re: Last topic titles

Post by Meis2M »

this option come for 3.1 ? :D

ToonArmy
Registered User
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK
Contact:

Re: Last topic titles

Post by ToonArmy »

No, but I'd like to think we could deliver it in 3.2.
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image

Post Reply