Fast Uncompromising Discussions. FUDforum will get your users talking.
Logout [ CommonCrawl [Bot] ]
Logged in user:
CommonCrawl [Bot] [
list all smilies
Editing Time Limit
[quote title=Ilia wrote on Wed, 16 April 2008 13:31]The post_proc.php.t code works with the message buffer, you can add C++ syntax highlighting there...[/quote]
Allowed File Extensions:
jpg jpeg png gif txt doc gz bz2 inc php zip diff
Maximum File Size:
Maximum Files Per Message:
Notify me when someone replies to this message.
Include your profile signature.
Disable smilies in this message
Re: C++ Syntax Highlighting?
Wed, 16 April 2008 13:31
The post_proc.php.t code works with the message buffer, you can add C++ syntax highlighting there...
C++ Syntax Highlighting?
Wed, 16 April 2008 05:06
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.
Mon May 25 06:03:07 EDT 2020
Total time taken to generate the page: 0.00826 seconds
Powered by: FUDforum 3.0.8.
FUDforum Bulletin Board Software