Simple:Press Documentation

Template Tag: Show Forum Rank

The Template Tag Show Forum Rank tag displays forum rank for the specified user.

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_ShowForumRankTag() and the file that makes the magic happen is sp-ShowForumRank-tag.php which is located in the plugin’s template-tags/library folder.

The user ID must be passed to the function. You can also pass optional arguments to the function for formatting and display of special text or to show/not show specific items.

 

Options

  • tagClass – The class to be applied for styling. This would be text. The default is spForumRankTag
  • titleClass – The class to be applied for styling. This would be text. The default is spForumRankTag
  • badgeClass – The class to be applied for styling. This would be text. The default is spForumRankTag
  • showTitle – Option to display users title. This is a true/false. The default is true.
  • showBadge – Option to display users badge. 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 the default settings and showing forum rank of user #2.

<?php sp_ShowForumRankTag('2');?>

An example of using this tag with showing forum rank of user #2 but not his badge

<?php sp_ShowForumRankTag(4,'showBadge=0');?>

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

[sp_forum_rank userid='2']

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.