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!
Well how are you wanting to display them. In a block , article, post, A little more info would be helpfull. TIck
On its own page. Maybe something like index.php?action=Ranks would be nice. If not a center block would work.
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
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?
In the admin section on the left menu go to "Membergroups"
should all be there ;)
yes, but how can i display so my users can see it? was trying to avoid just typing it out in simple txt.
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
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.
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'], ' ';
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 /> ';
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);
The images do not show and the area that it covers is huge.
Heres the url for the stars link. Is that extra character spose to be there?
forum/Themes/default/images/4#star.gif
If I comment the line for the star images will the script crash? I guess I should just try it huh?
I got it. I removed the stars and closed up the gaps. Thanks for the script.
The gaps are to leave space for stars when, say, Newbies don't get any (stacking them right on top of the next one won't look right.
And I forgot about the multiplier (I don't use images for the post-count groups myself). But you could see if this does it:
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)) {
if (!empty($row['stars'])) {
$stars = explode('#', $row['stars']);
$combine = '';
for ($i = 0; $i < $stars[0]; $i++)
$combine .= '<img src="' . $settings['images_url'] . '/' . $stars[1] . '" alt="*" border="0" />';
}
echo ' <div style="width:100%;padding-top:3px">';
echo ' <div style="float:left;width:25%;">';
echo ' <div style="text-align:right;">';
echo $row['minPosts'], ' ';
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'];
echo '<br /> ', $combine; // Commenting this line out should prevent stars showing and close 'gap'.
echo ' </div>';
echo ' </div>';
echo ' </div>';
echo ' <div style="clear:both;width:100%;"></div>';
}
mysql_free_result($request);
Thanks. I'll try it now.