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 » Thu Oct 18, 2018 3:12 am

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
Jr. Extension Validator
Posts: 14905
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Extensions for writing core files

Post by david63 » 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/
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

bryan23
Registered User
Posts: 102
Joined: Thu Dec 28, 2017 2:16 pm

Re: Extensions for writing core files

Post by bryan23 » Sat Oct 20, 2018 2:14 am

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: 541
Joined: Mon Oct 24, 2016 3:22 pm
Contact:

Re: Extensions for writing core files

Post by Toxyy » Sat Oct 20, 2018 6:15 pm

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

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][RC] Show User Activity

User avatar
</Solidjeuh>
Registered User
Posts: 1069
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Extensions for writing core files

Post by </Solidjeuh> » Sun Oct 21, 2018 12:13 am

Or my Board Magic. You can add html, css & language
https://github.com/Solidjeuh/BoardMagic
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

User avatar
Toxyy
Registered User
Posts: 541
Joined: Mon Oct 24, 2016 3:22 pm
Contact:

Re: Extensions for writing core files

Post by Toxyy » 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?
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][RC] Show User Activity

User avatar
</Solidjeuh>
Registered User
Posts: 1069
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Extensions for writing core files

Post by </Solidjeuh> » 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.
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

bryan23
Registered User
Posts: 102
Joined: Thu Dec 28, 2017 2:16 pm

Re: Extensions for writing core files

Post by bryan23 » Wed Oct 24, 2018 3:53 am

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 » Wed Oct 24, 2018 3:56 am

</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 » Wed Oct 24, 2018 7:08 am

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
Jr. Extension Validator
Posts: 14905
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Extensions for writing core files

Post by david63 » Wed Oct 24, 2018 7:17 am

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Toxyy
Registered User
Posts: 541
Joined: Mon Oct 24, 2016 3:22 pm
Contact:

Re: Extensions for writing core files

Post by Toxyy » Wed Oct 24, 2018 7:17 am

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!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][RC] Show User Activity

User avatar
david63
Jr. Extension Validator
Posts: 14905
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Extensions for writing core files

Post by david63 » Wed Oct 24, 2018 7:25 am

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

bryan23
Registered User
Posts: 102
Joined: Thu Dec 28, 2017 2:16 pm

Re: Extensions for writing core files

Post by bryan23 » Wed Oct 24, 2018 7:33 am

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: 541
Joined: Mon Oct 24, 2016 3:22 pm
Contact:

Re: Extensions for writing core files

Post by Toxyy » Wed Oct 24, 2018 7:36 am

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!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][RC] Show User Activity

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: xpmen and 5 guests