[ABD] Custom Code

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Locked
User avatar
Lumpy Burgertushie
Registered User
Posts: 69189
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [RC] Custom Code

Post by Lumpy Burgertushie »

I don't know much about how to create extensions at all, but I always wondered why you put all the html files in the store folder to begin with. I don't think other extensions do that , do they?


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
Sniper_E
Registered User
Posts: 986
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Edward Humphrey
Contact:

Re: [RC] Custom Code

Post by Sniper_E »

@ martti, I'm sorry your extension is having this problem with 3.1.6

I wish you good luck straighten it out and keeping this fine extension working.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Custom Code

Post by martti »

Lumpy Burgertushie wrote:I don't know much about how to create extensions at all, but I always wondered why you put all the html files in the store folder to begin with. I don't think other extensions do that , do they?


robert
Because the store folder is writeable and the ext folder is not. And the files in the store/customcode directory is user content/data and isn't clearly part of the extension code itself.
User avatar
KillBill.
Registered User
Posts: 625
Joined: Tue Jun 02, 2009 4:07 pm
Contact:

Re: [RC] Custom Code

Post by KillBill. »

martti wrote:
Lumpy Burgertushie wrote:I don't know much about how to create extensions at all, but I always wondered why you put all the html files in the store folder to begin with. I don't think other extensions do that , do they?


robert
Because the store folder is writeable and the ext folder is not. And the files in the store/customcode directory is user content/data and isn't clearly part of the extension code itself.
Idea change ext code:

1. you create new folder ext/marttiphpbb/customcode/styles/all/template/customcode
2. add info this folder change chmod 777
3. you change event/ all html include path
example
this
<!-- INCLUDE ../../../../../../store/customcode/overall_footer_after.html -->
replace
<!-- INCLUDE customcode/overall_footer_after.html -->
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [RC] Custom Code

Post by david63 »

KillBill. wrote:Idea change ext code:

1. you create new folder ext/marttiphpbb/customcode/styles/all/template/customcode
2. add info this folder change chmod 777
3. you change event/ all html include path
That idea, whilst good, would not get past validation.

It is not allowed to add/delete/modify files within an extension. The way that it is handled at the moment is, as I understand it, the correct way. The issue is to resolve the Twig change (which may be a bug)
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
Raul [ThE KuKa]
Style Customisations
Style Customisations
Posts: 10846
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo
Contact:

Re: [RC] Custom Code

Post by Raul [ThE KuKa] »

Users,
This extension not works on 3.1.6 version, please disable extension BEFORE update to 3.1.6 version please.
All unsolicited PMs will be ignored.
:warning: Knowledge Base | Documentation | Board rules | phpBB Styles Rules & Policies | Styles Queue Stats :warning:


If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate.
:flag_es: phpBB Spain - Online Since 2003 :heart:


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

Re: [RC] Custom Code

Post by martti »

Raul [ThE KuKa] wrote:Users,
This extension not works on 3.1.6 version, please disable extension BEFORE update to 3.1.6 version please.
This warning is put in the first post now.
User avatar
Mauron
Registered User
Posts: 342
Joined: Wed Jul 16, 2014 11:25 am

Re: [RC] Custom Code

Post by Mauron »

Galixte de EzCom wrote:Go in PhpMyAdmin, in table phpbb_ext, in column ext_name search the line marttiphpbb/customcode, in the column ext_active for the corresponding line found change the value 1 to 0.
martti wrote:If you are not logged in the ACP then delete the styles directory from the extension first. (under ext/marttiphpbb/customcode/) Then the board should work again.
Both these solutions don't work (I'm using a local test board anyway, so MEH).
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Custom Code

Post by martti »

Mauron wrote:
Galixte de EzCom wrote:Go in PhpMyAdmin, in table phpbb_ext, in column ext_name search the line marttiphpbb/customcode, in the column ext_active for the corresponding line found change the value 1 to 0.
martti wrote:If you are not logged in the ACP then delete the styles directory from the extension first. (under ext/marttiphpbb/customcode/) Then the board should work again.
Both these solutions don't work (I'm using a local test board anyway, so MEH).
Also delete the contents of the cache directory.
User avatar
Mauron
Registered User
Posts: 342
Joined: Wed Jul 16, 2014 11:25 am

Re: [RC] Custom Code

Post by Mauron »

martti wrote:Also delete the contents of the cache directory.
Thanks, it worked now.

For reference, I didn't delete all the cache but the one file the error pointed out:

Code: Select all

Fatal error: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template "@marttiphpbb_customcode/event/overall_header_head_append.html" (looked into: ) in "overall_header.html" at line 63.' in xxx\yyy\phpBB\vendor\twig\twig\lib\Twig\Loader\Filesystem.php:195 Stack trace: #0 xxx\yyy\phpBB\phpbb\template\twig\loader.php(107): Twig_Loader_Filesystem->findTemplate('@marttiphpbb_cu...') #1 xxx\yyy\phpBB\vendor\twig\twig\lib\Twig\Loader\Filesystem.php(138): phpbb\template\twig\loader->findTemplate('@marttiphpbb_cu...') #2 xxx\yyy\phpBB\vendor\twig\twig\lib\Twig\Environment.php(266): Twig_Loader_Filesystem->getCacheKey('@marttiphpbb_cu...') #3 xxx\yyy\phpBB\vendor\twig\twig\lib\Twig\Environment.php(324): Twig_Environment->getTemplateClass('@marttiphpbb_cu...', NULL) #4 xxx\yyy\phpBB\phpbb\template\twig\environment.php(166): Twig_Environment->loadTemplate('@marttiphpbb_cu...', NULL) #5 xxx\yyy\phpBB\cache\twig\c\e\ce0d92172b651115f5888a88e54bb33c8a2c8244acaaa909db6bdfacd0ffc390.php(26 in xxx\yyy\phpBB\vendor\twig\twig\lib\Twig\Loader\Filesystem.php on line 195
So I went and just deleted phpBB\cache\twig\c\e\ce0d92172b651115f5888a88e54bb33c8a2c8244acaaa909db6bdfacd0ffc390.php.
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Custom Code

Post by martti »

KillBill. wrote: Idea change ext code:

1. you create new folder ext/marttiphpbb/customcode/styles/all/template/customcode
2. add info this folder change chmod 777
3. you change event/ all html include path
example
this
<!-- INCLUDE ../../../../../../store/customcode/overall_footer_after.html -->
replace
<!-- INCLUDE customcode/overall_footer_after.html -->
The disadvantages are:
  • It is not plug and play.
  • Data in the repository code. (You have to pay attention not to delete your custom code when updating).
  • Can not be validated.
For anyone that is using the Custom Code extension I propose the following solution/alternative:

Create your own private extension by modifying this little extension: https://github.com/marttiphpbb/phpbb-ex ... mplatecode

In the ext/marttiphpbb/inserttemplatecode/style/all/template/event directory you can put then any template events you like.
If you have created content with the Custom Code extension, you can copy the contents of the store/customcode directory and move it to ext/marttiphpbb/inserttemplatecode/style/all/template/event.
(If you had included other files with <!-- INCLUDE ../../../../../../ you have to remove the prefix ../../../../../../ to and put the included files in ext/marttiphpbb/inserttemplatecode/style/all/template)

Don't forget to clear the cache when you have edited something. Tip: whilst editing you can switch on the option Recompile stale style components in ACP > Load Settings. Then you don't need to clear the cache each time you change something. But for the sake of performance switch off this option after editing.

The disadvantage is that you loose the editor of the Custom Code extension in the ACP. But on the other hand it is more flexible as you can easily insert any template event possible. You are not limited by the set template events that was provided by the Custom Code extension.
You can use my extension Template Event Locations to see markers in the board of all template events available.
Image

Here are 2 extra little extensions that provide extra template variables (these were used in the previous examples):
Last edited by martti on Sun Sep 13, 2015 6:52 pm, edited 4 times in total.
MarieNatalie
Registered User
Posts: 46
Joined: Tue May 05, 2015 1:19 pm
Location: Athens Greece
Name: Maria

Re: [RC] Custom Code

Post by MarieNatalie »

martti wrote:This extension does not work on the phpBB 3.1.6 version, please disable extension BEFORE update to 3.1.6 version.
Could you please tell us... just disable or and DELETE data?

Thanks in advance
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Custom Code

Post by martti »

MarieNatalie wrote:
martti wrote:This extension does not work on the phpBB 3.1.6 version, please disable extension BEFORE update to 3.1.6 version.
Could you please tell us... just disable or and DELETE data?

Thanks in advance
Disable.
User avatar
Solidjeuh
Registered User
Posts: 522
Joined: Wed Oct 06, 2010 11:20 pm
Location: Aalst / Belgium
Name: Andy Dm
Contact:

Re: [RC] Custom Code

Post by Solidjeuh »

I noticed in phpbb update that auto update still is merging files
So would it not be easyer to just edit the code files like before?
Or am I mistaking?
I don't suffer from insanity. I enjoy every minute of it.
User avatar
martti
Registered User
Posts: 911
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Custom Code

Post by martti »

Solidjeuh wrote:I noticed in phpbb update that auto update still is merging files
So would it not be easyer to just edit the code files like before?
Or am I mistaking?
It's always better to have a clean separation between the core and anything else, imho.
Locked

Return to “Abandoned Extensions”