Now that I'm less jetlagged after a night of sleep, I think it's fair to clear some stuff up:
But if your idea is to have auto-indentation/syntax highlighting/etc. as you type it in - This isn't a syntax editor; it's far less complex than something like Notepad++.
As far as I can tell, he is
definitely not suggesting this; nobody with any sense would use a forum to actually write their code
He simply wants the code in an actual post to be a little more pleasing to look at, which means syntax highlighting.
The line numbers comment comes from the fact that a lot of beginning modders have errors with code and stack traces usually give line numbers. Having those line numbers next to the code they post could (some might snip only what's relevant) be helpful to those trying to help. I'm actually pretty against having line numbers on the forum because of how niche they are.
In fact, the suggestion overall is pretty niche. I honestly feel like trying to implement either of these on the forum itself should be done either because the staff feels generous towards the modding community (of which, something tells me "generous" isn't the word they'd want to use) or because the staff thinks that the feature would prove to improve the quality of the forum... but it wouldn't really.
Looking at message post counts per forum (excluding news and social groups), the modding section only takes up about 21% of the forum and is actually
second in size to Forum Games. Player Suggestions and the cumulative Social forums (PC social, Mobile social, Console social, and Crossroads) are also pretty close behind.
Out of that 21% that the modding forum takes up, even a smaller amount are actual developers who care about stuff like syntax highlighting. My honest guess (and I'm likely being very generous) would be that 5% of the 21% (therefore ~1% of the forum's users) are people who are developers... but not necessarily those who care about having syntax highlighting on the forum; that likely narrows it down even further below an already generously high 1%.
As you can tell, this feature suggestion really isn't quite worth it: the modding community on the forum might be sizable, but
the developer community isn't. I'm more than happy to implement it for ATCF because I'm one of the people who would enjoy it (in the rare case where I actually visit the modding forum) and I can understand why it's useful. But I've also decided to default it to off because, while it does theoretically improve the forum, it's for such a narrow audience that having it on wastes resources for something that a user likely won't ever even find out about.
Honestly, I believe what TK said before is, honestly, a pathway to the true solution in my eyes, and I'm unhappy it was just glanced over:
You can also post a screencap of the code from a more pleasant-looking application, you can also post the snippets on a github [< changed by everest] and link them. That's about the best that can be offered.
The only concern I have about a screencap is it makes it hard to debug someone else's code because you can't copy it and try it yourself. Conversely, people who don't post screencaps probably don't care about having syntax highlighting (hell, I bet a number of them write in regular notepad in the first place) and if you want someone else's code to look nice then just copy it into your code editor of choice (except for visual studio; opening VS just to paste some code sounds like a lot of work
)
The talk about github, though, is a step in the right direction. I wouldn't recommend making a repository just to share one file as that's too cumbersome;
gist (github's mini code file sharing thingy) is more likely what TK meant, but I'd even go further and
advocate for the use of hastebin or pastebin (my preference would be hastebin) because they basically solve all the issues seen in this post:
- Syntax highlighting (hastebin lets you decide it when you view, pastebin lets the uploader decide)
- Line numbers
- Copy-able code
- Not needing to host & execute member-written code
So that's where I stand: the solution is to use hastebin.
or pastebin.
I also think "neglect" wasn't quite the word I was looking for earlier; I was more-so thinking about the sound of aggression that TK had in my head as I was reading his posts that made me unhappy. I'm not quite used to seeing staff approach a non-serious issue without some kind of lightheartedness.
Anyone can purchase a Xenforo license, rent a server to run it on, and mod it to their hearts content. If someone wants to do so, and demonstrate to us that they've created something useful, we'd be happy to take a look.
I'm not quite going to agree with the "anyone can just purchase XenForo" part, but I do wish for clarification as to whether this is an invite for someone competent to actually make a quality add-on for the forum or not.
I'll offer this: there is a facility in the ACP to define custom BB codes. A PHP callback can be used to format the text contained in the tags. If someone can create this functionality through that interface, I'll do what I can to help (and by that I mean: I'll tell you what information is needed, and I'll copy/paste it into the ACP form). I'm told that I can't really do anything harmful or irreversible through that interface.
The issue with this is that the PHP callback is useless in this case: the PHP callback literally just takes the path to a PHP function to call to handle the BB code formatting. Unless a function exists that already does the functionality you want, you have to define it yourself, which brings us back to the "hosting member-written code" issue.