[3.2][RC] Topic Template

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
CREGOPHER
Registered User
Posts: 26
Joined: Wed Mar 25, 2020 2:54 pm

Re: [3.2][RC] Topic Template

Post by CREGOPHER »

I downloaded the zip file but its not clear to me on the file path. I had tried the Posting Template extension and got the same error as reported by others here. The Posting Template's install path was: ext/marttiphpbb/postingtemplate. Can you tell me how this package installs after I unzip it?

Thanks
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Topic Template

Post by martti »

CREGOPHER wrote: Fri Apr 03, 2020 9:12 pm I downloaded the zip file but its not clear to me on the file path. I had tried the Posting Template extension and got the same error as reported by others here. The Posting Template's install path was: ext/marttiphpbb/postingtemplate. Can you tell me how this package installs after I unzip it?

Thanks
See the first post of this topic.
User avatar
CREGOPHER
Registered User
Posts: 26
Joined: Wed Mar 25, 2020 2:54 pm

Re: [3.2][RC] Topic Template

Post by CREGOPHER »

Thank you. I missed that part. I was able to install and am testing it. A couple of clarifications please:
1). When the final version is published and when I update my files with it, will the templates I have created for applicable forums be saved or will I need to re-enter them?
2). When updating a forum's settings in the ACP the topic template window that is now appearing is completely blank. I am able to create a free-from text entry of a form and leave blanks to be filled in. Is there a way to create an actual form with only the entry fields editable.
eg:
NAME: ____________________________
EMAIL: ____________________________
PHONE: ___________________________

Thanks again
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Topic Template

Post by martti »

The questions are not really clear to me. The basic understandig should be that the topic template is just preset text in the text editor when a new topic is started. (bb codes can be used off course).

The topic template gives the topic starter a structure. But the topic starter can still edit it however she or he wants it.
User avatar
CREGOPHER
Registered User
Posts: 26
Joined: Wed Mar 25, 2020 2:54 pm

Re: [3.2][RC] Topic Template

Post by CREGOPHER »

Thank you. You answered my second question. Regarding my first question, let me try again. When this extension is published following it beta stage, I assume that I would need to update its installation on my site. Will the topic templates defined in my existing forums need to be re-entered or will they stay intact?

Thanks again,
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Topic Template

Post by martti »

No your configured topic templates won't be lost.
I consider the extension stable, btw. It's in RC and there has not been reported bugs in the last two years it has been published here.
Naio90
Registered User
Posts: 3
Joined: Thu Apr 16, 2020 10:33 pm

Re: [3.2][RC] Topic Template

Post by Naio90 »

Hi!
I find this extension really useful for what I'm building. I managed to install it and enable it on the ACP, but for some reason I don't see the new options to write down the template code when I go to Forums and edit one of them. Is there a solution?

Thanks!
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Topic Template

Post by martti »

Naio90 wrote: Thu Apr 16, 2020 10:35 pm Hi!
I find this extension really useful for what I'm building. I managed to install it and enable it on the ACP, but for some reason I don't see the new options to write down the template code when I go to Forums and edit one of them. Is there a solution?

Thanks!
You don't see this input field in the forum editor in ACP (the input labelled "Topic template")? Or what options? It's just one text area.

Image
Naio90
Registered User
Posts: 3
Joined: Thu Apr 16, 2020 10:33 pm

Re: [3.2][RC] Topic Template

Post by Naio90 »

Thanks for the reply! I don't see the input field, even though the ext is installed and enabled in the ACP.
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Topic Template

Post by martti »

Do you have any other extensions installed? What's the PHP and phpBB version? Do you find the string marttiphpbb anywhere back in the raw html output (Ctrl-U in most browsers and OS and then Ctrl-F to search).
The raw html of the textarea looks like this::

Code: Select all

<dl>
	<dt>
		<label for="forum_marttiphpbb_topictemplate">Topic template</label>
		<br>
		<span>When starting a topic, the text editor will be pre-filled with this "Topic Template". Leave blank when you don’t wish to use this. This functionality comes from the "Topic Template" extension.</span>
	</dt>
	<dd>
		<textarea id="forum_marttiphpbb_topictemplate" name="forum_marttiphpbb_topictemplate" rows="5" cols="45" data-bbcode="true">[size=120][b]My setup:[/b][/size]</textarea>
	</dd>
</dl>	
Maybe a file from the install is missing. In that case download and install again.
TWEagle
Registered User
Posts: 304
Joined: Sat Dec 10, 2005 2:50 pm

Re: [3.2][RC] Topic Template

Post by TWEagle »

Is it also possible to have the icons here to like in the normal topics so that we musn't think about the code ourself?
Image
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Topic Template

Post by martti »

TWEagle wrote: Wed Apr 22, 2020 6:11 pm Is it also possible to have the icons here to like in the normal topics so that we musn't think about the code ourself?
The BBcodes, with preview and everything? No I'm not going to spend effort on that. That would be overkill. This is in the ACP, for the administrators and not for regular use. You can compose something with the normal post ediitor (with BBCode buttons) and then copy the result to Topic Template input text field in the ACP.
mrix2000
Registered User
Posts: 1271
Joined: Sun Dec 03, 2006 2:23 pm

Re: [3.2][RC] Topic Template

Post by mrix2000 »

Not sure if anything can be done but I use this in topic text to alert my members of certain terms before making a post, unfortunately there is no point in adding BBCode Like bolding headings and adding red alert colour as it only gets seen when the member actually clicks submit which is not going to happen because the code needs to be removed before posting as its only a template of what is expected to be posted etc.
I dont think there is anyway around this unfortunately ?
Thanks for any ideas
User avatar
martti
Registered User
Posts: 914
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [3.2][RC] Topic Template

Post by martti »

mrix2000 wrote: Fri Jul 24, 2020 9:34 am ...
No, that's not possible. The content of a <textarea> can't be styled (as used in the editor of phpBB). WYSIWYG editors use a <div>.
mrix2000
Registered User
Posts: 1271
Joined: Sun Dec 03, 2006 2:23 pm

Re: [3.2][RC] Topic Template

Post by mrix2000 »

martti wrote: Fri Jul 24, 2020 9:41 am
mrix2000 wrote: Fri Jul 24, 2020 9:34 am ...
No, that's not possible. The content of a <textarea> can't be styled (as used in the editor of phpBB). WYSIWYG editors use a <div>.

Hello and thanks for the quick reply, thats a shame but I fully understand why now, it still the best option available to me :D 8-)

Return to “Extensions in Development”