CNN has a number of RSS feeds with current news available, on a
CNN在a
上提供了许多RSS新闻,其中包含当前新闻。
number of topics.
主题数。
This widget allows the WP admin to select which
此小部件允许WP管理员选择哪个
feed, how many items to show from that feed and optionally set a
提要,从该提要中显示多少项,并可以选择设置
widget title.
小部件标题。
If no title is selected, the name of the feed is
如果未选择标题,则提要的名称为
used.
用过的。
The feed is fetched for every view, so users are guaranteed
为每个视图都提取了提要,因此可以保证用户
up to date information.
最新信息。
No local storage of feed is done.
没有本地存储提要。
Clicking on a news item will of course take you straight to the
点击新闻项当然会带您直接到
relevant article at CNN, as per CNN Terms of Use.
根据CNN使用条款在CNN上发表相关文章。 p>
This plugin works both as a widget, as inline content
此插件既可用作窗口小部件,也可用作内联内容
replacement and can be called from themes.
可以从主题中调用。
Any number of
任意数量的
inline replacements or theme calls allowed, but only one
允许进行内联替换或主题调用,但只允许一个
widget instance is supported in this release.
此版本中支持窗口小部件实例。 p>
For widget use, simply use the widget as any other after
要使用窗口小部件,只需将窗口小部件与其他任何元素一起使用
selecting which feed it should display.
选择应显示的Feed。
For inline content
对于内联内容
replacement, insert the one or more of the following strings in
替换,将以下一个或多个字符串插入
your content and they will be replaced by the relevant news feed.
您的内容,它们将被相关的新闻提要替换。
For theme use, add the do_action function call described below.
对于主题使用,添加下面描述的do_action函数调用。 p>
for the default feed-
<!-cnn-news-> code> strong> li>
-
<!-cnn-news#feedname-> code> strong> li>
ol>
Shortcodes can be used if you have WordPress 2.5 or above,
如果您的WordPress 2.5或更高版本,则可以使用短代码,
in which case these replacement methods are also available.
在这种情况下,也可以使用这些替换方法。 p>
[cnn-news]
for the default feed-
[cnn-news] code> strong>作为默认供稿 li>[cnn-news name="feedname"]
-
[cnn-news name =“ feedname”] code> strong> li>
ol>
Calling the plugin from a theme is done with the WP do_action()
从主题调用插件是通过WP do_action()
完成的
system.
系统。
This will degrade gracefully and not produce errors
这将正常降级并且不会产生错误
or output if plugin is disabled or removed.
或在插件被禁用或删除的情况下输出。 p>
-
<?php do_action('cnn_news'); ?>
for the default feed ?> code> strong>作为默认供稿 li>
-
<?php do_action('cnn_news','feedname'); ?>
?> code> strong> li>
ol>
Enable plugin, go to the CNN News page under
启用插件,请转到“ CNN新闻”页面
Dashboard->Settings and read the initial information.
控制台->设置并读取初始信息。
Then
然后
go to the CNN News page under Dashboard->Manage and
转到“控制台”->“管理和
”下的“ CNN新闻”页面
configure one or more feeds.
配置一个或多个供稿。
Then use a widget or insert
然后使用小部件或插入
relevant strings in your content or theme.
您的内容或主题中的相关字符串。 p>
Additional information:
其他信息: p>
The available options are as follows.
可用选项如下。 p>
Name: Optional feed name, that can be used in the
名称 strong>:可选的供稿名称,可以在
中使用widget or the inline replacement string to reference
小部件或要替换的内联替换字符串
a specific feed.
特定的供稿。
Any feed without a name is considered
任何不带名称的供稿都被视为
“default” and will be used if the replacement strings do
“默认”,如果替换字符串使用
,则将使用
not reference a specific feed.
没有引用特定的供稿。
If there are more than
如果超过
one feed with the same name, a random of these is picked
一个具有相同名称的供稿,随机选择其中一个
every time it is used.
每次使用。
This also applies to the default
这也适用于默认
feed(s).
提要。 p>
Title: Optional, which when set will be used in the
标题 strong>:可选,设置后将在
中使用widget title or as a header above the news items when
小部件标题或当新闻项上方的标题时
inline.
排队。
If the title is empty, then a default title
如果标题为空,则为默认标题
of “CNN News : : ” is used.使用“ CNN新闻:<区域>:”。Note
注意
that as per CNN Terms of Service it is a requirement
根据CNN服务条款,这是一项要求
to state that the news come from CNN.
声明新闻来自CNN。 p>
Feed: A dropdown list of the current feeds provided
Feed: strong>:提供的当前Feed的下拉列表
by CNN.
由CNN。
This list is hard coded into the plugin, presumably
此列表被硬编码到插件中,大概是
CNN does not change the list too often.
CNN不会经常更改列表。
The [INTL], [MONEY]
[INTL],[MONEY]
and [SI] after the feed name indicate that the feed is from
提要名称后的[SI]和[SI]表示该提要来自
CNN International, CNN Money or Sports Illustrated respectively.
分别是CNN International,CNN Money或Sports Illustrated。 p>
News item length: Short or long.
新闻项的长度 strong>:短或长。The short version is really just
简短的版本真的只是
the news item title as a one liner but probably the one most
新闻标题是唯一的,但可能是最多的
WP admins will use.
WP管理员将使用。
The long version is the title followed by
长版本是标题,后跟
a 3-4 line teaser.
3-4行预告片。
For the short version, the long text is
对于简短版本,长文本为
available as a mouse rollover/tooltip.
可作为鼠标悬停/工具提示。 p>
Max items to show: As the title says, if the feed has
最多可显示的项目 strong>:如标题所示,如果供稿具有
sufficient entries to fulfil the request.
足够的条目来满足请求。 p>
Cache time: The feeds are now fetched using WordPress
缓存时间: strong>现在可以使用WordPress获取提要
builtin MagpieRSS system, which allows for caching of feeds
内置的MagpieRSS系统,可以缓存提要
a specific number of seconds.
特定的秒数。
Cached feeds are stored in
缓存的提要存储在
中
the backend database.
后端数据库。 p>
Clicking on a news item will of course take you to the
点击新闻当然会带您到
relevant article at CNN, as per CNN Terms of Use.
根据CNN使用条款在CNN上发表相关文章。 p>
If you want to change the look&feel, the inline table is
如果要更改外观,则内联表为
wrapped in a div with the id “cnn-news-inline” and the
包装为div,其ID为“ cnn-news-inline”,并且
widget is wrapped in an li with id “cnn-news”.
小部件包装在id为“ cnn-news”的li中。
Let me
我
know if you need more to properly skin it.
知道是否需要更多适当的皮肤。 p>
Note that if you get the message “CNN News unavailable” then
请注意,如果收到消息“ CNN新闻不可用”,则
the WordPress internal RSS feed fetcher failed to get the
WordPress内部RSS feed提取程序无法获取
feed.
饲料。
Reasons for this are firewalls blocking outbound traffic,
原因是防火墙阻止出站流量,
CNN RSS being down or feed missing/wrong URL.
CNN RSS出现故障或馈送URL缺失/错误。
Try again with
再试一次
a different feed to see if that helps.
另一个供稿,看看是否有帮助。 p>
Download now!
立即下载! strong> p>Support
支持 p>
Donate
捐赠 p>