Você não está logado.

terça, 16 abril 2024 - 05:59 UTC+2

Dear visitor, welcome to official Covenant Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

ShadowByte

Administrador

  • "ShadowByte" started this thread

Mensagens: 1,166

Localização: Essen

Ocupação: Fachinformatiker (AE)

  • Enviar mensagem particular

1

segunda, 18 janeiro 2010 - 11:43

BBCodes zur Darstellung von Quellcode

Hallo,

das Forum stellt folgende BBCodes zur Darstellung von Quellcode bereit:
immer ohne Leerzeichen innerhalb von [bbcode] und [/bbcode]
  • Java [java ]Code[/java ]
  • MySQL [mysql ]Code[/mysql ]
  • CSS [css ]Code[/css ]
  • HTML [html ]Code[/html ]
  • XML [xml ]Code[/xml ]
  • TPL (Templates) [tpl ]Code[/tpl ]
  • JS (JavaScript) [js ]Code[/js ]
  • C (C / C++) [c ]Code[/c ]
  • PHP [php ]Code[/php ]
  • Code (wird verwendet wenn kein anderer BBCode passt) [code ]Code[/code ]


Bei jedem BBCode kann eine Zeilennummer mit angegeben werden. z.B.: [ php=30 ]Code[/php ]
Das kann nützlich sein, wenn man eine Fehlermeldung mit Zeilennummernangabe hat und hier die passenden Codezeilen +-10 Zeilen posten möchte.

Beispiele:
[java ]Code[/java ]

Código fonte JAVA

1
2
3
4
5
 public class HalloWelt {
     public static void main(String[] args) {
         System.out.println("Hallo Welt!");
     }
 }


[mysql ]Code[/mysql ]

Queries MySQL

1
2
3
SELECT * 
FROM   `Tabelle` 
WHERE ID=1;


[css ]Code[/css ]

CSS

1
2
3
.hot {
	font-weight: bold;
}


[html ]Code[/html ]

HTML

1
2
3
4
5
6
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" xml:lang="de">
   <head>
	<title>Mein Seitentitel</title>
   </head>


[xml ]Code[/xml ]

XML

1
2
3
4
5
<?xml version="1.0"?>
<!DOCTYPE data SYSTEM "http://www.woltlab.com/DTDs/options.dtd">
<data>
   <option name="myXML"></option>
</data>


[tpl ]Code[/tpl ]

Código fonte Template

1
2
3
4
5
6
7
8
9
10
11
12
{include file="documentHeader"}
<head>
	<title>{lang}index.title{/lang} - {lang}{PAGE_TITLE}{/lang}</title>
	
	{include file='headInclude' sandbox=false}
	<link rel="alternate" type="application/rss+xml" href="index.php?format=rss2" title="{lang}index.feed{/lang} (RSS2)" />
	<link rel="alternate" type="application/atom+xml" href="index.php?format=atom" title="{lang}index.feed{/lang} (Atom)" />
</head>
<body{if $templateName|isset} id="tpl{$templateName|ucfirst}"{/if}>
{include file='header' sandbox=false}

<div id="main">


[js ]Code[/js ]

Código fonte Javascript

1
2
3
function AjaxRequest() {
	this.xmlHttpRequest = null;
	this.response = null;


[c ]Code[/c ]

Código fonte C/C++

1
2
3
4
5
6
7
#include <iostream>
#include <ostream>
 
int main() 
{
   std::cout << "Hallo Welt!" << std::endl;
}


[php ]Code[/php ]

Código fonte PHP

1
echo "Hallo Welt";


[code ]Code[/code ]

Código Fonte

1
echo "Hallo Welt";
Nichts ist wahr! Alles ist erlaubt !

Covenant-Forum.de

Facebook

1010011010



Social bookmarks