code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
| <?
define('IN_PHPBB', 1);
// Edit to the right path of your PHPBB 2.0 Board
$ServerPath = "phpbb/config.php";
$Constants = "phpbb/includes/constants.php";
$URLPath = "http://members.lycos.co.uk/courageonline/phpbb/";
$PostNumber = "5"; // How Many Posts To Display
$timediff = 0;// Time difference between server and board time
$FontFace = "Verdana"; //- Font Face
$FontSize1 = "1"; //- Font Size 1
$FontSize2 = "1"; //- Font Size 2
$FontColor = "#000000"; //- Font Color
$TableWidth = "90%"; //- Table Width
$TableAlign = "CENTER"; //- Table Align
include_once($ServerPath);
include($Constants);
$db = @mysql_connect($dbhost, $dbuser, $dbpasswd) or die("here we die at connection");
@mysql_select_db($dbname,$db) or die("here we die");
$sql = "SELECT DISTINCT ptxt.post_subject, topic.topic_title, ptxt.post_id, post.post_time
FROM " . POSTS_TEXT_TABLE . " AS ptxt, " . POSTS_TABLE . " AS post, " . TOPICS_TABLE . " AS topic
WHERE topic.forum_id != 0 AND post.post_id = ptxt.post_id AND post.topic_id = topic.topic_id AND post.post_id = topic.topic_last_post_id
ORDER BY post.post_time DESC LIMIT $PostNumber";
if($r = mysql_query($sql, $db)) {
$content = '<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" ALIGN="'.$TableAlign.'" WIDTH="'.$TableWidth.'">';
while($m = mysql_fetch_array($r)) {
$temp = $m[3];
if ($timediff) {
$diffsecs = $timediff * 3600;
$temp += $diffsecs;
}
$pd = getdate ($temp);
if ($m[1]) {
$j = stripslashes($m[1]);
} else {
$j = stripslashes($m[0]);
}
$k = substr($j, 0, 20) . "...";
if ($pd['minutes'] < 10) {
$pmins = "0".$pd['minutes'];
} else {
$pmins = $pd['minutes'];
}
if ($pd['hours'] < 10) {
$phours = "0".$pd['hours'];
} else {
$phours = $pd['hours'];
}
$content.= '<TR><TD align="left"><a target="_blank" href="'.$URLPath.'/viewtopic.php?p='.$m[2].'#'.$m[2].'">'.$k.'</a></TD></TR>';
//$content.= '<TR><TD align="left">('.$pd['hours'].':'.$pmins." ".$pd['mday']."-".substr($pd['month'],0,3).')<HR></TD></TR>';
}
$content.= "</table>";
}
echo "$content";
?> |
vraagje over dit script wat de laatste 5 threads laat zien van mijn phpbb forum.
ik wil de text zo hebben :
lettertype: verdana, vet
grootte: 1
dit wil maar niet lukken kan iemand me helpen?
* MadMod is php noob