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: 508
  • Total: 508

Top Stats - 3 in 1 Block

Started by akulion, November 04, 2006, 03:53:42 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

bluedevil

Thanx Ro!


One question tho'

Does this code takes BBC codes as well?  I mean, where it says: "This weeks top posters" i would like to add a marquee?  Maybe like this?

[move]This weeks top posters[/move]

Will that work in the coding?

RoarinRow

Quote from: bluedevil on January 31, 2007, 12:31:49 AM
Thanx Ro!


One question tho'

Does this code takes BBC codes as well?  I mean, where it says: "This weeks top posters" i would like to add a marquee?  Maybe like this?

[move]This weeks top posters[/move]

Will that work in the coding?

Not sure if it will.  It didn't like the apostrophe I put in there when I had it say, 'This week's top posters'.   I had to make it read 'This weeks top posters'   :uglystupid2:

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

oliver

On This Weeks Top Posters it shows usernames and not display names so if somone change is name it will show the name that he or she use to log in.

Can this be changed ?

Thank you  :coolsmiley:

brianjw

Quote from: oliver on February 01, 2007, 03:01:18 AM
On This Weeks Top Posters it shows usernames and not display names so if somone change is name it will show the name that he or she use to log in.

Can this be changed ?

Thank you  :coolsmiley:
Yes, I need one that can do this too except with the code added as specified before. :D

oliver

I don't know anything about coding so i guess I have to wait to. Well is nice I like this mode anyway.  :up:

JPDeni

I haven't been feeling well, so I haven't been able to answer questions. But things have been piling up in this topic, so I figure I'd better try to answer some things.

No, you can't use bbc code with this. However, you can html code. You should be able to use


<marquee>This week\'s top posters</marquee>


Brian, did you try the code that Aku gave you?

As for the username, you can change function ssi_topPoster in SSI.php. Change every instance of realName to memberName. I think. I get confused with which one of those is which. :)

Is that everything?

oliver

I'm sorry JPDeni, I don't know any thing about coding but I want to include one personal opinion.

The code for the top 10 posters is displaying the users with the display name no matter what is that, and the top posters this week is showing with the userrname that they first register on the forum. Basically you can see some top 10 posters that are same with some top week posters but with completely different name. I thought it will be nice to be same that's all.

Thanks once again  :coolsmiley:

brianjw

Quote from: brianjw on January 30, 2007, 03:16:08 AM
Can someone take this code:

global $db_prefix, $memberContext;

$count = 2;
$users = array();

$request = db_query("
SELECT ID_MEMBER FROM {$db_prefix}members WHERE is_activated = 1 ORDER BY ID_MEMBER DESC LIMIT ".$count, __FILE__, __LINE__);

while ($row = mysql_fetch_assoc($request)) {
$users[] = intval($row['ID_MEMBER']);
}

loadMemberData($users);
echo'<table border="1" width="100%" id="table1" cellpadding="2" style="border-collapse: collapse">
<tr><td  bgcolor="#FF9900" width="150"><font color="#FFFFFF" face="Verdana" size="2"><b>Newest Members</b></font></td><td bgcolor="#660066" width="200"><font color="#FFFFFF" face="Verdana" size="2"><b>Top 10 Posters</b></font></td><td  bgcolor="#336699"><font color="#FFFFFF" face="Verdana" size="2"><b>This Weeks Top Posters</b></font></td></tr><tr>
<td>';
$i = 0;
foreach($users as $user_id) {
if ($i > 0) echo '<hr>';
$i++;

loadMemberContext($user_id);

if (!empty($memberContext[$user_id]['avatar']['image']))
echo '<div align="center">'.$memberContext[$user_id]['avatar']['image'].'<BR>'.$memberContext[$user_id]['link'].'</div>';
else
echo '<div align="center"><img src="http://brianjwilson.com/forum/noava.gif" height=80 widh=80><BR><BR>'.$memberContext[$user_id]['link'].'</div>';
}

$numberofposters = 10; // You can change this to however many you want

require_once "SSI.php";
$top_posters = ssi_topPoster($numberofposters, "return");
echo'</td><td>';
foreach ($top_posters as $poster)
{
  echo $poster['link'] , ' (', $poster['posts'] , ')<br />';
}
echo'</td><td>';

global $db_prefix;
$count= array();

$query = db_query(
    "SELECT posterName
     FROM {$db_prefix}messages
     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']];
}

$random = array_rand($count, count($count));
echo '<div style="text-align: center">';
foreach ($random as $value)
{
  $fsize = $count[$value] + 7;
  $name = str_replace(" ",'Ã,·',$value);
  echo '<span style="font-size:' . $fsize . 'pt;">' . $name . '</span> ';
}
echo '</div></td></tr>
</table>';

and add a 4th table that has the code:

echo'<center><form action="http://www.mapquest.com/maps/map.adp" method="get">
<table cellpadding="3" cellspacing="0" border="0" style="font: 11px Arial,Helvetica;">
<tr><td colspan="2">Address/Intersection:</td></tr>
<tr><td colspan="2"><input type="text" name="address" size="20" maxlength="80"></td></tr>
<tr><td colspan="2">City:</td></tr>
<tr><td colspan="2"><input type="text" name="city" size="20" maxlength="80"></td></tr>
<tr><td>State:</td><td>ZIP Code:</td></tr>
<tr><td><input type="text" name="state" size="3" maxlength="2"></td><td><input type="text" name="zipcode" size="10" maxlength="12"></td></tr>
<tr><td colspan="2" style="text-align: center;"><input type="submit" value="Get Map"><input type="hidden" name="CID" value="lfmapwid"></td></tr>
</table>
</form></center>';


Thanks much :D
Brianjw

?

JPDeni

Quote from: oliver
The code for the top 10 posters is displaying the users with the display name no matter what is that, and the top posters this week is showing with the userrname that they first register on the forum. Basically you can see some top 10 posters that are same with some top week posters but with completely different name.
I don't know what that means.

Brian, yes, I know. You posted that before. Aku responded, telling you how to fix it. Did you try the code that Aku posted for you?

brianjw

Quote from: Aku on January 30, 2007, 06:29:02 AM
near the end where it says

</td></tr>
</table>';

change it to:

</td><td>';
YOUR CODE GOES IN HERE
echo'</td></tr>
</table>';
Oh sorry JPDeni, lol :2funny:

My eyes were blind :o

This website is proudly hosted on Crocweb Cloud Website Hosting.