sp_QuickLinksForum

Important Note:  The contents of this document applies ONLY to version 5.x.x of Simple:Press.  It likely does NOT apply to version 6.x.x (our latest version).

Description

sp_QuickLinksForum() – Displays the Quicklinks forum drop down.

Usage

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

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Default:
‘tagId’        => ‘spQuickLinksForum’
‘tagClass’    => ‘spControl’
‘length’        => 40
‘showSubs’ => 1
‘echo’        => 1

‘tagId’: CSS ID for Quicklinks Div.
‘tagClass’: CSS class for Quicklinks Div.
‘length’: Number of characters to truncate to in forum name. If truncated the name will be followed with …
‘showSubs’: Flag to indicate whether to show the sub-forums in the Quick Links forum listing. One (1) is true and causes the sub-forums to be listed. Zero (0) is false and causes the sub-forums to not be listed.
‘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 at the top of the dropdown menu.
Type:
(string) (optional)
Default:
None

Special Notes

In standard supplied Simple:Press themes this is used in the header (spHead.php) of the forum pages but can be used elsewhere on a forum page.

Examples

Display the dropdown using the default arguments and displaying the title as “Select Forum.

sp_QuickLinksForum('', __sp('Select Forum'));

Display the dropdown using the default arguments and adding a spRight and spSelect CSS along with displaying the title as “Choose Forum”.

sp_QuickLinksForum('tagClass=spControl spSelect spRight', __sp('Choose Forum'));

Actions and Hooks Used in Template Tag

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

Changelog

Since Simple:Press version 5.0.
Version 5.5.6: Added the ‘showSubs’ argument.

Codex page sync’d to code version 5.5.6

Source Code

sp_QuickLinksForum() is located in simple-press/forum/content/sp-common-view-functions.php.

Posted in