[3.2][BETA] Custom Code

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!
Anti-Spam Guide
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
zpintar
Registered User
Posts: 30
Joined: Fri Jan 18, 2013 8:51 am
Location: Croatia
Name: Žarko Pintar
Contact:

Re: [RC] Custom Code

Post by zpintar » Thu Sep 24, 2015 7:30 am

martti wrote: Mind the extension became incompatible with phpBB 3.1.6. See previous posts and first post for a workaround.
Yes, I noted that, but on my site (currently in testing) I've just using 3.15 version where extension works without problems.

BTW, I didn't read all thread about this "3.16" incompatibility but will you fix this? Why this extension has problem with 3.16 ?

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

Re: [RC] Custom Code

Post by martti » Thu Sep 24, 2015 7:37 am

zpintar wrote:
martti wrote: Mind the extension became incompatible with phpBB 3.1.6. See previous posts and first post for a workaround.
Yes, I noted that, but on my site (currently in testing) I've just using 3.15 version where extension works without problems.

BTW, I didn't read all thread about this "3.16" incompatibility but will you fix this? Why this extension has problem with 3.16 ?
I don't think it can be fixed. The path that templates can be added became limited and it is currently not possible to add extra paths.

User avatar
zpintar
Registered User
Posts: 30
Joined: Fri Jan 18, 2013 8:51 am
Location: Croatia
Name: Žarko Pintar
Contact:

Re: [RC] Custom Code

Post by zpintar » Thu Sep 24, 2015 7:40 am

Huh, shame... :(

I'll see that workaround...

User avatar
Binano
Registered User
Posts: 62
Joined: Thu Jun 25, 2015 9:24 am

Re: [RC] Custom Code

Post by Binano » Thu Sep 24, 2015 9:04 am


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

Re: [RC] Custom Code

Post by martti » Thu Sep 24, 2015 9:08 am

viewtopic.php?f=456&t=2275361&start=600#p14209336

Ok, I wil update and remove this My content.

Edit: it is removed now.

User avatar
Binano
Registered User
Posts: 62
Joined: Thu Jun 25, 2015 9:24 am

Re: [RC] Custom Code

Post by Binano » Thu Sep 24, 2015 9:58 am

Oups, sorry :oops:
Edit: it is removed now
Thanks 8-)

User avatar
Lumpy Burgertushie
Registered User
Posts: 66738
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [RC] Custom Code

Post by Lumpy Burgertushie » Thu Sep 24, 2015 3:32 pm

I don't know much about how extensions work but I wonder why you have to create a folder inside the store folder for your files when no other extension does this?

is that the problem with 3.1.6, that it creates its folders outside of the actual extension?

from what I have read, extensions have to be completely free standing and require no changes to the code to be able to be validated.


I think this extension is great but I would think it could be rewritten to not have to create new folders/files outside of the extension.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

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

Re: [RC] Custom Code

Post by martti » Thu Sep 24, 2015 3:45 pm

Lumpy Burgertushie wrote:I don't know much about how extensions work but I wonder why you have to create a folder inside the store folder for your files when no other extension does this?
For the reason you write yourself below: you should not edit/change the repository code of the extension yourself. Extensions should be plug and play. And the custom code files should be stored somewhere.
is that the problem with 3.1.6, that it creates its folders outside of the actual extension?
Yes
from what I have read, extensions have to be completely free standing and require no changes to the code to be able to be validated.

I think this extension is great but I would think it could be rewritten to not have to create new folders/files outside of the extension.

robert
How else would you do that?

User avatar
Lumpy Burgertushie
Registered User
Posts: 66738
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [RC] Custom Code

Post by Lumpy Burgertushie » Thu Sep 24, 2015 3:49 pm

the requirement is that you not change core phpbb code, not that you don't allow changes to your extension when needed.

I have no idea how it would be done but the other extension authors seem able to do it by just putting all needed html files in the styles/template/event folder of their extensions.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

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

Re: [RC] Custom Code

Post by martti » Thu Sep 24, 2015 3:57 pm

Lumpy Burgertushie wrote:the requirement is that you not change core phpbb code, not that you don't allow changes to your extension when needed.

I have no idea how it would be done but the other extension authors seem able to do it by just putting all needed html files in the styles/template/event folder of their extensions.


robert
The content of the store directory is not part of the phpBB core. Hence the name store. For example you find database backups there.
User content does not belong in the extension directory. The extension directory is the responsibility of the extension author and under version control. Changes, edits would be lost on update to the next version of the extension.
Other extensions you mention don't have user defined templates.

marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [RC] Custom Code

Post by marcovo » Thu Sep 24, 2015 4:19 pm

Just a thought; would it be possible to store the user defined templates in the database, and feed that to the template parser, instead of feeding a file? And maybe then put the parsed output into a template variable so it will be displayed? Or have you already considered this?
I guess some BBcodes also work this way.

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

Re: [RC] Custom Code

Post by martti » Thu Sep 24, 2015 4:55 pm

marcovo wrote:Just a thought; would it be possible to store the user defined templates in the database, and feed that to the template parser, instead of feeding a file? And maybe then put the parsed output into a template variable so it will be displayed? Or have you already considered this?
I guess some BBcodes also work this way.
The nice thing of using files is that it doesn't create extra overhead. It doesn't matter how many files you include, all included static files get merged into one in the cache system.

marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [RC] Custom Code

Post by marcovo » Thu Sep 24, 2015 4:59 pm

That's true; but if your approach is not going to work with phpBB 3.1.6, .7, .8, etc.. (or is it?), I guess then it will be a choice between having a little extra overhead on the one hand, against no extension at all on the other? Or are is there already some progress in phpBB 3.1.7 to make it compatible again or sth like that?

User avatar
david63
Registered User
Posts: 16561
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [RC] Custom Code

Post by david63 » Fri Sep 25, 2015 1:13 pm

Not sure if this would work but it might be worth looking into (if you have not already done so)

Use the phpbb cache functions and load the files into the cache (if the are not already there) and then use them from the cache, possibly loading them into twig.
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
thunderchero
Registered User
Posts: 129
Joined: Sun Nov 03, 2013 10:16 pm

Re: [RC] Custom Code

Post by thunderchero » Fri Sep 25, 2015 5:41 pm

marcovo wrote:That's true; but if your approach is not going to work with phpBB 3.1.6, .7, .8, etc.. (or is it?), I guess then it will be a choice between having a little extra overhead on the one hand, against no extension at all on the other? Or are is there already some progress in phpBB 3.1.7 to make it compatible again or sth like that?
I ask basically same question a few pages back, I had to come to my own conclusion.

first, extensions are validated based on the current release of phpbb and they are not re-validated when a new version of phpbb is released. (unless extension author edits if needed and re-submits)
viewtopic.php?f=461&t=2336011&p=14204811#p14204851

so if this extension was validated on 3.1.5 this still would have happened. and could happen to any extension already validated. while extension would still have validated status. :shock:

Post Reply

Return to “Extensions in Development”