opensearch_启用OpenSearch的博客

news/2024/7/19 23:05:25 标签: 搜索引擎, java, php, python, wordpress
opensearch

opensearch

Have you noticed when you visit some sites, there's a bluish glow in the search engine field in Firefox. Like this:

当您访问某些网站时,是否注意到了,Firefox的搜索引擎字段中发出蓝色的光芒。 像这样:

open search example firefox

What does that even mean? Well, it means you can add this site's search to the drop down list of search engines. This functionality is following the open search standard.

那有什么意思? 好吧,这意味着您可以将本网站的搜索添加到搜索引擎的下拉列表中。 此功能遵循开放式搜索标准。

The things are actually pretty simple. You need to have an XML file <link>-ed to from your page.

事情实际上很简单。 您需要从页面上将XML文件<link> -ed链接到。

For example on this blog I have this in the head:

例如,在此博客中,我的头是这样的:

<link 
  rel="search" 
  type="application/opensearchdescription+xml" 
  href="http://www.phpied.com/wp-content/plugins/open-search/open-search-xml.php" 
  title="phpied.com : Search in posts"
/>

So how do you add open search capability to your blog? With the OpenSearch plugin for WordPress, naturally.

那么,如何为博客添加开放搜索功能? 自然地,使用适用于WordPress的OpenSearch插件。

BTW, if you're running PHP4 you might get errors during installation, in this case just open up the open-search-class.php and

顺便说一句,如果您正在运行PHP4,则在安装过程中可能会出错,在这种情况下,只需打开open-search-class.php

  • replace all "public static" with empty string

    用空字符串替换所有“公共静态”
  • replace all "private static" with empty string

    用空字符串替换所有“专用静态”
  • replace all "self::" with "OpenSearch::"

    用“ OpenSearch ::”替换所有“ self ::”

This is it, enjoy and if you want to change the default icon, you need to look into replacing the image found in /wp-content/plugins/open-search/default-favicon.png

就是这样,请尽情享受,如果您想更改默认图标,则需要研究替换在/wp-content/plugins/open-search/default-favicon.png找到的图像

Here's what you get at the end:

这是最后的结果:

And now your readers can add your search to their browser and quickly find content on your blog. Sweet.

现在,您的读者可以将搜索添加到他们的浏览器中,并快速在博客上查找内容。 甜。

Tell your friends about this post on Facebook and Twitter

在Facebook和Twitter上告诉您的朋友有关此帖子的信息

翻译自: https://www.phpied.com/opensearch-enabling-your-blog/

opensearch


http://www.niftyadmin.cn/n/1306418.html

相关文章

Oracle SQL Developer中SQL语句格式化快捷键

Oracle SQL Developer中SQL语句格式化快捷键 格式化SQL语句&#xff1a;CtrlF7

替换所选文本(Firefox)

A quick function to replace the selected text (in Firefox). Accepts: 替换所选文本的快速功能(在Firefox中)。 接受&#xff1a; string to replace the selection, or 字符串来替换选择&#xff0c;或者 callback function that takes the selected text and returns a st…

执行请求的操作时遇到错误

执行请求的操作时遇到错误 1、具体错误如下&#xff1a; ORA-01017:invalid username/password:logon denied 01017. 00000 -"invalid username/password.logon denied " *Cause: *Action: 2、错误原因 输入的密码不正确 3、解决办法 查看数据库配置文件&#xff0c;…

word编辑——制位表

使用多级列表时&#xff0c;要求自动编号后面空2格&#xff0c;使用制表符&#xff0c;比如三级标题&#xff0c;文本缩进和对齐位置都选0&#xff0c;然后左对齐&#xff0c;点更多&#xff0c;三级标题选制表符&#xff0c;直接输2个字符或者0.71cm&#xff0c;二级标题需要输…

js 画布翻转_将照片加载到画布中,然后翻转

js 画布翻转Today our family went to the yearly photo session with the girls. We took one shot that can be looked normally, as well as upside down, so I was wondering can you flip an image using a canvas tag. Turns out, yes, you can and its pretty easy. 今…

Excel 2010高级应用-雷达图(六)

Excel 2010高级应用-雷达图&#xff08;六&#xff09; 基本操作如下&#xff1a; 1、新建空白Excel文档&#xff0c;并命名雷达图 2、单击“插入”&#xff0c;并找到雷达图图样 3、单击雷达图图样&#xff0c;在空白文档上生成图框&#xff0c;并在图框下方生成数据源 4、在图…

推荐几个免费的电子书下载网站——网盘版

推荐几个免费的电子书下载网站——网盘版 1&#xff1a;虫部落 搜素引擎的集合版 链接: link. 图片&#xff1a; 2.大圣盘&#xff0c;类似于大力盘&#xff0c;怀疑它们的引擎是一个&#xff0c;搜索结果可能内它丰富 链接&#xff1a;link 图片&#xff1a; 3.罗马盘&am…

Excel 2010高级应用-圆环图(七)

Excel 2010高级应用-圆环图&#xff08;七&#xff09; 基本操作如下&#xff1a; 1、新建空白Excel文档&#xff0c;并命名为圆环图 2、单击“插入”&#xff0c;并找到圆环图图样 3、单击圆环图图样&#xff0c;并在空白文档上生成图框 4、在图框下方生成数据源 5、在图框上方…