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

Extension Writers Discussion • Re: use php to add extra css class to existing class

$
0
0
But there are other tasks where you can quickly and easily find a solution by directly changing the HTML output, which would otherwise only be possible with a lot of effort or not at all. At least with a private custom extension, this is definitely a legitimate option. I myself had a task some time ago where changing the HTML output was the only way to do it with reasonable effort and without changing the original files.
Hope its okay with an additional question.
im asking because you know about optimizing
Which is best?
Its about another EXT
I can either add an extra stylesheet. That means an extra html file that include the extra stylesheet.
Just a line of display:none;
or this:

Code:

public function add_ccs_class($event){if (strpos($event['output'], '<div class="stat-block statistics">') === false){return;}$event['output'] = preg_replace('/<div class="stat-block statistics">.*?<\/div>/s', '', $event['output']);}

Statistics: Posted by Stoker 4.0 — Fri Feb 14, 2025 9:52 am



Viewing all articles
Browse latest Browse all 2343

Trending Articles