內容簡介
類比 Google 搜尋顯示 WordPress 搜尋結果!
此 WordPress 外掛程式安裝了一組新的模板函數,讓您自定義 WordPress 搜尋頁面中顯示搜尋結果的方式。
您可以使用即時生成 Google 風格的文本片段來協助使搜尋結果的摘要更有用性。
您可以即時進行高亮顯示搜尋命中詞 (基於內嵌 xml,非笨重的非同步 Javascript)。
由於您自定義的搜尋結果摘要會被包含在交付的頁面內容中,所以它們可以被第三方網絡搜索引擎索引。
片段結果的 CSS 樣式與 Google 自定義搜索引擎樣式表兼容,可實現完整集成。
通過外掛程式的設置頁面,可高度自定義搜尋結果顯示的設計:您可以設置是否以及如何顯示片段日期 (支援本地化日期顯示)。
您可以選擇縮略說明/片段長度和顯示突出顯示搜尋命中詞的方式。
這是一個範例:http://www.nogent-citoyen.com/recherche/tour+eiffel 您可以看到在以上範例中左欄顯示了通過使用此外掛程式生成的 WordPress 搜尋結果,右欄顯示了非同步 Google 自定義搜尋引擎結果。
檢視您的訪客正在搜尋什麼!
此外掛程式安裝了新的儀表板 (管理面板小工具),以實時顯示您的用戶在您的博客中正在搜尋什麼 (熱門搜索列表,基本搜尋統計)。
它實現了搜索記錄和搜尋統計,並提供了最常搜索的小工具和模板函數以顯示熱門搜索列表。
最常搜索的清單可在您的管理面板中進行管理:您可以選擇重置任何搜尋表示的計數器或禁用該列表。
大多數蜘蛛和垃圾機器人已被過濾出搜尋計數器,以防止搜索鏈接垃圾郵件。
此外掛程式有自己的管理選項/設置頁面。
它是完全國際化的。搜尋功能支援 UTF-8 多字節,並處理重音文本。
日期顯示支援本地化問題。
基礎套件包括 .pot 檔案,以翻譯介面和英語和法語版本。
提示:儘管已經完全可用,但此外掛程式仍處於開發階段,會定期新增新功能以進一步改進搜尋結果的自定義和顯示。
可用的模板函數
在搜尋結果頁面模板循環 (search.php) 中使用<?php echo yd_search_snippet() ?> 。
例如,在您的搜尋模板主題文件 (search.php) 中,找到“the_content()”所在的位置,並像這樣替換它:
<?php if( function_exists( 'yd_search_snippet' ) ) yd_search_snippet() ?>
在任何頁面模板中的任何位置中使用 <?php echo yd_most_searched() ?>。
例如,在您的主頁面模板主題文件 (index.php) 中插入以下內容:
<?php if( function_exists( 'yd_most_searched' ) ) yd_most_searched() ?>
積極支援
到我的YD 搜尋功能外掛程式支援網站留言,以報告錯誤,要求特定功能或改進,或告訴我您使用外掛程式的方式。
法文描述:
此外掛程式安裝了一組新的模板函數,讓您自定義 WordPress 搜尋頁面中顯示搜尋結果的方式。
外掛標籤
開發者團隊
原文外掛簡介
Display WordPress search results like Google!
This WordPress plugin installs a set of new template functions that lets you customize the way search results are displayed in your WordPress search page.
You can use on-the-fly generated Google-style text snippets to help make search result abstracts more useful.
You can do on-the-fly hit-highlighting (in-line xml-based, not through a cumbersome asynchronous Javascript).
Your customized search result snippets being included in the delivered page content, they can be indexed by third-party web search engines.
The CSS styling of snippet results is compatible with Google custom search engine stylesheets for complete integration.
The design of the search result display is highly customizable through the plugin’s settings page: you can set-up if and how the snippet’s date is displayed (localized date display is supported).
You can choose the abstract/snippet length and the way highlighted search hits are rendered.
For an example of what it can look like, look here: http://www.nogent-citoyen.com/recherche/tour+eiffel (in this example, the left columns displays WordPress-generated results using this plugin, while the right column displays asynchronous Google custom search engine results)
Check-out what your visitors are searching for!
The plugin installs a new dashboard (admin panel widget) which shows you in real time what your users are searching for on your blog (top-search listing, basic search statistics).
It implements search logging, search statistics, and gives you a most-searched widget and template function to display the list of top-searches.
The most frequently searched listing is manageable in your admin panel: you can choose to reset counters for any search expression, or ban that expression from being listed.
Most spiders and spam-robots are filtered-out of the search counter to prevent search link-spamming.
The plugin has its own admin options/settings page.
It is fully internationalized. The search functions are UTF-8 multibyte compatible and do take care of accentuated text.
The date display supports localization issues.
Base package includes .pot file for translation of the interface, and English and French versions.
NB: although already fully functional, this plugin is still in active development stage, and new features are added on a regular basis to help further improve search-result customization and display.
Available template functions
Use in your search results page template loop (search.php).
For example, in your search template theme file (search.php), find the place where it says the_content() and replace it like this:
Use anywhere in any page template.
For example, in your home page template theme file (index.php), insert something like this:
Active support
Drop me a line on my YD Search Functions plugin support site to report bugs, ask for a specific feature or improvement, or just tell me how you’re using the plugin.
Description en Français :
Ce plug-in WordPress installe des fonctions avancées d’affichage des résultats de recherche.
Vous pouvez notamment l’utiliser pour afficher des extraits de texte intelligents dans vos résultats (“snippets” à la Google).
Il n’extraira que les passages du texte contenant les mots-clés et expressions recherchés.
Il pourra également surligner dans le texte les expressions et mots recherchés.
La fonction de surlignage se fait en ligne dans le flux XML et non en mode asynchrone avec un Javascript lent et lourd.
Les snippets et les mots surlignés faisant partie du texte de vos pages de résultats de recherche, ils peuvent eux-même être indéxés par les moteurs de recherche externes du web, donnant de la valeur originale à vos pages de résultats.
Par ailleurs, ce plugin active l’enregistrement des recherches effectuées par les visiteurs sur votre site,
et vous remonte au niveau de votre interface d’administration la liste des recherches les plus fréquentes.
Une fonction de template et/ou un widget vous permettent d’afficher la liste des recherches les plus courantes pour vos visiteurs.
Le style CSS généré pour les résultats de recherche est compatible avec les feuilles de styles utilisées par le moteur de recherche Google custom pour une intégration parfaite (voir exemple ci-dessous).
Le plugin a sa propre page d’option dans l’administration.
Il est entièrement internationalisé.
La distribution standard inclut le fichier de traduction .pot et les versions française et anglaise.
Le plugin peut fonctionner avec n’importe quelle langue ou jeu de caractères.
Les fonctions de recherche et de surlignage gèrent les caractères français accentués de façon intelligente.
Elles sont compatibles utf-8 multibyte.
Pour voir un exemple du fonctionnement de ce plug-in en grandeur nature, regardez ici : http://www.nogent-citoyen.com/recherche/pavillon+baltard
(dans cet exemple, la colonne de gauche affiche des résultats WordPress générés avec ce plug-in alors que la colonne de droite affiche des résultats de l’API du moteur de recherche Google custom)
Pour toute aide ou information en français, laissez-moi un commentaire sur le site de support du plugin YD Search Functions.
Funding Credits
Original development of this plugin has been paid for by www.Nogent-Citoyen.com. Please visit their site!
Le développement d’origine de ce plugin a été financé par www.Nogent-Citoyen.com. Allez visiter leur site !
Translation
If you want to contribute to a translation of this plugin or its documentation, please drop me a line by e-mail or leave a comment on the plugin’s page.
You will get credit for your translation in the plugin file and this documentation, as well as a link on this page and on my developers’ blog.
Plugin options/settings page
Use the plugin’s own options/settings page to customize settings if necessary.
Revisions
0.1.0 Original beta version.
0.2.0 First improvements (function interface, options/settings, no debug code)
0.2.1 Bugfix: caps search string (uppercase) / thanks to Inky for reporting
0.3.0 Complete settings, multi-word highlighting fixed, improved settings page design
0.4.0 Added search logging, search statistics, most searched listings, top-search widget and lots of new customization options
To Do
Test. Final release.
Look at comments on top of main plugin file to get a general idea of what is coming ahead in future versions.
Did you like it?
Drop me a line on http://www.yann.com/en/wp-plugins/yd-search-functions
And… please rate this plugin –>
