Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Topic closed
[plugin] [ORPHAN] tch_code: Code Syntax Highlighter
Notice: This thread is archived, this plugin is no longer available.
**********************************************************
Alright. Since I’m a Programmer and use code snippets on my blog, I created this function. I will add other syntax highlighters as the demand and ability allows.
<a href=“http://www.emmense.com/downloads/tch_code.txt”>Download</a>
Sample: <a href=“http://www.emmense.com/blog/Technology/10/already-a-now-playing-version-2”>Screenshot</a>
Instructions:
This snippet will syntax highlight a code snippet within your blog entry.
Using CSS, you can stylize the legend tag using the .codelabel class and the actual fieldset using the .snippet class.
Currently, syntax highlighting is only for PHP but I may add other languages as necessary.
Usage:
<txp:tch_code label=“PHP”><?php echo "Hello World!"; ?></txp:tch_code>
Aaron
Last edited by Sketch (2004-05-24 11:08:14)
Aaron Brazell
United States Navy
chmod a+x /bin/laden – Give everyone permission to execute /bin/laden
Offline
Re: [plugin] [ORPHAN] tch_code: Code Syntax Highlighter
Looks cool, but I think you linked to the wrong download.
drew mclellan
Offline
Re: [plugin] [ORPHAN] tch_code: Code Syntax Highlighter
I did? Okay well try again now. :)
Aaron
Aaron Brazell
United States Navy
chmod a+x /bin/laden – Give everyone permission to execute /bin/laden
Offline
#4 2004-05-24 17:02:31
- Ray
- Member
- Registered: 2004-03-02
- Posts: 154
Re: [plugin] [ORPHAN] tch_code: Code Syntax Highlighter
The screenshot link went to an entry in your blog called “Already Now Playing Version 2”. Is this what you want us to see?
The download code looks interesting. I’ll install and mess with it later today.
Offline
Re: [plugin] [ORPHAN] tch_code: Code Syntax Highlighter
That is the link to deomnstrate the syntax highlighting. Not the function. I guess that is misleading. That other plugin is different.
Aaron
Aaron Brazell
United States Navy
chmod a+x /bin/laden – Give everyone permission to execute /bin/laden
Offline
#6 2004-05-24 17:11:28
- Ray
- Member
- Registered: 2004-03-02
- Posts: 154
Re: [plugin] [ORPHAN] tch_code: Code Syntax Highlighter
OK… The itunes widget is what I’m interested in.
A couple of questions…
Can this be installed directly in through the Txp interface? Is there anything else I need to do on my end?
Offline
Re: [plugin] [ORPHAN] tch_code: Code Syntax Highlighter
You want <a href=“http://forum.textpattern.com/viewtopic.php?pid=10843#10843”>This</a> then.
Aaron
Aaron Brazell
United States Navy
chmod a+x /bin/laden – Give everyone permission to execute /bin/laden
Offline
Re: [plugin] [ORPHAN] tch_code: Code Syntax Highlighter
I don’t know what this plugin is doing… it has the wrong function name, it’s trying to call your server, etc. In the meantime, I just changed the code to
<pre>
function tch_code($atts,$snippet)
{
$nicecode = highlight_string($snippet,1);
return $nicecode;
}
</pre>
and it does well enough.
Offline
Re: [plugin] [ORPHAN] tch_code: Code Syntax Highlighter
That’s fine if you want to highlight PHP only. However, what if you want to higlight C or bash or ASP? That’s what the plugin does that I provided, though there may have been errors…I don’t recall. It utilizes the Beautifier library to use context highlighting for whatever code you are using.
Aaron
Aaron Brazell
United States Navy
chmod a+x /bin/laden – Give everyone permission to execute /bin/laden
Offline
#10 2005-10-26 20:05:51
- stefan koopmanschap
- Member
- Registered: 2005-09-14
- Posts: 10
Re: [plugin] [ORPHAN] tch_code: Code Syntax Highlighter
it seems the link to the plugin is dead? :(
Offline
Pages: 1
Topic closed