海德堡华人之家论坛Chinese Hut in HD  

返回   海德堡华人之家论坛Chinese Hut in HD > 论坛帮助

BB 代码
BB 代码是基于 HTML 语言的标准,您可能已经熟悉了。这允许您加入和 HTML 一样格式化的的标签代码到信息中,但是有一个简单的语法,不会破坏您查看的页面排版和设计。管理员可以设置在论坛是否可以使用 BB 代码,因此您在发送信息前应该检查一下论坛规则。

下面是您在论坛上可以使用的 BB 代码列表。
BB 代码列表
[b], [i], [u] 粗体 / 斜体 / 下划线
[color] 颜色
[size] 大小
[font] 字体
[highlight] 高亮
[left], [right], [center] 左对齐 / 右对齐 / 居中
[indent] 缩进
[email] 邮箱链接
[url] 超级链接地址
[thread] 主题链接
[post] 帖子链接
[list] 列表 / 高级列表
[img] 图片
[code] 代码
[php] PHP 代码
[html] HTML 代码
[quote] 引用
[noparse] 停止解析 BB 代码
[attach] 附件
[flash] flash
[iframe] iframe
[swf] SWF
[drupal] Drupal link
[dimage] Drupal image thumbnail
错误的 BB 代码用法:
  • [url] www.example.com [/url] - 不要在文本和代码间加上空格。
  • [email]myname@domain.com[email] - 结束标签必须要加上“/” ([/email])。

粗体 / 斜体 / 下划线
[b],[i] 和 [u] 标签允许您创建粗体,斜体和下划线文本。
使用 [b][/b]
[i][/i]
[u][/u]
使用示例 [b]粗体文字[/b]
[i]斜体文字[/i]
[u]带下划线的文字[/u]
示例输出结果 粗体文字
斜体文字
带下划线的文字

颜色
[color] 标签允许您改变文本颜色。
使用 [color=选项][/color]
使用示例 [color=blue]蓝色文字[/color]
示例输出结果 蓝色文字

大小
[size] 标签允许您改变文本的大小。
使用 [size=选项][/size]
使用示例 [size=+2]此文字比普通文字大两个字号[/size]
示例输出结果 此文字比普通文字大两个字号

字体
[font] 标签允许您改变文本的字体。
使用 [font=选项][/font]
使用示例 [font=courier]Courier 字体[/font]
示例输出结果 Courier 字体

高亮
[highlight] 标签允许强调您的文字。
使用 [highlight][/highlight]
使用示例 [highlight]此文本被高亮显示[/highlight]
示例输出结果 此文本被高亮显示

左对齐 / 右对齐 / 居中
[左],[右] 和 [中] 标签允许您改变文本对齐方式。
使用 [left][/left]
[center][/center]
[right][/right]
使用示例 [left]左对齐的文字[/left]
[center]居中文字[/center]
[right]右对齐的文字[/right]
示例输出结果
左对齐的文字
居中文字
右对齐的文字

缩进
[indent] 标签可以缩进您的文本。
使用 [indent][/indent]
使用示例 [indent]缩进文字[/indent]
示例输出结果
缩进文字

邮箱链接
这个 [email] 标签允许您添加一个邮箱地址链接,可以包含链接标题参数。
使用 [email][/email]
[email=选项][/email]
使用示例 [email]j.doe@example.com[/email]
[email=j.doe@example.com]发送邮件给我[/email]
示例输出结果 j.doe@example.com
发送邮件给我

超级链接地址
[url] 标签允许您链接到其他站点和文件,您可以在该链接里包含可选的链接名。
使用 [url][/url]
[url=选项][/url]
使用示例 [url]http://www.china-heidelberg.de/bbs[/url]
[url=http://www.china-heidelberg.de/bbs]海德堡华人之家论坛Chinese Hut in HD[/url]
示例输出结果 http://www.china-heidelberg.de/bbs
海德堡华人之家论坛Chinese Hut in HD

主题链接
[thread] 标签允许您使用指定的主题 ID 链接主题,您可以在这个链接里包含可选的链接名。
使用 [thread]主题 ID[/thread]
[thread=主题 ID][/thread]
使用示例 [thread]42918[/thread]
[thread=42918]点击查看![/thread]
(注意: 这里的 threadid/postid 只是一个例子,可能并没有链接到一个有效的主题/帖子。)
示例输出结果 http://www.china-heidelberg.de/bbs/showthread.php?t=42918
点击查看!

帖子链接
[post] 标签允许您使用指定的帖子 ID 链接到帖子。您可用在这个链接里包含可选的链接名。
使用 [post]帖子 ID[/post]
[post=帖子 ID][/post]
使用示例 [post]269302[/post]
[post=269302]点击查看![/post]
(注意: 这里的 threadid/postid 只是一个例子,可能并没有链接到一个有效的主题/帖子。)
示例输出结果 http://www.china-heidelberg.de/bbs/showthread.php?p=269302#post269302
点击查看!

列表
[list] 标签允许您简单发表不含指定项的列表。在值部分,每个符号都用[*]表示。
使用 [list][/list]
使用示例 [list]
[*]列表项 1
[*]列表项 2
[/list]
示例输出结果
  • 列表项 1
  • 列表项 2

高级列表
[list] 标签也允许您使用指定的选项创建高级列表.这个选项可以是“1”(创建数字列表)或者“A”(创建大写字母列表,按字母顺序排列)或者“a”(创建小写字母列表,按字母顺序排列)或者“I”(创建大写罗马数字列表)或者“i”(创建小写罗马数字列表)。
使用 [list=选项][/list]
使用示例 [list=1]
[*]列表项 1
[*]列表项 2
[/list]

[list=a]
[*]列表项 1
[*]列表项 2
[/list]
示例输出结果
  1. 列表项 1
  2. 列表项 2
  1. 列表项 1
  2. 列表项 2

图片
[img] 标签允许您在帖子中插入图片。您可以将此标签和[url]标签联合使用,这样可以给图片加上链接。
使用 [img][/img]
使用示例 [img]http://www.china-heidelberg.de/bbs/images/statusicon/forum_new.gif[/img] (没有链接)

[url=http://www.example.com] [img]http://www.china-heidelberg.de/bbs/images/statusicon/forum_new.gif[/img] [/url] (链接)
示例输出结果 (没有链接)

(链接)

代码
[code] 标签允许您插入一段代码。
使用 [code][/code]
使用示例 [code]
<script type="text/javascript">
<!--
    alert("Hello world!");
//-->
</script>
[/code]
示例输出结果
代码:
<script type="text/javascript">
<!--
	alert("Hello world!");
//-->
</script>

PHP 代码
[php] 标签的功能和 [code] 标签的功能差不多,但是可以对 PHP 代码语法高亮显示。虽然为 PHP 设计,但是也适用其他类似 C 语言的语言。
使用 [php][/php]
使用示例 [php]
$myvar = 'Hello World!';
for ($i = 0; $i < 10; $i++)
{
    echo $myvar . "\n";
}
[/php]
示例输出结果
PHP 代码:
$myvar 'Hello World!';
for (
$i 0$i 10$i++)
{
    echo 
$myvar "\n";


HTML 代码
[html] 标签允许您使用 HTML 代码。
使用 [html][/html]
使用示例 [html]
<img src="image.gif" alt="image" />
<a href="testing.html" target="_blank">Testing</a>
[/html]
示例输出结果
HTML 代码:
<img src="image.gif" alt="image" />
<a href="testing.html" target="_blank">Testing</a>

引用
[quote] 标签允许您归纳他人的话。
使用 [quote]引用[/quote]
[quote=用户名][/quote]
使用示例 [quote]Lorem ipsum dolor sit amet[/quote]
[quote=John Doe]Lorem ipsum dolor sit amet[/quote]
[quote=John Doe;124726]Lorem ipsum dolor sit amet[/quote]
示例输出结果
引用:
Lorem ipsum dolor sit amet
引用:
作者: John Doe
Lorem ipsum dolor sit amet
引用:
作者: John Doe 查看帖子
Lorem ipsum dolor sit amet

停止解析 BB 代码
[noparse] 标签允许您不解析 BB 代码。
使用 [noparse][b]值[/b][/noparse]
使用示例 [noparse][b]Lorem ipsum dolor sit amet[/b][/noparse]
示例输出结果 [b]Lorem ipsum dolor sit amet[/b]

附件
[attach] 标签允许您将附件插入在帖子文本中,而不是帖子的下方。它只会在上传它的帖子中显示。
使用 [attach]attachmentid[/attach]
使用示例 [attach]12345[/attach]
示例输出结果

flash
Flash media
使用 [flash][/flash]
使用示例 [FLASH]URL of .swf[/FLASH]
示例输出结果

iframe
镶套(引用/调用)WEB页面
使用 [iframe][/iframe]
使用示例 [IFRAME]http://chhd.vcwshd.de/ad/dsl.htm[/IFRAME]
示例输出结果

SWF
插入Flash标签
使用 [swf][/swf]
使用示例 [SWF]http://www.rzuser.uni-heidelberg.de/~kli/happybirth.swf[/SWF]
示例输出结果

Drupal link
Adds a link to a drupal node using the node's title. The option can be the node ID or the relative path to the node (path aliases are supported). If the option is ommited the value is used as the option and the node's title is used for the link text.
使用 [drupal][/drupal]
[drupal=选项][/drupal]
使用示例 [drupal]1[/drupal] [drupal=1]Alternative title[/drupal]
示例输出结果 ???????>www.china-heidelberg.de Alternative title

Drupal image thumbnail
Adds a clickable thumbnail to a drupal image node. The option can be the node ID or the relative path to the node (path aliases are supported). If the option is ommited the value is used as the option and the node's title is used for the alternative text. This tag is only useful when the drupal image module is installed.
使用 [dimage][/dimage]
[dimage=选项][/dimage]
使用示例 [dimage]1[/dimage] [dimage=1]Alternative title[/dimage]
示例输出结果 ???????>www.china-heidelberg.de Alternative title


所有时间均为格林尼治时间 +2。现在的时间是 15:37


Powered by CHHD 版本 3.8.1
版权所有 ©2003 - 2010,Chinese Hut in Heidelberg.
 [3.2.1] 制作:海德堡华人之家   技术支持: 华人之家