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

Re: use a gambas web cgi in a phpBB forum


On 11/29/25 3:41 PM, Lee wrote:
And here is the code for the "gbcode" ("[gbcode]{TEXT}[/gbcode]") custom bbcode:
<script>document.addEventListener('DOMContentLoaded',function(){const xhr=new XMLHttpRequest();xhr.onload=()=>{if (xhr.readyState==4 && xhr.status==200){document.getElementById("gbcode").innerHTML=xhr.responseText;}};xhr.open("POST","http:// localhost/~user/Highlighter.gambas");xhr.setRequestHeader("Content-Type","text/plain; charset=UTF-8");xhr.send(document.getElementById("gbcode").innerHTML);});</script><span id="gbcode">{TEXT}</span>

Well, shoot!

Upon further review, I've realized that script code will not work. If there is more than one post using the 'gbcode' bbcode, the SPAN id's will not be unique and only the first one found will be sent to the cgi app for highlighting.


--
Lee

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


Follow-Ups:
Re: use a gambas web cgi in a phpBB forumBruce Steers <bsteers4@xxxxxxxxx>
References:
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>
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>
Re: use a gambas web cgi in a phpBB forumLee <t.lee.davidson@xxxxxxxxx>
Re: use a gambas web cgi in a phpBB forumLee <t.lee.davidson@xxxxxxxxx>