2006-04-26, 11:05 AM
I've got a little (hope so ) problem.
My situation is the above image I would like that there are only showed of 20 characters an then "...".
Here is my code:
Thx in advance.
My situation is the above image I would like that there are only showed of 20 characters an then "...".
Here is my code:
<?php
require_once ("global.php");
require_once ("./forum/inc/functions_post.php");
?><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Fearless :: Established since januari 2006</title>
<link href="http://fearless.owiosa1.nl/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body background="http://fearless.owiosa1.nl/images/activetopics_bg.gif" class="navigation">
<?php
require_once ("global.php");
require_once ("./forum/inc/functions_post.php");
$limit = 5; // The amount of annoucements to show
$mysqlhost = "***";
$mysqlusername = "***";
$mysqlpassword = "***";
$mysqldbselect = "***";
$prefix = "mybb_";
$fid = 2;
mysql_select_db($mysqldbselect, mysql_connect($mysqlhost, $mysqlusername, $mysqlpassword));
$message['post'] = postify($message['post'], $allowhtml="yes", $allowmycode="yes", $allowsmilies="yes", $allowimgcode="yes", $archive=0);
$query = $db->query("
SELECT t.tid,t.subject
FROM mybb_threads t LEFT JOIN mybb_posts p ON (t.tid = p.tid)
AND t.visible=1
AND t.closed NOT LIKE 'moved|%'
ORDER BY t.dateline DESC
LIMIT $limit")
or die($db->error());
while($news = $db->fetch_array($query))
{
echo "<div style=\"padding:3px\"><a href=\"./forum/showthread.php?tid=".$news['tid']."\" target=\"_blank\">".$news['subject']."</a></div>";
}
?>
</body>
</html>
Thx in advance.