TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   News and Announcements (http://www.talkphp.com/news-announcements/)
-   -   Added Geshi Syntax Highlighting (http://www.talkphp.com/news-announcements/1406-added-geshi-syntax-highlighting.html)

Wildhoney 11-07-2007 03:52 PM

Added Geshi Syntax Highlighting
 
To make code easier to read, we have added another aptly named vB hack to TalkPHP. This allows you to specify various languages to highlight. If I can find a comprehensive list then I will list that later.

The syntax highlighting can be used like so:

[highlight=language] var myVar = myFunc(myArg); [/highlight]

Where language is the name of the language, such as javascript.

Nor 11-07-2007 04:07 PM

why not just edit the [code] tag? less stuff to remember..

Wildhoney 11-07-2007 04:18 PM

Will set up some aliases in due time. Such as [js].

cherries 11-07-2007 04:49 PM

php Code:
<?php
    class MyClass
    {
        public $var = 'MyVar';
        private $lulz = true;
       
        public function __construct ( $str )
        {
            $parts = explode(':', $str);
            $this->var = $parts[0];
            $this->lulz = $parts[1];
        }
    }
?>

Brackets don't show []

Wildhoney 11-07-2007 05:15 PM

Thanks for pointing that out. Well spotted! Updated Geshi and it seems to be working now. You'll have to re-post your code, though.

Edit: Ignore that, it's still broken!
Edit: Voila :) All fixed.

Tanax 11-18-2007 09:06 PM

php Code:
$variable = 'Success';
if($phpbox == true) {
echo $variable;
}
else {
echo 'Failed!';
}

Wildhoney 11-18-2007 10:12 PM

Smashing, Aye? :)

Jeff Andersen 11-18-2007 10:40 PM

Looks good Wild!
( Now how about the buttons that are missing their custom images ;) )

Wildhoney 11-20-2007 12:26 AM

Which buttons would those be, Jeff? Do explain yourself! We are re-coding the design, as you may have heard, so it'd be nice to cover all of these.

Jeff Andersen 11-20-2007 01:21 AM

http://www.talkphp.com/images/buttons/reputation.gif
http://www.talkphp.com/images/button...iquote_off.gif
http://www.talkphp.com/images/buttons/quickreply.gif
http://www.talkphp.com/images/statusicon/forum_link.gif
http://www.talkphp.com/images/button...apse_thead.gif
http://www.talkphp.com/images/buttons/lastpost.gif

All the default forum icons, I'm assuming you meant to use.

Wildhoney 11-20-2007 01:31 AM

Aha :) Onto those. Thanks a lot for filling me in!

Jeff Andersen 11-20-2007 02:51 AM

I'll post a screenshot when I get home, I'm just at work and don't have the means.


All times are GMT. The time now is 10:45 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0