Hallo,
Mayday21 hat geschrieben:Topics auch auf Forum-Seiten sehen
Ich habe den betreffenden Text etwas modifiziert und auf der Indexseite (index_body.tpl) eingefügt. Zeigt mir soweit auch das gewünschte Ergebnis, allerdings eben nur auf der Indexseite.
Nun hätte ich das Ergebnis aber gerne auch auf den Forumsseiten gesehen. Bei dem Versuch, den Quelltext einfach in der viewforum_topic.tpl einzubauen, erschien nur der festdefinierte Text der Überschriften, woraus ich schließe, daß er die Variablen nicht findet.
Hat jemand einen Lösungsvorschlag?
So, nachdem ich auch hierzu keine Antwort bekam, hab ich es selber versucht.
Das Ergebnis ist, daß ich es geschafft habe und nun ein wenig über den Aufbau von phpbb bescheid weiß.
Gut
Schade ist nur, daß mir niemand helfen konnte oder wollte.
Schlecht
Wie dem auch sei, ich möchte alle Interessierten dran teil haben lassen (was meines Erachtens auch viel zu wenige machen).
Topics auch auf Forum-Seiten und Post-Seiten sehen
Die Anleitung zum Recent-Mod sagt zwar für bestimmte Passagen "z.B.", was so viel heißen soll wie "einfügen wo gewünscht", aber wenn man sich nicht auskennt, dann weiß man damit nicht viel anzufangen.
Ich hab es jetzt auch gleich so abgewandelt, daß der Standard-Style subSilver (auch für die Styles
subRed und
Morpheus getestet) entsprechend fertig formatiert ist.
Allerdings brauchte ich die Beitragsvorschau nicht, daher ist diese bei meinen Änderungen rausgeflogen.
Zusätzlich zu den in der Installationsanleitung des Recent-Mods angegebenen Schritten sind die folgenden Schritte notwendig.
Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
$template->pparse('body');
#
#-----[ BEFORE, ADD ]------------------------------------------
#
include($phpbb_root_path .'recent.'.$phpEx);
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$template->pparse('body');
#
#-----[ BEFORE, ADD ]------------------------------------------
#
include($phpbb_root_path .'recent.'.$phpEx);
#
#-----[ OPEN ]------------------------------------------
#
/templates/subSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<table width="100%" cellpadding="1" cellspacing="1" border="0" align="center" class="forumline">
<tr>
<th colspan="5">{L_RECENT_TITLE}</th>
</tr>
<!-- BEGIN recent -->
<tr>
<td class="{recent.ROW_CLASS}" align="center" valign="middle"><img src="{recent.TOPIC_FOLDER_IMG}" alt="{recent.TOPIC_FOLDER_ALT}" title="{recent.TOPIC_FOLDER_ALT}" /></td>
<td class="{recent.ROW_CLASS}" nowrap="nowrap"><span class="topictitle">{recent.NEWEST_IMG}{recent.TOPIC_TYPE}<a href="{recent.U_VIEW_TOPIC}" class="topictitle">{recent.TOPIC_TITLE}</a></span>
<span class="gensmall">{recent.GOTO_PAGE}<br />{recent.FIRST_TIME}{recent.FIRST_AUTHOR}<br /></span></td>
<td class="{recent.ROW_CLASS}" width="8%" align="left"><span class="postdetails"> {recent.L_REPLIES}: {recent.REPLIES}
<br /> {recent.L_VIEWS}: {recent.VIEWS}</span></td>
<td class="{recent.ROW_CLASS}" width="25%" nowrap="nowrap"> <span class="forumlink"><a href="{recent.U_VIEW_FORUM}" class="forumlink">{recent.FORUM_NAME}</span></td>
<td class="{recent.ROW_CLASS}" width="25%" nowrap="nowrap"><span class="postbody">{recent.POST_TEXT}</span><br />
<span class="gensmall"> {recent.LAST_URL} {recent.LAST_TIME} {recent.LAST_AUTHOR}</span></td>
</tr>
<!-- END recent -->
</table>
#
#-----[ REPACE WITH ]------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catleft" colspan="2" ><span class="cattitle">{L_RECENT_TITLE}</span></td>
<td class="rowpic" colspan="3" > </td>
</tr>
<tr>
<th class="thCornerL">Titel</th>
<th class="thTop">Letzter Beitrag</th>
<th class="thTop">Antworten</th>
<th class="thTop">Aufrufe</th>
<th class="thCornerR">Forum</th>
</tr>
<!-- BEGIN recent -->
<tr>
<td class="row1" nowrap="nowrap"><span class="topictitle">{recent.NEWEST_IMG}{recent.TOPIC_TYPE}<a href="{recent.U_VIEW_TOPIC}" class="topictitle">{recent.TOPIC_TITLE}</a></span>
<span class="gensmall">{recent.GOTO_PAGE}<br /></span></td>
<td class="row2" width="25%" nowrap="nowrap"><span class="gensmall">{recent.LAST_TIME}, {recent.LAST_AUTHOR}<br /></span></td>
<td class="row1" width="6%" align="left"><span class="postdetails"> {recent.REPLIES}</span></td>
<td class="row2" width="6%" align="left"><span class="postdetails"> {recent.VIEWS}</span></td>
<td class="row1" width="25%" nowrap="nowrap"> <span class="forumlink"><a href="{recent.U_VIEW_FORUM}" class="forumlink">{recent.FORUM_NAME}</span></td>
</tr>
<!-- END recent -->
</table>
<br>
#
#-----[ OPEN ]------------------------------------------
#
/templates/subSilver/viewforum_body.tpl
#
#-----[ AT BEGINNING, ADD ]------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catleft" colspan="2" ><span class="cattitle">{L_RECENT_TITLE}</span></td>
<td class="rowpic" colspan="3" > </td>
</tr>
<tr>
<th class="thCornerL">Titel</th>
<th class="thTop">Letzter Beitrag</th>
<th class="thTop">Antworten</th>
<th class="thTop">Aufrufe</th>
<th class="thCornerR">Forum</th>
</tr>
<!-- BEGIN recent -->
<tr>
<td class="row1" nowrap="nowrap"><span class="topictitle">{recent.NEWEST_IMG}{recent.TOPIC_TYPE}<a href="{recent.U_VIEW_TOPIC}" class="topictitle">{recent.TOPIC_TITLE}</a></span>
<span class="gensmall">{recent.GOTO_PAGE}<br /></span></td>
<td class="row2" width="25%" nowrap="nowrap"><span class="gensmall">{recent.LAST_TIME}, {recent.LAST_AUTHOR}<br /></span></td>
<td class="row1" width="6%" align="left"><span class="postdetails"> {recent.REPLIES}</span></td>
<td class="row2" width="6%" align="left"><span class="postdetails"> {recent.VIEWS}</span></td>
<td class="row1" width="25%" nowrap="nowrap"> <span class="forumlink"><a href="{recent.U_VIEW_FORUM}" class="forumlink">{recent.FORUM_NAME}</span></td>
</tr>
<!-- END recent -->
</table>
<br>
#
#-----[ OPEN ]------------------------------------------
#
/templates/subSilver/viewtopic_body.tpl
#
#-----[ AT BEGINNING, ADD ]------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catleft" colspan="2" ><span class="cattitle">{L_RECENT_TITLE}</span></td>
<td class="rowpic" colspan="3" > </td>
</tr>
<tr>
<th class="thCornerL">Titel</th>
<th class="thTop">Letzter Beitrag</th>
<th class="thTop">Antworten</th>
<th class="thTop">Aufrufe</th>
<th class="thCornerR">Forum</th>
</tr>
<!-- BEGIN recent -->
<tr>
<td class="row1" nowrap="nowrap"><span class="topictitle">{recent.NEWEST_IMG}{recent.TOPIC_TYPE}<a href="{recent.U_VIEW_TOPIC}" class="topictitle">{recent.TOPIC_TITLE}</a></span>
<span class="gensmall">{recent.GOTO_PAGE}<br /></span></td>
<td class="row2" width="25%" nowrap="nowrap"><span class="gensmall">{recent.LAST_TIME}, {recent.LAST_AUTHOR}<br /></span></td>
<td class="row1" width="6%" align="left"><span class="postdetails"> {recent.REPLIES}</span></td>
<td class="row2" width="6%" align="left"><span class="postdetails"> {recent.VIEWS}</span></td>
<td class="row1" width="25%" nowrap="nowrap"> <span class="forumlink"><a href="{recent.U_VIEW_FORUM}" class="forumlink">{recent.FORUM_NAME}</span></td>
</tr>
<!-- END recent -->
</table>
<br>
Ich denke, damit hat mein Monolog ein Ende gefunden.
Gruß, Max