Simple:Press Documentation

Template Tag: Side Dash

The Template Tag Side Dash displays a common Simple:Press forum dashboard on pages. Shows members logged in or out, their Avatar and includes a link to WordPress Dashboard.

This template tag is included in the Template Tags and Widgets plugin available on the Simple:Press Our Plugin Library page.

The function used is sp_SideDashTag() and the file that makes the magic happen is sp-SideDash-tag.php which is located in the plugin’s template-tags/library folder.

You can pass optional arguments to the function for formatting and display of special text or to show/not show specific items.

Options

  • tagId – A unique id to use for div or list. This would be text. The default is spSideDashTag.
  • tagClass – The class to be applied for styling. This would be text. The default is spSideDashTag.
  • showAvatar – Show logged in users avatar. This is a true/false. The default is true.
  • avatarSize – The Pixel size of avatar if showing. This is a number. The default is 25.
  • avatarClass – The class to be applied for styling. This would be text. The default is spAvatar.
  • showAdminLink – Show link to wp admin dashboard. This is a true/false. The default is true.
  • showLogin – Shows the login form. This is a number, the options are:
    1 – Show Simple:Press login link
    2 – Show WordPress login link
    3 – Show Custom login Form
  • loginLink – The custom login link for showLogin option #3.
  • showLogout – Option to show link to logout. This is a true/false. The default is true.
  • echo is a true/false expression using 1 as true and 0 as false. The default is true.

NOTE: True must be expressed as a 1 and False as a zero

Usage

An example of using this tag with only default settings.

<?php sp_SideDashTag();?>

An example of using this tag and using the login link to WordPress’s login form.

<?php sp_SideDashTag('showLogin=2');?>

You can also call this function by using a shortcode on pages, posts or widgets.

[sp_sidedash]

The Using Plugins page describes how you obtain and install the Template Tags plugin. Once installed you would activate it from the Simple:Press administration page Available “Plugins – Install Simple:Press Plugins”

More Topics In SimplePress: Plugins


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