ich brauch einmal eure Hilfe.
undzwar lass ich mir mit einem Script die neusten 5 Beiträge des Forums auf meiner HP anzeigen.
der Code dafür sieht folgender maßen aus:
Code: Alles auswählen
<style type="text/css">
#General_arabic {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: xx-small;
font-weight: normal;
height: 100%;
width: 100%;
direction: ltr;
background-color:#FDD16F;
}
a:hover {
text-decoration: underline overline;
}
a:link {
text-decoration: none;
}
a {
text-decoration: none;
color: black;
}
a:visited {
text-decoration: none;
}
</style>
<?php
/**
*
* @package phpBB3
* @copyright (c) 2005 phpBB.bz Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
//forums you do not want to show
$forums =',';
// topics limit
$limit ='5';
$sql = "SELECT topic_id,topic_title
FROM phpbb3_topics
WHERE forum_id NOT IN ('$forums')
AND topic_approved = 1 ORDER BY topic_id DESC";
//$result = $db->sql_query($sql);
$result = $db->sql_query_limit($sql, $limit);
//echo $sql;
// show out put
echo "<div id='General_arabic'><ul>";
while (($row = $db->sql_fetchrow($result)) ) {
echo "<li>";
echo "<a target='_blank' href='viewtopic.php?t=";
echo $row[topic_id];
echo"'>";
echo $row[topic_title];
echo "</a></li>";
}
echo "<ul></div>";
// Free resultset
mysql_free_result($result);
?>
das lasse ich dann per iframe aufrufen.
das ganze funktioniert soweit ganz gut... außer die Darstellung.
Ich lade das ganze in einer navibox (phpkit) am rechten Rand der Seite und die ist nicht breit genug, wodurch der text 2-3 zeilen einnimmt und das ganze nicht mehr schön aussieht.
ich habe mir jetzt folgendes überlegt... hab das schonmal irgendwo gesehn...
Der Text darf nicht mehr als z.B. 20 Zeichen haben... wenn doch wird er mit "..." weitergeführt...
z.B.
heißt der thread "Hans" dann passt das
heißt der thread "Hans geht Pflaumen einkaufen"
soll das so aussehen: "Hans geht Pflaumen ..."
wie lässt sich das bewerkstelligen?