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

Top Stats - 3 in 1 Block

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JPDeni

I don't know what the problem can be. It's not the php because it works elsewhere. The only thing I can suggest is that the problem is with tables and divs and other blocks.

Here's what I would do. I would turn off all of the blocks on the front page, so none of them show. Then turn on the 3 in 1 block and see if you still have the same problem. If you do, then it's not a problem with the other blocks. If you don't have the problem, then you need to look at one of the other blocks.

MeRcChRiS

is there a way to just take those off and just leave the number without any ()

JPDeni

#42
Change


  echo $poster['link'] , ' (', $poster['posts'] , ')<br />';


to


  echo $poster['link'] , ' ', $poster['posts'] , '<br />';


That way, there's just a space between the poster name and the number of posts.

MeRcChRiS


akulion


MeRcChRiS

yes it did, not () but it doesnt matter

brianjw

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

akulion

near the end where it says

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

change it to:

</td><td>';
YOUR CODE GOES IN HERE
echo'</td></tr>
</table>';

bluedevil

#48
I used the 4th row by KNAT.   This is looking even better.  (No Admin.)

Thanks AKU,KNAT and JPDeni.  You guys rock.



http://www.midwestavalancheclub.com/index.php?board=5.0

It took me a minute to modify and put things together from all those codes hehehehe....

RoarinRow

Quote from: bluedevil on January 31, 2007, 12:08:34 AM
I used the 4th row by KNAT.   This is looking even better.  (No Admin.)

Thanks AKU,KNAT and JPDeni.  You guys rock.



http://www.midwestavalancheclub.com/index.php?board=5.0

It took me a minute to modify and put things together from all those codes hehehehe....

Lookin good Mick!   :up:

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

This website is proudly hosted on Crocweb Cloud Website Hosting.