[3.2][BETA] 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
martti
Registered User
Posts: 653
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

[3.2][BETA] Topic Template

Post by martti » Thu Apr 19, 2018 8:32 am

Extension Name: Topic Template
Author: martti
Extension Description: With this extension you can set a Topic Template (text) in the ACP for each forum in your board. The editor gets prefilled with the text that you defined in ACP whenever someone starts a topic.

Migrate from "Posting Template":
This is an upgrade and rewrite of my "Posting Template" extension.
It got renamed to "Topic Template" to reflect better what it does.
The "Topic Template" extension checks in the install process if the "Posting Template" extension is enabled.
If this is the case, all template data is copied to the "Topic Template" extension.

In order to migrate the templates from "Posting Template":
  • keep "Posting Template" enabled.
  • Install and enable this extension.
  • Disable "Posting Template".
(If you are looking for setting a template for the replies in a topic see the Reply Template extension)
Extension Version: 0.1.0
Requirements: PhpBB 3.2 PHP 7+
Extension Download: https://github.com/marttiphpbb/phpbb-ex ... master.zip
Github repository: https://github.com/marttiphpbb/phpbb-ext-topictemplate
Languages: en, de
Templates: all
Screenshots:

Adding or editing a forum in the ACP:

Image

Start a new topic:

Image
Last edited by martti on Wed Apr 25, 2018 5:23 am, edited 2 times in total.

User avatar
John Rambo
Registered User
Posts: 74
Joined: Tue Jun 18, 2013 8:46 pm

Re: [3.2][BETA] Topic Template

Post by John Rambo » Thu Apr 19, 2018 9:01 am

I needed this thanks 🙋

User avatar
jan_2017
Registered User
Posts: 141
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2][BETA] Topic Template

Post by jan_2017 » Fri Apr 20, 2018 6:23 pm

I love this ext.

I have had up to yesterday the ext "support ticket" from user dmzx

It was nice but no adjustable content in acp.

Now I can set everything individually for each forum.

Very Thanks
Last edited by jan_2017 on Sat May 19, 2018 5:28 pm, edited 1 time in total.

User avatar
jan_2017
Registered User
Posts: 141
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2][BETA] Topic Template

Post by jan_2017 » Fri Apr 20, 2018 6:23 pm

sorry double post

User avatar
masterbiz
Registered User
Posts: 52
Joined: Thu Dec 20, 2012 8:31 am

Re: [3.2][BETA] Topic Template

Post by masterbiz » Sun May 13, 2018 3:30 pm

excellent extension :)

php-bb3-user
Registered User
Posts: 41
Joined: Wed Mar 19, 2014 1:16 pm

Re: [3.2][BETA] Topic Template

Post by php-bb3-user » Thu May 24, 2018 6:50 am

Currently I use phpbb3.2.2 and could use an topic template extension, so I created a folder named marttiphpbb and an subfolder named topictemplate.
In the subfolder I copied all unpacked files and finally found the extension in the admin extension manager.
Yet at enabling this extension I receive the following error:

Parse error: syntax error, unexpected '?' in /public/sites/www.mkservices.nl/computerhulp/ext/mart ... /store.php on line 61

How do I solve this?
Assumption causes many times lots of trouble.

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

Re: [3.2][BETA] Topic Template

Post by martti » Thu May 24, 2018 7:03 am

php-bb3-user wrote: ↑
Thu May 24, 2018 6:50 am
Currently I use phpbb3.2.2 and could use an topic template extension, so I created a folder named marttiphpbb and an subfolder named topictemplate.
In the subfolder I copied all unpacked files and finally found the extension in the admin extension manager.
Yet at enabling this extension I receive the following error:

Parse error: syntax error, unexpected '?' in /public/sites/www.mkservices.nl/computerhulp/ext/mart ... /store.php on line 61

How do I solve this?
You got stuck at a Null coalescing operator
Your PHP version is probably not 7+

php-bb3-user
Registered User
Posts: 41
Joined: Wed Mar 19, 2014 1:16 pm

Re: [3.2][BETA] Topic Template

Post by php-bb3-user » Thu May 24, 2018 7:10 am

It is actually 5.6.17-1~dotdeb+7.1
Assumption causes many times lots of trouble.

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

Re: [3.2][BETA] Topic Template

Post by martti » Thu May 24, 2018 7:29 am

php-bb3-user wrote: ↑
Thu May 24, 2018 7:10 am
It is actually 7.1
Still my guess is that you are not using PHP7+. Did you check with phpinfo() (ACP > PHP Information) ?
The line in question reads:

Code: Select all

	return $this->data[$key] ?? null;
The Null coalescing operator (??) was introduced in PHP 7.0
But your PHP parser expects a ternary and doesn't understand the second question mark (?)

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

Re: [3.2][BETA] Topic Template

Post by martti » Thu May 24, 2018 7:30 am

php-bb3-user wrote: ↑
Thu May 24, 2018 7:10 am
It is actually 5.6.17-1~dotdeb+7.1
So it's PHP 5.6

php-bb3-user
Registered User
Posts: 41
Joined: Wed Mar 19, 2014 1:16 pm

Re: [3.2][BETA] Topic Template

Post by php-bb3-user » Thu May 24, 2018 7:38 am

I misread, therefor I copied it from acp.
Do you know of an older extension version that does actually support the 5.6 php for phpbb3.2.2 version?
Last edited by php-bb3-user on Thu May 24, 2018 7:41 am, edited 1 time in total.
Assumption causes many times lots of trouble.

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

Re: [3.2][BETA] Topic Template

Post by martti » Thu May 24, 2018 7:40 am

martti wrote: ↑
Thu May 24, 2018 7:30 am
php-bb3-user wrote: ↑
Thu May 24, 2018 7:10 am
It is actually 5.6.17-1~dotdeb+7.1
So it's PHP 5.6
~dotdeb+7.1 is the build for Debian 7.1. Which is from June 2013.

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

Re: [3.2][BETA] Topic Template

Post by martti » Thu May 24, 2018 7:42 am

php-bb3-user wrote: ↑
Thu May 24, 2018 7:38 am
I misread, therefor I copied it from acp.
Do you know of an older extension version that does actually support the 5.6 php for phpbb3.2.2 version?
My previous extension "Posting Template".

php-bb3-user
Registered User
Posts: 41
Joined: Wed Mar 19, 2014 1:16 pm

Re: [3.2][BETA] Topic Template

Post by php-bb3-user » Thu May 24, 2018 7:46 am

Thanks.

So Later on, when php 5.6 has been upgraded, an conversion can be done, correct?
Assumption causes many times lots of trouble.

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

Re: [3.2][BETA] Topic Template

Post by martti » Thu May 24, 2018 7:54 am

php-bb3-user wrote: ↑
Thu May 24, 2018 7:46 am
Thanks.

So Later on, when php 5.6 has been upgraded, an conversion can be done, correct?
That's right. It's described in the first post here.

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: Exabot [Bot] and 29 guests