Thread Verfasser: Oberyn
Thread ID: 662
Thread Info
Es gibt 3 Beiträge zu diesem Thema, und es wurde 2778 Mal angesehen.
 Thema drucken
PFMUK Downloads Mod
Oberyn
Hallo zusammen,
ich nutze die PFMUK Downloads Mod von http://www.phpfusionmods.co.uk/ und würde gerne in der Downloadübersicht noch die Anzahl der Kommentare angezeigt haben.

Also in etwa so...

Autor - Releasedate
Download image
Ratings
Dl Kategorie
Comments: 4
Downloads: 76


Das ist der Teil für die Übersichtseite:

   if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart']) && isset($_GET['download_cat']) && ($_GET['download_cat'] =="")) $_GET['rowstart'] = 0;
   $cat_name = "";
   $result = dbquery(
   "SELECT tu.*, tn.*, tb.*, download_cat_id, download_cat_name FROM ".DB_DOWNLOAD_CATS." tn
   LEFT JOIN ".DB_DOWNLOADS." tu ON tn.download_cat_id=tu.download_cat
   LEFT JOIN ".DB_USERS." tb ON tu.download_user=tb.user_id
   WHERE ".groupaccess('download_cat_access')."
   AND download_id!=''".$select_cat." ORDER BY  download_datestamp DESC LIMIT ".$_GET['rowstart'].", ".$row_limit);
   if (dbrows($result) && $row_check > 0) {
   $counter = 0;
   $i0 = 0;
   $row_color = ($i0 % 2 == 0 ? "tbl1 tbl-dl" : "tbl2 tbl2-dl");
   while ($data = dbarray($result)) {

   if ($data['download_image_thumb']) {
   $img_thumbb = DOWNLOADS."images/".$data['download_image_thumb'];
   } else {
   $img_thumbb = DOWNLOADS."images/no_image.jpg";
   }
   if ($counter != 0 && ($counter % 3 == 0)) { echo "</tr>\n<tr>\n"; }
   echo "<td align='center' valign='top' class='$row_color'>\n";
   echo "<strong><a href='".BASEDIR."downloads.php?download_cat=".$data['download_cat']."&amp;download_id=".$data['download_id']."'>".$data['download_title']."</a></strong><br /><span style='font-size: 10px;'>by ".profile_link($data['user_id'], $data['user_name'], $data['user_status'])." - ".showdate("%d.%m.%Y", $data['download_datestamp'])."</span><div style='padding-bottom: 10px;'>\n";
   if ($settings['download_screenshot'] && $data['download_image'] !=="") {
   echo"<a href='".BASEDIR."downloads.php?download_cat=".$data['download_cat']."&amp;download_id=".$data['download_id']."'><img src='".$img_thumbb."' class='thumb-dl' alt='".$data['download_title']."' /></a>";
   }else{
   echo "<a href='".BASEDIR."downloads.php?download_cat=".$data['download_cat']."&amp;download_id=".$data['download_id']."'><img src='".$img_thumbb."' class='thumb-dl' alt='".$data['download_title']."' /></a>";
   }
   if ($data['download_allow_ratings']) {
   $rate = dbquery("SELECT SUM(rating_vote) FROM ".DB_RATINGS." WHERE rating_type='D' AND rating_item_id='".$data['download_id']."'");
   $info = dbresult($rate,0);
   $num_rating = dbcount("(rating_vote)", DB_RATINGS, "rating_type='D' AND rating_item_id='".$data['download_id']."'");
   $download_rating = ($num_rating ? $info / $num_rating : 0);
   $rate_avg_title= round($download_rating, 2)."";
   echo"<div style='margin-top:5px;'><img src='".BASEDIR."includes/downloads_includes/ratings/images/rate/".ceil($download_rating).".gif' width='64' height='12' alt='".$rate_avg_title." ".$locale['r136']."' style=' vertical-align:middle;' title='".$rate_avg_title." ".$locale['r136']."' /></div>";
   }else{
   echo"---";
   }
   if(!isset($_GET['download_cat'])) {
   echo "<span style='font-size: 10px;'>".$data['download_cat_name']."</span><br />";
   }
   echo "<span style='font-size: 10px;'>".$locale['dlm002'].$data['download_count'].$locale['dlm003']."</span>";
   echo "<a href='".BASEDIR."downloads.php?download_cat=".$data['download_cat']."&amp;download_id=".$data['download_id']."'>\n";
   echo "<div class='dl-messageb' style='margin-top: 10px; margin-bottom: 5px;'><strong>".$locale['416']."</strong>";
   echo"</div></a>";

   echo "</div>\n";
   echo "</td>\n";
   $counter++;
   $i0;
   }

   echo "<tr>\n<td class='tbl2 small2' align='right' colspan='8'></td>\n";
   echo "</table>\n";
   echo "<!--sub_download_idx-->";
   } else {
   echo"<div style='text-align: center; padding: 5px;'>".$locale['dlm001']."</div>";
   }
   closetable();


   if (isset($_GET['download_cat'])) {
   if ($row_check> $settingsb['downloads_per_page']) echo "<div align='center'>".makepagenav($_GET['rowstart'], $settingsb['downloads_per_page'], $row_check, 3,FUSION_SELF."?download_cat=".$_GET['download_cat']."&amp;")."</div>\n";
   }else{
   if ($row_check > $settingsb['downloads_per_page']) echo "<div align='center'>".makepagenav($_GET['rowstart'], $settingsb['downloads_per_page'], $row_check, 3,FUSION_SELF."?")."</div>\n";
   }


Und hier würde ich gerne die Kommentare angezeigt haben:

echo "......Kommentare: ......................"
echo "<span style='font-size: 10px;'>".$locale['dlm002'].$data['download_count'].$locale['dlm003']."</span>";
echo "<a href='".BASEDIR."downloads.php?download_cat=".$data['download_cat']."&amp;download_id=".$data['download_id']."'>\n";
   echo "<div class='dl-messageb' style='margin-top: 10px; margin-bottom: 5px;'><strong>".$locale['416']."</strong>";


Für euch ist das bestimmt ne Kleinigkeit, für mich noch unlösbar. Hab versucht es irgendwie aus der photogallery.php irgendwie zu übernehmen und an Downloads anzupassen, aber es hat nie geklappt.

Und auf der Autor-Seite bekommt man zur Zeit nicht wirklich Support. Wohl alle an V9 beschäftigt.

Hoffe es kann mir einer von euch weiterhelfen.
Vielen Dank schonmal! :)
Information:
PHP Version: Nicht ausgewählt •  MySQL Version: Nicht ausgewählt •  PHP-Fusion: Nicht ausgewählt
 
Rolly8-HL
Ersetze Dein

Zitat

echo "......Kommentare: ......................"

mit

   $comments_count = dbcount("(comment_id)", DB_COMMENTS, "comment_type='D' AND comment_item_id='".$data['download_id']."'");
echo "Kommentare: ".$comments_count."<br />";

Ist bei mir zwar getestet, muss aber nicht stimmen.
Gruß Rolly8-HL
Was für Andere Wichtig ist muss für mich nicht genauso Wichtig sein!
Bin Dickkopf Unbelehrbar mache aus Protest nicht das was andere für Richtig halten!
Das gibt einem zu Denken oder?
Information:
PHP Version: Nicht ausgewählt •  MySQL Version: Nicht ausgewählt •  PHP-Fusion: Nicht ausgewählt
 
Oberyn
Klasse, es funktioniert soweit.
Vielen Dank für deine Hilfe Wink
Information:
PHP Version: Nicht ausgewählt •  MySQL Version: Nicht ausgewählt •  PHP-Fusion: Nicht ausgewählt
 
Springe ins Forum: