WordPress: Using Smilies:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
 
第128行: 第128行:
''*在有的情况下,多种文本操作可以用来显示同一种smiley.''
''*在有的情况下,多种文本操作可以用来显示同一种smiley.''


[[WordPress:Category:Getting Started]]


[[WordPress:Category:Getting Started|分类:入门]]
[[WordPress:Category:Getting Started|分类:入门]]
== Troubleshooting Smileys ==
=== Why Doesn't it Work? ===
Smileys may have been disabled by your Wordpress admin. Another possibility is  the smiley image files have been deleted from <tt>/wp-includes/images/smilies</tt>.


== Smiley问题发现与解决 ==
== Smiley问题发现与解决 ==
第143行: 第135行:
=== 它为什么不好用呢? ===
=== 它为什么不好用呢? ===
Smiley可能在你的Wordpress管理中被禁用了。另外一种可能是Smiley图片已经从<tt>/wp-includes/images/smilies</tt>中删除了。
Smiley可能在你的Wordpress管理中被禁用了。另外一种可能是Smiley图片已经从<tt>/wp-includes/images/smilies</tt>中删除了。
=== Why Doesn't it Work for Me? ===
''If smileys work for others at your site but not for you:''
Type a space before and after your smiley text. That prevents the smiley being accidentally included in the text around it. [[WordPress:Image:icon_redface.gif|redface emoticon]]
Make sure not to use quotes or other punctuation marks before and after the smiley text. [[WordPress:Image:icon_rolleyes.gif|rolleyes]]


=== 为什么只有我不能正常使用呢?===
=== 为什么只有我不能正常使用呢?===
第157行: 第142行:


注意不要在smiley文本之前或之后使用引号或者别的符号。[[WordPress:Image:icon_rolleyes.gif|翻白眼]]
注意不要在smiley文本之前或之后使用引号或者别的符号。[[WordPress:Image:icon_rolleyes.gif|翻白眼]]
=== Where Are My Smiley Images Kept? ===
The smiley or emoticon image graphics are found in the <tt>/wp-includes/images/smilies</tt> directory.
Note that smileys is spelled 'eys' in this documentation and the directory name for the smiley images is '''smilies'', spelled 'ies'. [[WordPress:Image:icon_eek.gif|eek emoticon]]


=== 我的Smiley图片保存在什么地方?===
=== 我的Smiley图片保存在什么地方?===
第167行: 第147行:


注意文件中的smileys的拼写是'eys',目录名字是'''smilies'', 拼写为 'ies'. [[WordPress:Image:icon_eek.gif|惊讶]]
注意文件中的smileys的拼写是'eys',目录名字是'''smilies'', 拼写为 'ies'. [[WordPress:Image:icon_eek.gif|惊讶]]
=== How Can I Have Different Smiley Images Appear? ===
''Simplest way:''
# Find your smiley image files in the <tt>/wp-includes/images/smilies</tt> directory and back them up to another directory
# Note the names of each smiley file. Your files must match these names and should be in the same 'gif' image format.
# For predictable behavior, the image sizes should be similar.
# Upload your new files to the <tt>/wp-includes/images/smilies</tt> directory with an [[WordPress:FTP_Clients|FTP program]].


=== 我如何才可以让不同的Smiley图片显示出来? ===
=== 我如何才可以让不同的Smiley图片显示出来? ===
第183行: 第155行:
# 显而易见的, 图片的尺寸应该比较小才可以。
# 显而易见的, 图片的尺寸应该比较小才可以。
# 使用[[WordPress:FTP_Clients|FTP 程序]]把新文件上传到<tt>/wp-includes/images/smilies</tt>目录.
# 使用[[WordPress:FTP_Clients|FTP 程序]]把新文件上传到<tt>/wp-includes/images/smilies</tt>目录.
''If you're up to hacking the code:''
If you really must change the file names of the images, edit the file that refers to these images, ''''vars.php'''' (in WordPress 2.2, they're located in ''''functions.php''''), situated in the <tt>/wp-includes/</tt> directory. Follow all precautions when "hacking code".
You can read a tutorial explaining all this in more detail, as well as how to avoid hacking WP code, at [http://aranea.zuavra.net/index.php/20/ Ars Aranea].
There are also WordPress Plugins which allow you to customize your smilies in WordPress.


''如果你懂得代码的话:''
''如果你懂得代码的话:''
第199行: 第163行:


还有一些WordPress插件允许你用来在WordPress中自定义smilies。
还有一些WordPress插件允许你用来在WordPress中自定义smilies。
=== Why are my Smiley Images Blank? ===
If you recently uploaded the images, it could be that the images have been uploaded in '''''ASCII''''' format by your FTP program. Re-upload the smileys ensuring that they are transferred in '''''BINARY''''' format.
Some FTP programs have an '''auto-detect''' setting which will upload files in the correct format without user intervention. If you have such a setting, turn it on.


=== 我的Smiley图片为什么是空白? ===
=== 我的Smiley图片为什么是空白? ===
第209行: 第168行:


一些FTP软件有个'''auto-detect'''设置,可以在用户不介入的情况下选择正确的格式上传文件,如果你有这个设置,打开它。
一些FTP软件有个'''auto-detect'''设置,可以在用户不介入的情况下选择正确的格式上传文件,如果你有这个设置,打开它。
== Smiley CSS ==
The smiley images in WordPress are automatically given a [[WordPress:Glossary#CSS|CSS]] class of '''wp-smiley''' when they are displayed in a post. You can use this class to style your smileys differently from other post images.


== Smiley CSS ==
== Smiley CSS ==
当它们在文章中显示的时候,WordPress 中的Smiley图片会被自动赋予一个[[WordPress:Glossary#CSS|CSS]]的'''wp-smiley'''类。你可以使用这个类来设计你的Smiley,让它不同于别的文章里的图片。
当它们在文章中显示的时候,WordPress 中的Smiley图片会被自动赋予一个[[WordPress:Glossary#CSS|CSS]]的'''wp-smiley'''类。你可以使用这个类来设计你的Smiley,让它不同于别的文章里的图片。
For example, it's not uncommon to set up images in a post to appear on the left-hand side of the content with text flowing around the image. The CSS for that might look like this:
<pre>
.post img {
    float: left;
}
</pre>


例如,在文章中建立图片,让它出现在内容的左手边,并且文字在图片周围漂浮,这可能很少见到。这个效果使用的CSS如下:
例如,在文章中建立图片,让它出现在内容的左手边,并且文字在图片周围漂浮,这可能很少见到。这个效果使用的CSS如下:
第232行: 第180行:
</pre>  
</pre>  


This would typically affect all images in a post, '''including''' your smiley images. To ''override'' this so that smileys stay inline, you could add this to your CSS:
<pre>
img.wp-smiley {
    float: none;
}
</pre>
For more on CSS in WordPress, you might want to [[WordPress:CSS|start here]].


这可能会特别影响到所有的文章里的图片,'''包括'''你的smiley图片,要想''不理会''这个效果的话,让smiley仍然在文本中,可以使用下面的CSS:
这可能会特别影响到所有的文章里的图片,'''包括'''你的smiley图片,要想''不理会''这个效果的话,让smiley仍然在文本中,可以使用下面的CSS:
第249行: 第188行:
}
}
</pre>  
</pre>  
== More Information on Smileys ==
* [http://en.wikipedia.org/wiki/Emoticon Wikipedia - Emoticon]
* [http://www.smileygarden.de/ Smileygarden - Free Smileys, Smilies and Gifs]
* [http://www.World-of-Smilies.com World-of-Smilies - Smileys and Smileygenerator]
* [http://www.greensmilies.com Green Smilies presented with and for WordPress]


== 有关Smiley的更多信息 ==
== 有关Smiley的更多信息 ==

2008年4月23日 (三) 12:20的最新版本

Smiley是什么?[ ]

Smiley,就是大家都知道的"字符组成的图释,"是在写作时用来表达表情的符号。他们是让你的文章更闪亮的好帮手。表情字符

文本Smiley是通过输入两个或者更多的符号组成的,如下: ;-) is equivalent to smile emoticon
:-) is equivalent to smile emoticon
:-( is equivalent to sad emoticon
:-? is equivalent to confused emoticon
参见Wikipedia Emoticons入门,以找到更多有关emoticon和它的历史信息。

WordPress是如何管理Smiley的?[ ]

默认情况下,WordPress自动转换文本的Smiley为图片,当你输入;-)时,在你的文章中,当你预览或者发布文章时,你可以看到一个微笑图标

关闭图形Smiley[ ]

如果你关闭了图形Smiley,那么不论你输入什么都只会保留原样显示,象纯文本一样。

  1. 进入管理面板
  2. 选择 Options > Writing
  3. Formatting部分, 不要选中 "Convert emoticons like :-) and :-P to graphics on display"前的复选框就可以了

关闭emoticon意味着当你输入;-)时,当你预览或者发布文章时,在这个文章中你会看到;-)。所以它不会阻止你使用把emoticons当作纯文本来使用。眨眼

应该输入哪些文本来制作Smiley?[ ]

Smiley图片和相应的文本*:


icon text text full text icon full text
微笑 :) :-) :smile: 大笑 :lol:
biggrin :D :-D :grin: 脸红 :oops:
悲伤 :( :-( :sad: 哭泣 :cry:
惊讶 :o :-o :eek: 邪恶 :evil:
惊恐 8O 8-O :shock: 苦恼 :twisted:
困惑 :? :-? :???: 翻白眼 :roll:
8) 8-) :cool: 大叫 :!:
疯狂 :x :-x :mad: 疑问 :?:
嘲弄 :P :-P :razz: 思考 :idea:
中立 :| :-| :neutral: 箭头 :arrow:
眨眼 ;) ;-) :wink: 精力旺盛 :mrgreen:

*在有的情况下,多种文本操作可以用来显示同一种smiley.


分类:入门

Smiley问题发现与解决[ ]

它为什么不好用呢?[ ]

Smiley可能在你的Wordpress管理中被禁用了。另外一种可能是Smiley图片已经从/wp-includes/images/smilies中删除了。

为什么只有我不能正常使用呢?[ ]

如果别的访问者可以使用你站点上的smiley,但是你却不能使用的话:

在smiley文本之前或后多输入一个空格。可以防止smiley被以外的认为是它周围的别的文本。脸红表情

注意不要在smiley文本之前或之后使用引号或者别的符号。翻白眼

我的Smiley图片保存在什么地方?[ ]

Smiley图片可以在/wp-includes/images/smilies目录下找到。

注意文件中的smileys的拼写是'eys',目录名字是'smilies, 拼写为 'ies'. 惊讶

我如何才可以让不同的Smiley图片显示出来?[ ]

最简单的方法:

  1. 找到你的smiley图片文件,它在/wp-includes/images/smilies目录中,把它们备份到另外一个目录中。
  2. 注意每个文件的名字。你的文件必须和这些名字匹配而且必须是同样的'gif'文件图片格式。
  3. 显而易见的, 图片的尺寸应该比较小才可以。
  4. 使用FTP 程序把新文件上传到/wp-includes/images/smilies目录.

如果你懂得代码的话:

如果你真的必须更改图片的文件名,编辑指向这些图片的文件,'vars.php' (在WordPress 2.2, 它们在文件'functions.php'中),位于/wp-includes/目录。在"写代码"的时候要小心谨慎。

你可以在Ars Aranea上阅读更详细的指南,同样还有如何避免破坏WP代码。

还有一些WordPress插件允许你用来在WordPress中自定义smilies。

我的Smiley图片为什么是空白?[ ]

如果你最近上传了图片,那可能是你的FTP软件使用了ASCII格式上传了图片,重新上传smiley,确定它们是使用BINARY格式上传的。

一些FTP软件有个auto-detect设置,可以在用户不介入的情况下选择正确的格式上传文件,如果你有这个设置,打开它。

Smiley CSS[ ]

当它们在文章中显示的时候,WordPress 中的Smiley图片会被自动赋予一个CSSwp-smiley类。你可以使用这个类来设计你的Smiley,让它不同于别的文章里的图片。

例如,在文章中建立图片,让它出现在内容的左手边,并且文字在图片周围漂浮,这可能很少见到。这个效果使用的CSS如下:

.post img {
    float: left;
}


这可能会特别影响到所有的文章里的图片,包括你的smiley图片,要想不理会这个效果的话,让smiley仍然在文本中,可以使用下面的CSS:

img.wp-smiley {
    float: none;
}

有关Smiley的更多信息[ ]