Da die
Anleitung von Kit-Spiele nicht mehr geht, habe ich mir gedacht ich setze es hier mal mit rein, fals es auch jemand nutzen möchte. Habe es bei mir getestet (1.6.6)
Wer seinen Usern ermöglichen möchte, einzelne Forenbeiträge auszudrucken, der befolgt bitte folgende Anleitung.
Öffnet bitte zunächst die Datei
pkinc/public/popup.php und suche:
|
PHP-Quelltext
|
1
|
$modehash=array('smilies','finduser','help','forumsticker');
|
und ersetzt es mit folgendem:
|
PHP-Quelltext
|
1
|
$modehash=array('smilies','finduser','help','forumsticker','print');
|
Sucht weiter:
|
PHP-Quelltext
|
1
2
3
|
default :
pkEvent('page_not_found');
break;
|
und fügt
darüber bitte folgendes ein:
|
PHP-Quelltext
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# case print
case 'print' :
pkLoadClass($BBCODE,'bbcode');
if(isset($_GET['postid']) && !empty($_GET['postid']) && is_numeric($_GET['postid'])) {
$postid = intval($_GET['postid']);
}
$res = $SQL->fetch_assoc($SQL->query("SELECT
*
FROM ".pkSQLPREFIX."_forumpost
WHERE forumpost_id = '".$postid."'
LIMIT 1
"));
$postTime = date("d.m.Y - H:i:s",$res['forumpost_time']);
if($res['forumpost_title'] != "") {
$title = $res['forumpost_title'];
}else{
$title = "Kein Titel angegeben";
}
$text = $BBCODE->parse($res['forumpost_text'],0,$res['forumpost_bbcode'],$res['forumpost_smilies'],$config['forum_images'],1,pkGetConfig('forum_imageresize'),pkGetConfig('forum_textwrap'));
$date = date("d.m.Y - H:i:s",time());
eval("\$site_body.=\"".pkTpl("forum/print")."\";");
break;
#END case print
|
Öffne nun die
pkinc/publictpl/forum/showthread_row.htm und suche:
|
HTML
|
1
2
3
4
5
6
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="99%" valign="top">$post_ip $info_user $info_email $info_im $info_hpage $info_buddie $info_icq $info_msn</td>
<td width="1%" valign="top"><a href="#head"><img border="0" alt="zum Anfang der Seite" src="$config[forum_button]/pageup.gif" /></a></td>
</tr>
</table>
|
und erstze es mit diesem:
|
HTML
|
1
2
3
4
5
6
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td width="99%" valign="top">
<a href="javascript:;" onclick="window.open('?path=popup&mode=print&postid=$forumpost[forumpost_id]&window_w_size=600&window_h_size=600','postprint','width=500, height=500, scrollbars=yes');"> <img src="images/print.gif" width="20" height="16" alt="Beitrag ausdrucken" title="Beitrag ausdrucken" border="0" /></a> $post_ip $info_user $info_email $info_im $info_hpage $info_buddie $info_icq</td>
<td width="1%" valign="top"> <a href="#head"><img border="0" alt="zum Anfang der Seite" src="$config[forum_button]/pageup.gif" /></a></td>
</tr>
</table>
|
Nun erstellet noch eine neue Datei, nennt diese
print.htm und speichern diese im Ordner
pkinc/publictpl/forum ab.
Der Inhalt dieser Datei ist folgender:
|
HTML
|
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
|
<table class="print" width="500" border="0" cellpadding="1" cellspacing="0">
<tr>
<td class="print" align="left">$config[site_name]</td>
</tr>
<tr>
<td class="print" align="right">
Forenbeitrag von <b>$res[forumpost_autor]</b> - Eingetragen am $postTime
</td>
</tr>
<tr>
<td class="printheads"><strong>$title</strong></td>
</tr>
<tr>
<td class="print" align="left"><br />$text</td>
</tr>
<tr>
<td class="print" align="left"><br />
<br /><span class="printsmall">gedruckt am $date</span></td>
</tr>
<tr>
<td><img src="images/black.gif" border="0" height="1" width="100%" alt="" /></td>
</tr>
<tr>
<td class="print" align="left"><span class="printsmall">Quelle: $config[site_url]/?path=forumthread&threadid=$res[forumpost_threadid]</span></td>
</tr>
</table>
<script language="JavaScript">
window.print();
</script>
|