← Comunidade

GeSHi Disponível.

Lida 13541 vezes

Offline

Nuno 
Administrador
Mensagens 7780 Gostos 216
Feedback +2

Troféus totais: 42
Trófeus: (Ver todos)
100 Poll Votes Level 7 Search Mobile User Level 6 Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes

Os programadores devem saber o que é o GeSHi, para os restantes provavelmente não deverá interessar. Esta é mais uma das novas features da nova versão do +tráfego que vamos lançar em breve. No entanto, esta funcionalidade não tem porque não estar já disponível a partir de agora. Aliás, já devia estar implementada há muito tempo, desculpem o esquecimento.

Citar
GeSHi aims to be a simple but powerful highlighting class, with the following goals:

    * Support for a wide range of popular languages
    * Easy to add a new language for highlighting
    * Highly customisable output formats
Supported languages:

    * Actionscript
    * ADA
    * Apache Log
    * AppleScript
    * ASM
    * ASP
    * Bash
    * C
    * C for Macs
    * C#
    * C++
    * CAD DCL
    * CadLisp
    * CSS
    * Delphi
    * DIV
    * DOS
    * Eiffel
    * FreeBasic
    * GML
    * HTML
    * Inno
    * Java
    * Javascript
    * Lisp
    * Lua
    * Microprocessor ASM
    * NSIS
    * Objective C
    * OCaml
    * OpenOffice BASIC
    * Oracle 8 SQL
    * Pascal
    * Perl
    * PHP
    * Python
    * Q(uick)BASIC
    * Ruby
    * Scheme
    * SDLBasic
    * Smarty
    * SQL
    * VB.NET
    * Visual BASIC
    * Visual Fox Pro
    * XML




Exemplos:

Código: (php) [Seleccione]
<?php echo 'nice piece of great code' ?>
Código: (php) [Seleccione]
$maistrafego = "GeSHi";

if ( $maistrafego == "GeSHi" ) {
echo "Nice fucking feature!<br />";
}
echo "Nobody cares!";


Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

O [*code] quando era PHP já tinha não?

Mas agora com essas linguagens todas melhor! :)

Não dá para mudares as cores do fundo e estilo disso?
Offline

Nuno 
Administrador
Mensagens 7780 Gostos 216
Feedback +2

Troféus totais: 42
Trófeus: (Ver todos)
100 Poll Votes Level 7 Search Mobile User Level 6 Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes

O [*code] quando era PHP já tinha não?

Mas agora com essas linguagens todas melhor! :)

Não dá para mudares as cores do fundo e estilo disso?

Não tinha. A licença do geshi não é compatível com a do smf.

Dá, na nova theme já está com um estilo mais aceitável. Não vou estar a mexer mais nesta.
Offline

epsy 
Membro
Mensagens 553 Gostos 1
Feedback +1

Troféus totais: 25
Trófeus: (Ver todos)
Search Windows User Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1

Só para testar...  :grin:
Código: (csharp) [Seleccione]
<script language="CS" runat="server">
const string ALL_CAPS_PATTERN = "[a-z]";
 
static readonly Regex All_Caps_Regex =
   new Regex (ALL_CAPS_PATTERN);
 
static bool AllUpperCase (string inputString)
{
   if (All_Caps_Regex.IsMatch ( inputString ))
   {
      return false;
   }
   return true;
}
</script>

5 Estrelas...
Offline

Miguel Patrício 
Membro
Mensagens 445 Gostos 9
Feedback +1

Troféus totais: 27
Trófeus: (Ver todos)
Tenth year Anniversary Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Código: (vb) [Seleccione]
msgbox "Olá"
Escrevi msgbox "Olá".... mas parece existir problemas em interpretar a acentuação!