<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>一路博客网 &#187; DEDECMS</title>
	<atom:link href="http://www.16blog.cn/category/dedecms/feed" rel="self" type="application/rss+xml" />
	<link>http://www.16blog.cn</link>
	<description>免费资源,电脑知识,图形图像,素材源码,系统硬件,网络设备,音乐MV,新闻摘要</description>
	<lastBuildDate>Sun, 05 Feb 2012 12:41:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Dedecms的简略标题</title>
		<link>http://www.16blog.cn/dedecms-shorttitle.htm</link>
		<comments>http://www.16blog.cn/dedecms-shorttitle.htm#comments</comments>
		<pubDate>Fri, 23 Dec 2011 00:45:14 +0000</pubDate>
		<dc:creator>美丽的谎言</dc:creator>
				<category><![CDATA[DEDECMS]]></category>

		<guid isPermaLink="false">http://www.16blog.cn/?p=2923</guid>
		<description><![CDATA[今天介绍织梦dedecms简略标题（副标题）的使用。 一、简略标题调用标签： 1. 1 &#123;dede:field.shorttitle/&#125; 这个不能在{dede:arclist}标签中套用，一般放在网页titile处； 2. 1 &#91;field:shorttitle/&#93; 这个可以在{dede:arclist}标签中套用，一般用在栏目列表。 二、当有简略标题时显示简略标题，没有简略标题时显示正标题： 1. 1 2 3 4 &#123;dede:field name=’array’ runphp=’yes’&#125; if&#40;@me&#91;'shorttitle'&#93;==”&#41; @me=@me&#91;'title'&#93;; else @me=@me&#91;'shorttitle'&#93;; &#123;/dede:field&#125; 这个不能在{dede:arclist}标签中套用，一般放在网页titile处； 2. 1 2 3 4 &#91;field:array runphp='yes'&#93; if&#40;@me&#91;'shorttitle'&#93;==”&#41; @me=@me&#91;'title'&#93;; else @me=@me&#91;'shorttitle'&#93;; &#91;/field:array&#93; 这个可以在{dede:arclist}标签中套用，一般用在栏目列表。 三、简略标题字数修改： 简略标题的字数是做了限制的，可以在管理目录dede文件夹下找到下面5个文件： archives_add.php，archives_do.php，archives_edit.php，article_add.php，article_edit.php 然后分别在文件中找到代码： 1 $shorttitle = cn_substrR&#40;$shorttitle,36&#41;; 把36改成100就可以了。 简略标题简单易用，很多站长可能暂时用不到简略标题，不过简略标题在一些大网站中经常用到，有时候还必须用。 本文转自：shiyiytt的空间]]></description>
			<content:encoded><![CDATA[<p>今天介绍织梦dedecms简略标题（副标题）的使用。</p>
<p>一、简略标题调用标签：<br />
1.</p>

<div class="wp_codebox"><table><tr id="p29236"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p2923code6"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>dede<span style="color: #339933;">:</span>field<span style="color: #339933;">.</span>shorttitle<span style="color: #339933;">/</span><span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>这个不能在{dede:arclist}标签中套用，一般放在网页titile处；</p>
<p><span id="more-2923"></span></p>
<p>2.</p>

<div class="wp_codebox"><table><tr id="p29237"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p2923code7"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#91;</span>field<span style="color: #339933;">:</span>shorttitle<span style="color: #339933;">/</span><span style="color: #009900;">&#93;</span></pre></td></tr></table></div>

<p>这个可以在{dede:arclist}标签中套用，一般用在栏目列表。</p>
<p>二、当有简略标题时显示简略标题，没有简略标题时显示正标题：</p>
<p>1.</p>

<div class="wp_codebox"><table><tr id="p29238"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p2923code8"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>dede<span style="color: #339933;">:</span>field name<span style="color: #339933;">=</span>’<a href="http://www.php.net/array"><span style="color: #990000;">array</span></a>’ runphp<span style="color: #339933;">=</span>’yes’<span style="color: #009900;">&#125;</span>
 <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span>me<span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'shorttitle'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span>”<span style="color: #009900;">&#41;</span> <span style="color: #339933;">@</span>me<span style="color: #339933;">=@</span>me<span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">else</span> <span style="color: #339933;">@</span>me<span style="color: #339933;">=@</span>me<span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'shorttitle'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#123;</span><span style="color: #339933;">/</span>dede<span style="color: #339933;">:</span>field<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>这个不能在{dede:arclist}标签中套用，一般放在网页titile处；</p>
<p>2.</p>

<div class="wp_codebox"><table><tr id="p29239"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p2923code9"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#91;</span>field<span style="color: #339933;">:</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a> runphp<span style="color: #339933;">=</span><span style="color: #0000ff;">'yes'</span><span style="color: #009900;">&#93;</span> 
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span>me<span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'shorttitle'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span>”<span style="color: #009900;">&#41;</span> <span style="color: #339933;">@</span>me<span style="color: #339933;">=@</span>me<span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">else</span> <span style="color: #339933;">@</span>me<span style="color: #339933;">=@</span>me<span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'shorttitle'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#91;</span><span style="color: #339933;">/</span>field<span style="color: #339933;">:</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#93;</span></pre></td></tr></table></div>

<p>这个可以在{dede:arclist}标签中套用，一般用在栏目列表。</p>
<p>三、简略标题字数修改：</p>
<p>简略标题的字数是做了限制的，可以在管理目录dede文件夹下找到下面5个文件：<br />
archives_add.php，archives_do.php，archives_edit.php，article_add.php，article_edit.php</p>
<p>然后分别在文件中找到代码：</p>

<div class="wp_codebox"><table><tr id="p292310"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p2923code10"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$shorttitle</span> <span style="color: #339933;">=</span> cn_substrR<span style="color: #009900;">&#40;</span><span style="color: #000088;">$shorttitle</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">36</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>把36改成100就可以了。</p>
<p>简略标题简单易用，很多站长可能暂时用不到简略标题，不过简略标题在一些大网站中经常用到，有时候还必须用。</p>
<p>本文转自：<a href="http://hi.baidu.com/shiyiytt/home" target="_blank">shiyiytt的空间</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.16blog.cn/dedecms-shorttitle.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DedeCMS实现头条大标题图片调用的实现方法</title>
		<link>http://www.16blog.cn/dedecms-call-header-image.htm</link>
		<comments>http://www.16blog.cn/dedecms-call-header-image.htm#comments</comments>
		<pubDate>Tue, 25 Jan 2011 07:55:42 +0000</pubDate>
		<dc:creator>美丽的谎言</dc:creator>
				<category><![CDATA[DEDECMS]]></category>

		<guid isPermaLink="false">http://www.16blog.cn/?p=2808</guid>
		<description><![CDATA[你是否经常看到一些大门户网站的漂亮的头条图片标题呢？就像下面人民网这个： 这标题就是图片做的，虽然我们可以直接用文字和css做，但有时我们需要要一些字体特效，可不是每个人的电脑都安装有这些字体的 dede怎么生成这样的标题呢？其实很简单的： 一、实现方法 1）标题图片字体定义 首先上传字体文件上传到include/data/fonts/下，并命名为 STXINGKA.TTF （字体下载），这个是用于生成标题图片的字体的。当然，你也可以自己定义更漂亮的字体，但字体必须命名为STXINGKA.TTF。 2）标题图片函数文件 打开include/extend.func.php （注意：本文件为自定义函数接口，如果你没有这个文件，请自己创建一个），在最后面的?&#62;的前面以上开始插入以下代码： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 [...]]]></description>
			<content:encoded><![CDATA[<p>你是否经常看到一些大门户网站的漂亮的头条图片标题呢？就像下面人民网这个：<br />
<img class="alignnone size-full wp-image-2810" title="未标题-1" src="http://www.16blog.cn/soft/2011/01/未标题-1.jpg" alt="" width="583" height="75" /><br />
这标题就是图片做的，虽然我们可以直接用文字和css做，但有时我们需要要一些字体特效，可不是每个人的电脑都安装有这些字体的</p>
<p><span id="more-2808"></span></p>
<p>     dede怎么生成这样的标题呢？其实很简单的：<br />
一、实现方法 1）标题图片字体定义<br />
首先上传字体文件上传到include/data/fonts/下，并命名为 STXINGKA.TTF （<a href="http://ishare.iask.sina.com.cn/f/11997493.html">字体下载</a>），这个是用于生成标题图片的字体的。当然，你也可以自己定义更漂亮的字体，但字体必须命名为STXINGKA.TTF。<br />
2）标题图片函数文件 打开include/extend.func.php （注意：本文件为自定义函数接口，如果你没有这个文件，请自己创建一个），在最后面的?&gt;的前面以上开始插入以下代码：</p>

<div class="wp_codebox"><table><tr id="p280815"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
</pre></td><td class="code" id="p2808code15"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> DeDeTitle 
<span style="color: #009900;">&#123;</span> 
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'暂无标题'</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$bg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#F0F0F0'</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$color</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#30F'</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$width</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">500</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$height</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$size</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$font</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$path</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$t</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$t</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$t</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">font</span> <span style="color: #339933;">=</span> DEDEINC<span style="color: #339933;">.</span><span style="color: #0000ff;">'/data/fonts/STXINGKA.TTF'</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">function</span> DeDeTitle<span style="color: #009900;">&#40;</span><span style="color: #000088;">$t</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$t</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">function</span> TextConv<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$cfg_soft_lang</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cfg_soft_lang</span><span style="color: #339933;">!=</span><span style="color: #0000ff;">'utf-8'</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #b1b100;">return</span> gb2utf8<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">function</span> C<span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #339933;">,</span><span style="color: #000088;">$rgb</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/strlen"><span style="color: #990000;">strlen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #000088;">$str</span> <span style="color: #339933;">.=</span> <a href="http://www.php.net/str_repeat"><span style="color: #990000;">str_repeat</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #000088;">$color</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'#'</span><span style="color: #339933;">.</span><span style="color: #000088;">$str</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$rgb</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'R'</span><span style="color: #339933;">:</span> <span style="color: #b1b100;">return</span> <a href="http://www.php.net/hexdec"><span style="color: #990000;">hexdec</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'B'</span><span style="color: #339933;">:</span> <span style="color: #b1b100;">return</span> <a href="http://www.php.net/hexdec"><span style="color: #990000;">hexdec</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'G'</span><span style="color: #339933;">:</span> <span style="color: #b1b100;">return</span> <a href="http://www.php.net/hexdec"><span style="color: #990000;">hexdec</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">function</span> Titlepath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$cfg_medias_dir</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> GetPinyin<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.gif'</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cfg_medias_dir</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/title/'</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/is_dir"><span style="color: #990000;">is_dir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
CreateDir<span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$path</span><span style="color: #339933;">.</span><span style="color: #000088;">$name</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">function</span> Show<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/file_exists"><span style="color: #990000;">file_exists</span></a><span style="color: #009900;">&#40;</span>DEDEROOT<span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Titlepath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Make</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$cfg_cmsurl</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;img src=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$cfg_cmsurl</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-/&gt;</span>Titlepath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;/&gt;'</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">function</span> Make<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> 
<span style="color: #000088;">$image</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/imagecreatetruecolor"><span style="color: #990000;">imagecreatetruecolor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">width</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">height</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$bg</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/imagecolorallocate"><span style="color: #990000;">ImageColorAllocate</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">C</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">bg</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'R'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">C</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">bg</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'B'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">C</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">bg</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'G'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$color</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/imagecolorallocate"><span style="color: #990000;">ImageColorAllocate</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">C</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">color</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'R'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">C</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">color</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'B'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">C</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">color</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'G'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<a href="http://www.php.net/imagefilledrectangle"><span style="color: #990000;">ImageFilledRectangle</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">width</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">height</span><span style="color: #339933;">,</span><span style="color: #000088;">$bg</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<a href="http://www.php.net/imagettftext"><span style="color: #990000;">imagettftext</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">size</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">size</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">height</span><span style="color: #339933;">+</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">size</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #000088;">$color</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">font</span><span style="color: #339933;">,</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">TextConv</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<a href="http://www.php.net/imagegif"><span style="color: #990000;">imagegif</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #339933;">,</span>DEDEROOT<span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Titlepath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<a href="http://www.php.net/imagedestroy"><span style="color: #990000;">imagedestroy</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>3）调用方法简单说明       实际上我们知道，在织梦（DedeCMS）系统中，处理底层字段，一般来说有两种方法：</p>
<p>1.function<br />
2.runphp</p>
<p>       这两种方法的知识不在本教程讲解的重点，大家可查阅相关资料了解！<br />
       我们这里的标题图片，运用的就是第二种runphp来处理的，调用方法为：<br />
       在arclist标签中：</p>

<div class="wp_codebox"><table><tr id="p280816"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p2808code16"><pre class="html" style="font-family:monospace;">[field:title runphp='yes']
$title = new DeDeTitle(@me);//使用DedeTile类
$title-&gt;bg = '#F0F0F0';//标题图片背静颜色
$title-&gt;color = '#30F';//标题图片字体颜色
$title-&gt;width = 350;//标题图片的宽度
$title-&gt;height = 50;//标题图片的高度
$title-&gt;size = 25;//标题图片的字体大小
@me=$title-&gt;Show();//显示图片
[/field:title]</pre></td></tr></table></div>

<p>如果在是内容页运用，只需要将[field:title/]换成 {dede:field.title/}即可，例如：</p>

<div class="wp_codebox"><table><tr id="p280817"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p2808code17"><pre class="html" style="font-family:monospace;">{dede:field.title runphp='yes'}
$title = new DeDeTitle(@me);//使用DedeTile类
$title-&gt;bg = '#F0F0F0';//标题图片背静颜色
$title-&gt;color = '#30F';//标题图片字体颜色
$title-&gt;width = 350;//标题图片的宽度
$title-&gt;height = 50;//标题图片的高度
$title-&gt;size = 25;//标题图片的字体大小
@me=$title-&gt;Show();//显示图片
{/dede:field.title/}</pre></td></tr></table></div>

<p>二、效果预览       我们在后台的【模板】——[全局标记测试]中输入以下代码：</p>

<div class="wp_codebox"><table><tr id="p280818"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code" id="p2808code18"><pre class="html" style="font-family:monospace;">{dede:arclist row='1' typeid=''}
&lt;a href=&quot;[field:arcurl/]&quot;&gt;[field:title runphp='yes']
$title = new DeDeTitle(@me);
$title-&gt;bg = '#F0F0F0';
$title-&gt;color = '#30F';
$title-&gt;width = 350;
$title-&gt;height = 50;
$title-&gt;size = 25;
@me=$title-&gt;Show();
[/field:title]&lt;/a&gt;
{/dede:arclist}</pre></td></tr></table></div>

<p>  三、其它说明<br />
      这里的这个是一个现成的库，他不仅仅可以生成标题图片，也可以生成一些其它的内容。只要你会使用本函数中所介绍的几个参数即可。<br />
       本文转自：DEDECMS 再次对原作者贾金鹏表示感谢</p>
]]></content:encoded>
			<wfw:commentRss>http://www.16blog.cn/dedecms-call-header-image.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DEDECMS-FCK编辑器增强插件</title>
		<link>http://www.16blog.cn/dedecms-kindeditor-3-2.htm</link>
		<comments>http://www.16blog.cn/dedecms-kindeditor-3-2.htm#comments</comments>
		<pubDate>Sun, 27 Sep 2009 08:35:53 +0000</pubDate>
		<dc:creator>美丽的谎言</dc:creator>
				<category><![CDATA[DEDECMS]]></category>

		<guid isPermaLink="false">http://www.16blog.cn/?p=2207</guid>
		<description><![CDATA[主要功能： 1、自动排版，将编辑器内的内容自动排版，段落自动居左，图片自动居中，清除多余空行，可定制段前是否空格。 2、图片排版，将编辑器中的图片自动居中，免去每张单独设置的烦恼。 3、简繁转换，可在编辑器中直接进行简繁转换，一键操作，方便快捷。 2 4、自动排版后，代码里只保留段落标签&#60;p&#62;&#60;/p&#62;，粗体标签&#60;strong&#62;&#60;/strong&#62;，（&#60;b&#62;&#60;/b&#62;会被自动替换成&#60;strong&#62;&#60;/strong&#62;），垃圾代码自动过滤，保证了代码的整洁。 使用方法： 1、请下载附件中的压缩包，并把文件夹解压到 /include 目录下 2、分别打开后台文章模板:/dede/templets/article_add.htm 和 /dede/templets/article_edit.htm 添加如下代码 1 &#60;script type=&#34;text/javascript&#34; src=&#34;../include/editor_plus/plus_format_fck.js&#34;&#62;&#60;/script&#62; 并找到代码，这段的作用是载入编辑器 &#60; ?php GetEditor(&#34;body&#34;,$body,450); ?&#62; &#160; 在这段代码下方加入如下代码 &#160; &#60;input type=&#34;button&#34; id=&#34;buttonj2f&#34; onClick=&#34;jian2fan('body')&#34; value=&#34;简-/&#62;繁&#34;&#62; &#60;input type=&#34;button&#34; name=&#34;formatbutton&#34; value=&#34;自动排版&#34; onClick=&#34;FormatText('body')&#34;/&#62; &#60;input id=&#34;ifblank&#34; name=&#34;ifblank&#34; type=&#34;checkbox&#34;/&#62; &#60;label for=&#34;ifblank&#34; style='font-size:12px;'&#62;段前空格?&#60;/label&#62; &#60;input type=&#34;button&#34; name=&#34;formatbutton_img&#34; value=&#34;图片排版&#34; onClick=&#34;FormatImages('body')&#34;/&#62; &#60;input type=&#34;button&#34; name=&#34;button&#34; value=&#34;插入分页标签&#34; onclick=&#34;javascript:insertHTMLToEditor('body', '#p#副标题#e#');&#34; /&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>主要功能：<br />
1、自动排版，将编辑器内的内容自动排版，段落自动居左，图片自动居中，清除多余空行，可定制段前是否空格。<br />
2、图片排版，将编辑器中的图片自动居中，免去每张单独设置的烦恼。<br />
3、简繁转换，可在编辑器中直接进行简繁转换，一键操作，方便快捷。</p>

<div class="wp_codebox"><table><tr id="p220722"><td class="line_numbers"><pre>2
</pre></td><td class="code" id="p2207code22"><pre class="html" style="font-family:monospace;">4、自动排版后，代码里只保留段落标签&lt;p&gt;&lt;/p&gt;，粗体标签&lt;strong&gt;&lt;/strong&gt;，（&lt;b&gt;&lt;/b&gt;会被自动替换成&lt;strong&gt;&lt;/strong&gt;），垃圾代码自动过滤，保证了代码的整洁。</pre></td></tr></table></div>

<p><span id="more-2207"></span><br />
<img src="http://www.16blog.cn/attachments/20090927/01.jpg" alt="" /><br />
使用方法：<br />
1、请下载附件中的压缩包，并把文件夹解压到 /include 目录下<br />
2、分别打开后台文章模板:/dede/templets/article_add.htm 和 /dede/templets/article_edit.htm<br />
添加如下代码</p>

<div class="wp_codebox"><table><tr id="p220723"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p2207code23"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;../include/editor_plus/plus_format_fck.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>


<div class="wp_codebox"><table><tr id="p220724"><td class="code" id="p2207code24"><pre class="html" style="font-family:monospace;">并找到代码，这段的作用是载入编辑器
   &lt; ?php
        GetEditor(&quot;body&quot;,$body,450);
      ?&gt;
&nbsp;
在这段代码下方加入如下代码
&nbsp;
&lt;input type=&quot;button&quot; id=&quot;buttonj2f&quot; onClick=&quot;jian2fan('body')&quot; value=&quot;简-/&gt;繁&quot;&gt;
&lt;input type=&quot;button&quot; name=&quot;formatbutton&quot; value=&quot;自动排版&quot; onClick=&quot;FormatText('body')&quot;/&gt;
&lt;input id=&quot;ifblank&quot; name=&quot;ifblank&quot; type=&quot;checkbox&quot;/&gt;
&lt;label for=&quot;ifblank&quot; style='font-size:12px;'&gt;段前空格?&lt;/label&gt;
&lt;input type=&quot;button&quot; name=&quot;formatbutton_img&quot; value=&quot;图片排版&quot; onClick=&quot;FormatImages('body')&quot;/&gt;
&lt;input type=&quot;button&quot; name=&quot;button&quot; value=&quot;插入分页标签&quot; onclick=&quot;javascript:insertHTMLToEditor('body', '#p#副标题#e#');&quot; /&gt;</pre></td></tr></table></div>

<p>插件地址：<br />
<a href="http://www.16blog.cn/attachments/20090927/editor_plus.zip"></a></p>
<p><font color="red">本文转自织梦论坛</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.16blog.cn/dedecms-kindeditor-3-2.htm/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>防止页面被撑破图片自动缩小代码</title>
		<link>http://www.16blog.cn/picture-automatically-reduce-the-code.htm</link>
		<comments>http://www.16blog.cn/picture-automatically-reduce-the-code.htm#comments</comments>
		<pubDate>Tue, 22 Sep 2009 13:00:29 +0000</pubDate>
		<dc:creator>美丽的谎言</dc:creator>
				<category><![CDATA[DEDECMS]]></category>

		<guid isPermaLink="false">http://www.16blog.cn/%e9%98%b2%e6%ad%a2%e9%a1%b5%e9%9d%a2%e8%a2%ab%e6%92%91%e7%a0%b4%e5%9b%be%e7%89%87%e8%87%aa%e5%8a%a8%e7%bc%a9%e5%b0%8f%e4%bb%a3%e7%a0%81.htm</guid>
		<description><![CDATA[5 6 7 8 9 本代码的功能是自动获取网页中超过一定尺寸的图片，并自动按比例缩小， 防止撑破网页请先定义一个ID，例&#60;div id=article&#62; 这里是文章正文 &#60;/div&#62; js只获取这个id里面的图片，不会对网页其他地方的图片进行干扰， 避免把广告也缩小了在页面底部插入代码，必须在 “&#60;div id=article&#62; 这里是文章正文 &#60;/div&#62;” 后面 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 &#60;script type=&#34;text/javascript&#34; &#62; &#160; [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p218727"><td class="line_numbers"><pre>5
6
7
8
9
</pre></td><td class="code" id="p2187code27"><pre class="html" style="font-family:monospace;">本代码的功能是自动获取网页中超过一定尺寸的图片，并自动按比例缩小，
防止撑破网页请先定义一个ID，例&lt;div id=article&gt; 这里是文章正文  &lt;/div&gt;
js只获取这个id里面的图片，不会对网页其他地方的图片进行干扰，
避免把广告也缩小了在页面底部插入代码，必须在 “&lt;div id=article&gt;  
 这里是文章正文  &lt;/div&gt;” 后面</pre></td></tr></table></div>

<p><span id="more-2187"></span></p>

<div class="wp_codebox"><table><tr id="p218728"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code" id="p2187code28"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> <span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">//缩放图片到合适大小</span>
<span style="color: #003366; font-weight: bold;">function</span> ResizeImages<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #003366; font-weight: bold;">var</span> myimg<span style="color: #339933;">,</span>oldwidth<span style="color: #339933;">,</span>oldheight<span style="color: #339933;">;</span>
   <span style="color: #003366; font-weight: bold;">var</span> maxwidth<span style="color: #339933;">=</span><span style="color: #CC0000;">550</span><span style="color: #339933;">;</span>
   <span style="color: #003366; font-weight: bold;">var</span> maxheight<span style="color: #339933;">=</span><span style="color: #CC0000;">880</span>
   <span style="color: #003366; font-weight: bold;">var</span> imgs <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'article'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'img'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   <span style="color: #006600; font-style: italic;">//如果你定义的id不是article，请修改此处</span>
&nbsp;
   <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span>imgs .<span style="color: #660066;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     myimg <span style="color: #339933;">=</span> imgs<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
     <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>myimg.<span style="color: #660066;">width</span> <span style="color: #339933;">&gt;</span> myimg.<span style="color: #660066;">height</span><span style="color: #009900;">&#41;</span>
     <span style="color: #009900;">&#123;</span>
         <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>myimg.<span style="color: #660066;">width</span> <span style="color: #339933;">&gt;</span> maxwidth<span style="color: #009900;">&#41;</span>
         <span style="color: #009900;">&#123;</span>
            oldwidth <span style="color: #339933;">=</span> myimg.<span style="color: #660066;">width</span><span style="color: #339933;">;</span>
            myimg.<span style="color: #660066;">height</span> <span style="color: #339933;">=</span> myimg.<span style="color: #660066;">height</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>maxwidth<span style="color: #339933;">/</span>oldwidth<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            myimg.<span style="color: #660066;">width</span> <span style="color: #339933;">=</span> maxwidth<span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span>
     <span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
         <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>myimg.<span style="color: #660066;">height</span> <span style="color: #339933;">&gt;</span> maxheight<span style="color: #009900;">&#41;</span>
         <span style="color: #009900;">&#123;</span>
            oldheight <span style="color: #339933;">=</span> myimg.<span style="color: #660066;">height</span><span style="color: #339933;">;</span>
            myimg.<span style="color: #660066;">width</span> <span style="color: #339933;">=</span> myimg.<span style="color: #660066;">width</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>maxheight<span style="color: #339933;">/</span>oldheight<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            myimg.<span style="color: #660066;">height</span> <span style="color: #339933;">=</span> maxheight<span style="color: #339933;">;</span>
         <span style="color: #009900;">&#125;</span>
     <span style="color: #009900;">&#125;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #006600; font-style: italic;">//缩放图片到合适大小</span>
ResizeImages<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>imgs<span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>也可将本代码保存成一个js文件，放在网页底部调用。<br />
其中 ResizeImages();  表示执行，缺少这段代码则程序不执行。</p>
<p><font color="red">本文转自DEDECMS</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.16blog.cn/picture-automatically-reduce-the-code.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>复制页面内容时自动加上网站信息</title>
		<link>http://www.16blog.cn/copy-the-inclusion-of-the-web-site-information.htm</link>
		<comments>http://www.16blog.cn/copy-the-inclusion-of-the-web-site-information.htm#comments</comments>
		<pubDate>Fri, 28 Aug 2009 06:54:18 +0000</pubDate>
		<dc:creator>子桀</dc:creator>
				<category><![CDATA[DEDECMS]]></category>

		<guid isPermaLink="false">http://www.16blog.cn/?p=1795</guid>
		<description><![CDATA[&#60;script type=&#34;text/javascript&#34;&#62; document.body.on_copy = function &#40;&#41; &#123; setTimeout&#40; function &#40;&#41; &#123; var text = clipboardData.getData&#40;&#34;text&#34;&#41;; if &#40;text&#41; &#123; text = text + &#34;\r\n本篇文章来源于 www.地址.COM 原文链接：&#34;+location.href; clipboardData.setData&#40;&#34;text&#34;, text&#41;; &#125; &#125;, 100 &#41; &#125; &#60;/script&#62;]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox"><table><tr id="p179530"><td class="code" id="p1795code30"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
document.<span style="color: #660066;">body</span>.<span style="color: #660066;">on_copy</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> setTimeout<span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #003366; font-weight: bold;">var</span> text <span style="color: #339933;">=</span> clipboardData.<span style="color: #660066;">getData</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>text<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> text <span style="color: #339933;">=</span> text <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>本篇文章来源于 www.地址.COM 原文链接：&quot;</span><span style="color: #339933;">+</span>location.<span style="color: #660066;">href</span><span style="color: #339933;">;</span> clipboardData.<span style="color: #660066;">setData</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #339933;">,</span> text<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">100</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.16blog.cn/copy-the-inclusion-of-the-web-site-information.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

