SunQuest
           Forum Announcements
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsForum InformationForum Announcements

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 9th, 2005, 02:08 PM
thaminda's Avatar
thaminda thaminda is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 396 thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 19 h 45 m 3 sec
Reputation Power: 415
New BBCode - Syntax Highlighter

We have added new bbcode “highlighter” which use for generic syntax highlighting. This one support wide range of popular languages.

Usage :
[ highlight=language ]
Codes
[ /highlight ]

Here is a new highlighter bbcode in action, displaying part of a PHP code.
php Code:
Original - php Code
  1. <?php
  2. function _split_text($text)
  3. {
  4. $MAX_LENGTH = 160;
  5.  
  6.   $split=explode(" ",$text);
  7.   $numwords = count($split);
  8.   $i=0; //while counter
  9.   $a = 1; //counts the text chunks
  10.  
  11.   $amount = ceil(strlen($text)/($MAX_LENGTH-5)); //get total word chunks
  12.   while($i < $numwords){
  13.    $len = (strlen($newtext[$a])+strlen($split[$i])); //get length of the active chunk
  14.      if($len>($MAX_LENGTH-5)){ //do we have to start a new one?
  15.        $a++;
  16.        $newtext[$a] = "[$a/$amount] "; //Adds [1/2]
  17.      }else{
  18.        if($i == 0) $newtext[$a] = "[$a/$amount] ";
  19.        $newtext[$a]=$newtext[$a]." ".$split[$i];
  20.        $i++;
  21.      }
  22.   }
  23.   return $newtext;
  24. }
  25. }
  26. ?>



Here is the list of languages supported by this new bbcode

actionscript
ada
apache
asm
asp
bash
caddcl
cadlisp
c_mac
c
cpp
csharp
css-gen.cfg
css
delphi
diff
div
d
eiffel
gml
html4strict
java
javascript
lisp
lua
matlab
mpasm
nsis
objc
oobas
oracle8
pascal
perl
php-brief
php
python
qbasic
smarty
sql
vbnet
vb
vhdl
visualfoxpro
xml

Reply With Quote
  #2  
Old August 10th, 2005, 01:46 PM
thaminda's Avatar
thaminda thaminda is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 396 thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)thaminda User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 19 h 45 m 3 sec
Reputation Power: 415
New Highlighter button

We have add new highlight button to editor toolbar, so people can easily use that button to create [ highlight=language ] tags.

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsForum InformationForum Announcements > New BBCode - Syntax Highlighter


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway