Author: toxyy
Special Thanks To: ToddSmith and Edwin (sponsoring and testing)
Extension Description: Make, manage, and use forms in posts within phpBB 3.3
Extension Version: 0.0.2
- **phpBB 3.3.10-RC1
- PHP 7+
There is a bug in phpBB core that prevents this extension from working properly. The ticket is defined below.
to fix this yourself, open
/forumroot/phpbb/request/type_cast_helper.php
Find
!preg_match('/^./u', $result)
Replace with
!preg_match('//u', $result)
Issues as of phpBB 3.3.10:
There is a "fix" for this extension itself to only allow English characters for no required core changes, but I have reports that even apostrophes get converted to question marks. If anyone wants this "fix", they can ask and I'll respond. As of now I would just change the core code as defined above. I believe the current code shouldn't require the "fix" and should work as is with normal English characters.
- (core bug) fix multibyte preg_match in type_cast_helper.php, manual fix defined above (ticket 17188)
Extension Download: https://github.com/toxyy/postformtempla ... -0.0.2.zip
Github repository: https://github.com/toxyy/postformtemplates
Languages: en
Templates: all
Features:
- Categories, templates, entries, and subentries
- Max depth of three, so Category -> Category -> Form Template is supported
- Just about every way you can think to copy settings or entries is there
- Multiple entry types (text entry, radio, checkbox, dropdown, and notes)
- Subentries as well to give your forms more flavor
- Newlines before or after entry tag/matches, so you can better format how the code is added to a post
- Full custom permission system for users and groups
- Header images, image cycle settings, and image management system
- Lots more!
- Create `toxyy/postformtemplates` in the `ext` directory.
- Download and unpack the repository into `ext/toxyy/postformtemplates`
- Enable `Post Form Templates` in the ACP at `Customise -> Manage extensions`.
The examples and descriptions by each setting should be pretty straightforward but I will offer support to clarify anything within this topic.
The main thing is that Entry Matches MUST have
{TEXT}
in them to be replaced with user entries for text replace, checkbox, radio, and dropdown. If no {TEXT}
is there, then only what is in the entry match will be replaced, making them effectively useless.Help line text is just text that appears when you hover over a question, it changes the cursor to correspond and your note will appear.
Also, any text in a postbox will be reset when selecting a template due to how I made the dropdown. This also applies to subjects when making a new topic. Will not fix this.
Template descriptions only show up in the ACP, I was going to make them appear on the frontend but never got around to it and don't feel the need now.
Delimiters for checkboxes are a
,
followed by a newline. I did not make this customizable at this time.** In order for templates to be displayed, you need to add template permissions. On installation, there are no permissions initially set up. These are in the extensions tab as shown in the 6th and 7th picture. Setting view/use to true for registered users should be enough for the whole form to be able to use them.
Screenshots:
This is just a minor preview. I could add many more pictures but this is already a bit much. It's a very big extension!
In a post:
What it looks like when you add, and then preview:
Form settings in the ACP:
Entry settings in the ACP:
Main image management page in ACP (I just used smiles as a quick example, use whatever images you want!)
Main permissions page (as you're used to):
Setting permissions page (also as you're used to):