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: 790
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

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.

JPDeni

There's all sorts of possible permutations, but after a while you can see what's going on. Good that you were able to edit it yourself.

Jpg

Well..I posted about 60% of my forum and my name was HUGE. Only half of it showed. :\
Any solutions?

JPDeni

Yeah. I put a solution up a while back.


  $fsize = $count[$value] + 7;
  if ($fsize > 20)
    $fsize = 20;


If it's still too big at 20, then make it 15. Or you could remove yourself from the list altogether.

Jpg

How could I remove myself? Because I'm using a different user name than my display name for hacking purposes cause I don't want people hacking my account...

JPDeni

Aren't you an admin? If you are either an admin or a moderator and you use one of the codes I posted here, your name -- and the names of any other admins or moderators -- would not be included in the Poster cloud.

Look on page 2 of this topic, a post by me on August 19, that starts with:

QuoteGot 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.

Jpg

This?

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>';

mnichols7

It worked fine on my site but I disabled it due to the fact that it showed the user name and not the display name.  I encourage my members to have a user name that is different from the display name for security reasons.

Could that be fixed?

PS, but not by me, I don't code. ;)


JPDeni

Jpg, yes. Try it. Nothing that goes into a block can break your machine. The worst thing that can happen is that you have to go into the database and delete it and that would be very rare. Give it a try. See what happens. Be bold!!  ;D

Marian, anything that is in the database can be displayed in any way you want it. :)

Actually, the code that Jpg just posted shows the display name. It shows whatever is displayed next to the posts because the name is taken from the record of the post, not from the member.

Jpg

Whoa seriously Jpdeni? Cool I'm adding it after I get another block for the other side. So my forum is evenly matched. ;)


PS:And Marian did you know the user name can be simply cracked by going to the profile and looking at the top header.
Summary - [Username]
Luckily that's only for 1.07 and lower... :)

JPDeni

The only thing that could possibly hurt your database would be something that included "INSERT", "DELETE" or "UPDATE" in the database query. Even then, you'd be able to get it back if your system did regular backups.

I have the advantage of working on a site that isn't "live" at all. I'm still using Invision Board for my community until I get everything all spiffy and can reveal it all to the group at once.

This website is proudly hosted on Crocweb Cloud Website Hosting.