﻿<?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>19~Blog &#124; &#187; Sweetcron</title>
	<atom:link href="http://www.ll19.com/tag/sweetcron/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ll19.com</link>
	<description>今天总是好过昨天~原来，冥冥之中，自有天意。</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:46:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>WordPress和Sweetcron的全站AJAX（续）</title>
		<link>http://www.ll19.com/sweetcron_wordpress_ajax.html</link>
		<comments>http://www.ll19.com/sweetcron_wordpress_ajax.html#comments</comments>
		<pubDate>Fri, 13 Feb 2009 03:11:56 +0000</pubDate>
		<dc:creator>19.</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Sweetcron]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ll19.com/?p=158</guid>
		<description><![CDATA[全站点AJAX续. 首先声明这样做完全不会影响SEO。以前的一篇WP的相关文章http://www.ll19.com/jquery-wordpress-ajax.html，这次算是补充，写了一个较通用的JQuery插件来实现，我的Lifestream也用了类似的方法全AJAX，有兴趣可以去测试一下。这里需要用到下面3个文件： &#124; 19_ajax.css &#124; 19_ajax.js &#124; ajax_tooltips_bg.gif &#124; 其中JS就是这个JQuery插件，其它两个是相关的css和背景的gif，引入站点后具体用法我举个例子比如在页面的最下加这句： 1 jQuery&#40;&#34;p.date a,li.tag_list a,p#pagination a&#34;&#41;.ajax_19&#40;&#34;div#main_container&#34;&#41;; 熟悉JQuery的人应该一看就懂，这里的作用是将所有class是date的p元素、class是tag_list的li元素、id是pagination的p元素下的链接点击的时候得到这个链接的内容后显示在ID为main_container的div里，而不会去打开此链接。这样既不影响SEO又实现了AJAX。 拿Lifestream来举例，用过的人都清楚这套系统简单说就是一个RSS聚合器，官方站点Sweetcron，同样我也是用它来聚合我在各个站点留下的各种记录，有兴趣的人可以去安装一套。之后要让它全AJAX，和WP中用到的方法类似，不同的是它在控制显示页面的时候不是在主题包中，首先需要修改system\application\libraries\sweetcron.php， 两个函数get_single_item_page（）和get_items_page（）的三个地方： 1 2 3 $this-&#62;CI-&#62;load-&#62;view&#40;'themes/' . $this-&#62;CI-&#62;config-&#62;item&#40;'theme'&#41; . '/_header', $data&#41;; $this-&#62;CI-&#62;load-&#62;view&#40;'themes/' . $this-&#62;CI-&#62;config-&#62;item&#40;'theme'&#41; . '/single', $data&#41;; $this-&#62;CI-&#62;load-&#62;view&#40;'themes/' . $this-&#62;CI-&#62;config-&#62;item&#40;'theme'&#41; . '/_footer', $data&#41;; 更改成： 1 2 3 4 5 6 7 8 $glll = $_POST&#91;&#34;glll&#34;&#93;; if &#40;$glll != &#34;ajax&#34;&#41; [...]]]></description>
		<wfw:commentRss>http://www.ll19.com/sweetcron_wordpress_ajax.html/feed</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
	</channel>
</rss>

