Can you use BBCode Buttons for Templates?

Get help developing custom BBCodes or request one.
Post Reply
Mr.Mystery
Registered User
Posts: 15
Joined: Thu Apr 07, 2022 11:11 am

Can you use BBCode Buttons for Templates?

Post by Mr.Mystery »

Hey,

I was wondering if it's possible to create new BBcode Buttons on the top to create a template.

For example when you press the button it should add the following text to your post and you just need to replace parts / add your information.

Code: Select all

Length: (Please put the size in mm)
Location: (Please put your location (Town / Country))
Time/Date: (Please put a timestamp on you found her. Time of the day and a date)

Additional Information: [URL2]https://www.google.com[/URL2]
It would help me to create some templates so users can just press a button and fill out what is needed.

What would I need to put for both BBCode and HTML replacement?

We are currently using phpBB version 3.2.0
Last edited by Mr.Mystery on Fri Jun 24, 2022 12:53 pm, edited 2 times in total.
User avatar
Talk19Zehn
Registered User
Posts: 846
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Can you use BBCode Buttons for Templates?

Post by Talk19Zehn »

Hello, if I understand correctly, perhaps the EXT: Post Models
https://www.phpbb.com/customise/db/exte ... st_models/
may be of interest to you.

Customisation for phpBB-3.3.x:
https://www.phpbb.com/customise/db/exte ... 66#p778166

Many greetings
Best regards
phpBB3 Designs - My own works: Stylearea Ongray-Designs, Adventinducement-Calendar for phpBB
Mr.Mystery
Registered User
Posts: 15
Joined: Thu Apr 07, 2022 11:11 am

Re: Can you use BBCode Buttons for Templates?

Post by Mr.Mystery »

Looks interesting but I would prefer to not use "plugins", "addons" or "extensions" since it's a bigger change than adding a button on the top bar.
It's also because even tho I'm an admin, I'm still not the owner of the forum so I cannot just make such decissions on my own. I'm sure they wouldn't mind but I don't want to ask if there is some work around for this.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Can you use BBCode Buttons for Templates?

Post by david63 »

Mr.Mystery wrote: Fri Jun 24, 2022 12:03 pm I would prefer to not use "plugins", "addons" or "extensions" since it's a bigger change than adding a button on the top bar.
So uploading an extension and enabling it is a "bigger" change than modifying core files (which would need to be done after every update) - not sure how you arrive at that!
Mr.Mystery wrote: Fri Jun 24, 2022 12:03 pm so I cannot just make such decissions on my own
But that is what you appear to be doing
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Mr.Mystery
Registered User
Posts: 15
Joined: Thu Apr 07, 2022 11:11 am

Re: Can you use BBCode Buttons for Templates?

Post by Mr.Mystery »

david63 wrote: Fri Jun 24, 2022 12:41 pm
Mr.Mystery wrote: Fri Jun 24, 2022 12:03 pm I would prefer to not use "plugins", "addons" or "extensions" since it's a bigger change than adding a button on the top bar.
So uploading an extension and enabling it is a "bigger" change than modifying core files (which would need to be done after every update) - not sure how you arrive at that!
Mr.Mystery wrote: Fri Jun 24, 2022 12:03 pm so I cannot just make such decissions on my own
But that is what you appear to be doing
When I'm talking about the BBCodes I mean those that are under Admin Interface (ACP) > Posting > BBCodes.
It's basically adding another entry which would add the needed Text. I also had another attempt where I tried to create a template with it but the best I managed was something too complicated for normal non-programming users and I've at the same time raised the question to test the extension.

I'm not exactly sure how I'm modifying core files by creating an entry that is most likely going to be stored in an SQL db or similar database table.

Also just to mention it. We are currently using phpBB version 3.2.0
User avatar
Talk19Zehn
Registered User
Posts: 846
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Can you use BBCode Buttons for Templates?

Post by Talk19Zehn »

Difficult or not. Or what exactly is it about? Pastebin ... (?).
You can also create a template via BBCode, link it in a forum FAQ or wherever (rules etc.), which must / could be filled in.

Information stands and falls with the person who should use it .....

Sample template: Example - Point 4
https://www.phpbb.com/extensions/rules- ... ent-rules/

Which, however, does not mean copyright and/or infringement (colors, etc.). Templates of this kind (i.e. similar) can often be found on that or another phpBB board ...

If you have no influence on the operator, only suggestions remain. Due to lack of time, I have no further ideas.

Edit: 24 Jun 2022, 15:38
It is better to ask here whether you are allowed to use the BBCode-(template) - If this document proves useful.
.
Last edited by Talk19Zehn on Fri Jun 24, 2022 1:39 pm, edited 1 time in total.
Best regards
phpBB3 Designs - My own works: Stylearea Ongray-Designs, Adventinducement-Calendar for phpBB
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26505
Joined: Fri Aug 29, 2008 9:49 am

Re: Can you use BBCode Buttons for Templates?

Post by Mick »

The author reckons this will work with 3.3 viewtopic.php?f=456&t=2468891

It’s still actively supported too viewtopic.php?p=15846556#p15846556

It may be possible to write a Custom BBCode that just writes a few lines of text when the button is clicked.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Mr.Mystery
Registered User
Posts: 15
Joined: Thu Apr 07, 2022 11:11 am

Re: Can you use BBCode Buttons for Templates?

Post by Mr.Mystery »

Mick wrote: Fri Jun 24, 2022 1:32 pm It may be possible to write a Custom BBCode that just writes a few lines of text when the button is clicked.
That would be exactly what I need. :)
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26505
Joined: Fri Aug 29, 2008 9:49 am

Re: Can you use BBCode Buttons for Templates?

Post by Mick »

I don’t know if you managed to sort the request but you can try something like this to see if you can make it work for your needs.

BBCode usage:

Code: Select all

[template][/template]
HTML replacement:

Code: Select all

Length: (Please put the size in mm)<br>
Location: (Please put your location (Town/Country))<br>
Time/Date: (Please put a timestamp on you found her. Time of the day and a date)<br><br>

Additional Information: <a href="https://google.com">Google</a>
Result:
158B5235-A520-43E9-8801-C0C4763B23E4.jpeg
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Mr.Mystery
Registered User
Posts: 15
Joined: Thu Apr 07, 2022 11:11 am

Re: Can you use BBCode Buttons for Templates?

Post by Mr.Mystery »

This is one step closer, however it's sadly not working the way I hoped. Would have been nice to click on the button "Template" and it drops the HTML replacement part in. :/

It would be first easier for the users to use and second they could fill it out then.

I guess I will have to go with a plugin / extension / addon.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26505
Joined: Fri Aug 29, 2008 9:49 am

Re: Can you use BBCode Buttons for Templates?

Post by Mick »

Mr.Mystery wrote: Thu Jul 21, 2022 9:21 amWould have been nice to click on the button "Template" and it drops the HTML replacement part in
Not sure what you mean but when you click the button it generates the template text and then the users can answer the questions posted.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Can you use BBCode Buttons for Templates?

Post by Brf »

Mick wrote: Thu Jul 21, 2022 10:47 am when you click the button it generates the template text and then the users can answer the questions posted.
Your example above would not work though. All it would do is drop [template][/template] in the post editor and then show your HTML replacement when the post is viewed. The HTML replacement does not go into the editor.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26505
Joined: Fri Aug 29, 2008 9:49 am

Re: Can you use BBCode Buttons for Templates?

Post by Mick »

Yep, your right. I did test it and thought it was ok but obviously I misled myself.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Post Reply

Return to “Custom BBCode Development and Requests”