Extensions for writing core files

Discussion forum for Extension Writers regarding Extension Development.
bryan23
Registered User
Posts: 102
Joined: Thu Dec 28, 2017 2:16 pm

Extensions for writing core files

Post by bryan23 »

Hi all, I am not a developer nor I am very good at coding. In other words I am totally new to writing extensions.

Currently I am making core files edit to my board (basic editing of .css and .html files), which I know it is not recommended since phpbb wants us to work with extensions. And of course, I would like to make one specially for my board too, so I won't have to edit the core files..

So I have some questions here:
1) As I already have the edited code in my core files, how difficult is it to write an extension inserting the edited code of mine to the files I want?
E.g:
Inserting this code <meta name="how to write an extension" content="how? please help me"/> to overall_header.html

Can anyone show me an example? if possible.

2) I see there is a skeleton extension, do I start with that to write my own personal extension?

thank you for your time!
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Extensions for writing core files

Post by david63 »

From what you have posted it appears that currently you are only making changes to your style files. If that is the case then to avoid having to reapply those changes whenever there is an update the recommended way is to create a "child" style of prosilver (or whatever style you are using). This means that you create a new style (with whatever name you want to give it) and within that style you have only the files that you have changed. Going this way means that you do not need, at this moment in time, to use any extensions.

For more information on creating a child style see https://www.phpbb.com/styles/create/
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
bryan23
Registered User
Posts: 102
Joined: Thu Dec 28, 2017 2:16 pm

Re: Extensions for writing core files

Post by bryan23 »

Hi david, thanks for the infomation I will read up on it.

Yes, it will save a lot of hassle of editing the files again wherever there is an update from phpbb.
User avatar
Toxyy
Registered User
Posts: 938
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Extensions for writing core files

Post by Toxyy »

I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Extensions for writing core files

Post by </Solidjeuh> »

Or my Board Magic. You can add html, css & language
https://github.com/Solidjeuh/BoardMagic
User avatar
Toxyy
Registered User
Posts: 938
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Extensions for writing core files

Post by Toxyy »

</Solidjeuh> wrote: Sun Oct 21, 2018 12:13 am Or my Board Magic. You can add html, css & language
https://github.com/Solidjeuh/BoardMagic
Do you have any pictures?
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Extensions for writing core files

Post by </Solidjeuh> »

Toxyy wrote: Sun Oct 21, 2018 3:34 pm
</Solidjeuh> wrote: Sun Oct 21, 2018 12:13 am Or my Board Magic. You can add html, css & language
https://github.com/Solidjeuh/BoardMagic
Do you have any pictures?
No, it's just an extension that contains all template events (empty).
You can add code in the templates.
Also for css & language.
The right side buttons on my forum are added via that ext: https://www.solidjeuh.be/.
And lots of other custom things.
bryan23
Registered User
Posts: 102
Joined: Thu Dec 28, 2017 2:16 pm

Re: Extensions for writing core files

Post by bryan23 »

Toxyy wrote: Sat Oct 20, 2018 6:15 pm These two may interest you:

viewtopic.php?f=456&t=2275361
viewtopic.php?f=456&t=2473561
Yes, I searched around and got these too. but it is under [BETA]. Not too sure if it will cause any problems :\
bryan23
Registered User
Posts: 102
Joined: Thu Dec 28, 2017 2:16 pm

Re: Extensions for writing core files

Post by bryan23 »

</Solidjeuh> wrote: Sun Oct 21, 2018 4:19 pm
Toxyy wrote: Sun Oct 21, 2018 3:34 pm
</Solidjeuh> wrote: Sun Oct 21, 2018 12:13 am Or my Board Magic. You can add html, css & language
https://github.com/Solidjeuh/BoardMagic
Do you have any pictures?
No, it's just an extension that contains all template events (empty).
You can add code in the templates.
Also for css & language.
The right side buttons on my forum are added via that ext: https://www.solidjeuh.be/.
And lots of other custom things.
the URL you provide solidjeuj.be has a pop out box that follows you scrolling up and down. May I know what extension is that? seems useful to my board.
bryan23
Registered User
Posts: 102
Joined: Thu Dec 28, 2017 2:16 pm

Re: Extensions for writing core files

Post by bryan23 »

david63 wrote: Thu Oct 18, 2018 6:24 am From what you have posted it appears that currently you are only making changes to your style files. If that is the case then to avoid having to reapply those changes whenever there is an update the recommended way is to create a "child" style of prosilver (or whatever style you are using). This means that you create a new style (with whatever name you want to give it) and within that style you have only the files that you have changed. Going this way means that you do not need, at this moment in time, to use any extensions.

For more information on creating a child style see https://www.phpbb.com/styles/create/
Anyway david, is it possible that I download the prosilver style, edit the files I want, rename it to whatever name I want, and put it in the style folder so that it would appear in my ACP and I could activate it. Does it work as simple as this?
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Extensions for writing core files

Post by david63 »

bryan23 wrote: Wed Oct 24, 2018 7:08 am Anyway david, is it possible that I download the prosilver style, edit the files I want, rename it to whatever name I want, and put it in the style folder so that it would appear in my ACP and I could activate it. Does it work as simple as this?
Basically yes - but you only need to put in "your" style style.cgf and the files that you change
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
User avatar
Toxyy
Registered User
Posts: 938
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Extensions for writing core files

Post by Toxyy »

bryan23 wrote: Wed Oct 24, 2018 7:08 am Anyway david, is it possible that I download the prosilver style, edit the files I want, rename it to whatever name I want, and put it in the style folder so that it would appear in my ACP and I could activate it. Does it work as simple as this?
You can set up your style.cfg to have prosilver as it's parent and then you only have to include the html files you've edited.

Edit: david beat me
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Extensions for writing core files

Post by david63 »

Toxyy wrote: Wed Oct 24, 2018 7:17 am you only have to include the html files you've edited
... and/or .css and .js files
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
bryan23
Registered User
Posts: 102
Joined: Thu Dec 28, 2017 2:16 pm

Re: Extensions for writing core files

Post by bryan23 »

Ok I am actually trying this.

I upload an additional default prosilver folder and rename it, put it in my root style folder, but in the ACP it is not showing up so I cant activate it. There must be something for me to change in order to show it in ACP.

sorry and thank you for being helpful!

So it is the style.cfg that I need to change? the name and the parent? could you gave me an example?

Thanks once again
User avatar
Toxyy
Registered User
Posts: 938
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Extensions for writing core files

Post by Toxyy »

bryan23 wrote: Wed Oct 24, 2018 7:33 am So it is the style.cfg that I need to change? the name and the parent? could you gave me an example?

Thanks once again

Code: Select all

#
# phpBB Style Configuration File
#
# This file is part of the phpBB Forum Software package.
#
# @copyright (c) phpBB Limited <https://www.phpbb.com>
# @license GNU General Public License, version 2 (GPL-2.0)
#
# For full copyright and license information, please see
# the docs/CREDITS.txt file.
#
# At the left is the name, please do not change this
# At the right the value is entered
#
# Values get trimmed, if you want to add a space in front or at the end of
# the value, then enclose the value with single or double quotes.
# Single and double quotes do not need to be escaped.
#
#

# General Information about this style
name = blah
copyright = © blah
style_version = 1.0.0
phpbb_version = 3.2.3

# Defining a different template bitfield
# template_bitfield = lNg=

# Parent style
# Set value to empty or to this style's name if this style does not have a parent style
parent = prosilver
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
Post Reply

Return to “Extension Writers Discussion”