FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » C++ Syntax Highlighting? (Some ideas, but no clue on where to start.)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
C++ Syntax Highlighting? [message #40828] Wed, 16 April 2008 09:06 Go to previous message
keithieopia is currently offline  keithieopia   United States
Messages: 2
Registered: April 2008
Karma:
Junior Member
I've come across a lot of other projects utilizing hacked versions of the PHP beautifier script for c++ code. At the very least I'd like to know how to implement a fudcode that parses c++ using this, possibly by finding the proposed fudcode [cpp] and then passing the message string to another php script that returns it all pretty and such, that way other parts of my forum are not slowed down by the parsing. Any suggestions or tips pointing me in the right direction would be greatly appreciated.

Here's the beautifier script, although the way I plan to implement it, I just need to know how to search the message for the [cpp]... in other words where's the template for doing this with all the other fudcode and what's the message buffer variable?



I've actually been using fudforum for a while (5+ years) on different websites, and while I've been lurking on these forums I've basically concluded that the developers are split among allowing more syntax highlighting for different languages. One says it will bloat and slow fudforum and most users don't want it (very true) and the other will say that there are some users that do (also true).

I've come up with a possible solution, of having a option in the admin configuration to turn on advanced fudcode tags such as the syntax highlighting, so the end users not wanting the feature don't have to suffer any slowed processing time. Another idea is to search the message code for a tag before processing it, say the code searches for a [cpp] before even loading the resources to highlight it up, that way the only additional overhead would be that of just another fudcode tag and not anything too advanced.
[Message index]
 
Read Message
Read Message
Previous Topic: How to edit RSS picture on post pages?
Next Topic: How to force all users to login first
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Sep 16 19:09:39 GMT 2024

Total time taken to generate the page: 0.06807 seconds