[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use a gambas web cgi in a phpBB forum


On 12/5/25 12:39 PM, Bruce Steers wrote:
also i found a nice hack for the highlighting.
the gambas code boxes have a "gambas" class so i used this code to get all gambas classes and ensure they are code blocks.....

[snip]

I have added that to the phpBB/styles/<stylename>/template/overall_footer.html just before the </body> tag.
on all styles.

Nice.

Just FYI, you can also use the DOMContentLoaded event anywhere in the page's code to ensure the DOM is fully loaded:
document.addEventListener("DOMContentLoaded", function() {
    // Your code here
});

But, placing it just above the <body> tag also works.



I just need to figure out how to stop the default highlighter trying to highlight it as it just gets re-written after.

Perhaps duplicate the CODE block HTML to create a distinct block that phpBB won't recognize as a "CODE" block and change
if (ele.tagName == "CODE" ) { makeGB(ele); };
to something like
if (ele.tagName == "GBCODE" ) { makeGB(ele); };


--
Lee

--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----


References:
Re: use a gambas web cgi in a phpBB forumBruce Steers <bsteers4@xxxxxxxxx>
Re: use a gambas web cgi in a phpBB forumLee <t.lee.davidson@xxxxxxxxx>
Re: use a gambas web cgi in a phpBB forumBruce Steers <bsteers4@xxxxxxxxx>