So I'm building my first addon that will deal with too long thread titles. So far it can find threads with title length longer than 70 characters and list them.
What I want to do next is to bulk fix them by removing " | Board title" from their titles. So I created a PAGE_CONTAINER template modification that will replace
with
The question - what would be the best field for storing the "mark" that thread title is too long?
Probably an extra column in xf_threads table, but frankly I'm too afraid to touch xf tables. )
What about a thread custom field? I could create it from ACP so it looks safe. Or it will require an extra query when rendering a thread page?
Will be appreciate for any advice.
Thanks in advance.
What I want to do next is to bulk fix them by removing " | Board title" from their titles. So I created a PAGE_CONTAINER template modification that will replace
Code:
<title><xf:title formatter="%s | %s" fallback="{$xf.options.boardTitle}" page="{$pageNumber}" /></title>
Code:
<title>
<xf:if is="$noBoardTitle">
<xf:title formatter="%s" fallback="{$xf.options.boardTitle}" page="{$pageNumber}" />
<xf:else />
<xf:title formatter="%s | %s" fallback="{$xf.options.boardTitle}" page="{$pageNumber}" />
</xf:if>
</title>
The question - what would be the best field for storing the "mark" that thread title is too long?
Probably an extra column in xf_threads table, but frankly I'm too afraid to touch xf tables. )
What about a thread custom field? I could create it from ACP so it looks safe. Or it will require an extra query when rendering a thread page?
Will be appreciate for any advice.
Thanks in advance.
