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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 468
  • Total: 468

Poster cloud

Started by JPDeni, August 04, 2006, 05:51:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vdubbia

also, I changed the width to 100% and it works great as a top center block.

how easy would it be to change the color of the font displayed in this block only?

JPDeni

Quotehow easy would it be to change the color of the font displayed in this block only?

Pretty easy.


echo '<div style="text-align: center; color: purple">';


Or whatever color you want to use. You can put any css attribute in there that you want and it will apply only to the text in the block.

vdubbia

Okay, now what if I wanted it to show each user's started posts instead of their profile when clicked?

JPDeni

This might work.

  echo '<a style="font-size:' . $fsize . 'pt;" class="normaltext" href="' . $scripturl . '?action=profile;u=' . $poster_number[$value] . ';sa=showPosts">' . $name . '</a> ';

If not, I don't know.

vdubbia

Quote from: JPDeni on March 13, 2007, 11:49:36 PM
This might work.

  echo '<a style="font-size:' . $fsize . 'pt;" class="normaltext" href="' . $scripturl . '?action=profile;u=' . $poster_number[$value] . ';sa=showPosts">' . $name . '</a> ';

If not, I don't know.

that worked!

thanks!

kjb0007

#85
Quote from: JPDeni on August 19, 2006, 09:58:45 PM
Got it.

This includes adding a link to the profile, not including admins and moderators and being able to adjust the minimum and maximum font sizes.
global $db_prefix, $scripturl;
$count= array();
$poster_number = array();
$query = db_query(
    "SELECT posterName, {$db_prefix}messages.ID_MEMBER, ID_GROUP
     FROM {$db_prefix}members
     JOIN {$db_prefix}messages
     ON {$db_prefix}members.ID_MEMBER = {$db_prefix}messages.ID_MEMBER
     WHERE ID_GROUP <> 1 AND ID_GROUP <> 2
     ORDER BY posterTime DESC
     LIMIT 100", __FILE__, __LINE__);

while ($row = mysql_fetch_assoc($query))
{
  if (!isset($count[$row['posterName']]))
    $count[$row['posterName']] = 0;
  ++$count[$row['posterName']];
    $poster_number[$row['posterName']] = $row['ID_MEMBER'];
}

$random = array_rand($count, count($count));
echo '<div style="text-align: center">';
foreach ($random as $value)
{
  $fsize = $count[$value] + 7;
  if ($fsize > 20)
    $fsize = 20;
  elseif ($fsize < 8)
    $fsize = 8;
  $name = str_replace(" ",'ÂÃ,·',$value);
  echo '<a class="normaltext" href="' . $scripturl . '?action=profile;u=' . $poster_number[$value] . '">
          <span style="font-size:' . $fsize . 'pt;">' . $name . '</span></a> ';
}
echo '</div>';


Anything else? :)


How do I keep staff (including admins) from showing up in this one ?

JPDeni

It's already there.


WHERE ID_GROUP <> 1 AND ID_GROUP <> 2


This eliminates admins and global moderators.

kjb0007

#87
Quote from: JPDeni on April 15, 2008, 02:35:19 AM
It's already there.


WHERE ID_GROUP <> 1 AND ID_GROUP <> 2


This eliminates admins and global moderators.

All 3 of my global mods are still showing up with this one as well as the 2 admins whos id's are 1 (mine)and 2.  (see image below)

What about other staff members? (I have 14 other individual staff membergroups - including 2 administrative ones).  Is there a line I need to add for each ones member number?

JPDeni

Are your admins, mods, staff, whatever in more than one group?

kjb0007

#89
Everyone is in their own group (with the exception of 3 of my gmods - who are all in that same group). I have several different staff types/positions on my site all of which require different permissons - I just set up the new group and set that groups permissions accordingly. I have to do it that way because not all of them are granted the same permissions, and they all need the seperate group for their various staff titles. Some have more than one title so I chose to set it up that way so both titles would appear for each one instead of only having their primary group appear.

This website is proudly hosted on Crocweb Cloud Website Hosting.