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).
sp_ColumnStart() – This function is used to create a new container div section within the forum theme display. Normally, theme display elements would then be output within the container section which can then be aligned as desired. Typically, this container section would be used to create a columnar display and a theme would use multiple Column Starts to create a tabular looking set of columns.
$args – List of arguments for controlling display.
‘tagClass’ => ‘spColumnSection’
‘tagId’ => ”
‘width’ => ‘auto’
‘height’ => ’60px’
‘echo’ => 1
‘tagClass’: Class to apply to the div container section.
‘tagId’: ID to apply to the container div.
‘width’: Controls width of the column. This should be between 1-100% with sum of all columns in section totaling ~100%.
‘height’: Controls the minimum height of the column. This can be used to ensure that all columns maintain the same height.
‘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.
$columnName – Special name applied to section. This template tag is set up to recognizes some names and will apply special styling IDs and classes.
Based on the $columnName argument, some special processing for applying unique IDs and Classes is possible. By default, the sp_ColumnStart() template tag will recognize some special Column Names and perform special processing. Currently, there are no pre-defined Column Names but a plugin/theme could hook into the ‘sph_ColumnStartColumnClass’ filter and check themselves.
Output a new display section with a classes of ‘spColumnSection’ and ‘spLeft’. The column section will have a width of 48% of the parent container and a minimum height of 55 pixels.
Output a new display section with an ID of ‘spMyColumn’ and classes of ‘spColumnSection’ and ‘spRight’. The column section will have a width of 32% of the parent container and a minimum height of 25 pixels.
Actions and Hooks Used in Template Tag
- apply_filters(‘sph_ColumnStart_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
- do_action(‘sph_BeforeColumnStart’, $columnName, $a) – Hook fired before the column container opening div is output. Hook is generic for every Column Start.
- do_action(‘sph_BeforeColumnStart_’.$columnName, $a) – Hook fired before the column container opening div is output. Hook is specific to the named Column Start.
- apply_filters(‘sph_ColumnStartColumnClass’, $colClass, $columnName) – Allows modification of class applied to the column container section based on named section special processing.
- apply_filters(‘sph_ColumnStart’, $out, $columnName, $a) – Allows modification of the column container section just prior to being output/returned.
- do_action(‘sph_AfterColumnStart’, $columnName, $a) – Hook fired after the column container section is output. Hook is generic for every Column Start.
- do_action(‘sph_AfterColumnStart_’.$columnName, $a) – Hook fired after the column container section is output. Hook is specific to the named Column Start.
Since Simple:Press version 5.0.
Codex page sync’d to code version 5.4.1.
sp_ColumnStart() is located in simple-press/forum/content/sp-common-view-functions.php.