Page 1 of 2

Topic Solved: [SOLVED] Prefix Placement

Posted: Sat Mar 09, 2019 9:56 pm
by Exclusive
I have installed this extension, It is working fine but I have a problem I need to fix. In the event folder

Code: Select all

styles/all/template/event/
there is a

Code: Select all

viewtopic_topic_title_append.html
file which contains the code below;

Code: Select all

<!-- IF TOPIC_SOLVED_TITLE -->
&nbsp;
<a href="{{ U_SOLVED_POST }}"<!-- IF TOPIC_SOLVED_STYLE --> style="color: #{TOPIC_SOLVED_STYLE};"<!-- ENDIF -->>
	{TOPIC_SOLVED_TITLE}
</a>
<!-- ENDIF -->
<!-- IF TOPIC_SOLVED_IMAGE -->
<a href="{{ U_SOLVED_POST }}" title="{L_TOPIC_SOLVED}">
	{TOPIC_SOLVED_IMAGE}
	<!-- IF ! TOPIC_SOLVED_PHPBB31 -->
	<span class="sr-only">{L_TOPIC_SOLVED}</span>
	<!-- ENDIF -->
</a>
<!-- ENDIF -->
And the outcome is:

after-post-title.png


Now how do i make the prefix [SOLVED] to be place before the post title?

Example:

before-post-title.png

Although before now, I have posted here

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Sun Mar 10, 2019 12:01 am
by Lumpy Burgertushie
rename viewtopic_topic_title_append.html to <!-- EVENT viewtopic_topic_title_prepend -->

see if that works.

robert

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Sun Mar 10, 2019 12:32 am
by Exclusive
Lumpy Burgertushie wrote:
Sun Mar 10, 2019 12:01 am
rename viewtopic_topic_title_append.html to <!-- EVENT viewtopic_topic_title_prepend -->

see if that works.

robert
Without a .html??

It didn't work :cry:

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Sun Mar 10, 2019 12:46 am
by Lumpy Burgertushie
sorry, I should have been more careful. yes, leave the .html and just rename the file name.


robert

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Sun Mar 10, 2019 7:54 am
by david63
Lumpy Burgertushie wrote:
Sun Mar 10, 2019 12:01 am
rename viewtopic_topic_title_append.html to <!-- EVENT viewtopic_topic_title_prepend -->

see if that works.

robert
That will not do anything - well it might cause an error.

Until you get a reply from the extension developer you could try

Code: Select all

<!-- IF TOPIC_SOLVED_TITLE -->
&nbsp;
<a href="{{ U_SOLVED_POST }}"<!-- IF TOPIC_SOLVED_STYLE --> style="color: #{TOPIC_SOLVED_STYLE};"<!-- ENDIF -->>
	{TOPIC_SOLVED_TITLE}
</a>
<!-- ENDIF -->
<!-- IF TOPIC_SOLVED_IMAGE -->
<a href="{{ U_SOLVED_POST }}" title="{TOPIC_SOLVED_IMAGE}{L_TOPIC_SOLVED}">
	<!-- IF ! TOPIC_SOLVED_PHPBB31 -->
	<span class="sr-only">{L_TOPIC_SOLVED}</span>
	<!-- ENDIF -->
</a>
<!-- ENDIF -->

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Sun Mar 10, 2019 8:37 am
by Lumpy Burgertushie
yep, sorry about that. my brain was not in gear that time.


robert

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Sun Mar 10, 2019 5:13 pm
by Exclusive
david63 wrote:
Sun Mar 10, 2019 7:54 am
Until you get a reply from the extension developer you could try

Code: Select all

<!-- IF TOPIC_SOLVED_TITLE -->
&nbsp;
<a href="{{ U_SOLVED_POST }}"<!-- IF TOPIC_SOLVED_STYLE --> style="color: #{TOPIC_SOLVED_STYLE};"<!-- ENDIF -->>
	{TOPIC_SOLVED_TITLE}
</a>
<!-- ENDIF -->
<!-- IF TOPIC_SOLVED_IMAGE -->
<a href="{{ U_SOLVED_POST }}" title="{TOPIC_SOLVED_IMAGE}{L_TOPIC_SOLVED}">
	<!-- IF ! TOPIC_SOLVED_PHPBB31 -->
	<span class="sr-only">{L_TOPIC_SOLVED}</span>
	<!-- ENDIF -->
</a>
<!-- ENDIF -->
It didn't work.....!

Please pbpBB Moderators/Admin, Why did you mark this topic as solve? The title means:

Topic Solved: - (the extension name)

[SOLVED] Prefix Placement - (the question)

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Sun Mar 10, 2019 10:53 pm
by mrgoldy
You're overlooking something.
The topic title is not the same as the post title (actually named post subject).

http://prntscr.com/mw265d

The topic title (the one you are modifying) is the one above the Forum rules.
For that one, changing it to _prepend will work, after you've purged the cache.

However, for the post subject, there are no template events in there.
So that means that the post was a reply when the topic had that specific title.

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Sun Mar 10, 2019 11:53 pm
by Exclusive
mrgoldy wrote:
Sun Mar 10, 2019 10:53 pm
The topic title (the one you are modifying) is the one above the Forum rules.
For that one, changing it to _prepend will work, after you've purged the cache.
Yes! Yesterday i renamed it to prepend and it worked, but you just figured out my problem now.

But it doesn't show in the browser's tab.
mrgoldy wrote:
Sun Mar 10, 2019 10:53 pm
However, for the post subject, there are no template events in there.
So that means that the post was a reply when the topic had that specific title.
It also worked for the subject, but the prefix still shows after subject title, any solution to this?

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Mon Mar 11, 2019 9:45 am
by mrgoldy
Like I said, there are no template events for the post subject. So the extension can not alter those through template events.
Those replies were made when the topic had that specific title mostlikely. Otherwise I/we will have to look at the extension’s repository. But I would highly suggest asking the developer.

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Mon Mar 11, 2019 10:31 pm
by 3Di
Exclusive wrote:
Sun Mar 10, 2019 11:53 pm
but the prefix still shows after subject title
Delete the file viewtopic_topic_title_append.html which surely is still in the folder and purge the cache.

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Wed May 29, 2019 5:19 am
by chuppito
Hello is anyone found the solution to actually pass it in front of the title? Thank you

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Wed May 29, 2019 11:23 am
by mrgoldy
You're best of creating your own topic, with a more detailed description/question than the one you just asked.

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Wed May 29, 2019 11:27 am
by chuppito
I just ask if he happened to pass solved at the beginning of the title, it avoids duplicates

Re: Topic Solved: [SOLVED] Prefix Placement

Posted: Wed May 29, 2019 1:47 pm
by mrgoldy
Well, if you use the viewtopic_topic_title_prepend template event, you can prepend something to the topic title.

Place the following file with the correct folder structure in your extension,
Put something in the file, for example "Hello".
Purge the cache.

styles/all/template/event/viewtopic_topic_title_prepend.html

But this all is for extensions and not Custom coding. If you want to add something to the topic title, hard-coded, just add it to the viewtopic_body.html.