Simple:Press Documentation

Plugin: Enhanced Forum and Blog Searching

Plugin Description

Plugin: Enhanced Forum and Blog Searching (Search) – This Simple:Press plugin allows displaying search results by forum post instead of by topic with keywords highlighted within the forum post. The plugin also adds Blog Search functionality to the advanced search set up so that WordPress post and page search results can be seen along with forum search results.

Plugin Features

Note: Independent of this plugin:

  • The following “Options” related link and screen exist.
    • A “General Display Settings” sub-menu entry under the Admin Forum menu “Options” entry linked to the “Options – General Display Settings” admin screen.
    • An “Options – General Display Settings” admin screen with a variety of general display sections. The sections have radio buttons and/or text input boxes for specifying options. The “Help” link should be used for assistance in setting up the options.
  • Clicking the “Advanced Search” label below the Search text input box on forum pages displays the details of the search options available on a drop down menu. Results depend on the options selected.If a search criteria has been put into the Search text input box, categories to select from under Advanced Search are:
    • Forum Scope selections
    • Match selections of any word, all words, or phrase
    • Forum Options selections of posts only, topic titles only, posts and topic titles, tags only
    • Note: The minimum search word length is 4 characters with the maximum length of 84 characters (note: this will be server setup specific).

    If no search criteria has been put into the Search text input box, categories to select from under Member Search (Current or All Forums) are:

    • List Topics You Have Posted To
    • List Topics You Started
    • Note: Putting any text in the Search text input box causes a forum search to occur, overriding these selections.

Installing this Simple:Press plugin adds:

  • A new “Search” section in the Plugin Management panel under the Admin menu path Forum – Plugins – Available Plugins. From this panel the Simple:Press “Enhanced Forum and Blog Searching” plugin can be activated, or deleted by the admin.

Activating this plugin provides:

  • A change to the new “Search” section in the Plugin Management panel under the Admin menu path Forum – Plugins – Available Plugins so the Simple:Press “Enhanced Forum and Blog Search” plugin can be deactivated, uninstalled, or its Options set up. Clicking the “Options” portion links to the existing “Options – General Display Setting” admin screen.
  • A new section “Site Integrated Search” in the “Options – General Display Settings” panel where the search plugin options can be set. The “Help” link should be used for assistance in setting up the options.
  • A new radio button in the “Forum Scope” section of the “Advanced Search” panel displayed when clicking on the text “Advanced Search” below the Search input text box found on the forum pages of the website. Note: The radio button’s label is set up by the admin in the “Site Integrated Search” section of the “Options – General Display Settings” panel. The label default is “Include blog posts”.
  • A new listing tab resulting from the search of forums using the keyword(s) that were inserted into the Search input text box found on the forum pages of the website. Note: The forum search tab label is set up by the admin in the “Site Integrated Search” section of the “Options – General Display Settings” panel. The label default is “Forum search results”.
  • A new listing tab resulting from the search of blogs using the keyword(s) that were inserted into the Search input text box found on the forum pages of the website. Note: The blog search tab label is set up by the admin in the “Site Integrated Search” section of the “Options – General Display Settings” panel. The label default is “Blog search results”.
  • A new widget “Blog & Forum Search” added to the list of available widgets on the WordPress Widgets page observed by hovering the cursor over the WP-Admin Bar “dashboard’ icon to have its drop down menu displayed and selecting the “Widget” entry in the menu. When activated, this widget adds the capability to search blog and forum posts from the Main Widget Area or the Secondary Widget area of WordPress blog pages.

There are no new permissions added to the permission sets due to this plugin.

Plugin Requirements

Simple:Press version 5.5.8 and above is required.

The Simple:Press plugin must be installed, activated, and its options set up before it is operational.

As part of the installation, a “Search” section is added to the Plugin Management panel under the admin menu Forum – Plugins – Available Plugins. From this panel the Enhanced Forum and Blog Searching plugin can be activated, deactivated, uninstalled, deleted, or have its options set up.

There are no new permissions added to the permission sets due to this plugin.

The plugin’s template tags are included in all current themes. If the default positions and layouts are acceptable, nothing need be done. If template tag changes are going to be made, it is recommended that a Custom or Child Theme is created first before installing this plugin. Information on Child Themes is located on our Creating a Child Theme page. Information on creating and installing themes is located on our Creating a Custom Theme page.

Plugin Installation and Activation

Please see Using Plugins on how to obtain and install the Simple:Press Enhanced Forum and Blog Searching plugin.

As mentioned there the default location for Simple:Press plugin folders is …/wp-content/sp-resources/forum-plugins. If this path is changed, it is important to note that the plugin’s folder and its content need to reside in the forum plugins folder wherever it has been moved and however it has been renamed. See Storage Locations for more information.

Activation is accomplished from the Admin Dashboard panel menu by selecting “Forum” and then “Plugins” from the drop down Forum Admin menu. On the Simple:Press Administration panel select the “Search” plugin on the “Plugin Management” panel and click on “Activate”. The “Activate/Delete” label changes to “Deactivate/Uninstall/Options”.

To deactivate the plugin, click on “Deactivate”. The “Deactivate/Uninstall/Options” label changes to “Activate/Delete”. Note: Deactivating the plugin also deactivates the “Forum & Blog Search” widget if it had been activated. Activating the plugin again reinstates plugin functionality as well as the widget functionality if the widget had been activated.

Plugin Administrative Options

After activation, a) on the aforementioned “Available Plugins” page and “Plugin Management” panel, click “Options” on the “Search” plugin section or b) under the forum menu on the left side of the forum admin page click the “Options” menu item followed by the “General Display Settings” sub-menu item to get the “Options – General Display Settings” panel.

  • Selecting “Site Integrated Search” Options
    • In this section, one can choose the label text to be displayed in the search form and on forum and blog search tabs as well as selecting if post, page, and achievement posts will be include in the integrated search results.
    • In the data input box to the right of the text “Label text for search form”, insert the label text to be associated with the new radio button on the search form. If the default text is acceptable, no action is required. The default is “Include blog posts”.
    • In the data input box to the right of the text “Label text for forum search tab”, insert the label text to be associated with the results shown on the forum search tab. If the default text is acceptable, no action is required. The default is “Forum search results”.
    • In the data input box to the right of the text “Label text for blog search tab”, insert the label text to be associated with the results shown on the blog search tab. If the default text is acceptable, no action is required. The default is “Blog search results”.
    • Click on the “Update Display Options” button to save the setting if no other changes are to be made in the other sections of the panel. Otherwise, wait to click the “Update Display Options” button until all desired changes have been made.

After plugin activation and while on a website page, hover the cursor over the WP-Admin Bar “dashboard” icon to have its drop down menu displayed and select the “Widgets” entry from the menu to get to the WP Widgets page.

  • Activating the “Blog & Forum Search” Widget
    • Once on the WP Widgets page, find the new “Blog & Forum Search” Widget.
    • Activate it by:
        • Clicking on it to see its drop down menu options of “Main Widget Area” (footer section of the site) and “Secondary Widget Area” (in a sidebar on posts and pages).
        • Click on the desired location for the forum search widget to select it. The location is selected when it is blue in color. Deselect a location that is blue in color by selecting the other location that is white in color. The location is deselected when it is white in color.
        • Click on the “Add Widget” button to move the widget to the desire location (Main Area or Secondary Area) on the Widget page and to open the widget’s Title box.

      OR

        • Drag the “Blog & Forum Search” Widget to the desire location for display, either under the Main Widget Area” or the “Secondary Widget Area” on the Widget page and to open the widget’s Title box.
  • In the “Title” input box, input the title to be shown for the Blog & Forum Search widget. An example might be “Forum Search”
  • Click on the “Save” button to save the title and complete the activation.
  • The widget will appear in the selected widget area as an text box for inputting the search criteria displaying the title just designated.

Plugin Language Translation

A plugin’s message strings can be translated from English to other languages and then the translation displayed if language translation files are available. Some plugins may not have such files.

Information regarding downloading language files, “mo’ language file placement, and translation (language localization) is found at Localization.

More information is available regarding translation files at Simple:Press Translations. On the base page, select the “Getting Started Guide” link for basics about it’s use. On that page, select the “register a username here” link to obtain a password to the site. Use the “Contact Form” link to request the desired language if it is not currently available. The “Contact Form” link may also be used to volunteer to be a validator for a translation project.

The Enhanced Forum and Blog Searching plugin’s available language translation files with translation statistics, and message translations can be viewed at Enhanced Forum and Blog Searching Translations. Select the Version link to see the languages available. Select the link for the desired language to see forum messages and their available translations. If available, export the file for the selected language to its proper forum language sub-folder as a “mo” file using the export link at the bottom of the page displaying the actual message translations for the language selected.

The default location for plugin language files is …/wp-content/sp-resources/forum-language/sp-plugins. If this path is changed, it is important to note that the plugin’s language file needs to reside in the language sub-folder for sp plugins wherever it has been moved and however it has been renamed. See Storage Locations for more information.

Plugin Usage

Forum admins use this plugin to set up the plugins options.

Forum admins and forum users can select to include blog post search results along with the forum search results.

  • Include Blog Posts
    • While on a Forum page, click the “Advanced Search” label below the Search criteria text input box to display the Advanced Search down menu.
    • Under the “Forum Scope” category, select the radio button to the left of text selected by the admin for the new radio button (the default is “Include blog posts”) to include the search of blog posts. The radio button indicates it is selected by turning green in color. Clicking the radio button when it is green will deselect it. The radio button indicates it is deselected by turning gray in color.
    • After any other selections or necessary actions for the desired search have been made including inputting the keyword(s) to be found or the search criteria text to be found into the Search text input box to the left of the “Search” button on the forum page, click either of the “Search” buttons to initiate the search process. One Search button is to the right of the Search criteria text input box. The other is on the Advance Search drop down menu.
  • Viewing Search Results
    • If “Include blog posts” was selected:
      • When the search completes, a button labeled with the text selected by the admin for the forum search results [the default text is “Forum search results ()] and a button with the text selected by the admin for the blog search results [the default text is “Blog search results()”] are displayed. Inside the parenthesis the number of occurrences of the search text found for each set of posts is displayed. See Selecting “Site Integrated Search” Options above for the label text selection.
      • To View Forum Posts
        • By default the list of forum posts with the search criteria text highlighted are displayed.
        • Click on the “Go To Post” text associated with a post to go to the forum post where the post can be viewed in its entirety.
        • Click on the back arrow to return to the search list page showing the forum posts.
        • Repeat the process to see the individual forum posts listed.
        • Note: Click on the “Forum search results” button anytime to again display the list of forum posts with the search criteria text highlighted.
      • To View Blog Posts
        • From the search results page, click on the “Blog search results()” button to display the list of blog posts containing the search criteria text.
        • Click on the title of the blog post to go to the blog post where the post can be viewed in its entirety.
        • Click on the back arrow to return to the search results page.
        • From the search results page, click on the “Blog search results()” button to display the list of blog posts containing the search criteria text.
        • Click on the title of the blog post to go to the blog post where the post can be viewed in its entirety.
        • Click on the back arrow to return to the search results page.
        • Repeat the process to see the individual blog posts listed.
        • Click on the “Forum search results” button to again display the list of forum posts with the search criteria text highlighted.
    • If “Include blog posts” was not selected:
      • When the search completes, a “Search results for xxxx ()” button are displayed. The xxxx represents the searched text. Inside the parenthesis the number of occurrences of the search text found for each set of posts is displayed. A list of the forum posts with the search text highlighted is also displayed.
      • Click on the “Go To Post” text associated with a post to go to the forum post where it can be view in its entirety.
      • Click on the back arrow to return to the search list page showing the forum posts.
  • Searching List of Forum Topics You Have Posted To and observing results
    • On the forum page, be sure there is no search criteria in the search criteria text input box. (Any text will result in a forum and/or blog search).
    • Click on “Advance Search” to see the Advanced Search drop down menu.
    • Note: settings under “Advanced Search” have no bearing on the search results.
    • Under “Member Search (Current or All Forums), click on “List Topics You Have Posted To” button to initiate the search of forum topics the logged in user has posted to.
    • After the search is complete, the Search|Forum page is displayed with a listing of all the forum topics the logged in user has posted to.
    • Click on a listed topic’s title to go to the actual post.
    • Click on the back arrow to return to the search results page.
  • Searching List of Forum Topics You Started and observing results
    • On the forum page, be sure there is no search criteria in the search criteria text input box. (Any text will result in a forum and/or blog search).
    • Click on “Advance Search” to see the Advanced Search drop down menu.
    • Note: settings under “Advanced Search” have no bearing on the search results.
    • Under “Member Search (Current or All Forums), click on “List Topics You Have Started” button to initiate the search of forum topics the logged in user has started.
    • After the search is complete, the Search|Forum page is displayed with a listing of all the forum topics the logged in user has started.
    • Click on a listed topic’s title to go to the actual post.
    • Click on the back arrow to return to the search results page.
  • Searching Forum and Blog with Search Widget and observing results
    • On any website page, go to the WP Footer (Main Widget Area) or the sidebar (Secondary Widget Area) to find the search criteria input text box and the title the Admin specified when activating the “Blog & Forum Search” widget. (The defaults is “Search blog posts and forums”.
    • Select the desired search option from (a) any word, (b) all words, and (c) phrase
    • Put the search criteria text into the search criteria text input box.
    • Click on the “Search” button to initiate the search of forum and blog posts meeting the search criteria.
    • When the search completes, a button labeled with the text selected by the admin for the forum search results [the default text is “Forum search results ()] and a button with the text selected by the admin for the blog search results [the default text is “Blog search results()”] are displayed. Inside the parenthesis the number of occurrences of the search text found for each set of posts is displayed. See Selecting “Site Integrated Search” Options above for the label text selection.
    • To View Forum Posts
      • By default the list of forum posts with the search criteria text highlighted are displayed.
      • Click on the “Go To Post” text associated with a post to go to the forum post where the post can be viewed in its entirety.
      • Click on the back arrow to return to the search list page showing the forum posts.
      • Repeat the process to see the individual forum posts listed.
      • Note: Click on the “Forum search results” button anytime to again display the list of forum posts with the search criteria text highlighted.
    • To View Blog Posts
      • From the search results page, click on the “Blog search results()” button to display the list of blog posts containing the search criteria text.
      • Click on the title of the blog post to go to the blog post where the post can be viewed in its entirety.
      • Click on the back arrow to return to the search results page.
      • From the search results page, click on the “Blog search results()” button to display the list of blog posts containing the search criteria text.
      • Click on the title of the blog post to go to the blog post where the post can be viewed in its entirety.
      • Click on the back arrow to return to the search results page.
      • Repeat the process to see the individual blog posts listed.
      • Click on the “Forum search results” button to again display the list of forum posts with the search criteria text highlighted.
    • To Return to Search Results page using Last Search Results button
      • The search results are cached allowing a return to the search result until a new search is initiated.
      • After navigating away from the Search Results page, below the Search text input box and adjacent to the “Advanced Search” button will be a “Last Search Results” button.
      • Click on the “Last Search Results” button to return to the search results page with its forum or forum & blog search results.

Plugin Special Notes

None

Template Tags Used in the Plugin

There are twenty-three (23) template tags available for this plugin that allow further customization of the plugin’s usage or otherwise customize the website. The Template Tag can be viewed by selecting its link below.

In file sp-search-template-functions.php

Action and Hooks Used in the Plugin

There are Actions and Hooks available in the Plugin’s Template Tags. The Template Tag’s Action and Hooks can be viewed by selecting its link below.

In file sp-search-template-functions.php

There are other Actions and Hooks available for this plugin.

In file sp-search-blog-list-class.php

  • apply_filters(‘sph_search_blog_post_list_query’, $spdb, $this) – Allows building the data structure for the Listview data object by identifying the data to be contained from the search.
  • do_action_ref_array(‘sph_after_blog_post_list’, array(&$this)) – Hook fired for loop control on Post records if the current post number is greater than 0.
  • do_action_ref_array(‘sph_before_blog_post_list’, array(&$this)) – Hook fired for loop control on Post records if the current post number is less than or equal to the listCount.

In file sp-search-blog-view-class.php

  • apply_filters(‘sph_blog_search_query’, $spdb, $this->searchTerm, $searchType, $searchInclude, $this) – Allows modification to the final SQL search query by plugins. searchTerm contains the content of the Search data input box. $searchType contains the “Match” column selection. $searchInclude contains the “Forum Options” selection.
  • apply_filters(‘sph_blog_search_term’, $w, $term, $type, $include) – Allows constructing the blog search terms from the search criteria selected and the options in the Advanced Search drop down menu. $term contains contents of the Search data input box. $type contains the “Match” column selection. $include contains the “Forum Options” selection.
  • apply_filters(‘sph_build_search_url’, $s) – Allows building the forum search url with the query variables.

In file sp-search-widget.php

  • apply_filters( ‘widget_title’, $title, $instance, $this->id_base ) – Allows setting up the Simple:Press “Forum & Blog Search” widget that extends the WP Search widget.

Plugin and Template Tag Changelog

Since Simple:Press version 5.5.1.

Codex page sync’d to code version 5.5.3 and plugin version 1.1.1.



Individual Template Tags


 

sp_SearchListViewHead

Description

sp_SearchListViewHead() – This template creates a heading using the action hook.

Usage

sp_SearchListViewHead();

Arguments

None

Special Notes

None

Examples

Create a heading for the forum search results.

sp_SearchListViewHead();

 

Actions and Hooks Used in the sp_SearchListViewHead Template Tag

  • do_action(‘sph_SearchListViewHead’) – Hook fired to create a search list header.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewFoot

Description

sp_SearchListViewFoot() – This template creates a footer using the action hook.

Usage

sp_SearchListViewFoot();

Arguments

None

Special Notes

None

Examples

Create a footer for the forum search results.

sp_SearchListViewFoot();

 

Actions and Hooks Used in the SearchListViewFoot Template Tag

  • do_action(‘sph_SearchListViewFoot’) – Hook fired to create a search list header.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewNoPostsMessage

Description

sp_SearchListViewNoPostsMessage() – This is a template tag to display a message when no Posts are found a Forum.

Usage

sp_SearchListViewNoPostsMessage($args=”, $definedMessage=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spNoPostsInListMessage’
‘tagClass’ => ‘spMessage’
‘echo’ => 1
‘get => 0

‘tagId’: CSS Id for the Div.
‘tagClass’: CSS Class for the Div.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

$definedMessage – Message defined to be displayed when no posts meeting the search criteria are found in the forum.
Type:
(string) (optional)
Default:
None

Special Notes

None

Examples

Using “tagClass” of “spMessage”, display the message “There are no posts found matching your search” when no posts meeting the search criteria are found in the forum.

sp_SearchListViewNoPostsMessage('tagClass=spMessage', __('There were no posts found matching your search', 'sp-search'));

 

Actions and Hooks Used in the SearchListViewNoPostsMessage Template Tag

  • apply_filters(‘sph_NoPostsInListMessage_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_NoPostsInListMessage’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewTopicHeader

Description

sp_SearchListViewTopicHeader() – This template tag allows displaying Topic (Post) Name/Title.

Usage

sp_SearchListViewTopicHeader($args=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spListPostName%ID%’
‘tagClass’ => ‘spListPostRowName’
‘echo’ => 1
‘get => 0

‘tagId’: CSS Id for the Div.
‘tagClass’: CSS Class for the Div.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

Special Notes

This template tag is used in the post list loop.

Examples

Using the defaults, display the topic name/title for the forum search result.

sp_SearchListViewTopicHeader();

 

Actions and Hooks Used in the sp_SearchListViewTopicHeader Template Tag

  • apply_filters(‘sph_SearchListViewTopicHeader_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchListViewTopicHeaderName’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewPostContent

Description

sp_SearchListViewPostContent() – This template tag allows displaying an excerpt of the search post content.

Usage

sp_SearchListViewPostContent($args=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spListPostContent%ID%’
‘tagClass’ => ‘spPostContent’
‘excerpt’ => 150
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the post ID.
‘tagClass’: CSS Class for the Div.
‘excerpt’: Number of characters from the post to show in the excerpt in the search post list.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

Special Notes

This template tag is used in the post list loop.

Examples

Using the defaults, display the post content excerpt for the forum search result.

sp_SearchListViewPostContent();

 

Actions and Hooks Used in the sp_SearchListViewPostContent Template Tag

  • apply_filters(‘sph_ListPostContent_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_ListPostContent’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewUserName

Description

sp_SearchListViewUserName() – This template tag allows displaying the poster’s name in the search results.

Usage

sp_SearchListViewUserName($args=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spListPostUserName%ID%’
‘tagClass’ => ‘spPostUserName’
‘truncateUser’ => 0
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the post ID.
‘tagClass’: CSS Class for the Div.
‘truncateUser’: Number of characters in the poster’s name to display for the post. Zero (0) indicates the poster’s name is not to be truncated.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

Special Notes

This template tag is used in the post list loop.

Examples

With the “tagclass” of “spPostUserName”, display the post’s author’s name for the forum search result.

sp_SearchListViewUserName('tagClass=spPostUserName');

 

Actions and Hooks Used in the sp_SearchListViewUserName Template Tag

  • apply_filters(‘sph_SearchListViewUserName_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchListViewUserName’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewUserDate

Description

sp_SearchListViewUserDate() – This template tag allows displaying the search post date in the search results.

Usage

sp_SearchListViewUserDate($args=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spListPostUserDate%ID%’
‘tagClass’ => ‘spPostUserDate’
‘nicedate’ => 0
‘date’ => 1
‘time’ => 1
‘stackdate’ => 0
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the post ID.
‘tagClass’: CSS Class for the Div.
‘nicedate’: Flag to indicate whether to display the date of the post in the “nicedate” format. One (1) is true and causes the post’s date to be displayed in “nicedate” format with the post. Zero (0) is false and causes the post’s date to not be displayed in the “nicedate” format with the post. Examples of the “nicedate” format are “1 week ago” and “5 days ago”. Note: if “nicedate” format is selected, “date” should not be selected.
‘date’: Flag to indicate whether to display the date of the post or not. One (1) is true and causes the post’s date to be displayed with the post. Zero (0) is false and causes the post’s date to not be displayed with the post. Note: if “date” format is selected, “nicedate” format should not be selected.
‘time’: Flag to indicate whether to display the time of the post or not. One (1) is true and causes the post’s time to be displayed with the post. Zero (0) is false and causes the post’s time to not be displayed with the post. Note: if time is to be displayed, it will only be done if “date” is being displayed.
‘stackdate’: Flag to indicate whether to display the date and time stacked with the time under the date or on the same line. One (1) is true and causes the post’s date and time to be displayed stacked. Zero (0) is false and causes the post’s date and time to not be displayed stacked, but on the same line.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

Special Notes

This template tag is used in the post list loop.

Examples

With the “tagclass” of “spPostUserDate”, display the post’s date for the forum search result.

sp_SearchListViewUserDate('tagClass=spPostUserDate');

 

Actions and Hooks Used in the sp_SearchListViewUserDate Template Tag

  • apply_filters(‘sph_SearchListViewUserDate_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchListViewUserDate’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewForumName

Description

sp_SearchListViewForumName() – This template tag allows displaying the Forum name in the search results.

Usage

sp_SearchListViewForumName($args=”, $label=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spListPostForumName%ID%’
‘tagClass’ => ‘spListPostForumRowName’
‘linkClass’ => ‘spLink’
‘truncate’ => 0
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the post ID.
‘tagClass’: CSS Class for the Div.
‘linkClass’: CSS Class for the link.
‘truncate’: Number of characters in the forum name at which to truncate for displaying in the post list. Zero (0) indicates the forum name is not to be truncated.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

$Label – Text displayed before Forum name is shown.
Type:
(string) (optional)
Default:
None

Special Notes

This template tag is used in the post list loop.

Examples

Using the defaults, display the post’s forum name preceded by the label “Forum:”.

sp_SearchListViewForumName('', __('Forum: ', 'sp-search'));

 

Actions and Hooks Used in the sp_SearchListViewForumName Template Tag

  • apply_filters(‘sph_SearchListViewForumName_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchListViewForumName’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewTopicName

Description

sp_SearchListViewTopicName() – This template tag allows displaying the Topic Name/Title in the search results.

Usage

sp_SearchListViewTopicName($args=”, $label=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spListPostTopicName%ID%’
‘tagClass’ => ‘spListPostTopicRowName’
‘linkClass’ => ‘spLink’
‘truncate’ => 0
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the post ID.
‘tagClass’: CSS Class for the Div.
‘linkClass’: CSS Class applied to the link style.
‘truncate’: Number of characters in the post topic name at which to truncate for displaying in the post list. Zero (0) indicates the post’s topic name is not to be truncated.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

$Label – Text displayed before Topic name is shown.
Type:
(string) (optional)
Default:
None

Special Notes

This template tag is used in the post list loop.

Examples

Using the defaults, display the post’s topic name preceded by the label “Topic:”.

sp_SearchListViewTopicName('', __('Topic: ', 'sp-search'));

 

Actions and Hooks Used in the sp_SearchListViewTopicName Template Tag

  • apply_filters(‘sph_SearchListViewTopicName_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchListViewTopicName’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewTopicCount

Description

sp_SearchListViewTopicCount() – This template tag allows displaying the Topic post count in the search results.

Usage

sp_SearchListViewTopicCount($args=”, $label=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spListPostTopicCount%ID%’
‘tagClass’ => ‘spListPostCountRowName’
‘truncate’ => 0
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the post ID.
‘tagClass’: CSS Class for the Div.
‘truncate’: Listed as an argument, but is not currently used in the template tag.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

$Label – Text displayed before topic’s post count is shown.
Type:
(string) (optional)
Default:
None

Special Notes

This template tag is used in the post list loop.

Examples

To the left with “tagClass” of “spListPostCountRowName” display the number of topic posts preceded by the label “Posts”.

sp_SearchListViewTopicCount('tagClass=spListPostCountRowName spLeft', __('Posts: ', 'sp-search'));

 

Actions and Hooks Used in the sp_SearchListViewTopicCount Template Tag

  • apply_filters(‘sph_SearchListViewTopicCount_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchListViewTopicCount’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewTopicViews

Description

sp_SearchListViewTopicViews() – This template tag allows displaying the number of views of the topic post in the search results.

Usage

sp_SearchListViewTopicViews($args=”, $label=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spListPostTopicViews%ID%’
‘tagClass’ => ‘spListPostViewsRowName’
‘truncate’ => 0
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the post ID.
‘tagClass’: CSS Class for the Div.
‘truncate’: Listed as an argument, but is not currently used in the template tag.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

$Label – Text displayed before topic’s view count is shown.
Type:
(string) (optional)
Default:
None

Special Notes

This template tag is used in the post list loop.

Examples

To the left with “tagClass” of “spListPostViewsRowName” display the number of topic views preceded by the label “Views:”

sp_SearchListViewTopicViews('tagClass=spListPostViewsRowName spLeft', __('Views: ', 'sp-search'));

 

Actions and Hooks Used in the sp_SearchListViewTopicViews Template Tag

  • apply_filters(‘sph_SearchListViewTopicViews_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchListViewTopicViews’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchListViewGoToPost

Description

sp_SearchListViewGoToPost() – This template tag allows displaying the “go to post” link post in the search results.

Usage

sp_SearchListViewGoToPost($args=”, $label=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spListPostGoToPost%ID%’
‘tagClass’ => ‘spListPostGoToPostRowName’
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the post ID.
‘tagClass’: CSS Class for the Div.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

$Label – Text displayed to link the post’s search listing to the post itself.
Type:
(string) (optional)
Default:
None

Special Notes

This template tag is used in the post list loop.

Examples

To the right with “tagClass” of “spListPostViewsRowName” display the label “Go To Post” that is the link to the post itself.

sp_SearchListViewGoToPost('tagClass=spListPostGoToPostRowName spRight', __('Go To Post', 'sp-search'));

 

Actions and Hooks Used in the sp_SearchListViewGoToPost Template Tag

  • apply_filters(‘sph_SearchListViewGoToPost_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchListViewGoToPost’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlog

Description

sp_SearchBlog() – This template tag allows searching the blog posts and displaying the search results.

Usage

sp_SearchBlog($args=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘show’ => 20

‘show’: Number of search blog posts to display in the search results.

Special Notes

None

Examples

Using the defaults, set up the blog search and display.

sp_SearchBlog();

 

Actions and Hooks Used in the sp_SearchBlog Template Tag

  • apply_filters(‘sph_SearchBlog_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlogListViewHead

Description

sp_SearchBlogListViewHead() – This template creates a blog search heading using the action hook.

Usage

sp_SearchBlogListViewHead();

Arguments

None

Special Notes

None

Examples

Create the heading for the blog search results.

sp_SearchBlogListViewHead();

 

Actions and Hooks Used in the sp_SearchBlogListViewHead Template Tag

  • do_action(‘sph_SearchBlogListViewHead’) – Hook fired to create the blog search list header.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlogListViewFoot

Description

sp_SearchBlogListViewFoot() – This template creates a blog search footer using the action hook.

Usage

sp_SearchBlogListViewFoot();

Arguments

None

Special Notes

None

Examples

Create the footer for the blog search results.

sp_SearchBlogListViewFoot();

 

Actions and Hooks Used in the SearchBlogListViewFoot Template Tag

  • do_action(‘sph_SearchBlogListViewFoot’) – Hook fired to create the blog search list footer.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlogHeaderName

Description

sp_SearchBlogHeaderName() – This template tag allows searching blog header text.

Usage

sp_SearchBlogHeaderName($args=”, $termLabel=”, $postedLabel=”, $startedLabel=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId’ => ‘spSearchBlogHeaderName’
‘tagClass’ => ‘spMessage’
‘echo’ => 1

‘tagId’: Id for the Div.
‘tagClass’: CSS Class for the Div.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.

$termLabel – Text displayed before the search criteria (term) is shown. This will only be shown if search criteria has been input into the search input text box.
Type:
(string) (optional)
Default:
None

$postedLabel – Text displayed before the user’s name who initiated a search of the topics the user posted to is shown. This will only be displayed if there was no search criteria input into the search input text box and the “List Topics You Have Posted To” button is selected from the Advanced Search drop down menu.
Type:
(string) (optional)
Default:
None

$startedLabel – Text displayed before the user’s name who initiated a search of the topics the user started is shown. This will only be displayed if there was no text was input into the search input text box and the “List Topics You Started” button is selected from the Advanced Search drop down menu.
Type:
(string) (optional)
Default:
None

Special Notes

This template tag is used in the search view.

Examples

Using the defaults, display heading for the various searches that can be requested in the Advanced Search drop down menu. If a blog search was selected, display the header “Blog Search results for %TERM%” where %TERM% will be replaced by the search criteria input into the search input text box. If the “List Topics You Have Posted To” was selected, display the header “Topics posted to by %NAME%” where %NAME% is replaced by the name of the logged in user. If the “List Topics You Started” was selected, display the header “Topics started by %NAME%” where %NAME% is replaced by the name of the logged in user.

sp_SearchBlogHeaderName('', __('Blog Search results for %TERM%', 'sp-search'), __('Topics posted to by %NAME%', 'sp-search'), __('Topics started by %NAME%', 'sp-search'));

 

Actions and Hooks Used in the sp_SearchBlogHeaderName Template Tag

  • apply_filters(‘sph_SearchBlogHeaderName_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchBlogHeaderName’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlogPageLinks

Description

sp_SearchBlogPageLinks() – This template tag allows putting in the search view page links.

Usage

sp_SearchBlogPageLinks($args=”, $label=”, $toolTip=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagClass’ => ‘spPageLinks’
‘prevIcon’ => ‘sp_ArrowLeft.png’
‘nextIcon’ => ‘sp_ArrowRight.png’
‘iconClass’ => ‘spIcon’
‘pageLinkClass’ => ‘spPageLinks’
‘curPageClass’ => ‘spCurrent’
‘showLinks’ => 4
‘echo’ => 1

‘tagClass’: CSS Class for the Div.
‘prevIcon’: Filename containing the previous page icon.
‘nextIcon’: Filename containing the next page icon.
‘iconClass’: CSS Class for the page icon.
‘pageLinkClass’: CSS Class for the page links.
‘curPageClass’: CSS Class for the current page.
‘showLinks’: Number of page links to show.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out.

$label – Text displayed before the blog page numbers.
Type:
(string) (optional)
Default:
None

$toolTip – Text displayed when hovering the cursor over the page number links.
Type:
(string) (optional)
Default:
None

Special Notes

This template tag is used in the search view.

Examples

Using “tagClass” of “spPageLinks spPageLinksBottom”, display the links to the pages listing the blog posts meeting the search criteria. Show the label of “Page” before the page number links and when hovering the cursor over the page number link, display “Jump to page %PAGE% of results” where %PAGE% is the page number one goes to when clicking the link.

sp_SearchBlogPageLinks('tagClass=spPageLinks spPageLinksBottom', __('Page: ', 'sp-search'), __('Jump to page %PAGE% of results', 'sp-search'));

 

Actions and Hooks Used in the sp_SearchBlogPageLinks Template Tag

  • apply_filters(‘sph_SearchBlogPageLinks_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchBlogPageLinks’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlogResults

Description

sp_SearchBlogResults() – This template tag allows displaying the blog search results. It uses the ListView template and template functions for display.

Usage

sp_SearchBlogResults($args=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId” => ‘spSearchList’
‘tagClass’ => ‘spSearchSection’
‘template’ => ‘spSearchBlogListView.php’
‘first’ => 0
‘get’ => 0

‘tagId’: Id for the Div.
‘tagClass’: CSS Class for the Div.
‘template’: File executed to develop and display the search listing.
‘first’: Flag to indicate whether to add a “first post” column along with the normal “last post” column in the search results or not. One (1) is true and causes a “first post” column to be added to the output. Zero (0) is false and results in only the normal “last post” column being output.
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

Special Notes

This template tag is used in the search view.

Examples

Using “tagClass” of “spSearchSection” display the blog search results.

sp_SearchBlogResults('tagClass=spSearchSection');

 

Actions and Hooks Used in the sp_SearchBlogResults Template Tag

  • apply_filters(‘sph_SearchBlogResults_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlogListTitle

Description

sp_SearchBlogListTitle() – This template tag allows displaying the blog Name/Title.

Usage

sp_SearchBlogListTitle($args=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId” => ‘spSearchBlogListTitle%ID%’
‘tagClass’ => ‘spListTopicRowName’
‘linkClass’ => ‘spLink’
‘truncate’ => 0
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the blog post ID.
‘tagClass’: CSS Class for the Div.
‘linkClass’: CSS Class for the link.
‘truncate’: : Number of characters in the blog post title at which to truncate for displaying in the post list. Zero (0) indicates the blog post title is not to be truncated.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

Special Notes

This template tag is used in the blog list loop.

Examples

Using the defaults, display the blog post’s name/title.

sp_SearchBlogListTitle('');

 

Actions and Hooks Used in the sp_SearchBlogListTitle Template Tag

  • apply_filters(‘sph_SearchBlogListTitle_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchBlogListTitle’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlogListInfo

Description

sp_SearchBlogListInfo() – This template tag allows displaying the blog post information.

Usage

sp_SearchBlogListInfo($args=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId” => ‘spSearchBlogListInfo%ID%’
‘tagClass’ => ‘spListPostLink’
‘labelClass’ => ‘spListLabel’
‘linkClass’ => ‘spLink’
‘nicedate’ => 0
‘date’ => 1
‘time’ => 0
‘user’ => 1
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the blog post ID.
‘tagClass’: CSS Class for the Div.
‘labelClass’: CSS Class for the label.
‘linkClass’: CSS Class for the link.
‘nicedate’: Flag to indicate whether to display the date of the post in the “nicedate” format. One (1) is true and causes the post’s date to be displayed in “nicedate” format with the post. Zero (0) is false and causes the post’s date to not be displayed in the “nicedate” format with the post. Examples of the “nicedate” format are “1 week ago” and “5 days ago”. Note: if “nicedate” format is selected, “date” should not be selected.
‘date’: Flag to indicate whether to display the date of the post or not. One (1) is true and causes the post’s date to be displayed with the post. Zero (0) is false and causes the post’s date to not be displayed with the post. Note: if “date” format is selected, “nicedate” format should not be selected.
‘time’: Flag to indicate whether to display the time of the post or not. One (1) is true and causes the post’s time to be displayed with the post. Zero (0) is false and causes the post’s time to not be displayed with the post. Note: if time is to be displayed, it will only be done if “date” is being displayed.
‘user’: Flag to indicate whether to display the user authoring the blog post or not. One (1) is true and causes the post’s author to be displayed with the post. Zero (0) is false and causes the post’s author to not be displayed with the post.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

Special Notes

This template tag is used in the blog list loop.

Examples

Using the defaults, display the blog post’s information.

sp_SearchBlogListInfo('');

 

Actions and Hooks Used in the sp_SearchBlogListInfo Template Tag

  • apply_filters(‘sph_SearchBlogListInfo_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchBlogListInfo’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlogListPost

Description

sp_SearchBlogListPost() – This template tag allows displaying an excerpt from the blog post.

Usage

sp_SearchBlogListPost($args=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId” => ‘spSearchBlogListInfo%ID%’
‘tagClass’ => ‘spListLabel’
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div. %ID% is replaced by the blog post ID.
‘tagClass’: CSS Class for the Div.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

Special Notes

This template tag is used in the blog list loop.

Examples

Using the defaults, display the excerpt from the blog post.

sp_SearchBlogListPost('');

 

Actions and Hooks Used in the sp_SearchBlogListPost Template Tag

  • apply_filters(‘sph_SearchBlogListPost_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlogListViewNoPostsMessage

Description

sp_SearchBlogListViewNoPostsMessage() – This template tag allows displaying a message when no Blog Posts are found.

Usage

sp_SearchBlogListViewNoPostsMessage($args=”, $definedMessage=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagId” => ‘spNoBlogPostsInListMessage’
‘tagClass’ => ‘spMessage’
‘echo’ => 1
‘get’ => 0

‘tagId’: Id for the Div.
‘tagClass’: CSS Class for the Div.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

$definedMessage – Message defined to be displayed when no posts meeting the search criteria are found in the blog.
Type:
(string) (optional)
Default:
None

Special Notes

This template tag is used in the blog list loop.

Examples

With “tagClass” of “spMessage”, display the message “There were no blog posts found” when no posts meeting the search criteria are found in the forum.

sp_SearchBlogListViewNoPostsMessage('tagClass=spMessage', __('There were no blog posts found', 'sp-search'));

 

Actions and Hooks Used in the sp_SearchBlogListViewNoPostsMessage Template Tag

  • apply_filters(‘sph_NoBlogPostsInListMessage_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_NoBlogPostsInListMessage’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_SearchBlogListIcon

Description

sp_SearchBlogListIcon() – This template tag allows displaying the blog post icon.

Usage

sp_SearchBlogListIcon($args=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Defaults:
‘tagClass’ => ‘spRowIconSmall’
‘icon’ => ‘sp_SearchBlogPost.png’
‘echo’ => 1
‘get’ => 0

‘tagClass’: CSS Class for the Div.
‘icon’: Name of file containing the blog post icon to be displayed.
‘echo’: Flag to indicate whether to write out the generated html display code or just return the html display code. One (1) is true and causes the html display code to be written to the display. Zero (0) is false and causes the html display code to be returned instead of written out
‘get’: Flag to indicate whether to short circuit the template tag display process and simply return data or to proceed with normal HTML display code generation. One (1) is true and the template tag display process is not done and data is returned. Zero (0) is false and normal html display code generation happens.

Special Notes

This template tag is used in the blog list loop.

Examples

With ‘tagClass” of “spRowIconSmall spIcon spLeft”, display the blog post icon on the left of the column

$out.= sp_SearchBlogListIcon('tagClass=spRowIconSmall spIcon spLeft');

 

Actions and Hooks Used in the sp_SearchBlogListIcon Template Tag

  • apply_filters(‘sph_SearchBlogListIcon_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_SearchBlogListIcon’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


More Topics In SimplePress: Plugins


Copyright © 2006-2019 Simple:Press. All Rights Reserved.