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

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.

Harro

Great block code!
Gonna add this one to my site aswell!

sburke930

This one still created multiple errors....about 63 pages in 3 hours.  I've had to delete the block.  Thank you for trying to get the code to work without addint the admin or moderators.

JPDeni


sburke930

Array errors; anytime the admin or moderators move about the site.  Usually I got through the error log each night and clear them once I've made sure they are just the normal type of errors, but these were created when going to any board, into personal messages, the arcade, even playing a game created 8 errors per play.

I deleted the error log wtihout making note of what exactly the error was but it was very similar to what was posted on your word cloud thread.

JPDeni

Very odd. I don't get any errors at all with the poster cloud. I guess you're right to remove it and if anybody else gets errors, it's best to remove it, too.

sburke930

I think because the version I was using omitted admin and moderators.  Thats where all the odd errors were coming from.

JPDeni

That's the one I'm using right now, and I'm not getting any errors. However, if you want to test it, take out the line
     WHERE ID_GROUP <> 1 AND ID_GROUP <> 2
Or even go back to the first code in the thread. I'd be interested to know what works.

Harro

hey JPDeni, do you think it would be possible to edit this block to display the members website (if the filled it in their profile) instead of their name?
I tried it, but for some reason it's not working properly.
The size of url's (and the url's) are just random it seems.
If you want I can send you the code I already have.

JPDeni

This should print out the name with URL and, if there's no URL, just a plain name. The crux of determining whether there's a URL is that the length is greater than 8, since all URLs start with "http://" and have to have at least two letters.

global $db_prefix, $scripturl;
$count= array();
$poster_number = array();
$query = db_query(
    "SELECT posterName, {$db_prefix}messages.ID_MEMBER, ID_GROUP, websiteURL
     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'];
    $poster_site[$row['posterName']] = $row['websiteURL'];
}

$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;
  $name = str_replace(" ",'ÂÃ,·',$value);
  if (strlen($poster_site[$value])> 8)
  {
    echo '<a class="normaltext" href="' . $poster_site[$value] . '">
          <span style="font-size:' . $fsize . 'pt;">' . $name . '</span></a> ';
  }
  else
  }
     echo '<span style="font-size:' . $fsize . 'pt;">' . $name . '</span> ';
  }
}
echo '</div>';

Harro

Was not exactly what I was looking for, But now I was able to edit it.
Thanks a lot for the help!

This website is proudly hosted on Crocweb Cloud Website Hosting.