Views auf index page
Verfasst: 28.07.2007 20:09
Gibt es einen Mod, der so wie unten eine Views Kolumne zur ersten Seite des Forums hinzufügt ?
Beesten Dank im Voraus!
Beesten Dank im Voraus!
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
<th class="catLeft">{L_LASTPOST}
Code: Alles auswählen
<th class="catLeft">{catrow.forumrow.VIEWS}</th>
klappt aber nicht(bei mir jedenfalls). ich denke mal das muss erst extra in der index.php erzeugt werden oder?Amandil hat geschrieben:suche in der index_body.tpl nachund füge davorCode: Alles auswählen
<th class="catLeft">{L_LASTPOST}
ein. das müsste klappen.Code: Alles auswählen
<th class="catLeft">{catrow.forumrow.VIEWS}</th>
Code: Alles auswählen
#
#------[ OPEN ]------------------------------------------
#
./index.php
#
#------[ FIND ]------------------------------------------
#
default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
FROM (( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
ORDER BY f.cat_id, f.forum_order";
#
#------[ IN-LINE, FIND ]---------------------------------
#
, p.post_username
#
#------[ IN-LINE AFTER, ADD ]----------------------------
#
, t.topic_views
#
#------[ FIND ]------------------------------------------
#
FROM (( " . FORUMS_TABLE . " f
#
#------[ IN-LINE AFTER, ADD ]----------------------------
#
, " . TOPICS_TABLE . " t
#
#------[ FIND ]------------------------------------------
#
ORDER BY f.cat_id, f.forum_order";
#
#------[ FIND ]------------------------------------------
#
$posts = $forum_data[$j]['forum_posts'];
$topics = $forum_data[$j]['forum_topics'];
#
#------[ AFTER, ADD ]------------------------------------
#
$views = $forum_data[$j]['topic_views'];
//-- end mod : topic view count on index v.1.0.0
#
#------[ FIND ]------------------------------------------
#
'POSTS' => $forum_data[$j]['forum_posts'],
'TOPICS' => $forum_data[$j]['forum_topics'],
#
#------[ AFTER, ADD ]------------------------------------
#
'VIEWS' => $forum_data[$j]['topic_views'],
//-- end mod : topic view count on index v.1.0.0
#
#------[ OPEN ]------------------------------------------
#
./templates/subSilver/index_body.tpl
#
#------[ FIND ]------------------------------------------
#
<th width="50" class="thTop" nowrap="nowrap"> {L_POSTS} </th>
#
#------[ AFTER, ADD ]------------------------------------
#
<!-- Start mod : topic view count on index v.1.0.0 -->
<th width="50" class="thTop" nowrap="nowrap"> {L_VIEWS} </th>
<!-- Finish mod : topic view count on index v.1.0.0 -->
#
#------[ FIND ]------------------------------------------
#
<td class="rowpic" colspan="3" align="right"> </td>
#
#------[ REPLACE WITH ]-----------------------------------
#
<td class="rowpic" colspan="4" align="right"> </td>
#
#------[ FIND ]------------------------------------------
#
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
#
#------[ AFTER, ADD ]------------------------------------
#
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.VIEWS}</span></td>
#
#------[ SAVE/CLOSE ALL FILES ]
Code: Alles auswählen
Could not query forums information
DEBUG MODE
SQL Error : 1066 Not unique table/alias: 't'
SELECT f.*, p.post_time, p.post_username, t.topic_views, u.username, u.user_id, t.topic_title, t.topic_last_post_id FROM ((( orion_forums f, orion_topics t LEFT JOIN orion_posts p ON p.post_id = f.forum_last_post_id ) LEFT JOIN orion_users u ON u.user_id = p.poster_id ) LEFT JOIN orion_topics t ON t.topic_last_post_id = p.post_id AND t.forum_id = f.forum_id) ORDER BY f.cat_id, f.forum_order
Line : 201
File : index.php
berni23 hat geschrieben:Alles klar, habs gefunden:
Bekomme aber diesen Fehler:Code: Alles auswählen
# #------[ OPEN ]------------------------------------------ # ./index.php # #------[ FIND ]------------------------------------------ # default: $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id FROM (( " . FORUMS_TABLE . " f LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id ) LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id ) ORDER BY f.cat_id, f.forum_order"; # #------[ IN-LINE, FIND ]--------------------------------- # , p.post_username # #------[ IN-LINE AFTER, ADD ]---------------------------- # , t.topic_views # #------[ FIND ]------------------------------------------ # FROM (( " . FORUMS_TABLE . " f # #------[ IN-LINE AFTER, ADD ]---------------------------- # , " . TOPICS_TABLE . " t # #------[ FIND ]------------------------------------------ # ORDER BY f.cat_id, f.forum_order"; # #------[ FIND ]------------------------------------------ # $posts = $forum_data[$j]['forum_posts']; $topics = $forum_data[$j]['forum_topics']; # #------[ AFTER, ADD ]------------------------------------ # $views = $forum_data[$j]['topic_views']; //-- end mod : topic view count on index v.1.0.0 # #------[ FIND ]------------------------------------------ # 'POSTS' => $forum_data[$j]['forum_posts'], 'TOPICS' => $forum_data[$j]['forum_topics'], # #------[ AFTER, ADD ]------------------------------------ # 'VIEWS' => $forum_data[$j]['topic_views'], //-- end mod : topic view count on index v.1.0.0 # #------[ OPEN ]------------------------------------------ # ./templates/subSilver/index_body.tpl # #------[ FIND ]------------------------------------------ # <th width="50" class="thTop" nowrap="nowrap"> {L_POSTS} </th> # #------[ AFTER, ADD ]------------------------------------ # <!-- Start mod : topic view count on index v.1.0.0 --> <th width="50" class="thTop" nowrap="nowrap"> {L_VIEWS} </th> <!-- Finish mod : topic view count on index v.1.0.0 --> # #------[ FIND ]------------------------------------------ # <td class="rowpic" colspan="3" align="right"> </td> # #------[ REPLACE WITH ]----------------------------------- # <td class="rowpic" colspan="4" align="right"> </td> # #------[ FIND ]------------------------------------------ # <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td> # #------[ AFTER, ADD ]------------------------------------ # <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.VIEWS}</span></td> # #------[ SAVE/CLOSE ALL FILES ]
Kann mir jemand weiterhelfen?Code: Alles auswählen
Could not query forums information DEBUG MODE SQL Error : 1066 Not unique table/alias: 't' SELECT f.*, p.post_time, p.post_username, t.topic_views, u.username, u.user_id, t.topic_title, t.topic_last_post_id FROM ((( orion_forums f, orion_topics t LEFT JOIN orion_posts p ON p.post_id = f.forum_last_post_id ) LEFT JOIN orion_users u ON u.user_id = p.poster_id ) LEFT JOIN orion_topics t ON t.topic_last_post_id = p.post_id AND t.forum_id = f.forum_id) ORDER BY f.cat_id, f.forum_order Line : 201 File : index.php