Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2802

phpBB Custom Coding • Re: [SOLVED] Does anyone understand Twig macros?

$
0
0
Aha. Just thought of something to test. Using the DEFINE option introduces a hazard for beginners, because it necessitates using correct PHP syntax for escaping apostrophes. Not a problem once you know about it, but will kill the whole site if you miss one.

This works:

Code:

{% DEFINE GB_URLPAR_DISABLED = '<strong>You have disabled automatic parsing of URL\'s.</strong>' %}
This will give you a white page of death:

Code:

{% DEFINE GB_URLPAR_DISABLED = '<strong>You have disabled automatic parsing of URL's.</strong>' %}
So in that respect the macros option may be safer for some people, even though it has other drawbacks.

Statistics: Posted by Gumboots — Tue Apr 15, 2025 12:16 am



Viewing all articles
Browse latest Browse all 2802

Trending Articles