Want to post but can't?

Want to just shoot the breeze? Forum 42 is the place!

Moderator: Moderators

Post Reply
nitro2k01
Posts: 651
Joined: Tue Dec 19, 2006 12:41 pm

Want to post but can't?

Post by nitro2k01 »

Want to post to this forum but can't because the text box for entering the message is broken? The answer is probably no, since this place is dead as a dodo at this point, but here's a solution for you anyway.

The problem is that the HTML tag for the message textarea is broken and missing a space. So it looks like this...

Code: Select all

<textareaname="message" id="message" rows="15" cols="76" 
instead of like this:

Code: Select all

<textarea name="message" id="message" rows="15" cols="76" 
It's unclear exactly why his happens, but my theory is that newer versions of PHP are incompatible with the older versions of phpBB that some forums still use.

Here's a user script you can add to Tampermonkey to make this, and potentially other phpBB forums with the same problem, work. (You'd need to add the site you want to add as a match line.)

Code: Select all

// ==UserScript==
// @name         Fix GBADEV forum
// @namespace    http://www.dwedit.org/
// @version      0.2
// @description  Fix invalid HTML tag for the posting textarea
// @author       Dwedit
// @author       nitro2k01
// @match        https://forum.gbadev.org/*
// @match        https://forums.benheck.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    //Code to replace an HTML tag name
    //https://stackoverflow.com/questions/15086677/replace-specific-tag-name-javascript
    function changeTag(el, newTagName = "div") { var newEl = document.createElement(newTagName); [...el.children].forEach(o => newEl.appendChild(o)); [...el.attributes].forEach(o => newEl.attributes.setNamedItem(o.cloneNode())); el.parentNode.replaceChild(newEl, el); return newEl; }
    var elements = document.getElementsByTagName("textareaname=\"message\"");
    if (elements !== undefined && elements.length > 0)
    {
        var element = elements[0];
        element.setAttribute("name","message");
        // Preserve the message for edit/preview. Trim the string to get rid of annoying whitespace at the end of the string.
        var message=element.innerHTML.trim();
        var newEl=changeTag(element, "textarea");
        newEl.innerHTML=message;
    }
})();
Here's where I first encountered this issue, on a different forum, for reference: https://forum.gbadev.org/viewtopic.php?f=6&t=18213

Edit: fixed typo.
My blog
ASM Retro <- Gameboy Classic Backlight

Being the sadistic bastard I am, I have covered Frog's left eye with a Santa hat.

Last edited by nitro2k01 tomorrow, 1:48 pm; edited 1 time in total
Triton
Moderator
Posts: 7397
Joined: Mon May 24, 2004 12:33 pm
360 GamerTag: triton199
Steam ID: triton199
Location: Iowa
Contact:

Re: Want to post but can't?

Post by Triton »

some of us old guard do check in from time to time lol. lucky for me the reply box seems to be working
schmellyfart
Portablizer Extraordinaire
Posts: 1151
Joined: Sun Mar 05, 2006 8:29 pm
Steam ID: schmellyfart
Location: Gilbert, AZ

Re: Want to post but can't?

Post by schmellyfart »

well hello there
segasonicfan
Moderator
Posts: 516
Joined: Fri Jul 23, 2004 3:57 am

Re: Want to post but can't?

Post by segasonicfan »

Yeah, I had the same issue. Part of the old guard OG crew here too lol.

I wanted to share this craaazyy benheck style portable mod:
https://m.youtube.com/watch?v=e9FhIZkm4cw
Pretty wild!
Gamelver
Moderator
Posts: 3352
Joined: Sun Apr 04, 2004 9:03 pm
Location: in my basement, to forever work on portables ;)

Re: Want to post but can't?

Post by Gamelver »

omg a virtual boy portable?!? Insane xD
Without games my life would have no meaning.
Well, I guess it would, but it would be a lot less fun!!!!!!!

Image
Gamelver
Moderator
Posts: 3352
Joined: Sun Apr 04, 2004 9:03 pm
Location: in my basement, to forever work on portables ;)

Re: Want to post but can't?

Post by Gamelver »

Another old guard OG crew member here. Miss this forum, good times…
Without games my life would have no meaning.
Well, I guess it would, but it would be a lot less fun!!!!!!!

Image
Post Reply