Automatic [code] tags

Discussion related to the Website functionality, user accounts and graphic design.

Moderator: coordinators

Automatic [code] tags

Postby Pilchard123 » Wed May 30, 2012 12:23 pm

I'm kinda just thinking aloud here, but is it possible (I should imagine it is, but I'm not that good with PHP) to have a forum script that will recognise common error logs and automatically wrap them in [ code] tags? They can be rather long, and putting them in their own box makes the post a lot more readable.
Pilchard123
 
Posts: 406
Joined: Sun Oct 30, 2011 8:05 am

Re: Automatic [code] tags

Postby A-man » Wed May 30, 2012 3:00 pm

Can't you just type '
Code: Select all
' and '
'? It is probably possible, but it really isn't difficult to add tags manually. You can even highlight your code, then click the 'code' button above the post box and it will automatically wrap the highlighted text in code, or you can click code first, and then paste your text between the tags.
Studio XPS 9100 | 2.8 Ghz Intel 930 | 12 GB RAM | Radeon 5870 1GB
User avatar
A-man
 
Posts: 687
Joined: Sat Apr 24, 2010 4:24 pm

Re: Automatic [code] tags

Postby Pilchard123 » Wed May 30, 2012 3:08 pm

I know it isn't hard to add tags manually, but I just thought that when people that leave huge WoTs in error posts it's hard to read. Asking that they tag it seems a little picky (for want of a better word), particularly if you don't have anything else relevant to say. Like I said, I was just really thinking aloud and seeing what other people thought.
Pilchard123
 
Posts: 406
Joined: Sun Oct 30, 2011 8:05 am

Re: Automatic [code] tags

Postby B.Y.O.B. » Wed May 30, 2012 3:16 pm

You are right about the "picky" thing, I experienced that, too.
The automatic recognition is also a good idea, but I see some difficulties there. I know nearly nothing about the forums software, but such a recognition would require a parse of every comment made - after hard-detectable signs of "log-message style text"...
And maybe sometimes normal text would be detected by mistake, like it is already with the 8-) 8 - ) thing.
User avatar
B.Y.O.B.
 
Posts: 1880
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany


Return to Website & Graphic design

Who is online

Users browsing this forum: No registered users and 0 guests