4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: mawenzi on December 02, 2005, 02:11:33 AM

Title: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on December 02, 2005, 02:11:33 AM
(http://img517.imageshack.us/img517/1378/deu8yc.gif) / (http://img517.imageshack.us/img517/7821/eng9tu.gif) - Vorwort / Preface :

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Demo zum MOD :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - MOD-Demo :

(http://img517.imageshack.us/img517/1378/deu8yc.gif) / (http://img517.imageshack.us/img517/7821/eng9tu.gif) - Versionen :

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Features zum MOD :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - Features of this MOD :

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Voraussetzungen an MODs:
Um ein korrektes Paging auf den einzelnen Seiten der Kommentar-Liste anzuzeigen, d.h. xx Kommentare statt xx Bilder, solltes du folgende MODs installiert haben :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - Conditions of MODs :
In order to show a correct paging on the sides of the comment list, e.g. xx comments instead of xx images, you should have installed the following MODs :

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Dateien die zu ändern sind :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - Files to be changed :
(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und je nach Linkeinbindung in deine Templates
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - and for links in you templates e.g.

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Neue Dateien :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - New files :

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Installation :
WICHTIG: Mache vor der Installation von den zu ändernden Dateien ein Backup.  Nur zur eigenen Sicherheit und nicht dass keiner das Selbstverständliche nochmals erwähnt hätte ... .
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - Installation :
IMPORTANT: Make a backup of your original files ... .


(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 1. Schritt
lege im Root-Verzeichnis die neue Datei comments_all.php mit dem folgenden Inhalt an :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 1. Step
in the root directory make a new file comments_all.php with following contents :
[/list]
Code: [Select]
<?php
/*************************************************************************
*                                                                        *
*    4images - A Web Based Image Gallery Management System               *
*    ----------------------------------------------------------------    *
*                                                                        *
*             File: comments_all.php Version 1.6                         *
*        Copyright: (C) 2002 Jan Sorgalla                                *
*            Email: jan@4homepages.de                                    *
*              Web: http://www.4homepages.de                             *
*    Scriptversion: 1.7.x                                                *
**************************************************************************
*    Die comments_all.php ist nicht Bestandteil des Originalscripts !    *
*    Erstellt durch : mawenzi - www.detlev-kostka.de                     *
*                   : loda    - www.loda.de ... Danke !                  *
*                                                                        *
*************************************************************************/


$main_template 'comments_all';
$templates_used 'comments_all_bit';

define('GET_CACHES'1);
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();
include(
ROOT_PATH.'includes/page_header.php');

   if (isset(
$HTTP_POST_VARS['commentsetperpage']) || isset($HTTP_GET_VARS['commentsetperpage'])) {
     
$commentsetperpage = (intval($HTTP_POST_VARS['commentsetperpage']) ) ? intval($HTTP_POST_VARS['commentsetperpage']) : intval($HTTP_GET_VARS['commentsetperpage']);
     if (
$commentsetperpage) {
       
$site_sess->set_session_var("commentperpage"$commentsetperpage);
       
$session_info['commentperpage'] = $commentsetperpage;
     }
   }

   if (isset(
$session_info['commentperpage'])) {
     
$commentperpage $session_info['commentperpage'];
   }
   else {
     
$commentperpage 10;
   }
   
$commentsperpage_dropdown "\n<select name=\"commentsetperpage\" onchange=\"if (this.options[this.selectedIndex].value != 0){ forms['commentsperpage'].submit() }\" class=\"select\">\n";
   for(
$i 1$i <= 20$i++) {
     
$setvalue $i;
     
$commentsperpage_dropdown .= "<option value=\"".$setvalue."\"";
       if (
$setvalue == $commentperpage) {
       
$commentsperpage_dropdown .= " selected=\"selected\"";
     }
     
$commentsperpage_dropdown .= ">";
     
$commentsperpage_dropdown .= $setvalue;
     
$commentsperpage_dropdown .= "</option>\n";
   }
   
$commentsperpage_dropdown .= "</select>\n";

   
$site_template->register_vars("commentsperpage_dropdown"$commentsperpage_dropdown);
   
$commentsperpage_dropdown_form $site_template->parse_template("commentsperpage_dropdown_form");
   
$site_template->register_vars("commentsperpage_dropdown_form"$commentsperpage_dropdown_form);

   
$cat_id_sql get_auth_cat_sql("auth_viewcat""NOTIN").", ".get_auth_cat_sql("auth_readcomment""NOTIN").", ".get_auth_cat_sql("auth_viewimage""NOTIN");

   if (isset(
$HTTP_GET_VARS['user_id']) and $HTTP_GET_VARS['user_id'] != ""){
    
$add_where "WHERE c.user_id IN (".$user_id.") AND i.cat_id NOT IN ($cat_id_sql)";
   }else{
    
$add_where "WHERE i.cat_id NOT IN ($cat_id_sql)";
   }

   
$sql "SELECT COUNT(*) AS comments
       FROM "
.COMMENTS_TABLE." c
       LEFT JOIN "
.IMAGES_TABLE." i ON (i.image_id = c.image_id)
       WHERE i.cat_id NOT IN (
$cat_id_sql)";
   
$result $site_db->query_firstrow($sql);
   
$site_db->free_result();
   
$num_comments $result['comments'];
   if (
$action == "postcomment") {
      
$page ceil($num_comments $commentperpage);
   }
   
$num_rows_all = (isset($num_comments)) ? $num_comments 0;
   
$link_arg $site_sess->url(ROOT_PATH."comments_all.php");
   include(
ROOT_PATH.'includes/paging.php');
   
$getpaging = new Paging($page$commentperpage$num_rows_all$link_arg$lang['comment_stats'], "comments");
   
$offset $getpaging->get_offset();
   
$site_template->register_vars(array(
     
"paging" => $getpaging->get_paging(),
     
"paging_stats" => ($num_comments) ? $getpaging->get_paging_stats() : ""
   
));

  
$sql "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_date".get_user_table_field(", u.""user_level")."
          FROM "
.COMMENTS_TABLE." c
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
          LEFT JOIN "
.IMAGES_TABLE." i ON (i.image_id = c.image_id) ".$add_where."
          ORDER BY c.comment_date DESC
          LIMIT 
$offset$commentperpage";

  
$result $site_db->query($sql);
  
$comment_row = array();
  while (
$row $site_db->fetch_array($result)) {
    
$comment_row[] = $row;
  }
  
$site_db->free_result($result);
  
$num_comments sizeof($comment_row);
  if (!
$num_comments) {
    
$comments_all "<tr><td class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
  }
  else {
    
$comments_all "";
    
$ii 1;
    for (
$i 0$i $num_comments$i++) {
      
$image_id $comment_row[$i]['image_id'];
      
$sql "SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file".get_user_table_field(", u.""user_id").get_user_table_field(", u.""user_level").get_user_table_field(", u.""user_name")."
             FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
             LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id) 
             "
.$add_where."
             AND i.image_id = "
.$image_id." AND c.cat_id = i.cat_id ";
      
$image_row $site_db->query_firstrow($sql);
      
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
      
$comment_counter $num_rows_all-($offset+$i);
      if (
check_permission("auth_readcomment"$cat_id)){
      
$comment_user_name htmlspecialchars($comment_row[$i]['comment_user_name']);
      
$comment_user_id $comment_row[$i]['user_id'];
      
$user_row_comment get_user_info($comment_user_id);
      
$comment_user_profile_link "";
      
$comment_user_info $lang['userlevel_guest'];
        if (!isset(
$comment_row[$i][$user_table_fields['user_level']]) || (isset($comment_row[$i][$user_table_fields['user_level']]) && $comment_row[$i][$user_table_fields['user_level']] == USER)) {
          
$comment_user_info $lang['userlevel_user'];
        }
        elseif (
$comment_row[$i][$user_table_fields['user_level']] == ADMIN) {
          
$comment_user_info $lang['userlevel_admin'];
        }
     if ( 
$user_info['user_level'] == GUEST ) {
         
$comment_user_profile_link "";
      } else {
             if ( 
$comment_user_id == -) {
                  
$comment_user_profile_link "";
             } else {
                  
$comment_user_profile_link $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$comment_user_id);
             }
      }
      
$comment_user_link = ($comment_user_profile_link) ? "<a href=\"".$comment_user_profile_link."\">".$comment_user_name."</a>" $comment_user_name;


      if (!
get_file_path($image_row['image_thumb_file'], "thumb"$image_row['cat_id'], 00)) {
        
$thumb_file ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
      }else {
        
$thumb_file get_file_path($image_row['image_thumb_file'], "thumb"$image_row['cat_id'], 01);
      }
      
$thumb_info = @getimagesize($thumb_file);
      
$width $thumb_info[0];
      
$height $thumb_info[1];
      
$dimension 100;
      
$ratio $width $height;
      if (
$ratio 1) {
        
$new_width $dimension;
        
$new_height floor(($dimension/$width) * $height);
      }else {
        
$new_width floor(($dimension/$height) * $width);
        
$new_height $dimension;
      }
      
$text $comment_row[$i]['comment_text'];
      
$text format_text($text$config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
      
$admin_links "";
      if (
$user_info['user_level'] == ADMIN) {
        
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;";
        
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['delete']."</a>";
      }
      
$sql "SELECT COUNT(*) AS total_image_comments FROM ".COMMENTS_TABLE." WHERE image_id = ".$image_id."";
           
$row $site_db->query_firstrow($sql);
           
$total_image_comments $row['total_image_comments'];

      
$site_template->register_vars(array(
        
"total_image_comments" => $total_image_comments,
        
"comment_counter" => $comment_counter,
        
"comment_image_thumb" => (!check_permission("auth_viewcat"$cat_id) || !check_permission("auth_viewimage"$cat_id)) ? "<img src=\"".$thumb_file."\" width=\"".$new_width."\" height=\"".$new_height."\" onClick=\"alert('".((isset($lang['auth_alert'][$cat_id])) ? $lang['auth_alert'][$cat_id] : $lang['auth_alert']['default'])."');\" border=\"".$config['image_border']."\">" "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode ""))."\"><img src=\"".$thumb_file."\" width=\"".$new_width."\" height=\"".$new_height."\" border=\"".$config['image_border']."\"></a>",
        
"comment_image_name" => (!check_permission("auth_viewcat"$cat_id) || !check_permission("auth_viewimage"$cat_id)) ? $image_row['image_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode ""))."\">".$image_row['image_name']."</a>",
        
"comment_cat_name" => (!check_permission("auth_viewcat"$cat_id)) ? $image_row['cat_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\">".$image_row['cat_name']."</a>",
        
"comment_user_name" => $comment_user_link,
        
"comment_user_info" => $comment_user_info,
        
"comment_headline" => format_text($comment_row[$i]['comment_headline'], 0$config['wordwrap_comments'], 0011),
        
"comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1),
        
"comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
        
"image_user_name" => ($image_row[$user_table_fields['user_level']] != GUEST) ? "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$image_row[$user_table_fields['user_id']])."\">".htmlspecialchars($image_row[$user_table_fields['user_name']])."</a>" $lang['userlevel_guest'],
        
"admin_links" => $admin_links,
        
"lang_variable_text" => $lang['variable_text'],
        
"lang_navigation" => $lang['navigation'],
        
"lang_com_per_page" => $lang['com_per_page'],
        
"lang_com" => $lang['com'],
        
"lang_for_image" => $lang['for_image'],
        
"lang_in_cat" => $lang['in_cat'],
        
"lang_com_date" => $lang['com_date'],
        
"lang_com_by" => $lang['com_by'],
        
"lang_com_to_this" => $lang['com_to_this'],
        
"lang_com_total" => $lang['com_total']
      ));
      
$comments_all .= $site_template->parse_template("comments_all_bit");
     }
    }
  }
  
$site_template->register_vars("comments_all"$comments_all);
  unset(
$comments_all);

//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['all_comments']."</span>";
$site_template->register_vars("clickstream"$clickstream);

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->print_template($site_template->parse_template($main_template));
include(
ROOT_PATH.'includes/page_footer.php');
?>


(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 2. Schritt
lege im Template-Verzeichnis die neue Datei an :
/templates/<dein_Template>/comments_all.html
wobei du eine Kopie deiner :
/templates/<dein_Template>/error.html
verwenden solltest, indem du die Datei entsprechend umbenennst und dann den folgenden Code (Beispiel Standard-Template) :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 2. Step
make a new file in the template directory :
/templates/<your_template>/comments_all.html
you should make a copy of your :
/templates/<your_template>/error.html
with the new name and replace the following contents (example standard-template) :
Code: [Select]
<b class="title">{lang_error}</b>
<hr size="1" />
<p>{error_msg}</p>

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - durch diesen neuen Code ersetzt (so ist schon mal das umgebene Design deines Templates gewahrt ... !) :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - by this new code ( design of your template is saved ... !)
Code: [Select]
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="title">{lang_all_comments}</span></td>
<td align="right" valign="bottom">
</td>
</tr>
</table>
<hr size="1" />
<br />
{lang_variable_text}
<br />
{if paging}{if paging_stats}
         <table width="100%" border="0" cellspacing="1" cellpadding="0" class="head2">
            <tr>
               <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="3">
                     <tr>
                        <td width="65%" class="row1" valign="middle">
                           {paging_stats}
                        </td>
                        <td width="30%" class="row1" valign="middle" align="right">
                           {lang_com_per_page}
                        </td>
                        <td width="5%" class="row1" valign="top" align="right">
                           {commentsperpage_dropdown_form}
                        </td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
      <br />
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="head2">
            <tr>
               <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="3">
                     <tr>
                        <td class="row1" valign="top" align="left">{lang_navigation}</td>
                        <td class="row1" valign="top" align="right">{paging}</td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
      <br />
{endif paging_stats}{endif paging}
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  {comments_all}
</td></tr></table>
<br />
{if paging}
         <table width="100%" border="0" cellspacing="1" cellpadding="0" class="head2">
            <tr>
               <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="3">
                     <tr>
                        <td class="row1" valign="top" align="left">{lang_navigation}</td>
                        <td class="row1" valign="top" align="right">{paging}</td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
      <br />
{endif paging}

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Die weitere Template-Gestaltung ist natürlich deine Sache .
In der comments_all.html können die folgenden Tags verwendet werden :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - Of course is template designing your part.
The following tags are available to use in comments_all.html :
{if paging}
{paging}
{endif paging}
{if paging_stats}
{paging_stats}
{endif paging_stats}
{commentsperpage_dropdown_form}
{comments_all}

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Und diese Sprach-Tags :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - And this language-tags :
{lang_all_comments}
{lang_variable_text}
{lang_com_per_page}
{lang_navigation}

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Wobei die Bedeutung der Tags selbsterklärend sein dürfte ... .
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - You recognize the meaning of the tags alone ... .

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 3. Schritt
lege im Template-Verzeichnis die neue Datei /templates/<dein_Template>/comments_all_bit.html mit folgendem Inhalt an.
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 3. Step
in template directory make a new file /templates/<your_template>/comments_all_bit.html with the following contents.
Code: [Select]
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td class="bordercolor">
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
   <td colspan="2" class="head2" height="20">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr><td width="75%">
        <b>{comment_counter}. {lang_com}</b> <small>{lang_for_image}</small><b> {comment_image_name}</b> <small>- [{lang_in_cat} {comment_cat_name}]</td>
        <td align="right" width="25%">
        <small>[{lang_com_date} <b>{comment_date}</b>]</small></td>
        </tr></table>
   </td>
</tr>
<tr>
   <td width="15%" rowspan="2" class="row2" valign="top" align="center">
         {comment_image_thumb}
         {image_user_name}
   </td>
   <td width="85%" class="row2" valign="top" align="left"><b>{comment_headline}</b>&nbsp;<small>[{lang_com_total} {total_image_comments} {lang_com_to_this}]</small><hr size="1" />{comment_text}<br></td>
</tr><tr>
   <td class="row1" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr><td width="50%">
        <small>{lang_com_by} : {comment_user_name} [{comment_user_info}]</small></td>
        <td align="right" width="50%">
        <small>{if admin_links}{admin_links}{endif admin_links}</small></td>
        </tr></table>
   </td>
</tr>
</td></tr></table>
</td></tr></table>
<br>
</td></tr>

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Die weitere Template-Gestaltung incl. des Sprachgebrauchs ist natürlich auch hier deine Sache.
In der comments_all_bit.html können die folgenden Tags verwendet werden :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - Of course is template designing your part.
The following tags are available to use in comments_all_bit.html :
{comment_counter}
{total_image_comments}
{comment_image_name}
{comment_cat_name}
{comment_date}
{comment_image_thumb}
{comment_headline}
{comment_text}
{comment_user_name}
{comment_user_info}
{image_user_name}
{if admin_links}
{admin_links}
{endif admin_links}

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Und diese Sprach-Tags :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - And this language-tags :
{lang_com}
{lang_for_image}
{lang_in_cat}
{lang_com_date}
{lang_com_by}
{lang_com_total}
{lang_com_to_this}

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Wobei die Bedeutung der Tags auch hier selbsterklärend sein dürfte ... .
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - You recognize the meaning of the tags alone ... .

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 4. Schritt
lege im Template-Verzeichnis die neue Datei /templates/<dein_Template>/commentsperpage_dropdown_form.html mit dem folgenden Inhalt an.
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 4. Step
in template directory make a new file /templates/<your_template>/commentsperpage_dropdown_form.html with the following contents.
Code: [Select]
<table border="0" cellspacing="0" cellpadding="0">
   <form method="post" action="{self}" name="commentsperpage">
      <tr>
         <td>{commentsperpage_dropdown}</td>
      </tr>
   </form>
</table>

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 5. Schritt
Öffne die Datei includes/page_header.php und finde :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 5. Step
Open the file includes/page_header.php and find :

"url_home" => $site_sess->url(ROOT_PATH."index.php"),

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und füge unmittelbar dahinter die folgende Codezeile ein.
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - and insert after the following code.

"url_comments_all" => $site_sess->url(ROOT_PATH."comments_all.php"),
"lang_all_comments" => $lang['all_comments'],


(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 6. Schritt
Öffne die Datei /lang/deutsch/main.php und finde am Ende :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 6. Step
Open the file /lang/<your_lang>/main.php and find at the end :
Code: [Select]
?>

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und füge unmittelbar davor den folgenden Code ein:

//-----------------------------------------------------
//--- [MOD]All Comments / Alle Kommentare -------------
//-----------------------------------------------------
$lang['all_comments'] = "Alle Kommentare";
$lang['no_comments'] = "Keine Kommentare";
$lang['variable_text'] = "Auf den folgenden Seiten kannst du alle Bild-Kommentare nachlesen.";
$lang['navigation'] = "Seiten-Navigation :";
$lang['com_per_page'] = "Kommentare pro Seite :";
$lang['com'] = "Kommentar";
$lang['for_image'] = "zum Bild :";
$lang['in_cat'] = "In Kategorie :";
$lang['com_date'] = "gepostet am :";
$lang['com_by'] = "gepostet von :";
$lang['com_total'] = "gesamt :";
$lang['com_to_this'] = "Kommentar(e) zu diesem Bild";


(http://img517.imageshack.us/img517/7821/eng9tu.gif) - and insert above the following code :

//-----------------------------------------------------
//--- [MOD]All Comments / Alle Kommentare -------------
//-----------------------------------------------------
$lang['all_comments'] = "All comments";
$lang['no_comments'] = "No comments";
$lang['variable_text'] = "Your individual text for all comments list ...";
$lang['navigation'] = "Page navigation :";
$lang['com_per_page'] = "Comments per page :";
$lang['com'] = "Comment";
$lang['for_image'] = "to image :";
$lang['in_cat'] = "In category:";
$lang['com_date'] = "Date posted :";
$lang['com_by'] = "Posted by :";
$lang['com_total'] = "total :";
$lang['com_to_this'] = "comment(s) to this image";


(http://img517.imageshack.us/img517/7821/eng9tu.gif) - And for Russian language - add in lang/russian/main.php (thanks to Valery) :
Code: [Select]
//-----------------------------------------------------
//--- [MOD]All Comments / Alle Kommentare -------------
//-----------------------------------------------------
$lang['all_comments'] = "Все комментарии";
$lang['no_comments'] = "0 комментарии";
$lang['variable_text'] = "Список всех комментариев в порядке убывания.";
$lang['navigation'] = "Выберите категорию:";
$lang['com_per_page'] = "Комментариев на странице:";
$lang['com'] = "Комментарий";
$lang['for_image'] = "фото:";
$lang['in_cat'] = "Категория:";
$lang['com_date'] = "дата комментария:";
$lang['com_by'] = "Ответил:";
$lang['com_total'] = "всего:";
$lang['com_to_this'] = "Комментариев на эту работу";

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 7. Schritt
Jetzt kannst du an jeder Stelle in deinen Templates den folgenden Tag als Link zu deiner Kommentar-Liste verwenden. Z.B. in deinem Menü (user_logininfo.html , user_loginform.html) oder in einer Zeile unterhalb deiner "Letzten Kommentare" in der home.html.
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 7. Step
Now you can use on every place in your templates the following tag as link to your all-comments-list e.g. in your menue (user_logininfo.html , user_loginform.html) or in a line after your "Last Comments" in your home.html.
Code: [Select]
<a href="{url_comments_all}">{lang_all_comments}</a>

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 8. Schritt - Einstellungmöglichkeiten
Die folgenden Einstellungen lassen sich zur Anpassung an deine Website in der comments_all.php vornehmen:
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 8. Step - Settings
The following settings can be made for the adjustment of your website in comments_all.php :


NEU / NEW :

(http://img517.imageshack.us/img517/1378/deu8yc.gif) / (http://img517.imageshack.us/img517/7821/eng9tu.gif) - Erweiterung / Extension : Alle Kommentare einer Kategorie / All comments of a category


(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 1. Schritt
lege im Root-Verzeichnis die neue Datei comments_cat.php mit dem folgenden Inhalt an :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 1. Step
in the root directory make a new file comments_cat.php with following contents ( please modify for your language ! ) :

<?php
/*************************************************************************
*                                                                        *
*    4images - A Web Based Image Gallery Management System               *
*    ----------------------------------------------------------------    *
*                                                                        *
*             File: comments_cat.php Version 1.6                         *
*        Copyright: (C) 2002 Jan Sorgalla                                *
*            Email: jan@4homepages.de                                    *
*              Web: http://www.4homepages.de                             *
*    Scriptversion: 1.7.x                                                *
**************************************************************************
*    Die comments_cat.php ist nicht Bestandteil des Originalscripts !    *
*    Erstellt durch : mawenzi - www.detlev-kostka.de                     *
*                                                                        *
*************************************************************************/


$main_template = 'comments_all';
$templates_used = 'comments_all_bit';

define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');

$cat_id=$_GET['cat_id'];

   if (isset($HTTP_POST_VARS['commentsetperpage']) || isset($HTTP_GET_VARS['commentsetperpage'])) {
     $commentsetperpage = (intval($HTTP_POST_VARS['commentsetperpage']) ) ? intval($HTTP_POST_VARS['commentsetperpage']) : intval($HTTP_GET_VARS['commentsetperpage']);
     if ($commentsetperpage) {
       $site_sess->set_session_var("commentperpage", $commentsetperpage);
       $session_info['commentperpage'] = $commentsetperpage;
     }
   }

   if (isset($session_info['commentperpage'])) {
     $commentperpage = $session_info['commentperpage'];
   }
   else {
     $commentperpage = 10;
   }
   $commentsperpage_dropdown = "\n<select name=\"commentsetperpage\" onchange=\"if (this.options[this.selectedIndex].value != 0){ forms['commentsperpage'].submit() }\" class=\"select\">\n";
   for($i = 1; $i <= 20; $i++) {
     $setvalue = 1 * $i;
     $commentsperpage_dropdown .= "<option value=\"".$setvalue."\"";
       if ($setvalue == $commentperpage) {
       $commentsperpage_dropdown .= " selected=\"selected\"";
     }
     $commentsperpage_dropdown .= ">";
     $commentsperpage_dropdown .= $setvalue;
     $commentsperpage_dropdown .= "</option>\n";
   }
   $commentsperpage_dropdown .= "</select>\n";

   $site_template->register_vars("commentsperpage_dropdown", $commentsperpage_dropdown);
   $commentsperpage_dropdown_form = $site_template->parse_template("commentsperpage_dropdown_form");
   $site_template->register_vars("commentsperpage_dropdown_form", $commentsperpage_dropdown_form);

   $cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN").", ".get_auth_cat_sql("auth_readcomment", "NOTIN").", ".get_auth_cat_sql("auth_viewimage", "NOTIN");

   if (isset($HTTP_GET_VARS['user_id']) and $HTTP_GET_VARS['user_id'] != ""){
    $add_where = "WHERE c.user_id IN (".$user_id.") AND i.cat_id NOT IN ($cat_id_sql)";
   }else{
    $add_where = "WHERE i.cat_id NOT IN ($cat_id_sql)";
   }

   $sql = "SELECT COUNT(*) AS comments
       FROM ".COMMENTS_TABLE." c
       LEFT JOIN ".IMAGES_TABLE." i ON (i.image_id = c.image_id)
       WHERE i.cat_id NOT IN ($cat_id_sql)
       AND i.cat_id = ".$cat_id."";
   $result = $site_db->query_firstrow($sql);
   $site_db->free_result();
   $num_comments = $result['comments'];
   if ($action == "postcomment") {
      $page = ceil($num_comments / $commentperpage);
   }
   $num_rows_all = (isset($num_comments)) ? $num_comments : 0;
   $link_arg = $site_sess->url(ROOT_PATH."comments_cat.php?cat_id=".$cat_id."");
   include(ROOT_PATH.'includes/paging.php');
   $getpaging = new Paging($page, $commentperpage, $num_rows_all, $link_arg, $lang['comment_stats'], "comments");
   $offset = $getpaging->get_offset();
   $site_template->register_vars(array(
     "num_comments" => $num_comments,
     "paging" => $getpaging->get_paging(),
     "paging_stats" => ($num_comments) ? $getpaging->get_paging_stats() : ""
   ));

  $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_date".get_user_table_field(", u.", "user_level")."
          FROM ".COMMENTS_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          LEFT JOIN ".IMAGES_TABLE." i ON (i.image_id = c.image_id) ".$add_where."
          AND i.cat_id = ".$cat_id."
          ORDER BY c.comment_date DESC
          LIMIT $offset, $commentperpage";

  $result = $site_db->query($sql);
  $comment_row = array();
  while ($row = $site_db->fetch_array($result)) {
    $comment_row[] = $row;
  }
  $site_db->free_result($result);
  $num_comments = sizeof($comment_row);
  if (!$num_comments) {
    $comment_cat_name = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$cat_id)."\">".htmlspecialchars($cat_cache[$cat_id]['cat_name'])."</a>";
    $comments_all = "<tr><td colspan=\"2\">Es wurden noch keine Kommentare zu Bildern in der Kategorie ".$comment_cat_name." abgegeben. Mach den Anfang !</td></tr>";
    $msg = "Sorry - keine Kommentare";
    $site_template->register_vars(array(
        "msg" => $msg,
        "comment_cat_name" => $comment_cat_name
    ));
  }
  else {
    $comments_all = "";
    $ii = 1;
    for ($i = 0; $i < $num_comments; $i++) {
      $image_id = $comment_row[$i]['image_id'];
      $sql = "SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name")."
             FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
             LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
             ".$add_where."
             AND i.image_id = ".$image_id." AND c.cat_id = i.cat_id AND c.cat_id = ".$cat_id." ";
      $image_row = $site_db->query_firstrow($sql);
      $cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
      $comment_counter = $num_rows_all-($offset+$i);
      if (check_permission("auth_readcomment", $cat_id)){
      $comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);
      $comment_user_id = $comment_row[$i]['user_id'];
      $user_row_comment = get_user_info($comment_user_id);
      $comment_user_profile_link = "";
      $comment_user_info = $lang['userlevel_guest'];
        if (!isset($comment_row[$i][$user_table_fields['user_level']]) || (isset($comment_row[$i][$user_table_fields['user_level']]) && $comment_row[$i][$user_table_fields['user_level']] == USER)) {
          $comment_user_info = $lang['userlevel_user'];
        }
        elseif ($comment_row[$i][$user_table_fields['user_level']] == ADMIN) {
          $comment_user_info = $lang['userlevel_admin'];
        }
     if ( $user_info['user_level'] == GUEST ) {
         $comment_user_profile_link = "";
      } else {
             if ( $comment_user_id == -1 ) {
                  $comment_user_profile_link = "";
             } else {
                  $comment_user_profile_link = $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$comment_user_id);
             }
      }
      $comment_user_link = ($comment_user_profile_link) ? "<a href=\"".$comment_user_profile_link."\">".$comment_user_name."</a>" : $comment_user_name;


      if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0)) {
        $thumb_file = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
      }else {
        $thumb_file = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
      }
      $thumb_info = @getimagesize($thumb_file);
      $width = $thumb_info[0];
      $height = $thumb_info[1];
      $dimension = 100;
      $ratio = $width / $height;
      if ($ratio > 1) {
        $new_width = $dimension;
        $new_height = floor(($dimension/$width) * $height);
      }else {
        $new_width = floor(($dimension/$height) * $width);
        $new_height = $dimension;
      }
      $text = $comment_row[$i]['comment_text'];
      $text = format_text($text, $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
      $admin_links = "";
      if ($user_info['user_level'] == ADMIN) {
        $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;";
        $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['delete']."</a>";
      }
      $sql = "SELECT COUNT(*) AS total_image_comments FROM ".COMMENTS_TABLE." WHERE image_id = ".$image_id."";
           $row = $site_db->query_firstrow($sql);
           $total_image_comments = $row['total_image_comments'];

      $comment_cat_name = (!check_permission("auth_viewcat", $cat_id)) ? $image_row['cat_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\">".$image_row['cat_name']."</a>";

      $site_template->register_vars(array(
        "total_image_comments" => $total_image_comments,
        "comment_counter" => $comment_counter,
        "comment_image_thumb" => (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id)) ? "<img src=\"".$thumb_file."\" width=\"".$new_width."\" height=\"".$new_height."\" onClick=\"alert('".((isset($lang['auth_alert'][$cat_id])) ? $lang['auth_alert'][$cat_id] : $lang['auth_alert']['default'])."');\" border=\"".$config['image_border']."\">" : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : ""))."\"><img src=\"".$thumb_file."\" width=\"".$new_width."\" height=\"".$new_height."\" border=\"".$config['image_border']."\"></a>",
        "comment_image_name" => (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id)) ? $image_row['image_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$image_row['image_name']."</a>",
        "comment_cat_name" => $comment_cat_name,
        "comment_user_name" => $comment_user_link,
        "comment_user_info" => $comment_user_info,
        "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0, 1, 1),
        "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1 , 1),
        "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
        "image_user_name" => ($image_row[$user_table_fields['user_level']] != GUEST) ? "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$image_row[$user_table_fields['user_id']])."\">".htmlspecialchars($image_row[$user_table_fields['user_name']])."</a>" : $lang['userlevel_guest'],
        "admin_links" => $admin_links,
        "lang_variable_text" => $lang['variable_text'],
        "lang_navigation" => $lang['navigation'],
        "lang_com_per_page" => $lang['com_per_page'],
        "lang_com" => $lang['com'],
        "lang_for_image" => $lang['for_image'],
        "lang_in_cat" => $lang['in_cat'],
        "lang_com_date" => $lang['com_date'],
        "lang_com_by" => $lang['com_by'],
        "lang_com_to_this" => $lang['com_to_this'],
        "lang_com_total" => $lang['com_total']
      ));
      $comments_all .= $site_template->parse_template("comments_all_bit");
     }
    }
  }
  $site_template->register_vars("comments_all", $comments_all);
  unset($comments_all);

//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$txt_clickstream = "Alle Kommentare der Kategorie ".$comment_cat_name."";
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>";
$site_template->register_vars("clickstream", $clickstream);

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>


(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 2. Schritt
in der Datei categories.php finde :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 2. Step
in file categories.php find :

"msg" => $msg,

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und füge danach folgendes hinzu :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - and add after the following ( please modify for your language ! ) :

"link_cat_comments" => "<a href=\"".$site_sess->url(ROOT_PATH."comments_cat.php?cat_id=".$cat_id)."\">Alle Kommentare der Kategorie</a>",


(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 3. Schritt
nun kannst du als Link zu der neuen Seite "Alle Kategorie-Kommentare" in der /templates/<dein_Template>/categories.html den folgenden
Tag in einsetzten :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 3. Step
now you can use as a link to your new page "All Category-Comments" in /templates/<your_Template>/categories.html the following tag :
[/list]
Code: [Select]
{link_cat_comments}


mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: Toso on December 02, 2005, 10:53:52 AM
Sehr schöner Mod, hab Ihn direkt eingebunden. Respekt!!!  :mrgreen:

Ich bekomme jedoch noch eine kleine Fehlermeldung in der Statusleiste des Browsers, wenn den Dropdown für "Kommentare pro Seite" auswähle.

'forms.commentperpage' ist NULL oder kein Objekt
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: WoD on December 02, 2005, 03:31:26 PM
Thanks a lot!! That's exactly what I was lookin' for :)

-----

@Support ;)

Ich würde gerne den "Alle Kommentare" Link auf die Hauptseite meiner Galerie haben. Wie lautet da die korrekte Verknüpfung?

Quote
<tr>
  <td width="100%" align="center" height="20" background="templates\4waters\images\4button.gif" ><a style="text-decoration: none" href="hxxp://www.abc.de/forum">Zum Forum</a></td>
 </tr>

ACHTUNG: Den Link habe ich verändert ;)

So sähe bei mir der Link auf der Hauptseite der Galerie aus, der in mein Forum verlinkt. Jetzt möche ich gerne "Alle Kommentare" auch so verlinken.
What to do?

Grüße
WoD

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 02, 2005, 03:35:04 PM
Can't wait for the english version  :mrgreen:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 02, 2005, 04:15:05 PM
@ all - Danke für das schnelle Feedback / Thanks for the fast feedback !

@Toso,
habe den 4.Schritt überarbeitet. Bitte aktualisiere deine commentsperpage_dropdown_form.html. Habe nach meiner Anleitung nochmals eine Installation an einer frischen 4images-Installation vorgenommen. Läuft jetzt fehlerfrei bis auf einige optische/gestalterische Änderungen, die ich noch vornehmen werde.

@WoD,
deine Frage ist eigentlich mit dem 6.Schritt erklärt und beantwortet ... aber nochmals für deinen Fall ...
der Link mit Button für deine Hauptseite muss nach deiner Vorlage so aussehen :
Code: [Select]
<tr>
 <td width="100%" align="center" height="20" background="templates\4waters\images\4button.gif" ><a style="text-decoration: none" href="{url_comments_all}">Alle Kommentare</a></td>
 </tr>
Voraussetzung ist natürlich, dass du den Link entsprechend 5.Schritt in der page_header.php registriert hast. Der Link funktioniert dann in allen deinen Templates.

@ impss,
After finely MOD-tuning I will begin immediately with the translation ...  :wink:

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: JensF on December 02, 2005, 04:15:30 PM
@WoD

ändere das
Quote
a style="text-decoration: none" href="hxxp://www.abc.de/forum">Zum Forum</a>
in das
Quote
<a href="{url_comments_all}"><b>Alle Kommentare</b></a>

@mawenzi

Vielen herzlichen Dank für diesen Mod. Habe ihn eingebaut und er funktioniert wunderbar aber ich habe noch einige Fragen ;)

Du schreibst das man als Admin Links zum löschen und bearbeiten der Kommentare hat. Ich sehe leider keine :(
Und dann wollte ich fragen ob man das noch so erweitern kann das man, wenn gewünscht, nicht die letzten Kommentare sondern die ersten Kommentare sehen kann (ASC-DESC).
Und ob es möglich ist eine Antwortfunktion einzubauen. Man kann direkt auf den Kommentar antworten von der Liste aus. Natürlich nur wenn man die Rechte dazu hat.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 02, 2005, 04:29:25 PM
Thanks mawenzi  8)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 02, 2005, 04:31:58 PM
@ JensF,

habe nach einer MOD-Installation in einer Fresh-4-images-Version (siehe oben) den Fehler mit den Admin-Links auch bemerkt. Das ist das Problem, wenn man eine Modifizierung seiner eigenen Website veröffentlicht, dann auch alle relevanten Änderungen dazu in dem veröffentlichten MOD mit einzubauen.
Werde dieses zugesagte Feature natürlich noch nachreichen ! Die Option (ASC-DESC) hatte ich auch schon integriert ... kein Thema ... muss dann nur den Kommentar-Counter nochmals ändern, da er ja dann auch anders herum zählen muss ... d.h. Nr.1 an erster Stelle .
Die Option der Antwortmöglichkeit sehe ich eigentlich über den Link zum Bild und dem dort vorhandenen Kommentar-Form gegeben. Oder sollte sich nach deiner Vorstellung nur ein Kommentar-Form öffnen ?

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: JensF on December 02, 2005, 04:38:14 PM
Hi,

eigentlich hast du recht mit der Antwortfunktion. Man hat ja den Link zum Bild. Das sollte reichen. Und über die anderen Sachen würde ich mich natürlich freuen :)

Habe mal ne andere Frage.

Habe den Link zu den Kommentaren so geändert

Quote
<a href="{url_comments_all}">{lang_last_comments}</a>

Habe diesen Link in der home.html sowie in der user_logininfo.html & user_loginform.html

Wenn ich meine index.php aufrufe wird mir der Link auch ohne Probleme angezeigt aber wenn ich andere Seiten öffne (z.b. ein Bild anklicke) dann geht der Link nicht mehr....Hast du da ne Idee???
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 02, 2005, 04:44:15 PM
@ JensF,

hast du den Tag {lang_last_comments} in der page_header.php registriert ... oder nur in der index.php ... ?
(werde die Integration der /lang/.../main.php wie angekündigt noch vornehmen ... )
PS. ... der MOD sieht gut aus auf deiner Seite ...   :D

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: JensF on December 02, 2005, 05:05:11 PM
Quote
hast du den Tag {lang_last_comments} in der page_header.php registriert ... oder nur in der index.php ... ?

das war es. jetzt klappt alles.

danke.....
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 02, 2005, 05:46:25 PM
@ JensF und alle die den MOD bereits installiert haben ... ,

habe die Admin-Links zum Bearbeiten und Löschen der Kommentare in der comments_all.php nachgerüstet. Diese Datei ist oben aktualisiert worden ... bitte einfach noch mal austauschen !

@Jako,

das sieht nach einem prizipiellen Problem mit deiner Paging-Class aus. Funktioniert dein Paging sonst einwandfrei ? Hast du die o.g. Universal-Paging-Class V.1.1 installiert ?

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: Jako on December 02, 2005, 06:05:54 PM
hab den fehler schon gefunden, danke
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: dosensteck on December 02, 2005, 09:24:31 PM
und der mod hätte nicht 2 wochen früher gepostet werden können? :D

ich hab mir das selbst gebaut (mit v@nos mod) - http://www.hobby-fotografen.com/comments.php
werde aber warscheinlich auf deinen mod umstellen da das paging bei mir nicht richtig funktioniert (klick mal auf letzte seite)

nungut - danke, werde warscheinlich deinen einarbeiten :)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 03, 2005, 12:17:34 AM
@ dosensteck,

... tja ... vor  2 Wochen hat ich diesen MOD auch schon zu laufen ...  :wink:
Aber gegen ein gutes Paging incl. Paging-Stats sowie einen Kommentar-Counter ist ja auch nichts einzuwenden ...  :mrgreen:

Es sind halt immer noch 2 verschiedene Dinge ... eine Modifikation auf der eigenen Website zum Laufen zu bekommen und auf der anderen Seite einen MOD hier im Forum zu publizieren, den dann auch alle nachvollziehen und allgemein installieren können.

Dann versuche es mit meiner Variante ...  :D

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: JensF on December 03, 2005, 10:38:48 AM
@ JensF und alle die den MOD bereits installiert haben ... ,

habe die Admin-Links zum Bearbeiten und Löschen der Kommentare in der comments_all.php nachgerüstet. Diese Datei ist oben aktualisiert worden ... bitte einfach noch mal austausc

mawenzi

gemacht, getan...funktioniert.....Besten Dank....!!!!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: WoD on December 03, 2005, 01:53:41 PM
Also, wenn ich den Link zu Alle Kommentare in einer der oben 3 genannten .html Files einbaue, funktioniert alles super. Nur möchte ich den Link nicht in einer dieser html-Files, sondern in der .php meines verwendeten Styles im Hauptordner von 4images einbauen.
Die von euch genannten Tipps führen leider nur dazu, dass beim Anklicken des Links rein gar nichts passiert :|

Grüße
WoD
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 03, 2005, 11:28:36 PM
Also, wenn ich den Link zu Alle Kommentare in einer der oben 3 genannten .html Files einbaue, funktioniert alles super. Nur möchte ich den Link nicht in einer dieser html-Files, ... einbauen

... das sollte es auch. Der Link kann in dieser Form (5.Schritt und 7.Schritt) in jedem Template ( Haupt-html-Dateien) verwendet werden !

... , sondern in der .php meines verwendeten Styles im Hauptordner von 4images einbauen.

...  :?: ... das bedarf einer genaueren Erläuterung von dir ! So macht das für mich keinerlei Sinn. Bist du dir über die prinzipielle Einbindung von Links im Klaren ?

Die von euch genannten Tipps führen leider nur dazu, dass beim Anklicken des Links rein gar nichts passiert :|

Hast du oben nicht geschrieben, dass unsere Hinweise zur Linkeinbindung super funktionieren ... :?:  Wann passiert denn rein gar nichts ...  :?:

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: WoD on December 04, 2005, 12:16:41 AM
Ja, der Link lässt sich ohne Probleme in die html-Files einbauen! :)


Ich möchte den Link aber gerne in ein php-File einbauen, etwa nach folgendem Vorbild:

Quote
<div align="center">
<center>
 <table border="0" cellpadding="0" cellspacing="0"  width="100">
 <tr>
  <td width="100%" align="center" height="20" background="templates\4waters\images\4button.gif" ><a style="text-decoration: none" href="http://*****.de/4images/">Galerie Hauptseite</a></td>
 </tr>

Dies sind die ersten paar Zeilen aus der php Datei, in die ich gerne den Link setzen würde.


Grüße
WoD
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 04, 2005, 12:49:40 AM
@WoD
... dieser 'php-File' ist Bestandteil des Templates und wird in den html-Templates mittels @includes eingefügt ...

1. Diese 'php-Files' sind reine html-Datein, nur mit php-Extension ... um w.o. gesagt eingefügt zu werden.
2. Für interne Links sind diese 'php-Files' eigentlich ungeeignet, da diese Links nicht für die Session registriert sind.
3. Du wirst feststellen, dass die in deinem Template so vorgegebenen Links reine externe Links sind.

Willst du trotztdem dort deinen Link zu "Alle Kommentare" einbinden, dann verwende als Link einfach :
<a style="text-decoration: none" href="http://*****.de/4images/comments_all.php">Alle Kommentare</a>
(... doch wie gesagt ... funktioniert, aber ist nicht ganz sauber ...  :wink:)

4. Die korrekte Linksetzung in den Templates erfolgt entspr. 5.Schritt und 7.Schritt !

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: WoD on December 04, 2005, 01:16:55 AM
@mawenzi

Ast rein, genau so hatte ich mir das vorgestellt *thumbsup* Dankeschön :)


btw -  es musste allerdings comments_all heißen und nicht umgekehrt ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 05, 2005, 06:25:55 PM
(http://img517.imageshack.us/img517/1378/deu8yc.gif) / (http://img517.imageshack.us/img517/7821/eng9tu.gif) - A English MOD-translation now available !

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 05, 2005, 07:51:49 PM
(http://img517.imageshack.us/img517/1378/deu8yc.gif) / (http://img517.imageshack.us/img517/7821/eng9tu.gif) - A English MOD-translation now available !

mawenzi

thanks mawenzi,

Will give it a shot after work.

 8)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: V@no on December 06, 2005, 12:46:00 AM
(http://img517.imageshack.us/img517/1378/deu8yc.gif) / (http://img517.imageshack.us/img517/7821/eng9tu.gif) - A English MOD-translation now available !

mawenzi
This is the best idea regarding multi-langual tutorials I've seen so far!
Very nice! Hope people will pick this up as a standart :D (unless there is better idea ;))
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 06, 2005, 12:49:13 AM
(http://img517.imageshack.us/img517/1378/deu8yc.gif) / (http://img517.imageshack.us/img517/7821/eng9tu.gif) - A English MOD-translation now available !

mawenzi
This is the best idea regarding multi-langual tutorials I've seen so far!
Very nice! Hope people will pick this up as a standart :D (unless there is better idea ;))

It is very nice, any way to add these to the board as like smileys
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 06, 2005, 01:00:31 AM
... This is the best idea regarding multi-langual tutorials I've seen so far! Very nice! ...

thanks for the flowers ...  :D
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 06, 2005, 02:00:06 AM
im getting a error

Notice: Undefined index: comment_stats in C:\CuSStom.com\www\gallery\comments_all.php on line 76

this is that line

Code: [Select]
   $getpaging = new Paging($page, $commentperpage, $num_rows_all, $link_arg, $lang['comment_stats'], "comments");

Did i have to install Veno's mod comment mod first? I did upload the new paging file

my site is here : http://www.cusstom.com/gallery/comments_all.php
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 06, 2005, 02:15:50 AM
well I added
Code: [Select]
$lang['comment_stats'] = "Found: {total_cat_images} comment(s) on {total_pages} page(s). Displayed: comment {first_page} to {last_page}.";
$lang['comments_per_page'] = "Comments per page:";

To Main.php that I got From this mod- http://www.4homepages.de/forum/index.php?topic=5830.0

And now it seems to be working, was this the correct thing to do ?

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: V@no on December 06, 2005, 05:09:10 AM
And now it seems to be working, was this the correct thing to do ?
You've got it right ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 06, 2005, 10:53:00 AM
@ impss
thanks for reporting ... you are right ... I added this MOD to conditions.

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 06, 2005, 01:59:43 PM
also another thing I noticed,

I allow my visitors to see thumbnails, but not large images unless they are registered.

On the comments page, If members are not logged in, they cannot see thumbnails from catogories they would normally see .

any way to change that?

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 07, 2005, 04:42:36 PM
Any help?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 07, 2005, 05:32:20 PM
On the comments page, If members are not logged in, they cannot see thumbnails from catogories they would normally see .

... mmm ... I can't see a example on your page ... please a link with such a commented image ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 07, 2005, 06:19:45 PM
http://www.cusstom.com/gallery/comments_all.php

I have a total of 118 comments right now, but the  only 2 thumbnails  are viewable (when not logged in) are in a catogory that I have set to :

View Category = ALL
View Image     = ALL

The Other Catogories are set to:

View Category  = ALL
View Image      = Registered Users*

*It is set this way, because i want members to login before veiwing the large size images

On the comments page, If members are not logged in, they cannot see thumbnails from catogories they would normally see .

... mmm ... I can't see a example on your page ... please a link with such a commented image ...

The link to the comments page is in the upper right hand corner, next to Top Images
 
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 07, 2005, 06:31:43 PM
The Other Catogories are set to:

View Category  = ALL
View Image      = Registered Users*

... a-ha ...  :idea:

View Image = only registered Users ... that means also ... View Comments = only registered Users  ... !

If a user can't see a image he also can't see comments to that image ... that are 4images-settings ... and that is right !

On the top of your comments_all.html you can place a comment-counter for every user ... with ... e.g.
- all comments
- new comment
- comments you may see
And with a reference : You must be logged in to be able to read all comments !

Example on my site : here (http://klick.kl.funpic.de/comments_all.php) !
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 07, 2005, 07:14:14 PM
Ah ok.....

I figured that was the problem, but I thought there maybe a away to work around that considering with the same settings,  users (not logged in) can veiw the thumbnails with Top Images.

for example, most of images on this page are in catogories set to View Image = only registered Users  , but they can still see the images, just like they would when looking at the catogory, but since they are not logged in when they click the thumbnail, all it does is refresh the page.  http://www.cusstom.com/gallery/top.php

I thought maybe the comments would work the same. Btw, I set all the catogories to View Comments = ALL , thinking that would fix the problem but it didn't .   
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: V@no on December 08, 2005, 01:02:16 AM
The primary objective of mod is to show comments and not thumbnails. If one can't see the image (details), then, as mawenzi said, they can't read the comments either. If they can't read the comments from details page, then why would you want show them the comments through this mod? ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: impss on December 08, 2005, 01:15:32 AM
Im sorry if I came off sounding like he was wrong, he is not.

I was just trying to figure out a way to have it the same as my top images is.
It may not make sense to you that way, but the pictures are the main reason why my members are there, not the comments, that is only a plus
I have no problem with users veiwing large images, i would just rather they register first, so that it bumps up my member count.

And mawenzi ,

I just looked back at my posts, and I thought I had thanked you for this wonderful mod, but i guess i didnt.
I greatly appreciate the help you, and veno, and alot of other people give to us php challenged members.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on December 08, 2005, 11:47:11 AM
And mawenzi ,
I just looked back at my posts, and I thought I had thanked you for this wonderful mod, but i guess i didnt.

...  :roll: ...

@ impss,
a short solution to show all comments and thumbnails without any restrictions ... here ...
in comments_all.php delete the following code :
in line 66 :
Code: [Select]
WHERE i.cat_id NOT IN ($cat_id_sql)
but save ";  after ... ON (i.image_id = c.image_id)";  

in line 98 :
Code: [Select]
".$add_where."

If settings are : View Image = only registered Users ... Now on All Comments Page all users can see all comments and the pertinent thumbnail ... but they can't get the image detail page ... !
In comments_all.php still remains unused code ... .

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: zoolmann on January 20, 2006, 02:11:56 PM
How display author of image in show all comments   :?:


HELP ME PLEASE !!!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on January 20, 2006, 02:36:26 PM
@ zoolmann ,

... you mean a image of the " [Mod] Avatar v2.01 " ... ?

...
The avatars will be displayed in comments. ( can be added somewhere else, if needed )
...

... than use in /templates/<your_template>/comments_all_bit.html  the {user_avatar_current}-tag where you want ...
Code: [Select]
{if user_avatar_current}
{user_avatar_current}
{endif user_avatar_current}

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: zoolmann on January 20, 2006, 04:38:30 PM
@ mawenzi

Im sorry for my english.

no, no

How to display the author of inserted images in list all comments ?  :roll:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: TheOracle on January 20, 2006, 05:01:07 PM
Quote

How to display the author of inserted images in list all comments ?


With : {comment_user_name} tag. ;)

So :

Code: [Select]

{if comment_user_name}
{comment_user_name}
{endif comment_user_name}


;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: zoolmann on January 20, 2006, 05:16:05 PM
Nooooo  :cry:

How to display the author of inserted images (no author of comments) in list all comments ? 



HELP ME PLEASE
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: TheOracle on January 20, 2006, 10:15:23 PM
 :oops: :oops: :oops:

You meant something like : Image uploaded by: <<username>> ?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: zoolmann on January 20, 2006, 10:34:15 PM
It's not functional (it is no go)  :cry:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: V@no on January 21, 2006, 01:53:17 AM
In comments_all.php find:
Code: [Select]
      $sql = "SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_fileReplace it with:
Code: [Select]
      $sql = "SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name")."
Then find:
Code: [Select]
        "admin_links" => $admin_links,Insert above:
Code: [Select]
        "image_user_name" => ($image_row[$user_table_fields['user_level']] != GUEST) ? "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$image_row[$user_table_fields['user_id']])."\">".htmlspecialchars($image_row[$user_table_fields['user_name']])."</a>" : $lang['userlevel_guest'],Then in template you can use {image_user_name}
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: mawenzi on January 21, 2006, 03:01:53 AM
@ V@no

... thanks for this nice additive ...  :D
... I will integrate it into the MOD ...

... little mistake ... this ..
Quote
... $user_table_fields['user_id']]."\">".htmlspecialchars($image_row[ ...
should be
Quote
... $user_table_fields['user_id']])."\">".htmlspecialchars($image_row[ ...

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.0
Post by: TheOracle on January 21, 2006, 03:13:36 AM
In the mean time, I believe I know why this string $user_table_fields is being used now. ;)

However, I wonder if this one can be applied over user additional fields or only on user core fields ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: V@no on January 21, 2006, 04:32:04 AM
... I will integrate it into the MOD ...
Oh, ok :)
And while you at it, I have a suggestion, not really important, but in this query:
Code: [Select]
  $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").$additional_sql."
          FROM ".COMMENTS_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          LEFT JOIN ".IMAGES_TABLE." i ON (i.image_id = c.image_id) ".$add_where."
          ORDER BY c.comment_date DESC
          LIMIT $offset, $commentperpage";
actualy don't need include USERS_TABLE table, because later on you are using
Code: [Select]
$user_row_comment = get_user_info($comment_user_id);which fetch all needed information about the user of the comment ;)
so, this query should do just fine:
Code: [Select]
  $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_date
          FROM ".COMMENTS_TABLE." c
          LEFT JOIN ".IMAGES_TABLE." i ON (i.image_id = c.image_id) ".$add_where."
          ORDER BY c.comment_date DESC
          LIMIT $offset, $commentperpage";

Also, since no USER_TABLE included in the query this block of code is no needed:
Code: [Select]
    $additional_sql = "";
      $table_fields = $site_db->get_table_fields(USERS_TABLE);
      foreach ($additional_user_fields as $key => $val) {
        if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
          $additional_sql .= ", $key = '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
        }
      }


And now a little bug fix ;)
this code
Code: [Select]
  if (isset($HTTP_GET_VARS['user_id']) and $HTTP_GET_VARS['user_id'] != ""){
    $add_where = "WHERE c.user_id IN (".$user_id.") AND i.cat_id NOT IN ($cat_id_sql)";
  }else{
    $add_where = "WHERE i.cat_id NOT IN ($cat_id_sql)";
  }
should be placed below
Code: [Select]
  $cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN").", ".get_auth_cat_sql("auth_readcomment", "NOTIN").", ".get_auth_cat_sql("auth_viewimage", "NOTIN");Otherwise when you open comments page for a specific user, you will get wrong total comments number and pages count ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: zoolmann on January 21, 2006, 09:34:46 AM
S . U . P . E . R .

Thanks, its very nice MOD  :D

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on January 21, 2006, 01:55:46 PM
@ V@no

... thanks for your additional input for tuning of this MOD ...
... I have updated the MOD description ... now it is Version 1.1 ...  :wink:

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: tradenet on January 22, 2006, 06:03:40 PM
I've set this MOD up with 4images v1.7
However, I'm getting a:
Quote
Warning: Division by zero in /home/4images/comments_all.php on line 146

Warning: Division by zero in /home/4images/comments_all.php on line 151

When I access the page. Any ideas?

Nice MOD BTW.
Thanks
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: TheOracle on January 22, 2006, 06:24:55 PM
@tradenet:

Try this :

Quote

$ratio = $width / $height;
      if ($ratio > 1) {
        $new_width = $dimension;
        $new_height = floor(($dimension/$width) * $height);
      }else {
        $new_width = floor(($dimension/$height) * $width);
        $new_height = $dimension;
      }


replace with :

Code: [Select]

$ratio = $width / $height;
      if ($ratio > 1) {
        $new_width = $dimension;
        $new_height = floor(($dimension/$width) * $height);
      }else {
        $new_width = floor(($dimension/$height) * $width);
        $new_height = $dimension;
        $ratio = 0;
      }

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: V@no on January 22, 2006, 06:53:25 PM
Warning: Division by zero in /home/4images/comments_all.php on line 146

Warning: Division by zero in /home/4images/comments_all.php on line 151
Replace
Code: [Select]
      $width = $thumb_info[0];
      $height = $thumb_info[1];
With:
Code: [Select]
      $width = ($thumb_info[0]) ? $thumb_info[0] : 400;
      $height = ($thumb_info[1]) ? $thumb_info[1] : 400;


Code: [Select]

$ratio = $width / $height;
 if ($ratio > 1) {
 $new_width = $dimension;
 $new_height = floor(($dimension/$width) * $height);
 }else {
 $new_width = floor(($dimension/$height) * $width);
 $new_height = $dimension;
 $ratio = 0;
 }

HUH? Would you be so kind an explain what the hell that supposed to change? Jeez...Stop embarrassing yourself...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: tradenet on January 22, 2006, 07:13:40 PM
 :lol: TheOracle  :P

Thanks V@no. That worked.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: JensF on January 26, 2006, 06:08:19 PM
Hi Detlef,

habe folgendes kleines Problem festgestellt :)

Wenn man als Admin nen Kommentar schreibt erscheint man in der Liste als Member.....Ist mir gerade so aufgefallen.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Eschy5 on January 27, 2006, 10:51:01 PM
Ich habe den Hack bei www.verkehrsgigant.info auch eingebaut. Mir gefällt er ganz ganz, aber am Style habert´s noch etwas. Wie bekomme ich das richtig hin?

http://www.verkehrsgigant.info/comments_all.php
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on January 27, 2006, 11:04:52 PM
hallo Eschy5,
... das ist dann eigentlich "nur" html-coding ...
... hast du die comments_all.html entsprechend 2.Schritt aus deiner error.html erstellt ... ?
... ansonsten ... probier es nochmals ... ggf. hast etwas zu viel von den Tabellen weggelöscht ...
... sei vorsichtig mit den Table-Tags ... <table><tr><td> ... </td></tr></table> ...
... die Schriftfarbe von "head2" in style.css solltest du noch ändern ...

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Eschy5 on January 27, 2006, 11:18:42 PM
Ich hab´s nochmal probiert, war anscheinend mein Fehler.  :oops:
Aber der Tabellenkopf müsste eigentlich, wenn es den gleichen Style benutzt, hellblau sein. Ist er aber nicht, er ist dunkelblau.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on January 27, 2006, 11:25:52 PM
... wie ich sagte sei vorsichtig ... nicht halbe und angebrochene Tags stehen lassen ...
... beim Beginn des Einfügens steht noch ... <b ... in der Gegend rum ...  :wink:
... ggf. "head2" gegen "head1" tauschen ... eben so wie die anderen Tab.-Köpfe ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Eschy5 on January 28, 2006, 02:20:07 PM
Hi,

habe habe jetzt eine ganze Weile gebastelt, finde aber einfach nicht die richtigen Stellen. Die dunkelblauen Tabellenköpfe sollen so aussehen, wie alle anderen Tabellenköpfe in der Galerie. Das ist jedoch keine Farbe, sondern eine Datei. Die heißt cat.gif.
Wo muss ich welchen Code einfügen, damit die Tabellenköpfe genauso aussehen und dazu noch eine weiße Schrift haben? Bild liegt bei.

PS: Ein Bild mit besserer Qualität konnte ich auf Grund der geringen erlaubten Dateigröße nicht anhängen.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on January 28, 2006, 02:35:56 PM
hallo Eschy5,

... den Tabellenkopf musst du in der comments_all_bit.html editieren ...
... am einfachsten wäre es, wenn du die Zeilendefinition für den Kopf von deinen anderen Tabellen übernehmen würdest ..
... es handelt sich dabei um die folgende Zeile ...
Code: [Select]
<td colspan="2" class="head2" height="20">
... wichtig wäre es, die richtige class aus deiner style.css zu finden, so dass die Schrift weiß wird ...
... das Hintergrundbild fügts du wie folgt ein ...
Code: [Select]
<td colspan="2" class="head2" height="20" background="{template_url}/images/cat.gif">
... folgendes Problem wird aber bei dir noch auftreten, da dein Template in der Breite beschränkt ist ...
... der Inhalt des Tabellenkopfes verteilt sich über 2Zeilen, so daß sich das Hintergrundbild kacheln wird ...
... und das sieht wieder unschön aus ...
... also dann kein Hintergrundbild wählen, sondern nur eine andere Farbe ...
... oder den Inhalt des Tabellenkopfes etwas zurechtstutzen und die Tags in eine andere Spalte verschieben ... z.B. ...

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Eschy5 on January 28, 2006, 02:41:29 PM
Naja, so gut kenne ich mich damit nicht aus, aber ich probiere dann mal weiter. Mal schauen, was daraus wird. Das Problem ist, ich habe noch 5 andere Styles, bei denen das auch noch gemacht werden muss. 4 davon dürften gleich sein, nur in anderen Farben und der 5 ist noch der Standardstyle von 4images.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on January 28, 2006, 02:46:11 PM
... aber wenn du bereits verschiedenen Styles auf deiner Website eingearbeitet hast ...
... dann dürfte dass doch kein Problem für dich sein ... is only html ...  :wink:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Eschy5 on January 28, 2006, 03:32:27 PM
Das mit den Styles habe ich auch nur geschafft, weil das alles Idiotensicher war. :mrgreen:
Alleine bekomme ich ohne HTML Buch gar nix hin.
Aber wenigstens ist der erste Style optisch perfekt. Ich habe einfach die ganze Fette Schrift dünn gemacht und die kleinste Schrift benutzt. Damit passt es alles auf eine Zeile. Sollte wieder mal was längeres dadrin stehen, dann kürze ich einfach die Kategorienamen etwas.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on January 28, 2006, 04:24:32 PM
@ Eschy5
... na das sieht doch perfekt aus ...  :!:
... html-learning by doing ...  :wink:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: TheOracle on January 28, 2006, 04:38:36 PM
Quote

html-learning by doing


... and understanding. ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Eschy5 on January 28, 2006, 07:41:44 PM
Jetzt kommt das nächste Problem vom 4images Standardstyle. Den habe ich mal ein der einen Galerie als Standard eingestellt.
www.verkehrsgigant.info
Bei der Kommentarliste haben dieses mal die Tabellenköpfe die richtige Farbe, die Schrift bekomme ich weiß, aber Bildname und Kategoriename sind verlinkt. Links haben das gleiche Blau wie die Tabellenköpfe. Über die style.css habe ich versucht die Linkfarbe zu ändern, aber komischerweise hat mir der Internet Explorer nur die Hälfte in der Links in der neuen Farbe angezeigt und der Rest ist wieder gleich geblieben.
Also die Bildnamen und die Kategorienamen müssten in der Kommentarliste so eingefärbt werden, dass dann alle diese Farbe benutzen, nicht nur ein paar.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on January 28, 2006, 07:58:13 PM
... wenn du unabhängig von deiner style.css die Links im Tabellenkopf (kommen ja sonst nicht da vor !) auch immer weiß haben willst ...
... dann mache am besten folgendes in der comments_all.php ...
Quote
"comment_image_name" => (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id)) ? $image_row['image_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : ""))."\"><span style=\"color:#FFFFFF;\">".$image_row['image_name']."</span></a>",

und

Quote
"comment_cat_name" => (!check_permission("auth_viewcat", $cat_id)) ? $image_row['cat_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\"><span style=\"color:#FFFFFF;\">".$image_row['cat_name']."</span></a>",
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Eschy5 on January 28, 2006, 11:20:28 PM
Erst mal danke für deine schnelle Hilfe, klappt bis jetzt alles. :D

Jetzt aber zum letzten Problem. Ich habe weitere 4 Styles, die sind alle gleich, unterscheiden sich nur von den Farben. Dort war aber in der error.html nix vom Design drin.
Die Kommentarliste sieht jetzt so aus: http://www.verkehrsgigant.info/comments_all.php und ich hätte die gerne so: http://www.verkehrsgigant.info/details.php?image_id=1991 (aber natürlich mit den Thumbnails).

Wenn irgendwelche Dateien gebraucht werden, dann hänge ich sie hier an. Oder könnte man den Code von comments_all.html evtl. auch in eine anderen Datei einfügen?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on January 28, 2006, 11:48:07 PM
... wenn deine Styles ( wo kann man die überhaupt auswählen ? ) auf der jeweiligen Auswahl der style.css-Datei besteht ...
... dann musst du in den css-Dateien doch immer entsprechende Klassen haben ...
... und wenn nicht, dann solltest du die Tabellenfelder deiner comments_all_bit.html neu definieren ...
... z.B. class="com_kopf" class="com_row1" class="com_row2" u.s.w. ....
... und diese Klassen definierst du dann jeweils in deinen style.css-Dateien ...
... den die comments_all_bit.html bleibt doch in allen Styles die gleiche ... !
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Eschy5 on January 28, 2006, 11:51:52 PM
Die Styles kann man im Kontrollcenter ändern. Dann probiere ich das mal mit Tabelle selber basteln.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: glitzer on March 02, 2006, 10:47:10 AM
super! Hat auf Anhieb geklappt, ich verstehe nur nicht, dass obwohl es kommentare sind immer steht "Gefunden: 1479 Bild(er) auf 148 Seite(n). Angezeigt: Bild 1 bis 10"...
warum zeigt er an "Bilder"?

Wo kann ich das ändern?

Danke + Liebe Grüße
Alexx
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: IcEcReaM on March 02, 2006, 05:47:43 PM
Du musst die Universal Paging Class Mod von vano installieren,
damit du das Paging auch für Comments nutzen kannst.
Es gibt meiner Meinung nach irgendwo hier auch nen Thread,
wo das erklärt wird für Comment Paging.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on March 02, 2006, 06:05:51 PM
hallo glitzer,

es steht zwar ziemlich viel in den Vorbemerkungen zu diesem MOD, doch nicht ohne Grund habe ich das so ausführlich gemacht ...  :wink: .
Auch die Lösung zu deinem Problem ist dort zu finden. Unter Voraussetzungen an MOD's findest du auch die Links zu den erforderlichen MOD's die das Problem beheben  ... also wieder lesen ...  :wink:

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: glitzer on March 02, 2006, 06:15:05 PM
hi,

sorry ich hab das nicht "Überlesen" ich bin bzw. war bisher stark der meinung das ich dieses Universal Paging instaliert hab.
Aber vielleicht hab ich mir das nur gedacht und dann doch nicht gemacht.
Sorry dafür jetzt schon wenn ich es wirklich nicht gemacht hab.
Wenn doch und es geht nach wie vor nicht..dann lest ihr wieder wieder von mir :-)

lg
glitzer
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on March 02, 2006, 06:18:22 PM
hallo glitzer,

wichtig ist der : [MOD] Paging for Comments (http://www.4homepages.de/forum/index.php?topic=5830.0)
( ändert Bilder -> Kommentare )

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: glitzer on March 02, 2006, 06:50:06 PM
sodala
hab den fehler gefunden.
hatte die richtige paging.php und die paging for comments auch gehabt.
Hab nur bei der paging for comments den eintrag in der Main.php vergessen *gg*
jetzt gehts *frohbin*

danke + liebe grüße
alexx
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: darkcurves on March 18, 2006, 08:42:27 AM
Will this mod work without this two:

[MOD] Universal Paging Class v1.1
[MOD] Paging for Comments


I dont want to add too many mods and have to reinstall them back when i change to new version. Thanks.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on March 18, 2006, 02:42:51 PM
@ darkcurves,

yes, the mod work without the paging-mods ... but it show in paging ... e.g. 10 images instead of 10 comments ... thats all ...  :wink:

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: darkcurves on March 18, 2006, 06:11:42 PM
Thanks alot man!!  :D
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: darkcurves on March 18, 2006, 07:56:33 PM
I have a problem, i get database error. Is this something to do with my PHPBB integration? Below is my URL:

http://www.ktmrailwayfan.com/pics/comments_all.php

Thanks.  :D
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: V@no on March 18, 2006, 08:53:05 PM
I have a problem, i get database error. Is this something to do with my PHPBB integration? Below is my URL:

http://www.ktmrailwayfan.com/pics/comments_all.php

Thanks. :D
Please read forum rules. If you see an error on your site, do not ONLY post a link to the site, but post exact error message as well.

And yes, its has everything to do with phpbb integration. replace all user_id with userid in this mod (its the easiest way to fix it)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: darkcurves on March 19, 2006, 02:17:06 PM
Sorry about it, i wont do that again. Thanks btw!  :D

I changed user_id to userid and i still get this error:

Code: [Select]
DB Error: Bad SQL Query: SELECT c.comment_id, c.image_id, c.userid, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_date FROM 4images_comments c LEFT JOIN 4images_images i ON (i.image_id = c.image_id) WHERE i.cat_id NOT IN (0, 0, 0) ORDER BY c.comment_date DESC LIMIT 0, 10
Unknown column 'c.userid' in 'field list'

I also get this error:
Code: [Select]
Template Error: Couldn't open Template ./templates/default/comments_all.html
Am i doing anything wrong? My link is http://www.ktmrailwayfan.com/pics/comments_all.php .  Thanks.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on March 19, 2006, 04:14:29 PM
@darkcurves,

1. Unknown column 'c.userid' - What is your right column name for user_id ? I dont know ? Use myPhpAdmin to find it ...

2. Couldn't open Template ./templates/default/comments_all.html - Where is your template ? You made step 2 ? You created comments_all.html  ?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: darkcurves on March 19, 2006, 05:07:13 PM
Thanks for the prompt reply. I will search for my column name. My comments_all.html is here http://www.ktmrailwayfan.com/pics/templates/default/comments_all.html . It's empty right? Sorry for bugging you guys, my knowledge on this is very limited.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on March 19, 2006, 05:48:19 PM
@darkcurves,

and where ist the content of your comments_all.html ?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: darkcurves on March 19, 2006, 07:22:43 PM
Where can i get the content? I cant find it on the frontpage. Please guide me, just basic ideas and i will try from there. My knowlegde on PHP and SQL is very limited. Thanks for the reply btw, appreciate it alot.  :D
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on March 19, 2006, 10:18:30 PM
Where can i get the content? I cant find it on the frontpage. ...

What a question ... see above ... You made step 2 ?

... :roll: ...

come on ! I described it all for the modification step by step on the frontpage ... please read carefully the first page and implement it step by step in your 4images script !

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: darkcurves on March 20, 2006, 07:17:12 PM
Thanks. I thought that was for error.html. I manage to log in to my PHPMYADMIN but where am i suppose to search? phpbb_users or 4images_users?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on March 20, 2006, 08:03:12 PM
this mod used user_id from table ...
- 4images_users
- 4images_comments
- 4images_images
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: darkcurves on March 21, 2006, 06:18:49 AM
Thanks for the reply. I tried afew but it still doesn't seem to work. Below are my tables, any idea which one? Also, i have PHPBB integration, possible if it's in PHPBB table? Thanks for your replies, appreciate your help.

4images_4images
http://i1.tinypic.com/rvhlsi.jpg

4images_comments
http://i1.tinypic.com/rvhm2u.jpg

4images_users
http://i1.tinypic.com/rvhm4i.jpg
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on March 21, 2006, 09:19:39 AM
@darkcurves,
look at your comments_all.php ...

this is your error message :
Quote
DB Error: Bad SQL Query: ... c.userid, ...
Unknown column 'c.userid'

and the query in comments_all.php must be (see the first page...) :
Quote
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS ...

In your tables you use only user_id ... !
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: V@no on March 21, 2006, 02:31:25 PM
In your tables you use only user_id ... !
They have to use userid for the users table because of phpbb integration...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on March 21, 2006, 02:43:00 PM
They have to use userid for the users table because of phpbb integration...
... but not in the tables which are above shown as pictures ...  :roll:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: darkcurves on March 22, 2006, 04:27:54 PM
Thanks again for your reply. After changing c.userid to c.user_id, i get a different error below:

Code: [Select]
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.username FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_id = 10341 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.username FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_id = 10327 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.username FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_id = 10366 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.username FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_id = 10366 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.username FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_id = 5605 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.username FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_id = 6231 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.username FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_id = 8544 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.username FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_id = 10366 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.username FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_id = 10324 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.username FROM 4images_images i, 4images_categories c LEFT JOIN phpbb_users u ON (u.user_id = i.user_id) WHERE i.image_id = 10366 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

I have changed all userid to user_id at comments_all.php. What could be the problem this time? Thanks.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: V@no on March 23, 2006, 01:38:50 AM
u.user_id
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: darkcurves on March 23, 2006, 07:17:53 AM
Vano and Mawenzi, thanks alot guys! It works finally, really appreciate spending time to reply my posts. I am one happy webmaster!  :lol:

Btw, below the pics it says Anonymous, is it because i dont have the other two mods? Below is the link to my comments_all.php:
http://www.ktmrailwayfan.com/pics/comments_all.php
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: waleed on April 06, 2006, 11:19:11 PM
i installed this MOD and evrything is fine except one thing
here you can see:
http://www.maghna.com/comments_all.php

white page why ?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: waleed on April 06, 2006, 11:52:58 PM
fixed
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: koikonut on May 02, 2006, 06:04:15 AM
Ich habe leider das gleiche Problem wie ein User ein paar Seiten zuvor, obwohl ich NICHTS an den Seiten verändert habe, noch am Style von 4images - es müsste also alles perfekt wie im "Auslieferungszustand" sein. Also bei mir wir auch blau auf blau geschrieben:

Siehe hier: http://www.konradin.net/comments_all.php

Vielen Dank beim Fehler finden helfen ;-)

Chao, übrigens ein toller Mod,
Konradin
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on May 02, 2006, 10:04:13 AM
Hallo konradin,

in der comments_all_bit.html muss für den Tabellenkopf die Schriftfarbe geändert werden. Entweder du machst das über deine style.css mit einer neuen "class" ... oder du findest in der comments_all_bit.html folgendes ...
Code: [Select]
<tr>
   <td colspan="2" class="head2" height="20">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr><td width="75%">
        <b>{comment_counter}. {lang_com}</b> <small>{lang_for_image}</small><b> {comment_image_name}</b> <small>- [{lang_in_cat} {comment_cat_name}]</td>
        <td align="right" width="25%">
        <small>[{lang_com_date} <b>{comment_date}</b>]</small></td>
        </tr></table>
   </td>
</tr>

und tauscht es gegen dieses aus ...
Code: [Select]
<tr>
   <td colspan="2" class="head2" height="20">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr><td width="75%"><font color="#ffffff">
        <b>{comment_counter}. {lang_com}</b> <small>{lang_for_image}</small><b> {comment_image_name}</b> <small>- [{lang_in_cat} {comment_cat_name}]</font></td>
        <td align="right" width="25%"><font color="#ffffff">
        <small>[{lang_com_date} <b>{comment_date}</b>]</small></font></td>
        </tr></table>
   </td>
</tr>

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Sopur on May 02, 2006, 11:01:51 AM
Hallo!
Bei mir funktioniert der Mod sehr gut :-)
Ein kleines (kosmetisches) Problem habe ich: wie bringe ich die Links auch weiss? Ich habe da schon in cer style.css rumgepröbelt, aber leider nichts gefunden :-(
Konkret geht es um diese Seite: http://www.harassenlauf.ch/comments_all.php

Vielen Dank!
M
F
G
Sopur
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on May 02, 2006, 01:27:52 PM
@ Sopur,

entweder du definierst in der style.css eine neue "class" für die Links im Tabellenkopf und verwendest diese dann in der comments_all_bit.html ... oder du machst das so wie hier -> http://www.4homepages.de/forum/index.php?topic=10632.msg59159#msg59159

mawenzi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Sopur on May 02, 2006, 02:06:52 PM
Oh - vielen Dank! So gehts! (Wie müsste ich das in der style.css hinzufügen? Ich hab das einfach nicht hingekriegt?)

Einen kleinen Fehler habe ich noch: beim Autor des Kommentar steht da immer der Name, dahinter "member". Grösstenteils sind das aber gar keine Member, und wenn doch, dann wird nicht auf die VK verlinkt. Muss ich da noch was anpassen, oder ist das so gedacht?
M
F
G
Sopur
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Sopur on May 03, 2006, 09:11:42 AM
Ich habe nun versucht, in die comments_all_bit.html noch folgende parameter einzubauen: 
    {comment_user_status_img}
    {comment_user_profile_button}
    {comment_user_email_button}
    {comment_user_homepage_button}
Dies war auf der Seite dann gar nicht ersichtlich. Was müsste ich dazu beachten?
Vielen Dank für Eure Hilfe!
M
F
G
Sopur
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on May 03, 2006, 06:57:44 PM
@ Sopur

um diese Tags mit der comments_all.html anzeigen zu lassen müsstest du den entsprechenden Code, der diese Tags definiert, aus der details.php (unter --- Show Comments ---) in die comments_all.php übernehmen ...  :wink:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Sopur on May 03, 2006, 07:43:33 PM
Hm - das habe ich versucht, scheint aber nicht geklappt zu haben. Welchen Code muss ich da alles kopieren? Ich habe mal
  "comment_user_name" => $comment_user_name,
        "comment_user_info" => $comment_user_info,
        "comment_user_profile_button" => $comment_user_profile_button,
        "comment_user_email" => $comment_user_email,
        "comment_user_email_save" => $comment_user_email_save,
        "comment_user_mailform_link" => $comment_user_mailform_link,
        "comment_user_email_button" => $comment_user_email_button,
        "comment_user_homepage_button" => $comment_user_homepage_button,

unter "$site_template->register_vars(array("
eingefügt...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on May 03, 2006, 09:36:39 PM
z.B. für "comment_user_profile_button"

$comment_user_email_button = "";
$comment_user_profile_button = "<a href=\" ....... </a>";

und dann unter ... $site_template->register_vars(array(

"comment_user_profile_button" => $comment_user_profile_button,

und das analog für alle gewünschten Tags analog in der details.php

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mstgokcen on July 22, 2006, 10:31:41 PM
it is a perfect MOD but is it possible to improve ?

I want every member has the comments of his own photos in his own profile page (member.php) in list.. Morover maybe  his own comments that he wrote the others' photos..

I mean

the list of user's photos with the comments that photo took...
the list of user's comments to other users' photoso

in briefly incoming and outgoing comments of a member in his own profile page :)


Thanks for now..
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: tansamalaja on July 31, 2006, 01:46:16 PM
Very nice MOD, thank you very much!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: sharangan on August 31, 2006, 10:37:23 PM
Works Grate thank you
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on August 31, 2006, 10:54:39 PM
@ mstgokcen ,
there is another MOD for your request in the forum ...  :wink:

@ mstgokcen, tansamalaja, sharangan ,
nice to know that the MOD works perfect / very nice / grate for you ...  :D
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: macmaster_it on September 06, 2006, 08:44:01 AM
Cooler Mod
bleibt nur die Frage: wieso werden beim vom Admin geschriebene Kommentare der Admin als Member angezeigt??
Könnt ihr das mal fixen??

nebenbei:
Kann man den Mod mit dem Memberlist-Mod http://www.4homepages.de/forum/index.php?topic=1954.0 verbinden,
so daß wenn man auf die Anzahl der vom User geschriebenen Kommentare klickt, nur dessen Kommentare (aber nicht alle) angezeigt werden??

(Wär doch mal was  :wink:)

Bis dann
ron
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: pda on September 06, 2006, 11:56:51 AM
nebenbei:
Kann man den Mod mit dem Memberlist-Mod http://www.4homepages.de/forum/index.php?topic=1954.0 verbinden,
so daß wenn man auf die Anzahl der vom User geschriebenen Kommentare klickt, nur dessen Kommentare (aber nicht alle) angezeigt werden??

(Wär doch mal was  :wink:)

Bis dann
ron

Actually there is already a mod. Well it`s not familiar with this Mod (all Comments), but it`s exactly the thing which you need.

See:
http://www.4homepages.de/forum/index.php?topic=4131.0

Well and then you need to add/edit the following code in the Memberlist.php

Open memberlist.php
Search for:
Code: [Select]
$total_user_comments = $user_row['user_comments'];
Replace this with this code
Code: [Select]
 
$user_comments_link = $site_sess->url(ROOT_PATH."member.php?action=showcomments&user_id=".$user_row['user_id']);
total_user_comments = "<a href=\"".$user_comments_link."\">".$user_row['user_comments']."</a>";

Hope it works  :?


Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: bayerns-elite on September 06, 2006, 10:56:55 PM
ich bekomme leider keine thumbnails angeziegt, sondern nur ein "AD"  ?!

und könntest du bitte mal dein templates  der commnts_all bzw last_commets anhängen?


gefällt mir bei dir sehr gut :)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: mawenzi on September 06, 2006, 11:32:06 PM
gefällt mir bei dir sehr gut :)

... wenn ich gemeint bin ...  :roll: ...
... dann findest du meine Templates für die comments_all.html und comments_all_bit.html auf der 1. Seite in diesem Thread ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: bayerns-elite on September 06, 2006, 11:55:37 PM
danke

aber ich meinte eher die vom demo

sind das nicht deine?
da ist mit tabellen etc gearbeitet

bei mir schaut das ganz anders aus

und wieso wird bei mir kein thumbnail angeziegt?!

http://www.bayerns-elite.de/Photos/Unbenannt2.jpg
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: mawenzi on September 07, 2006, 01:08:00 AM
@ bayerns-elite
... und trotzdem bleibe ich bei meiner vorherigen Meinung, es sind exakt meine Templates ... !
... du musst dir die Tabellen in den Templates mal genauer ansehen ...
... und dann deine style.css bzw. deine class="bordercolor" anpassen ...
... wenn alle classes die gleiche Farbe wie bei dir haben, dann kann man halt keine 1Pixel-Tabellen sehen ...
... also direkt in den Templates die "bgcolor" für die Tabellen ändern ...
... oder die class="bordercolor" im Template und der style.css ändern ...

PS. mit den Infos, dann kann ich dir leider nicht mit deinen nicht angezeigten Thumbnails weiterhelfen ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: mawenzi on September 07, 2006, 01:22:10 AM
@ alle Nutzer von [MOD] All Comments (Alle Kommentare) ... neue Version 1.2

Habe nun endlich den Bug mit der nicht richtig angezeigten "User_Info" ( also [Gast]/[Member]/[Administrator] ) hinter dem Kommentator aus der Welt geschafft ( wie jetzt auch auf meiner Demo-Seite zu sehen ist ). Um diesen Bug zu beseitigen, muss einfach die vorhandene comments_all.php gegen die neue Version 1.2 (im Schritt 1 zu finden) ausgetauscht werden.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: Schmutti on September 11, 2006, 01:35:24 PM
Hi,
ich habe auf eine "nacktes" 1.7.3 versucht diesen Mod zu installieren und erhalte immer bei Aufruf der comments_all.php folgende Fehlermeldung:
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) WHERE i.image_id = 595 AND c.cat_id = i.cat_id
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE i.image_id = 595 AND c.cat_id = i.cat_id' at line

Kann mir bitte jemand das Brett vom Kopf runterziehen damit ich das zum laufen bringe?!
Danke
Basti

--> gallery.panoguide.de
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: mawenzi on September 11, 2006, 02:03:29 PM
... versuche mal folgendes ... lösche aus der Zeile 132 der comments_all.php ...
Code: [Select]
AND c.cat_id = i.cat_id
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: Schmutti on September 11, 2006, 02:19:32 PM
Diesen Eintrag habe ich lediglich in Zeile 114, hier brachte das löschen leider keine Verbesserung...
Basti
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: Schmutti on September 11, 2006, 04:27:29 PM
Nachtrag:
die SQL Fehlermeldung hat sich geändert, lautet jetzt nur noch

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) WHERE i.image_id = 87
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE i.image_id = 87' at line 4

Lg
Basti
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: Schmutti on September 11, 2006, 04:41:01 PM
So, ich habs nun doch hingekrigt. Ich habe diesen Eintrag hier auch noch rausgelöscht:
".$add_where." und nun geht es. Leider sehr zäh, aber vielleicht hat ja von euch noch jemand eine Idee?!
Basti
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: JinYoshi on September 12, 2006, 04:35:31 PM
For 4images 1.7.3
Open comments_all.php

Find
Code: [Select]
             WHERE i.image_id = $image_id AND c.cat_id = i.cat_id";
Replace
Code: [Select]
             AND i.image_id = $image_id AND c.cat_id = i.cat_id ";

cheers :)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: mawenzi on September 12, 2006, 05:19:40 PM
@ JinYoshi 
 
... it's strange ... but thanks for reporting ...
... and now all works in the best way ... ?

... first post is changed with this fix ... thanks JinYoshi !
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: Schmutti on September 13, 2006, 08:07:49 AM
Thanks for the Reply! Yes now everythink works fine, speed is OK for me. Have a look at http://www.panoguide.de/galerie an check out :-)
Best Wishes
Basti
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: Amosnet on September 14, 2006, 09:14:52 PM
For 4images 1.7.3
Open comments_all.php

Find
Code: [Select]
             WHERE i.image_id = $image_id AND c.cat_id = i.cat_id";
Replace
Code: [Select]
             AND i.image_id = $image_id AND c.cat_id = i.cat_id ";

cheers :)


Thank you!
It also fixed my SQL Prrblem.



Title: Re: [MOD] All Comments (Alle Kommentare) V.1.1
Post by: Amosnet on September 14, 2006, 09:53:53 PM
In your tables you use only user_id ... !
They have to use userid for the users table because of phpbb integration...

I also use the phpbb integration,

 :arrow: I have the same problem, at http://www.digimania-club.de/comments_all.php
i cant get the link to the phpbb member profile, i changes everythink i read on this thread but nothing worked out for me.

Can somebody please help me out?


BTW: Great mod!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: HorrorCrafT on September 19, 2006, 12:28:38 AM
ich habe nicht den ganzen thread gelesen, falls diese frage schon mal irgendwo beantwortet wurde:
wie kann ich einen link auf das userprofil des kommentar-schreibers einbauen wenn ich auf seinen nick klicke?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: trez on September 19, 2006, 02:23:19 AM
ich habe nicht den ganzen thread gelesen, falls diese frage schon mal irgendwo beantwortet wurde:
wie kann ich einen link auf das userprofil des kommentar-schreibers einbauen wenn ich auf seinen nick klicke?

<offtopic>
Und warum sollte diese Frage nochmal beantwortet werden, weil jemand zu faul ist sich den thread durchzulesen?
 :twisted:
</offtopic>
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: HorrorCrafT on September 19, 2006, 02:57:19 PM
ist ja schon gut! tief ein- und ausatmen und puls langsam senken ... :wink:
dann werd ich mal brav lesen ... aber wehe die antwort ist nicht zu finden! bin ja schließlich nicht zum spass hier! :wink: :mrgreen: :mrgreen:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: trez on September 19, 2006, 05:07:34 PM
ist ja schon gut! tief ein- und ausatmen und puls langsam senken ... :wink:
dann werd ich mal brav lesen ... aber wehe die antwort ist nicht zu finden! bin ja schließlich nicht zum spass hier! :wink: :mrgreen: :mrgreen:

 :mrgreen: :mrgreen:, sorry, war ne lange nacht gestern ;)
Die antwort war irgendwo auf den ersten 5 seiten, wenn nicht sag bescheid und ich poste dir die loesung.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: HorrorCrafT on September 19, 2006, 10:18:14 PM
hey kein thema und danke für den hinweis!! (http://www.hypofun.com/pixgalerie/templates/default/smilies/icon_positive.gif)

EDIT: so, in der hoffnung doch vielleicht was überlesen zu haben, hab ich den thread zweimal durchgelesen und wie es scheint hat tatsächlich noch niemand danach gefragt oder gewünscht, beim klicken auf den nick des kommentar-schreibers, sein profil angezeigt zu bekommen.

trez, wenn dein angebot noch gilt, würd ich es gerne annehmen :D
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: WoD on September 30, 2006, 10:59:38 AM
Hat sich erledigt :)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: mawenzi on October 16, 2006, 06:07:45 PM
@ ivan,

... und diesen MOD hattest du noch nicht installiert ...  :roll:
... danke für den Hinweis zu php5 ...
... werde es noch im Originalpost aktualisieren ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: tansamalaja on October 24, 2006, 03:17:02 PM
Ich möchte den Link zu "Alle Kommentare" nur für Admins sichtbar machen, User sollen (vorerst) keinen Zugriff haben.

Wo ändere ich was?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: mawenzi on October 24, 2006, 04:09:37 PM
... dann verwende folgendes als Link (wo auch immer) in deinem Template ...
Code: [Select]
{if is_admin}<a href="{url_comments_all}">{lang_all_comments}</a>{endif is_admin}

... sollte funktionieren ...  :wink:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.2
Post by: tansamalaja on October 24, 2006, 04:59:45 PM
Besten Dank - mal wieder... 8)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: mawenzi on December 06, 2006, 04:09:39 PM
Hallo Ivan,

... habe den "User_Profile_Link" aktualisiert und in der MOD-Beschreibung "comments_all.php" eingearbeitet ...
... sollte jetzt richtig funktionieren ... siehe hier (http://klick.kl.funpic.de/comments_all.php)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: mawenzi on January 25, 2007, 12:58:29 AM
Hallo Ivan,

so wie ich dich verstehe möchtest du einen Link zu [Alle Kommentare des Users] in der untersten Bit-Zeile haben ...
das müsste wie folgt realisiert werden können ...

Schritt 0. Voraussetzung für diese Modifizierung ...
Als Voraussetzung muss der [Mod] Show user's comments from his profile von v@no auf deiner Website installiert sein ...
Zu finden hier : http://www.4homepages.de/forum/index.php?topic=4131.0

Schritt 1. finde in comments_all.php ...
Code: [Select]
$comment_user_profile_link = ($comment_user_profile_link) ? "<a href=\"".$comment_user_profile_link."\">".$comment_user_name."</a>" : $comment_user_name;

und füge danach folgendes ein ...
Code: [Select]
$lang_user_comments = "Alle Kommentare des Users";  //Hier Wortlaut des Links
if ( $user_info['user_level'] == GUEST ) {
         $comment_user_comments_link = "";
      } else {
         $comment_user_comments_link = $site_sess->url(ROOT_PATH."member.php?action=showcomments&amp;user_id=".$comment_user_id);
      }
      $comment_user_comments_link = ($comment_user_comments_link) ? "<a href=\"".$comment_user_comments_link."\">".$lang_user_comments."</a>" : $lang_user_comments ;

Schritt 2. finde in comments_all.php ...
Code: [Select]
"comment_user_name" => $comment_user_profile_link,

und füge danach folgendes ein ...
Code: [Select]
"user_comments" => $comment_user_comments_link,

Schritt 3. finde in comments_all_bit.html ...
Code: [Select]
{lang_com_by} : {comment_user_name} [{comment_user_info}]

und ersetze es durch ...
Code: [Select]
{lang_com_by} : {comment_user_name} [{comment_user_info}] [{user_comments}]

das wärs ... ungetestet ... sollte aber funktionieren ... ;)
PS. wenn du diesen Link in meinen "Alle Kommentare" findest, dann ist es getestet ...
PPS. ist nun getestet und funktioniert bestens ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: mawenzi on January 25, 2007, 09:35:41 AM
... Als Voraussetzung muss jedoch der [Mod] Show user's comments from his profile von v@no auf deiner Website installiert sein ...
... Zu finden hier : http://www.4homepages.de/forum/index.php?topic=4131.0 ...
... dann klappt es auch mit dem Link ... ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: mawenzi on January 25, 2007, 02:22:13 PM
... also wenn du die gleiche Optik / das gleiche Design der jeweiligen comment_bit.html haben willst, dann ...
... nehme als member_comment_bit.html eine Kopie der comments_all_bit.html und ...
... ersetze einfach die Tags entsprechend der member_comment_bit.html , d.h. die folgenden Tags einsetzen ...
... {comment_image_name} ... {comment_cat_name} ... {comment_image} ... {comment_headline} ... {comment_text} ... u.s.w.
...  aber die Funktion //---Show Member Comments--- aus der member.php wird in jedem Fall benötigt ...

... d.h. in Kürze ...
... den [Mod] Show user's comments from his profile installieren und nur das Bit_Template ändern ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: mawenzi on January 25, 2007, 09:40:48 PM
... von was für Tabellen, in welchem Code sprichst du ... ?
... html-Tabellen in den Templates, oder db-Tabellen im php-code, oder html-Tabellen im php-code ... ?
... und bezieht sich alles auf v@no's MOD ... ?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: dgandy on March 16, 2007, 01:31:09 PM
Hi mawenzi
This is a great mod...thank you!
Is there any way to change the sort order. As you can see (http://www.simsfashionbarn.net/downloads/comments_all.php) with image 65 and 59, it is sorted by comment date. So, if there is more than one comment on an image, it shows the same image more than once with one comment each time. I would like to have the image shown once with all comments on that image listed together. Does that make sense?
Thanks again!
Debra
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: dgandy on March 16, 2007, 10:54:16 PM
On the first page of the comments, I have these error messages
Quote
Warning: Division by zero in /home/simsfash/public_html/downloads/comments_all.php on line 148

Warning: Division by zero in /home/simsfash/public_html/downloads/comments_all.php on line 153

Warning: Division by zero in /home/simsfash/public_html/downloads/comments_all.php on line 148

Warning: Division by zero in /home/simsfash/public_html/downloads/comments_all.php on line 153

Warning: Division by zero in /home/simsfash/public_html/downloads/comments_all.php on line 148

Warning: Division by zero in /home/simsfash/public_html/downloads/comments_all.php on line 153

I think it is because of images on comments #77, #76 and #75.

Those thumbnails are not showing.

I think it is because the original image is in a different category and these images are from linking to the originals.

For example: Comment #77 is on this image http://www.simsfashionbarn.net/downloads/details.php?image_id=1483 (http://www.simsfashionbarn.net/downloads/details.php?image_id=1483) The image is from a link to this image http://www.simsfashionbarn.net/downloads/details.php?image_id=1462 (http://www.simsfashionbarn.net/downloads/details.php?image_id=1462)

Can you tell me how to fix it?

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: htpzc on May 22, 2007, 09:45:38 PM
Hi,

habe den Mod nach der Anleitung implementiert, bekomme aber sobald ich auf den Link klicke nur einen Kommentar zu sehen.

Jemand ne Ahnung wo mein Fehler liegt?

www.bauer-august.de
(Link ist links oben unter der Anmeldung)

Danke

Gruß Marcus
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: mawenzi on July 06, 2007, 04:53:34 PM
@htpzc

... so wie es aussieht wird nur die comments_all_bit.html über die comments_all.php aufgerufen ...
... du musst wohl die comments_all.html entsprechend Schritt 2 noch mal bearbeiten ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: mawenzi on July 06, 2007, 05:00:35 PM
@dgandy

... upload a thubmnail to the linking images ...
... every image needs a thumbnail ...
... the error messages are caused by missing thumbnails ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: vipersgarden on August 12, 2007, 10:45:56 AM
HILFE !!!!

Binde ich den Code:
<a href="{url_comments_all}">{lang_all_comments}</a>
in meine home.html ein, erscheint der Code, aber kein Link!
http://vipersgarden.at/4images/index.php (http://vipersgarden.at/4images/index.php)

Gebe ich aber den Link direkt ein, funktioniert alles wunderbar:
http://www.vipersgarden.at/4images/comments_all.php (http://www.vipersgarden.at/4images/comments_all.php)

Bin ich zu blöd !!! ????

Hat sich erledigt !!

Ich war zu blöd !!
Ich habe den Code beim Dreamweaver in der Entwurfs-, anstatt in der Codeansicht eingefügt.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: Lennforce on August 25, 2007, 09:44:01 AM
Hallo,

ich weiß nicht, was ich verkehrt gemacht habe.

Schaut doch mal selbst http://www.picture-collection.net (http://www.picture-collection.net).

Da ist nur ein Link mit Alle Kommentare und wenn ich darauf klicke, dann kommt irgend ein Code.

MfG Lennforce
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: barabangel on October 02, 2007, 11:06:47 PM
How to desplay last 5 comments direct in home.html
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: Schtorsch on October 03, 2007, 09:45:38 PM
How to desplay last 5 comments direct in home.html

Her is your answer:  http://www.4homepages.de/forum/index.php?topic=15701.0
 :wink:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: Schtorsch on October 03, 2007, 09:54:11 PM
Erstmal ein riesengroßes Dankeschön für diesen genialen & perfekten Mod!  :mrgreen:

Dann hab ich auch gleich noch eine Frage...  :oops:

Ist es möglich, in der Liste aller Kommentare auch die bisherige Gesamtzahl an Kommentaren einzublenden?!
Also in etwa so, wie es hier http://www.4homepages.de/forum/index.php?topic=15701.msg100119#msg100119 für die "Letzten Kommentare" angestrebt wurde?! Ich fände das ganz gut, wenn man gleich sieht, dass der aktuelle Kommentar bereits der 10. ist - ohne erst auf das Bild/den Titel zu klicken...  :roll:

Vielleicht kann mir auch noch ein User bei einer anderen Frage helfen (hab diese Frage auch beim betreffenden Mod gestellt):
Nach dem Einbau der Links für "Alle Kommentare dieses Users" klappt auch erstmal alles sehr gut - bis auf die Optik...
Irgendwie öffnet sich dann die "Ergebnisseite" etwas verschoben: Zu schmal, großer blauer Balken, die gesamte Seitennavigation kommt mit und der eigentliche Kommentar kommt doch sehr kurz...  Was ist da schief gegangen? Hab die Codes mehrfach gecheckt - bin wohl schon betriebsblind...  :(  Hätte die Anzeige von "Alle Kommentare dieses Users" eigentlich gerne ähnlich der Anzeige dieses Mods hier...

Hier könnt Ihr Euch mal das Dilemma ansehen... -> http://www.dhk-galerie.de/4images/member.php?action=showcomments&user_id=29
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: Schtorsch on October 06, 2007, 10:55:54 PM
Hat keiner ne Idee zu meinen Fragen/Problemen...?!   :oops: :cry:
Ich fasse nochmal kurz zusammen:

1. Frage: Möglichkeit der Einblendung der Gesamtzahl aller Kommentare für aktuelles Bild in Ansicht "Alle Kommentare" (Beispiellink oben)?

2. Frage (neu): Einbinden eines Links zur Anzeige aller Kommentare nur für meine Bilder möglich?!

3. Anzeigeproblem beim Klick auf "Alle Kommentare dieses Users zeigen" - Beispiellink bzw. Beschreibung hatte ich oben gepostet...

Wäre nett, wenn es eine Lösungsmöglichkeit gäbe bzw. mir jemand bei dem Problemfall unter 3. behilflich wäre...  :wink:

Ich danke schonmal vorab für alle Hinweise, Tipps, Hilfestellungen oder auch "Absagen" für meine "Sonderwünsche"!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: mawenzi on October 09, 2007, 06:14:19 PM
sorry Schtorsch, bin leider jetzt erst auf deine Posts gestoßen ...
mal sehen, was sich da machen lässt ...

1. ist sicher möglich ... werde ich mir ansehen und dann hier die Lösung posten ...

2. ist auch möglich ...
2.1 finde in der /includes/ page_header.php folgendes ...
Code: [Select]
"url_top_images" => $site_sess->url(ROOT_PATH."top.php"),
2.2 füge dahinter folgendes ein ...
Code: [Select]
"url_user_pics" => $site_sess->url(ROOT_PATH."search.php?search_user=".$user_info['user_name'].""),
2.3 nun kannst du in der /templates/<dein_template>/user_logininfo.html  folgendes für den Link "Deine Bilder" verwenden ...
Code: [Select]
&nbsp;&raquo; <a href="{url_user_pics}">Deine Bilder</a>

3. "Alle Kommentare dieses Users zeigen"
... diesen Link habe ich wohl auch erst später zu diesem MOD dazugefügt und die Voraussetzungen dazu noch nicht erwähnt ...
... dazu musst du noch eine Modifikation von V@no zusätzlich installieren, die diese Auflistung anzeigt ...
... der MOD ist hier zu finden : http://www.4homepages.de/forum/index.php?topic=4131.0
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: Schtorsch on October 09, 2007, 10:05:30 PM
Danke mawenzi!  :)

Bin da geduldig. Hab mir nach dem zweiten Post schon gedacht, dass Du bestimmt gerade keine Zeit oder so hattest.

Zu 1. => Bin gespannt. Wär schön.  8)

Zu 2. => Das zeigt sicher alle meine Bilder an, oder?! Dies hätte ich schon verbaut. Mein "Wunschtraum" wäre es, wenn ich mit einem Klick alle meine kommentierten Bilder sehen würde. Am besten in der Reihenfolge der letzten Kommentare. Wenn also ein User meine Bilder kommentiert, dann müßte ich nur auf diesen Link klicken, um alle Kommentare zu meinen eigenen Bildern zu sehen. Ist sicherlich nicht sooo wichtig - über "Alle Kommentare" bekomme ich ja auch alles zu lesen. Aber dort stehen ja auch Kommentare zu Bildern anderer User. Ich würde folglich gerne sowas wie "Alle Kommentare zu meinen Bildern" nutzen wollen...  Hatte dazu schonmal die "Per Mail benachrichtigen bei neuen Kommentaren"-Mod von Thunderstrike - aber dieses Mod hat viele Probleme gemacht. Daher nun dieser Traum von mir...  :oops:

Zu 3. => EDIT! Sorry, ich bin einfach blöde! Jetzt läuft es sauber... Peinlich...

4. => Noch eine neue Frage...  Durch die diversen Änderungen in Paging bzw. durch den Aufbau Deines Mods sind nun die Kommentare unter den Bildern "verkehrt herum" sortiert - also der letzte Kommentar oben und der erste unten. Kann dies umgekehrt werden? Also neue Kommentare wieder unten (wie in Foren) - aber bei "Alle Kommentare" die neuen oben. Aber wahrscheinlich geht es nur so oder so. Also immer und überall neue oben oder eben immer und überall neue unten. Oder? Könnte man z.B. in der details.html die Sortierung umkehren - ohne die anderen Anzeigen zu berühren?!

Sorry für meine vielen Fragen und Probleme...  :oops:  Aber dieser Mod ist soooooo geil!  :)  Und da werde ich zum "Perfektionisten" und träume ein bißchen...  :lol: :roll:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: Schtorsch on October 13, 2007, 02:17:29 PM
Gibt es schon Neuigkeiten?  :oops: :?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: Schtorsch on October 29, 2007, 06:42:30 AM
Mawenziiiiii....  Wo bist Duuuuu?!   :cry: :wink:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: Martin2006-B-2 on October 29, 2007, 02:35:08 PM
Cool MOD! It Works. Thx
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: mawenzi on October 29, 2007, 08:56:48 PM
1. Frage: Möglichkeit der Einblendung der Gesamtzahl aller Kommentare für aktuelles Bild in Ansicht "Alle Kommentare" (Beispiellink oben)?

Hallo Schtorsch ... na hier bin ich ...  :mrgreen: ... ,

zur Frage 1 wäre die Antwort wie folgt zu erledigen ...

1. finde in der comments_all.php folgende Zeile ...
Code: [Select]
$site_template->register_vars(array(
und füge davor folgende Codezeilen ein ...
Code: [Select]
      $sql = "SELECT COUNT(*) AS total_image_comments FROM ".COMMENTS_TABLE." WHERE image_id = ".$image_id."";
           $row = $site_db->query_firstrow($sql);
           $total_image_comments = $row['total_image_comments'];
           $site_template->register_vars("total_image_comments", $total_image_comments);

2. nun kannst du als Counter für die Gesamtzahl der Kommentare zu einem Bild den folgenden Tag in der comments_all_bit.html verwenden ...
Code: [Select]
{total_image_comments}

ich habe das bei mir hinter der Kommentar (Bild) Überschrift eingefügt ... und zwar so ...
Code: [Select]
<b>{comment_headline}</b>&nbsp;<small>[gesamt {total_image_comments} Kommentar(e) zu diesem Bild]</small>

ich hoffe es war noch nicht zu spät ...  :wink:

PS. Habe diese Erweiterung in den MOD-Post auf der ersten Seite eingearbeitet ...
PPS. Der aktuelle MOD-Versionsstand ist damit jetzt 1.4 ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.3
Post by: thunderstrike on October 29, 2007, 09:12:44 PM
Change:

Quote
$sql = "SELECT COUNT(*) AS total_image_comments FROM ".COMMENTS_TABLE." WHERE image_id = ".$image_id."";
           $row = $site_db->query_firstrow($sql);
           $total_image_comments = $row['total_image_comments'];
           $site_template->register_vars("total_image_comments", $total_image_comments);

for:

Code: [Select]
$sql = "SELECT COUNT(*) AS total_image_comments FROM ".COMMENTS_TABLE." WHERE image_id = ".$image_id;
           $row = $site_db->query_firstrow($sql);
           $total_image_comments = (isset($row['total_image_comments'])) ? $row['total_image_comments'] : 0;
           $site_template->register_vars("total_image_comments", $total_image_comments);
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on October 29, 2007, 09:49:51 PM
@ thunderstrike,

wenn du dich mit dem Inhalt des oben aufgeführten Counters auseinandergesetzt hättest, so würdest du zumindest feststellen, dass er niemals auf "0" stehen kann, denn es werden ja nur Kommentare zu Bildern gezählt zu denen bereits mindest ein Kommentar gepostet wurde. Deine vermeindliche Erweiterung bringt den Inhalt dieser MOD(ifikation) also keinen "mm" weiter ... schadet ihn aber auch genauso wenig ... es ist halt der Code nur etwas länger ... für den der es benötigt ...

Danke für dein vermeindliches Interesse ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: thunderstrike on October 29, 2007, 09:53:29 PM
Sorry ... I no get german ... if is problem with code ... please post english.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Schtorsch on October 30, 2007, 12:26:36 AM
@Mawenzi: Perfekt!  :)  Das Warten hat sich gelohnt! Passt super! Daaaanke!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Schtorsch on October 31, 2007, 09:52:31 AM
Muß doch nochmal nachfragen, wie es mit den Fragen 2 und 4 ausschaut...  :mrgreen:

Also ob die Möglichkeit besteht, auch eine Funktion zu machen, in der ich sofort alle vorhandenen Kommentare zu meinen eigenen Bildern sehe und ob es möglich ist, die Sortierung der Kommentare in der Detail-Ansicht wieder andersrum hinzubekommen?! Aber da nehme ich an, dass es dann überall andersrum wäre, oder?!  (also bei letzte Kommentare und bei alle Kommentare auch)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: rinaldos on November 04, 2007, 07:55:09 PM
Hallo Mawenzi,
ich habe den MOD gerade eingebaut. Auf deiner Seite habe ich gesehen, das bei Dir auch Gästebucheinträge angezeigt werden. Wie müsste ich den MOD erweitern damit das auch funktioniert.
Als GB nutze ich http://www.4homepages.de/forum/index.php?topic=7409.0

LG
Ingo
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on December 04, 2007, 11:32:55 AM
@rinaldos
... das funktioniert eher zufällig ...
... ich verwende nicht den hier im Forum angebotenen Gästebuch-MOD ...
... mein Gästebuch ist einfach ein Bild, dass ich Gästebuch benannt habe und in einer eigenen Kategorie steckt ...
... zusätzlich habe ich nur das Template für diese Kategorie etwas abgeändert ...
... und das funktioniert seit Zeiten bestens bei mir und so werden auch die Gästebucheinträge als Kommentare gelistet ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: www.katzen.ag on December 06, 2007, 07:13:13 PM
Läuft ohne Probleme...THX
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on December 06, 2007, 07:26:05 PM
Läuft ohne Probleme...THX

... na das ist doch mal 'ne glasklare Aussage ...
... danke für die Meldung ... ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: www.katzen.ag on December 07, 2007, 09:27:51 PM
Jau  :mrgreen:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Nicky on December 13, 2007, 12:39:01 PM
okay... habs auch getestet :)

Code: [Select]
        "lang_com_to_this" => $lang['com_to_this'],
        "lang_com_total" => $lang['com_total'],

wie auch
Code: [Select]
           $total_image_comments = $row['total_image_comments'];
fehlen in der comments_all.php

schönheitsfehler in der comments_all_bit.html
Code: [Select]
   <td width="85%" class="row2" valign="top" align="left"><b>{comment_headline}</b>&nbsp;<small>[{lang_com_total} {total_image_comments} {lang_com_to_this}</small><hr size="1" />{comment_text}<br></td>

auf

Code: [Select]
   <td width="85%" class="row2" valign="top" align="left"><b>{comment_headline}</b>&nbsp;<small>[{lang_com_total} {total_image_comments} {lang_com_to_this}]</small><hr size="1" />{comment_text}<br></td>

dann ist hintere eckige klammer auch da :)

sonnst toller mod... thx Detlev!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on December 13, 2007, 03:16:37 PM
Hallo Nicky,

... ja, die von dir aufgezeigten Fehler haben sich beim letzten Codeupdate mit erweitertem Counter (http://www.4homepages.de/forum/index.php?topic=10632.msg103417#msg103417) eingeschlichen ...
... danke für deine Aufmerksamkeit und den Report ...
... habe die Fehler im ersten Post berichtigt ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Nicky on December 13, 2007, 03:27:47 PM
...gern geschehen... :)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Valery on January 05, 2008, 10:57:07 PM
comments_all_bit.html Gently seems nice and without errors :?. Preview: http://vodkomotornik.ru/phgallery/comments_all.php
Code: [Select]
<link href="style.css" rel="stylesheet" type="text/css" />
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td class="bordercolor">
  <table width="100%" height="156" border="0" cellpadding="4" cellspacing="1">
<tr>
  <td height="18" colspan="3" class="navbar" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="26" scope="col"><div align="left"><small>[{image_user_name}, {lang_for_image} </small><b class="subcat"> {comment_image_name}</b> <small> - {lang_in_cat} {comment_cat_name}]</small></div></td>
      <td width="43%" scope="col"><div align="right"><small class="navbar">[{lang_com} №{comment_counter}. {lang_com_date} {comment_date}]</small></div></td>
    </tr>
  </table></td>
</tr>

<tr>
   <td width="15%" colspan="2" rowspan="2" class="row2" valign="top" align="center">
         {comment_image_thumb} </td>
   <td width="85%" height="84" align="left" valign="top" class="row1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
       <td width="49%" height="26" scope="col"><div align="left"><b>{comment_headline}</b>&nbsp;<small>[{lang_com_total} {total_image_comments} {lang_com_to_this}] </small></div></td>
       <td width="51%" scope="col"><div align="right"><small>{if admin_links}{admin_links}{endif admin_links}</small></div></td></tr></table>
     <hr size="1" />     {comment_text}<br>   </td>
</tr><tr>
   <td height="15" valign="top" class="row1">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="50%">
        <small>{lang_com_by}  {comment_user_name} [{comment_user_info}]</small></td>
          <td align="right" width="50%">
        </td>
        </tr></table>   </td>
</tr>
</table>
<td></td></tr></table>
</td></tr>

And Russian lancuage - add in lang/russian/main.php

Code: [Select]
//-----------------------------------------------------------------------
//--- All Comments / Alle Kommentare V.1.4-------------
//-----------------------------------------------------------------------
$lang['all_comments'] = "Все комментарии";
$lang['variable_text'] = "Список всех комментариев в порядке убывания.";
//$lang['navigation'] = "Выберите категорию:";
$lang['com_per_page'] = "Комментариев на странице:";
$lang['com'] = "Комментарий";
$lang['for_image'] = "фото:";
$lang['in_cat'] = "Категория:";
$lang['com_date'] = "дата комментария:";
$lang['com_by'] = "Ответил:";
$lang['com_total'] = "всего:";
$lang['com_to_this'] = "Комментариев на эту работу";

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on January 17, 2008, 01:49:26 PM
@ Valery
... thanks for your Russian language code ... :)
... I added this part into the mod description on the first page ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: skiemor on January 18, 2008, 10:52:38 PM
Sehr feiner MOD, Mawenzi! Hat auf Anhieb geklappt. ;-)
Es fehlte für die Anzeige gefundene Kommentare noch:

deutsch: main.php
$lang['comment_stats'] = "Gefunden: {total_cat_images} Kommentar(e) auf {total_pages} Seite(n). Angezeigt: Kommentar {first_page} bis {last_page}.";

englisch: main.php
$lang['comment_stats'] = "Found: {total_cat_images} comment(s) on {total_pages} page(s). Displayed: comment {first_page} to {last_page}.";


Gruß Chris.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: skiemor on January 19, 2008, 02:51:10 AM
Es geht um diesen Beitrag:
http://www.4homepages.de/forum/index.php?topic=10632.msg87034#msg87034

Ich möchte den Text auch in englischer Sprache anzeigen lassen:

$lang_user_comments = "Alle Kommentare des Users";  //Hier Wortlaut des Links

Wie muss das dann aussehen?

Ich habe den Link für die Kommentare auf der home.html neben dem Link "Neue Bilder seit deinem letzten Besuch". Dieser Link ist nur Mitgliedern zugänglich.
Wie kriege ich es hin, dass auch der Kommentarlink für Gäste nicht zu sehen ist.
http://www.4homepages.de/forum/index.php?topic=4648.msg19476#msg19476

Vielen Dank schon mal vorab, falls sich jemand damit beschäftigt. ;-)

Gruß Chris.

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: rubberduck on January 26, 2008, 11:00:26 PM
Hab mir gerade die 1.4 installiert, läuft prima.

Eins ist mir aber aufgefallen:

Wenn man in den Kategorien eingestellt hat

- Bilder sehen: Registrierte
- Kommentare Lesen: Alle

werden aber die Kommentare nicht angezeigt, obwohl ja Lesen auf "Alle" steht.

Gibt es dafür eine Lösung? Entsprechend müssten dann aber wie auch im Index keine Links mehr zum Bild vorhanden sein, halt nur die Kommentare.

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on January 27, 2008, 01:50:41 AM
@rubberduck

... die Ansichtsrechte beziehen sich in jedem Fall auf die Bilder ...
... d.h. wer die Bilder nicht sehen darf, der kann auch nicht die Kommentare dazu lesen ...
...
... sollte eigentlich logisch sein, denn es wir ja hier das Thumbnail und der Link zum Bild mit angezeigt ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: CCVBE on January 27, 2008, 12:10:43 PM
Is there a code for "New comments since last visit" (just like "New images since last visit")?
http://www.4homepages.de/forum/index.php?topic=4648.msg19476#msg19476
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on January 31, 2008, 01:20:29 AM
@CCVBE

... I think there is / was (before the hack) a MOD for this here in the 4images forum ...
... MOD unread comments for its own images ...
... http://www.4homepages.de/forum/index.php?topic=11280.msg58324#msg58324 ...
...
... V@no published the google cached page of that MOD as a zip-file here ...
... http://www.4homepages.de/forum/index.php?topic=11280.msg58339#msg58339 ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Suricata on March 30, 2008, 01:43:12 PM
Hallo,

bin zwar kein Newbi mehr, aber trotzdem stelle ich mich gerade blöd an. Wo kann ich bitte die Textfarbe verändern?

So sieht es bei mir zu Zeit aus (siehe Anhang) oder http://www.fp-foto.de/comments_all.php.
Wie ihr seht mit <font="#FFFFFF"> habe ich schon rum gespielt.

Danke für Eure Tipps.

Viele Grüße
Suricata
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on April 01, 2008, 05:38:15 PM
@ Suricata 
 
... der jeweilige Tabellenkopf der comments_all_bit.html wird in der style.css durch "head2" definiert ...
... wenn du deinen Tabellenkopf nun ändern willst empfehle ich ...
- in der comments_all_bit.html den Tabellenkopf mit class="head3" zu setzen ...
- in der style.css eine neue Klasse "head3" nach deinen Erfordernissen zu definieren ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Rewolve44 on August 10, 2008, 11:13:18 AM
Hallo mawenzi,

Möchte mich Herzlichst für dieses super Mod bedanken, ist echt super und läuft ohne Probleme.
Man kann Dir nur Gratulieren für deine Arbeit hier und den super Mods die Du immer wieder hier veröffentlichst.

Liebe Grüße,
Rewolve44
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on August 10, 2008, 01:42:10 PM
@Rewolve44

... nett zu lesen, das alles so problemlos lief ...  :mrgreen: ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: shadowhunter on November 02, 2008, 02:55:35 PM
Hallo!

Ich habe noch eine nützliche MOD Erweiterung, welche ich aber nicht selber lösen kann:

Ich möchte gerne mit diesem MOD alle Kommentare in einer spezifischen Kategorie anzeigen können. Könnte mir da bei dieser kleinen Änderung bitte jemand weiterhelfen.

Als Beispiel URL: comments_all.php?cat_id=1
Dann werden nur die Kommentare von der Kategorie #1 angezeigt mit diesem MOD.

Vielen Dank für eure Hilfe.
Gruss
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on November 02, 2008, 06:08:59 PM
@scluzern ...

... das sollte realisierbar sein ... ;)
... von wo aus sollte diese Auflistung dann aufzurufen sein ... ?
... als Link von der jeweiligen Kategorie aus ... ? ... wäre wohl am einfachsten zu realisieren ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: shadowhunter on November 02, 2008, 06:48:00 PM
Quote
... von wo aus sollte diese Auflistung dann aufzurufen sein ... ?
.. als Link von der jeweiligen Kategorie aus ... ? ... wäre wohl am einfachsten zu realisieren ...
Ja genau, aber das ist mit Abstand das Einfachste davon.

Ich habe es selber einmal versucht, aber bei mir hat es immer Fehlermeldungen gegeben.
Habe bei allen SQL-Entries versucht folgendes anzufügen:
Code: [Select]
WHERE c.cat_id = $cat_id AND c.cat_id = i.cat_idAber dies funktioniert nicht und ich finde keine Lösung.

Danke für deine Hilfe im Voraus.
Gruss
Title: Problem witch all comment
Post by: luktur on December 09, 2008, 10:58:51 PM
I dont know what to do with this:
Quote
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) AND i.image_id = 277 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) AND i.image_id = 277 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) AND i.image_id = 283 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) AND i.image_id = 282 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) AND i.image_id = 281 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) AND i.image_id = 276 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) AND i.image_id = 265 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) AND i.image_id = 277 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) AND i.image_id = 281 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file, u.user_id, u.user_level, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.cat_id NOT IN (0, 0, 0) AND i.image_id = 271 AND c.cat_id = i.cat_id
Unknown column 'i.user_id' in 'on clause'

http://www.ogk.cal.pl/comments_all.php

I use this MOD almost 2 weeks (it was OK) and on sunday i bum - error.
Title: Re: Problem witch all comment
Post by: Nicky on December 09, 2008, 11:08:26 PM
hi,

this will help http://www.4homepages.de/forum/index.php?topic=22668.0
Title: Re: Problem witch all comment
Post by: luktur on December 10, 2008, 12:14:11 AM
I read topic and I try tu use method nr 3 - change the php files. But in php files i already have  ( ) in selected places:

FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c) etc

I have MySQL 4,1 but if this important i can have 5.
Title: Re: Problem witch all comment
Post by: Nicky on December 10, 2008, 12:37:48 AM
did you look into comments_all.php too?
Title: Re: Problem witch all comment
Post by: luktur on December 10, 2008, 01:02:05 AM
Thx. It's working. I'm own you a beer.  :D
Title: Re: Problem witch all comment
Post by: Nicky on December 10, 2008, 01:20:18 AM
piwo? yeeahhhhh...  :mrgreen:

 :arrow: no probs, you're welcome
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: sanko86 on January 07, 2009, 10:51:11 AM
Thanks perfect info.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on January 07, 2009, 08:54:38 PM
... nice to read that all is "perfect" for you with "All Comments" ...
... and thanks for your statement ... ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: sanko86 on January 09, 2009, 02:49:04 PM
... nice to read that all is "perfect" for you with "All Comments" ...
... and thanks for your statement ... ;)

sorry
my bad english:)
perfect turkish language
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Streetlife on February 22, 2009, 08:11:38 PM
Bei mir wird auf der all_comments.php das Layout verändert angezeigt...

So siehts aus http://strlifewitten.st.funpic.de/4images/comments_all.php (http://strlifewitten.st.funpic.de/4images/comments_all.php)

Und so solltes aussehen http://strlifewitten.st.funpic.de/4images/index.php (http://strlifewitten.st.funpic.de/4images/index.php)


Und oben steht wieder "Your site´s Name here?"

Weiss einer was da falsch ist?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: bergblume on February 22, 2009, 09:09:33 PM
hi streetlife...

habe nur mal flüchtig drauf geschaut... meiner meinung nach ist bei dir ein <br /> zuviel drin...

such mal bei dir im code nach

Code: [Select]
<td width="100%" align="center" height="20" background="templates/4dark/bbutton.gif" ><a style="text-decoration: none" href="http://www.ksw-allstars.de" target="_blank">K-S-W</a></td>

 </tr>
 </table>
<br><br>

</center>
</div>
<br>                  <br />

und entferne dort das letzte <br />
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Streetlife on February 23, 2009, 05:26:48 PM
Ich kann den angegebenen Code bei mir nicht finden...

Hilft es dir wenn ich dir mal den Kompletten code von der comment_all.php gebe???


Code: [Select]
<?php
/*************************************************************************
*                                                                        *
*    4images - A Web Based Image Gallery Management System               *
*    ----------------------------------------------------------------    *
*                                                                        *
*             File: comments_all.php Version 1.4                         *
*        Copyright: (C) 2002 Jan Sorgalla                                *
*            Email: jan@4homepages.de                                    *
*              Web: http://www.4homepages.de                             *
*    Scriptversion: 1.7.x                                                *
**************************************************************************
*    Die comments_all.php ist nicht Bestandteil des Originalscripts !    *
*    Erstellt durch : mawenzi - www.detlev-kostka.de                     *
*                   : loda    - www.loda.de ... Danke !                  *
*                                                                        *
*************************************************************************/


$main_template 'comments_all';
$templates_used 'comments_all_bit';

define('GET_CACHES'1);
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();
include(
ROOT_PATH.'includes/page_header.php');

   if (isset(
$HTTP_POST_VARS['commentsetperpage']) || isset($HTTP_GET_VARS['commentsetperpage'])) {
     
$commentsetperpage = (intval($HTTP_POST_VARS['commentsetperpage']) ) ? intval($HTTP_POST_VARS['commentsetperpage']) : intval($HTTP_GET_VARS['commentsetperpage']);
     if (
$commentsetperpage) {
       
$site_sess->set_session_var("commentperpage"$commentsetperpage);
       
$session_info['commentperpage'] = $commentsetperpage;
     }
   }

   if (isset(
$session_info['commentperpage'])) {
     
$commentperpage $session_info['commentperpage'];
   }
   else {
     
$commentperpage 10;
   }
   
$commentsperpage_dropdown "\n<select name=\"commentsetperpage\" onchange=\"if (this.options[this.selectedIndex].value != 0){ forms['commentsperpage'].submit() }\" class=\"select\">\n";
   for(
$i 1$i <= 20$i++) {
     
$setvalue $i;
     
$commentsperpage_dropdown .= "<option value=\"".$setvalue."\"";
       if (
$setvalue == $commentperpage) {
       
$commentsperpage_dropdown .= " selected=\"selected\"";
     }
     
$commentsperpage_dropdown .= ">";
     
$commentsperpage_dropdown .= $setvalue;
     
$commentsperpage_dropdown .= "</option>\n";
   }
   
$commentsperpage_dropdown .= "</select>\n";

   
$site_template->register_vars("commentsperpage_dropdown"$commentsperpage_dropdown);
   
$commentsperpage_dropdown_form $site_template->parse_template("commentsperpage_dropdown_form");
   
$site_template->register_vars("commentsperpage_dropdown_form"$commentsperpage_dropdown_form);

   
$cat_id_sql get_auth_cat_sql("auth_viewcat""NOTIN").", ".get_auth_cat_sql("auth_readcomment""NOTIN").", ".get_auth_cat_sql("auth_viewimage""NOTIN");

   if (isset(
$HTTP_GET_VARS['user_id']) and $HTTP_GET_VARS['user_id'] != ""){
    
$add_where "WHERE c.user_id IN (".$user_id.") AND i.cat_id NOT IN ($cat_id_sql)";
   }else{
    
$add_where "WHERE i.cat_id NOT IN ($cat_id_sql)";
   }

   
$sql "SELECT COUNT(*) AS comments
       FROM "
.COMMENTS_TABLE." c
       LEFT JOIN "
.IMAGES_TABLE." i ON (i.image_id = c.image_id)
       WHERE i.cat_id NOT IN (
$cat_id_sql)";
   
$result $site_db->query_firstrow($sql);
   
$site_db->free_result();
   
$num_comments $result['comments'];
   if (
$action == "postcomment") {
      
$page ceil($num_comments $commentperpage);
   }
   
$num_rows_all = (isset($num_comments)) ? $num_comments 0;
   
$link_arg $site_sess->url(ROOT_PATH."comments_all.php");
   include(
ROOT_PATH.'includes/paging.php');
   
$getpaging = new Paging($page$commentperpage$num_rows_all$link_arg$lang['comment_stats'], "comments");
   
$offset $getpaging->get_offset();
   
$site_template->register_vars(array(
     
"paging" => $getpaging->get_paging(),
     
"paging_stats" => ($num_comments) ? $getpaging->get_paging_stats() : ""
   
));

  
$sql "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_date".get_user_table_field(", u.""user_level")."
          FROM "
.COMMENTS_TABLE." c
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = c.user_id)
          LEFT JOIN "
.IMAGES_TABLE." i ON (i.image_id = c.image_id) ".$add_where."
          ORDER BY c.comment_date DESC
          LIMIT 
$offset$commentperpage";

  
$result $site_db->query($sql);
  
$comment_row = array();
  while (
$row $site_db->fetch_array($result)) {
    
$comment_row[] = $row;
  }
  
$site_db->free_result($result);
  
$num_comments sizeof($comment_row);
  if (!
$num_comments) {
    
$comments_all "<tr><td class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
  }
  else {
    
$comments_all "";
    
$ii 1;
    for (
$i 0$i $num_comments$i++) {
      
$image_id $comment_row[$i]['image_id'];
      
$sql "SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file".get_user_table_field(", u.""user_id").get_user_table_field(", u.""user_level").get_user_table_field(", u.""user_name")."
             FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
             LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id) 
             "
.$add_where."
             AND i.image_id = "
.$image_id." AND c.cat_id = i.cat_id ";
      
$image_row $site_db->query_firstrow($sql);
      
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
      
$comment_counter $num_rows_all-(($i+1+($page-1)*$commentperpage)-1);
      if (
check_permission("auth_readcomment"$cat_id)){
      
$comment_user_name htmlspecialchars($comment_row[$i]['comment_user_name']);
      
$comment_user_id $comment_row[$i]['user_id'];
      
$user_row_comment get_user_info($comment_user_id);
      
$comment_user_profile_link "";
      
$comment_user_info $lang['userlevel_guest'];
        if (!isset(
$comment_row[$i][$user_table_fields['user_level']]) || (isset($comment_row[$i][$user_table_fields['user_level']]) && $comment_row[$i][$user_table_fields['user_level']] == USER)) {
          
$comment_user_info $lang['userlevel_user'];
        }
        elseif (
$comment_row[$i][$user_table_fields['user_level']] == ADMIN) {
          
$comment_user_info $lang['userlevel_admin'];
        }
      if ( 
$user_info['user_level'] == GUEST ) {
         
$comment_user_profile_link "";
      } else {
         
$comment_user_profile_link $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$comment_user_id);
      }
      
$comment_user_profile_link = ($comment_user_profile_link) ? "<a href=\"".$comment_user_profile_link."\">".$comment_user_name."</a>" $comment_user_name;


      if (!
get_file_path($image_row['image_thumb_file'], "thumb"$image_row['cat_id'], 00)) {
        
$thumb_file ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
      }else {
        
$thumb_file get_file_path($image_row['image_thumb_file'], "thumb"$image_row['cat_id'], 01);
      }
      
$thumb_info = @getimagesize($thumb_file);
      
$width $thumb_info[0];
      
$height $thumb_info[1];
      
$dimension 100;
      
$ratio $width $height;
      if (
$ratio 1) {
        
$new_width $dimension;
        
$new_height floor(($dimension/$width) * $height);
      }else {
        
$new_width floor(($dimension/$height) * $width);
        
$new_height $dimension;
      }
      
$text $comment_row[$i]['comment_text'];
      
$text format_text($text$config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
      
$admin_links "";
      if (
$user_info['user_level'] == ADMIN) {
        
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;";
        
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['delete']."</a>";
      }
      
$sql "SELECT COUNT(*) AS total_image_comments FROM ".COMMENTS_TABLE." WHERE image_id = ".$image_id."";
           
$row $site_db->query_firstrow($sql);
           
$total_image_comments $row['total_image_comments'];

      
$site_template->register_vars(array(
        
"total_image_comments" => $total_image_comments,
        
"comment_counter" => $comment_counter,
        
"comment_image_thumb" => (!check_permission("auth_viewcat"$cat_id) || !check_permission("auth_viewimage"$cat_id)) ? "<img src=\"".$thumb_file."\" width=\"".$new_width."\" height=\"".$new_height."\" onClick=\"alert('".((isset($lang['auth_alert'][$cat_id])) ? $lang['auth_alert'][$cat_id] : $lang['auth_alert']['default'])."');\" border=\"".$config['image_border']."\">" "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode ""))."\"><img src=\"".$thumb_file."\" width=\"".$new_width."\" height=\"".$new_height."\" border=\"".$config['image_border']."\"></a>",
        
"comment_image_name" => (!check_permission("auth_viewcat"$cat_id) || !check_permission("auth_viewimage"$cat_id)) ? $image_row['image_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode ""))."\">".$image_row['image_name']."</a>",
        
"comment_cat_name" => (!check_permission("auth_viewcat"$cat_id)) ? $image_row['cat_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\">".$image_row['cat_name']."</a>",
        
"comment_user_name" => $comment_user_profile_link,
        
"comment_user_info" => $comment_user_info,
        
"comment_headline" => format_text($comment_row[$i]['comment_headline'], 0$config['wordwrap_comments'], 0011),
        
"comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1),
        
"comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
        
"image_user_name" => ($image_row[$user_table_fields['user_level']] != GUEST) ? "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$image_row[$user_table_fields['user_id']])."\">".htmlspecialchars($image_row[$user_table_fields['user_name']])."</a>" $lang['userlevel_guest'],
        
"admin_links" => $admin_links,
        
"lang_variable_text" => $lang['variable_text'],
        
"lang_navigation" => $lang['navigation'],
        
"lang_com_per_page" => $lang['com_per_page'],
        
"lang_com" => $lang['com'],
        
"lang_for_image" => $lang['for_image'],
        
"lang_in_cat" => $lang['in_cat'],
        
"lang_com_date" => $lang['com_date'],
        
"lang_com_by" => $lang['com_by'],
        
"lang_com_to_this" => $lang['com_to_this'],
        
"lang_com_total" => $lang['com_total']
      ));
      
$comments_all .= $site_template->parse_template("comments_all_bit");
     }
    }
  }
  
$site_template->register_vars("comments_all"$comments_all);
  unset(
$comments_all);

//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['all_comments']."</span>";
$site_template->register_vars("clickstream"$clickstream);

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->print_template($site_template->parse_template($main_template));
include(
ROOT_PATH.'includes/page_footer.php');
?>



Oder hier, die comments_all.html

Code: [Select]
{header}
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>
<table cellpadding="0" cellspacing="0"  width="100%" border="0" bgcolor="#000000">
 <tr>
  <td width="100%">
   <table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="100%" height="62" background="{template_url}/images/bbcell.gif">
    <tr>
     <td width="50%" align="left"><img src="{template_url}/images/banner_1.gif" width="547" height="38" align="center" alt="" /></td>
     <td width="50%" align="right" >
<form method="post" action="{url_search}">
              <table border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td>
                    <input type="text" name="search_keywords" size="15" class="searchinput" />
                  </td>
                  <td>
                    <input type="submit" value="{lang_search}" class="button" name="submit" />&nbsp;
                  </td>
                </tr>
                <tr valign="top">
                  <td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td>
                </tr>
              </table>
            </form>
     </td>
   </tr>
  </table>
</td>
</tr>
</table>
     

    </td>
  </tr>
  <tr>
    <td class="bordercolor">
      <table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td class="tablebgcolor">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
    <td class="navbar" height="23">
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td align="left" width="50%">
        <img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />Your Site's Name here ?
       </td>
       <td align="right" width="50%">
     
        <a href="comments_all.php"><b>Alle Kommentare</b></a>&nbsp;
        <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
        <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;&nbsp;
       </td>
      </tr>
     </table>
    </td>
   </tr>
  </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="150" class="row2" valign="top">
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">{user_box} </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
  {if random_image}
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">
    <br />
                        {random_image}
<br />
                        <br />
                      </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
{endif random_image}
                  <p align="center">
                    <?php
                    
echo date("d.m.Y, H:i"); 
        ?>

                  </p>
<?php include("4darkm.php"); ?>
                  <br />
                </td>
                <td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
                <td width="18" valign="top"><img src="{template_url}/images/spacer.gif" width="18" height="18" alt="" /></td>
                <td width="450" valign="top"><br />
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="title">{lang_all_comments}</span></td>
<td align="right" valign="bottom">
</td>
</tr>
</table>
<hr size="1" />
<br />
{lang_variable_text}
<br />
{if paging}{if paging_stats}
         <table width="100%" border="0" cellspacing="1" cellpadding="0" class="head2">
            <tr>
               <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="3">
                     <tr>
                        <td width="65%" class="row1" valign="middle">
                           {paging_stats}
                        </td>
                        <td width="30%" class="row1" valign="middle" align="right">
                           {lang_com_per_page}
                        </td>
                        <td width="5%" class="row1" valign="top" align="right">
                           {commentsperpage_dropdown_form}
                        </td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
      <br />
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="head2">
            <tr>
               <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="3">
                     <tr>
                        <td class="row1" valign="top" align="left">{lang_navigation}</td>
                        <td class="row1" valign="top" align="right">{paging}</td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
      <br />
{endif paging_stats}{endif paging}
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  {comments_all}
</td></tr></table>
<br />
{if paging}
         <table width="100%" border="0" cellspacing="1" cellpadding="0" class="head2">
            <tr>
               <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="3">
                     <tr>
                        <td class="row1" valign="top" align="left">{lang_navigation}</td>
                        <td class="row1" valign="top" align="right">{paging}</td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
      <br />
{endif paging}

                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>{category_dropdown_form}</td>
                      <td align="right">{setperpage_dropdown_form}</td>
                    </tr>
                  </table>
                  <p>&nbsp;</p>
                </td>
<td width="19" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="19" height="19" /></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
     
    </td>
  </tr>
</table>
{footer}
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on February 23, 2009, 06:01:02 PM
@Streetlife ...

... deine Links zeigen die "Index-Seite" und die "Alle Kommentrare-Seite" ...
... das die eine Seite nicht so aussieht wie die andere Seite dürfte allein vom Inhalt her klar sein ...
... so wie ich gesehen habe, wird der Inhalt der "Alle Kommentrare-Seite" korrekt angezeigt ...
... alles weitere sind somit anpassungen in deinem Template ...

... konkret ... worin siehst du nun ein Problem ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Streetlife on February 23, 2009, 06:15:23 PM
Das das aussehen der Seiten ein bischen anders ist wegen dem Inalt is mir ja klar, hab ich auch kein Problem damit...


Was ich meinte is Links wo die Login felder und unten die Links sind, das ist bei Alle Kommentare größer als überall woanders... Und dadurch verschieben sich die Links nach links, und das stört mich ein wenig...

Ich hab als Link nur die Index page genommen damit man auch sehen kann was ich meine...


Verstehst jetzt was ich meinte???
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on February 23, 2009, 06:25:56 PM
... entsprechend meiner Beschreibung hast du deine error.html als Grundlage für deine neue comments_all.html übernommen ... ?
... folglich muss dieser Wurm bereits in der error.html vorhanden sein ... nur das du diese sicher nicht so oft zu Gesicht bekommst ...
... um nicht alle Fehler aus diesem Template heraussuchen zu müssen ...
... verwende ein anderes Template als Grundlage für die comments_all.html ...
... z.B. die top.html ...
... ansonsten die Seite nach html-Abweichungen (tab-Breiten ... u.s.w) untersuchen und ggf. ändern ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Streetlife on February 23, 2009, 06:56:57 PM
Alles klar, ich halte mich erstmal an die sache mit der top.html...


Danke!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: darkcurves on March 10, 2009, 04:30:41 AM
How can i display the old comments first at details.php? I have attached a screenshot. As you can see, the new posts are on top. I think that is confusing for visitors. Any help would be appreciated! Thanks  :D
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: V@no on March 10, 2009, 04:42:58 AM
In comments_all.php replace
Code: (MySQL) [Select]
          ORDER BY c.comment_date DESC
With:
Code: (MySQL) [Select]
          ORDER BY c.comment_date ASC
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: darkcurves on March 10, 2009, 06:43:31 AM
Thanks for the reply but i meant at details.php. The new comments seem to be on the top like Youtube. It'd be better if the first comment is on the top like forums.  :)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: V@no on March 10, 2009, 07:10:55 AM
Then in details.php replace:
Code: (MySQL) [Select]
          ORDER BY c.comment_date ASC";
with:
Code: (MySQL) [Select]
          ORDER BY c.comment_date DESC";
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: darkcurves on March 10, 2009, 07:58:51 AM
Perfect. Thanks Vano!  :D
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on March 10, 2009, 08:06:16 AM
@darkcurves

... your request has nothing to do with [MOD] All Comments ... right ? ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: darkcurves on March 10, 2009, 08:11:40 AM
I have no idea. After installing this mod on both my galleries, the first comment goes down.

Oh wait, maybe because of the other paging mod, didn't realise at all.  :oops:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: 4ella on May 28, 2009, 01:43:49 PM
It worked immediately and fantastic , thanks for very nice tutorial Mawenzi.
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on May 28, 2009, 02:55:41 PM
@4ella

... thanks for your statement ... ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: nameless on June 08, 2009, 04:18:20 AM
Nice Mod
Thanks mawenzi for this mod it works fine

i need something and sorry for my bad English

my gallery have 15 main cat
so your mod dispaly all comments for all 15 cat

i need not to display all comments for all 15 cat but i want to chose which cat to display all comments for it

i hope you understand me

and thanks againe for this mod
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on June 11, 2009, 09:16:09 AM
@ nameless

1. thanks for your statement ..

2. in comments_all.php find  ...
Code: [Select]
".get_auth_cat_sql("auth_viewimage", "NOTIN");

and replace with ...
Code: [Select]
".get_auth_cat_sql("auth_viewimage", "NOTIN").", 1, 2, 3";

where the numbers 1, 2, 3 are your cat_id's you won't show ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Sebas Bonito on July 11, 2009, 06:39:26 PM
Thx for this great mod  :!:

One Point:

If an user doesn't exist with a profile, BUT has written a comment, the mod will show the user's name with a link. How to avoid this? (cause there is actually no profile)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on July 12, 2009, 07:29:46 PM
@Schnick und Schnack

... zunächst : Danke für dein Statement zu dieser Modifikation ... ;)
...
... und weiter :  ich kann deine Problemstellung nicht ganz nachvollziehen ...
... wenn ein User einen Kommentar geschrieben hat, so muss für ihn auch eine Profil vorhanden sein ... der Link ist also gerechtfertigt ...
... es kann natürlich sein, dass der User in seinem Profil keinerlei zusätzliche Infos hinterlegt hat ...
... doch das zu prüfen ist nicht Inhalt und Zielsetzung dieser Modifikation ...
...
... oder habe ich dich da total falsch verstanden ... ?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Sebas Bonito on July 12, 2009, 09:52:21 PM
@Schnick und Schnack

... zunächst : Danke für dein Statement zu dieser Modifikation ... ;)
...
... und weiter :  ich kann deine Problemstellung nicht ganz nachvollziehen ...
... wenn ein User einen Kommentar geschrieben hat, so muss für ihn auch eine Profil vorhanden sein ... der Link ist also gerechtfertigt ...
... es kann natürlich sein, dass der User in seinem Profil keinerlei zusätzliche Infos hinterlegt hat ...
... doch das zu prüfen ist nicht Inhalt und Zielsetzung dieser Modifikation ...
...
... oder habe ich dich da total falsch verstanden ... ?

Nabend,
ja, haste falsch verstanden  :wink:

wenn Du eine Kategorie erstellst oder bearbeitest, gibt es folgenden Einstellung:

(http://www.bilder-hochladen.net/files/bn9m-3.jpg)

Also jemand, der einen Kommentar geschrieben hat, muss nicht zwangsläufig ein Profil besitzen  8O
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: Sun on August 05, 2009, 02:17:52 PM
Thank you for this mod :)

I found one error: i can see negative number (for example -8, -7 etc.) in the number of comment.
For examle, you can see it in MOD-Demo:
1. choose 1 comment per page
2. choose last page with comments
3. choose 3 comment per page
after this steps you will be on the first(!) page and number of comment will be "-1223"
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on August 05, 2009, 02:58:08 PM
Hello Sun ...

... thanks for your statement to this mod ... ;)
... and you are right ... this is a bug ... I've never seen before, these negativ numbers ...
... I will try to find the reason of this bug ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: V@no on August 06, 2009, 04:41:11 AM
this line is extra and not needed  $num_comments = sizeof($comment_row);

also   if (!$num_comments) {
    $comments_all = "<tr><td class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
  }
  else {


should be move up, above
  $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_date".get_user_table_field(", u.", "user_level")."
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.4
Post by: mawenzi on August 06, 2009, 03:22:15 PM
... so, bin dabei einige kleine Bugs zu beseitigen ... ;)

@Sebas Bonito bzw. Schnick und Schnack  :roll:

... mit dem Profillink für Gäste hast du natürlich Recht ...
... mit folgender Änderung werden bei Kommentareinträgen von Gästen deren Namen nicht mehr als Link zum Profil angezeigt ...
... finde in comments_all.php ...

      if ( $user_info['user_level'] == GUEST ) {
         $comment_user_profile_link = "";
      } else {
         $comment_user_profile_link = $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$comment_user_id);
      }
      $comment_user_profile_link = ($comment_user_profile_link) ? "<a href=\"".$comment_user_profile_link."\">".$comment_user_name."</a>" : $comment_user_name;


... und ersetzte es durch ...

     if ( $user_info['user_level'] == GUEST ) {
         $comment_user_profile_link = "";
      } else {
             if ( $comment_user_id == -1 ) {
                  $comment_user_profile_link = "";
             } else {
                  $comment_user_profile_link = $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$comment_user_id);
             }
      }
      $comment_user_link = ($comment_user_profile_link) ? "<a href=\"".$comment_user_profile_link."\">".$comment_user_name."</a>" : $comment_user_name;


... im MOD-Post auf der ersten Seite erfolgte ein Update ...


@Sun

... I can't find any solution ...  :?
... maybe there is a bug in my paging class ... in includes/paging.php ...

@V@no

... I think, $num_comments is very needed ...
... and your $sql - hint ... I can't understand it ...
... will your hints resolved the paging bug ... ?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.5
Post by: V@no on August 06, 2009, 04:23:53 PM
... I think, $num_comments is very needed ...
You are right, my bad.

... and your $sql - hint ... I can't understand it ...
... will your hints resolved the paging bug ... ?
Well, I figured, since you have two mysql queries, first one is counting how many comments are available, then why would you want execute second query in case no comments available. It's just a little optimization.

As of the bug. Since selected page is not always correct, then $page should not be used for determine current number of a comment.
try replace
      $comment_counter = $num_rows_all-(($i+1+($page-1)*$commentperpage)-1);

with something like this:
      $comment_counter = $offset+$i+1;
 
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.5
Post by: mawenzi on August 06, 2009, 04:57:13 PM
... the "comment counter" ... we are on the right way ...
... the counter should display "Nr.1" for the first comment and e.g. "Nr.615" for the latest comment ...
... your counter code display display "Nr.615" for the first comment and "Nr.1" for the latest comment ...
... so I try the following counter code with success and without the bug Sun has shown ...

$comment_counter = $num_rows_all-($offset+$i);

... thanks V@no for your right hint ... ;)

... I've updated the first MOD-post ... it's now "All Comments Version 1.6" ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: Sun on August 06, 2009, 05:08:16 PM
Thank you, mawenzi, V@no. It's work.  :)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on August 06, 2009, 05:13:04 PM
Thank you, mawenzi, V@no. It's work.  :)

... nice to read ... ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: V@no on August 07, 2009, 02:18:04 AM
@mawenzi: the bug is still on your site ;)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on August 07, 2009, 10:04:58 AM
@V@no
... are you shure ... ?
... with the test, Sun has suggested ... I can't find the old paging bug ... the problem was solved ...
... maybe there is another, new one ... but I can't find it ...
... perhaps therefor we need a new test ... ;)


PS. ... I think your (one site)-test was from your cache ...  :mrgreen:
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: Sun on August 07, 2009, 11:24:51 AM
... with the test, Sun has suggested ... I can't find the old paging bug ... the problem was solved ...
... perhaps therefor we need a new test ... ;)

Yesterday i try it in my site. Now i test it at mawenzi site. I can't repeat this error. All works.  :)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on August 07, 2009, 11:34:03 AM
@Sun

... thanks for your testings and your statement ... :)
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: nameless on October 27, 2009, 10:05:25 AM
hi nice mod

but i need  -- All Comments in catagory

show all comments in a catagory

thanks
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on October 27, 2009, 11:10:27 AM
@nameless

... are there so much comments in your gallery ... ?
... btw. that needs some code-changes and changes in the sql-querys ...
... and sould this work from a link in the category ... ?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: nameless on October 27, 2009, 12:36:24 PM
hi mawenzi

for example

i have 5 cat
now in this mod i will see all Comments

but if the user need to see all Comments in cat2 only becouse he is not intrested to see Comments for the other 4 cat

i hope u understand me

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on October 27, 2009, 02:17:11 PM
@ nameless and all ...
... die Erweiterung : Alle Kommentare einer Kategorie ist online ....
... the extension : All comments of a category is online ...


@ nameless
... thanks for pointing me in a new direction with this modification ...
... after installing and testing "All comments of a category" in my gallery I can say ... a very useful extension ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: d1eter on February 18, 2010, 03:18:53 AM
hello mawenzi..,

I tried to apply this All Comments mod to my community gallery (http://www.batamphotoclub.org/gallery/comments_all.php)

there's one small strange thing..
the posted by:

if a registered user looks at the page it displays like this:
(http://i18.photobucket.com/albums/b104/d1eter/4images-comm-01.jpg)

for a guest (non-regsitered) it displays like this:
(http://i18.photobucket.com/albums/b104/d1eter/4images-comm-02.jpg)

for any other page the {comment_user_name} displays the correct value, just in this comments_all.php (comments_all.html) which shows like this..

please help.
thank you!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on February 18, 2010, 10:07:44 AM
@d1eter ...

... at all installations of "All Comments" I saw this fault the first time ...
... and at the moment I can't reproduce this mistake in the php-code ...
... please double check the lines No 137 - 140 and 177 of the mod-code ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: d1eter on February 18, 2010, 10:18:08 AM
hi mawenzi..

this is line 131-140
Code: [Select]
     if ( $user_info['user_level'] == GUEST ) {
         $comment_user_profile_link = "";
      } else {
             if ( $comment_user_id == -1 ) {
                  $comment_user_profile_link = "";
             } else {
                  $comment_user_profile_link = $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$comment_user_id);
             }
      }
      $comment_user_link = ($comment_user_profile_link) ? "<a href=\"".$comment_user_profile_link."\">".$comment_user_name."</a>" : $comment_user_name;

and this is line 177
Code: [Select]
        "comment_user_name" => $comment_user_profile_link,

which one should I pay attention..

sorry.. my php knowledge is very poor...
 :cry:

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on February 18, 2010, 11:39:08 AM
... line No 177 ...

"comment_user_name" => $comment_user_profile_link,


... replace with ...

"comment_user_name" => $comment_user_link,
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: d1eter on February 19, 2010, 02:06:11 AM
bulls-eye..!!

thank you very much..!!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: surferboy on April 27, 2010, 04:40:23 AM
Hi -

Using v1.7.7  The MOD is operating perfectly and with some tweaking as Manwenzi indicated, got the look I wanted in my templates.  I had previously installed the page comments and universal paging MOD's.  At first I was troubled at not seeing the universal paging but I wondered if my few number of comments might be the cause. I only had 6 comments recorded and these were my comments_all.php  settings:

# Comments per page : standard = 10 ; change through - $commentperpage =  10; -->12(default vs. what I had mine set at)
# Min. Comments per page : standard = 1 ; change through - for($i = 1; $i <=  20;  --> 1
# Max. Comments per page : standard = 20 ; change through - for($i = 1; $i <=  20;  --> 18

So I started pushing the comments and once I got to 13 comment recorded, yes my comment drop down menu appeared at the top and at the bottom although a little ungainly in appearance at the top with two bars and the first table bar directly below the lang_variable_text even though I have a <br /> character afterwards. It looks so sweet if the comment dropdown doesn't appear but once I push the comments to 13, it begins to look a little monstrous. I took Manwezi's code and changed it slightly:

Quote
<table width="828" border="0" cellspacing="12" cellpadding="0" class="maincat" >
      <span class="title">{lang_all_comments}</span>
<hr size="1" />
{lang_variable_text}
<br />
{if paging}{if paging_stats}
         <table width="828" border="0" cellspacing="1" cellpadding="0" class="head2">
            <tr>
               <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="3">
                     <tr>
                        <td width="65%" class="row1" valign="left">
                           {paging_stats}
                        </td>
                        <td width="30%" class="row1" valign="middle" align="right">
                           {lang_com_per_page}
                        </td>
                        <td width="5%" class="row1" valign="top" align="right">
                           {commentsperpage_dropdown_form}
                        </td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
      <br />
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="head2">
            <tr>
               <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="3">
                     <tr>
                        <td class="row1" valign="top" align="left">{lang_navigation}</td>
                        <td class="row1" valign="top" align="right">{paging}</td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
      <br />
{endif paging_stats}{endif paging}

Has anyone finessed this paging code so you don't have two table bars right there at the top? Or at least made it a little more elegant as one piece instead of 2 table bars?

Thanks for all the work on the MOD. I read through all 17 pages of the comments and I see you incorporated a number of the suggestions in the MOD updates you created.  It truly is hard to improve on perfection here!

- Brian
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on April 27, 2010, 10:00:02 AM
@surferboy ...

... first ... thanks for your statement ...
...
... there are two table bars because there is to much content for only one table bar ...
... and so I think it is a elegant way and we use this way since we use [MOD] Paging for Comments ...
... but you can customise the bars, so that the paging stats are not showing in a bar but only as a text above the bar ...
... and you can put the commentsperpage dropdown form in the second bar ...
... so was my hint for all ...
... Of course is template designing your part. ...
... and all tags you can use for your customizing are listed separately in the first post ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: waddledee1337 on August 23, 2010, 12:27:51 AM
hi leute,

erstmal danke für diesen saugeilen mod!

ich habe nur noch ein kleines problem: wenn einer ein kommentar postet wird ganz unten beim autor angezeigt: "gepostet von : : ./member.php?action=showprofile&user_id=4 [Member]"

- wie kann ich einstellen, dass der name angezeigt wird? (sry kenn mich da nicht so gut aus^^)

mfg Flavi
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on August 23, 2010, 07:09:24 PM
bin zwar nicht leute ...

aber überprüfe nochmals die Zeilen 124 - 140 aus deiner comments_all.php anhand meiner aktuellen comments_all.php ...

und sehe dir mal diese Fragestellung an :
http://www.4homepages.de/forum/index.php?topic=10632.msg145673#msg145673

und auch die Antwort dazu :
http://www.4homepages.de/forum/index.php?topic=10632.msg145679#msg145679
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: Tino23 on September 14, 2010, 09:03:57 PM
Eine Hinweis für alle die den MOD http://www.4homepages.de/forum/index.php?topic=10632.msg87034#msg87034 (http://www.4homepages.de/forum/index.php?topic=10632.msg87034#msg87034) eingebaut haben, ihr müßt die gleichen Änderrungen auch in der comments_cat.php machen, damit der Link [Alle Kommentare des Users] dort auch angezeigt wird  :!:

Hab das gerade auch erst bemerkt  :wink:


Noch eine kleine Frage. Die Anzeige des Links ( Alle Kommentare der Kategorie ) kann man die irgendwie in den Ordnern verbergen, in dem keine Bilder sind und sich nur Unterordner befinden?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: surferboy on September 14, 2010, 09:58:09 PM
Yikes, this is a situation where Google translate drops the ball.

I tried to use the Google translate to read Tino's message and it is so jumbled and backwards, I have no idea what he is talking about.

Could someone summarize in english his post/problem or finding? It sounds important.

Thanks,

Brian
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on September 14, 2010, 11:02:57 PM
Um den Link "Alle Kommentare der Kategorie" für Kategorien ohne Bilder (und damit logischer Weise auch ohne Kommentare) gleich von vornherein auszublenden wäre das dann Folgende zu erledigen ... Wenn diese Änderung nicht ausgeführt wird, dann wird über den Link die "Kommentarseite" mit dem Hinweis "noch keine Kommentare" angezeigt ... also dann auch logisch ...

Hier also die mögliche Änderung :

1. in der categories.php finde :

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------

und füge davor ein :

if ($num_rows_all == "0") {
$link_cat_comments = " ";
} else {
$link_cat_comments = "<a href=\"".$site_sess->url(ROOT_PATH."comments_cat.php?cat_id=".$cat_id)."\" title=\"Alle Kategorie-Kommentare anzeigen\"><b>Alle Kategorie-Kommentare</b></a>";
}


2. In der categories.php finde :

"link_cat_comments" => "<a href=\"".$site_sess->url(ROOT_PATH."comments_cat.php?cat_id=".$cat_id)."\">Alle Kommentare der Kategorie</a>",

und ersetzte es durch :

"link_cat_comments" => $link_cat_comments,

Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: V@no on September 14, 2010, 11:29:39 PM
:offtopic:
Yikes, this is a situation where Google translate drops the ball.

I tried to use the Google translate to read Tino's message and it is so jumbled and backwards, I have no idea what he is talking about.

Wow the difference in google translation versus bing...amazing how well bing translated that post
http://www.microsofttranslator.com/bv.aspx?from=&to=en&a=http%3a%2f%2fwww.4homepages.de%2fforum%2findex.php%3ftopic%3d10632.msg150519%3btopicseen
I've got to add bing translation support to our page translation script :D
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on September 15, 2010, 12:37:08 AM
(http://www.4homepages.de/forum/Smileys/default/offtopic.gif)

... before a user want to translate something with google, the source should already be correct in its own language ...
... but the user of the google-translator can't know that ...
... that can be a problem ... also for google ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: Tino23 on September 15, 2010, 08:08:30 PM
@mawenzi  danke, war genau die Lösung nach der ich noch gesucht habe :D

Wie kann ich denn in den PHP Code meine Tabelle mit Einbinden, damit sie auch nur angezeigt wird, wenn Kommentare vorhanden sind, wie jetzt beim Link?
Kann man das so machen?
Code: [Select]
$link_cat_comments = "<br /><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" class=\"head2\"><tr><td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\"><tr><td class=\"row1\" valign=\"top\" align=\"middle\"><a href=\"".$site_sess->url(ROOT_PATH."comments_cat.php?cat_id=".$cat_id)."\" title=\"Alle Kategorie-Kommentare anzeigen\"><b>Alle Kategorie-Kommentare</b></a></td></tr></table></td></tr></table>";   
                        
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: bergblume on December 12, 2010, 09:49:31 PM
hallo zusammen,

super MOD , den ich bereits seit geraumer zeit verwende...

ich habe nun folgende Idee: ist es möglich, dass man auf der Seite comments_all.php ein Kommentarfeld (Kommentarbox) einbaut und man somit direkt von dieser Seite kommentare abgeben kann? das beste wäre hier natürlich, dass bei eingabe der Überschrift (via autodetect oder ähnliches) bereits vorhandene Bilder mit der Überschrift erkannt werden und die Kommentare hier dann auch auf den detailseiten erscheinen.. alle anderen - über die überschrift - nicht zuordbaren Kommentare werden dann als "Kategorienlos" bezeichnet und tauchen nur auf der comments_all.php-Seite auf...

wäre klasse wenn sich das realisieren ließe...

Gruss, bergblume
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on December 13, 2010, 10:21:21 AM
wäre klasse wenn sich das realisieren ließe...

... antworten von der "Alle Kommentare Seite" lässt sich realisieren ...
... doch müssen die Kommentare immer Bildern zugeordnet sein ( "kategorielos" -> nein -> und warum auch ? ) ...
... die Antwort direkt auf Kommentare wäre noch möglich ->[MOD] Answers in Comments like on YouTube  (http://www.4homepages.de/forum/index.php?topic=23498.msg130641#msg130641) ...
... und damit die Antwortmöglichkeit auch optisch direkt dem Kommentar / dem Bild zugeordnet wird, sollte ein "Mini-Kommentarfeld" zu jedem Kommentar ( in der comments_all_bit.html ) via Toggle-Funktion ausklappbar sein ( verwende ich analog in "My Photo-Blog (http://klick.kl.funpic.de/photoblog.php)" )  ...
... so ließe sich komfortabel beim Lesen "Aller Kommentare" sofort antworten ...
... ja, der Gedankenansatz hat was ... werde es mal testen ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: bergblume on December 13, 2010, 10:25:17 AM

... doch müssen die Kommentare immer Bildern zugeordnet sein ( "kategorielos" -> nein -> und warum auch ? ) ...


hi mawenzi,

danke für deine anmerkungen zu meiner idee... da hast du natürlich recht... es ist natürlich einfacher und auch stimmiger wenn die kommentare dann z.B. einem dummy-Bild (das dann z.B. "allgemeine Bilder" lautet() zugeordnet werden kann... das ergebnis ist ja dann letztlich dasgleiche... würde mich sehr freuen, wenn du da ne lösung für hinbekommen könntest.

Viele Grüße einstweilen!
bergblume
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: bergblume on January 19, 2011, 08:09:48 PM
wäre klasse wenn sich das realisieren ließe...

... antworten von der "Alle Kommentare Seite" lässt sich realisieren ...
... doch müssen die Kommentare immer Bildern zugeordnet sein ( "kategorielos" -> nein -> und warum auch ? ) ...
... die Antwort direkt auf Kommentare wäre noch möglich ->[MOD] Answers in Comments like on YouTube  (http://www.4homepages.de/forum/index.php?topic=23498.msg130641#msg130641) ...
... und damit die Antwortmöglichkeit auch optisch direkt dem Kommentar / dem Bild zugeordnet wird, sollte ein "Mini-Kommentarfeld" zu jedem Kommentar ( in der comments_all_bit.html ) via Toggle-Funktion ausklappbar sein ( verwende ich analog in "My Photo-Blog (http://klick.kl.funpic.de/photoblog.php)" )  ...
... so ließe sich komfortabel beim Lesen "Aller Kommentare" sofort antworten ...
... ja, der Gedankenansatz hat was ... werde es mal testen ...

hallo zusammen, kann mir hier jmd. mit einem "Lösungs-Code" für die obige Anforderung weiterhelfen?
Vielen dank im voraus an euch experten!
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: FotoRalle on February 14, 2011, 05:26:28 PM
Kann ein User bei diesem Mod sehen, ob er neue Kommentare zu seinen eigenen Bildern bekommen hat?
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on November 16, 2011, 06:17:55 PM
@FotoRalle
... leider aus gewissen Gründen etwas später ...
...
... wenn deine User für ihre Bilder eigene Kategorien verwenden, dann ... JA ...
... mit der Erweiterung "Alle Kategorie-Kommentare" kann sich der User dann die Kommentare zu seinen Bildern zeitlich geordnet anzeigen lassen ...
... und so hat er immer den Blick auf die letzten Kommentare zu seinen Bildern ...
Title: Re: [MOD] All Comments (Alle Kommentare) V.1.6
Post by: mawenzi on January 08, 2012, 04:59:08 PM
@Ivan ...

... ich kann deine Frage nicht ganz nachvollziehen. Wenn keine Kommentare vorhanden sind ( insgesamt oder je Kategorie ), dann werden doch auch keine Kommentrare angezeigt, bzw. eben die Info "keine kommentare" wird angezeigt. Was soll also an Tabellen ausgeblendet werden ? Wenn du hier etwas entfernen oder hinzufügen willst, dann kannst du das direkt in der comment_all.php unmittelbar nach "if (!$num_comments)" oder in der main.php unter "$lang['no_comments'] = "Keine Kommentare";" editieren. Willst du irgend etwas anderes im Template ausblenden, falls keine Kommentare vorhanden sind, so könnte man dazu den Tag "Kommentar_Counter" verwenden. Etwa so {ifno comment_counter} text {endifno comment_counter} .
Bin mir jetzt aber nicht sicher, ob ich deine Nachfrage damit erschöpfend beantwortet habe ?