TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 16, 2024, 05:18:13 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,158
  • Total Topics: 21,219
  • Online today: 92
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 93
  • Total: 93

Ranks/ Membes Group Display

Started by SoulPleX, September 20, 2007, 09:29:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SoulPleX

How can i display to my members what ranks or members post groups are available so they will know how many post they need to move up to the next rank or post group?

Thanks!

tick

Well how are you wanting to display them.  In a block , article, post,     A little more info would be helpfull.  TIck

SoulPleX

On its own page. Maybe something like index.php?action=Ranks would be nice. If not a center block would work.

Phamon

By no means the expert here... but couldnt this simply be done in an article? you could then post a link to it from the sitemap or some other page your members reference for similar information

SoulPleX

Any way is fine with me. i just dont know how to do it. what would be th link to show what are the available post groups?

Phamon

In the admin section on the left menu go to "Membergroups"

should all be there ;)

SoulPleX

yes, but how can i display so my users can see it? was trying to avoid just typing it out in simple txt.

Phamon

with an article you can come up with all sorts of ways to display it, its wysiwyg so pretty easy to get creative. dont have an easy answer for ya here

/shrug thats one of the things I enjoy doing as an admin

anyoldcard

Hope I'm not butting in. Pages in the admin section would be tough to show because of the login but you could always do a page capture and display it. It would save work.

jacortina

#9
This block will show all the post-count based groups, posts needed to get there, group names in the group color (if any), and stars for the group (if any).

In a phpblock (put it on one side):

global $db_prefix, $settings;

$request = db_query("
    SELECT ID_GROUP, groupName, minPosts, onlineColor, stars
    FROM {$db_prefix}membergroups
    WHERE minPosts > -1
    ORDER BY minPosts", __FILE__, __LINE__);

echo '<div style="text-align:center;text-decoration:underline;"><h3>Ranks</h3></div>';

while ($row = mysql_fetch_assoc($request)) {
    echo '  <div style="width:100%;padding-top:3px">';
    echo '      <div style="float:left;width:25%;">';
    echo '          <div style="text-align:right;">';
    echo                $row['minPosts'], '&nbsp;';
    echo '          </div>';
    echo '      </div>';
    echo '      <div style="float:right;width:75%;font-weight:bold;', (!empty($row['onlineColor']) ? ('color:'.$row['onlineColor'].';') : ''), '">';
    echo '          <div style="text-align:left;">';
    echo                $row['groupName'], '<br />&nbsp;';
    echo                (!empty($row['stars']) ? ('<img src="' . $settings['images_url'] . '/' . $row['stars'] . '" alt="*" border="0" />') : '');
    echo '          </div>';
    echo '      </div>';
    echo '  </div>';
    echo '  <div style="clear:both;width:100%;"></div>';
}

mysql_free_result($request);