Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - mawenzi

Pages: 1 [2]
16
Hinweis auf einen MOD im spanischen 4images-Forum :

Um der 4images-Galerie einen weiteren "User-Status" (4images-Standard : Guest, User_Awaiting, User, Admin), den des Moderators hinzuzufügen, hat excitex2 einen MOD entwickelt und ihn im Forum Español / Castellano (Moderator: benzo) veröffentlicht.

Nach der MOD-Installation kann der Administrator speziellen Usern Moderatoren-Rechte wie folgt zuweisen :
- Moderator für das Bearbeiten der Kategorien
- Moderator für das Bearbeiten der Bilder
- Moderator für das Bearbeiten der Kommentare
- Moderator für das Bearbeiten der User

Der MOD ist auf Spanisch, doch wenn man 4images MODs installieren kann, ist er absolut selbsterklärend ...
Sollte es Sprachprobleme geben, so kann man auch die Google-Übersetzung (Spanisch -> Englisch) verwenden, wobei man in jedem Fall den Code aus dem Original-Thread verwenden sollte. Eine Google-Übersetzung (Spanisch -> Deutsch) gibt es z.Z. nicht ...

Hier die Links ...

Original-Thread : [MOD] Incorporar Moderadores en la galería
Google-Übersetzung (Englisch) : [MOD] Moderators for 4images gallery

Danke excitex2 für diesen großartigen MOD ...
Thanks excitex2 for this great MOD ...
Gracias excitex2 por este fantastico MOD ...

17
bezieht sich auf die Anfrage von Phil87 hier : http://www.4homepages.de/forum/index.php?topic=15762.0

Hallo Phil87,

MOD - Anzeige des Dateityps als Icon bzw. Text

... also dann erkläre ich mich mal bereit ...  :mrgreen: ... zumal du mit den Icons schon gute Vorarbeit geleistet hast ...
... wäre nett, wenn du in deiner Auflistung noch weitere Icons dazufügen könntest ...
... da es ja vorkommen kann, dass zu einem Dateityp kein Icon vorhanden ist, wird statt des Icons der Dateityp als Text angezeigt ...
... die Anzeige des Dateityps kann sowohl in der thumbnail_bit.html wie auch in der details.html verwendet werden ...
... was ist also zu tun ... ?

1. Schritt
Die Datei-Icons sind im Ordner /templates/<dein_template>/images nach folgendem Schema zu speichern.
  • [extension]_icon.gif
  • also z.B : jpg_icon.gif , jpeg_icon.gif , gif_icon.gif ... u.s.w.

2. Schritt
In der /includes/functions.php innerhalb der Funktion "function show_image" finde :
Code: [Select]
$site_template->register_vars(array(
und füge unmittelbar davor folgendes ein :
Code: [Select]
//--- Start Datei-Icons und -Extensionen anzeigen ---
 $file_ext = get_file_extension($image_row['image_media_file']);
 $file_ico = get_gallery_image($file_ext."_icon.gif");
 $file_icon = (!file_exists($file_ico)) ? $file_ext : "<img src=\"".$file_ico."\" border=\"0\" alt=\"".$file_ext." - Datei\" />";
 $site_template->register_vars(array(
    "file_ext" => $file_ext,
    "file_icon" => $file_icon,
 ));
//--- Ende Datei-Icons und -Extensionen anzeigen ---

3. Schritt
Nun kann man die folgenden Tags in der /templates/<dein_template>/thumbnail_bit.html für die Anzeige des Dateityps zu den Thumbnails (Kategorie-, Such-, Archiv-Seiten ... u.s.w.) oder auch in der /templates/<dein_template>/details.html für die Anzeige des Dateityps auf der Detailseite verwenden :

- Anzeige des Dateityps nur als Text :
Code: [Select]
Dateityp : {file_ext}

- Anzeige des Dateityps als Datei-Icon bzw. wenn noch nicht vorhanden, dann für den jeweiligen Dateityp als Text :
Code: [Select]
Dateityp : {file_icon}

Die Template-Gestaltung mit der Platzierung innerhalb der tumbnail_bit.html bzw. details.html ist dann natürlich deine Sache.

4. Schritt
Fertig und danke an Phil87 für die Anfrage und die zur Verfügung gestellten Datei-Icons hier im Anhang. Ich hoffe natürlich, dass noch reichlich Datei-Icons (18x16 Pixel) hier im Thread gepostet werden ...  :wink:

mawenzi

18
Feedback & Suggestions / 4images 1.7.4 - Feedback
« on: October 23, 2006, 04:00:19 PM »
Hallo Jan,

... zunächst ... Danke für die neue 4images Version 1.7.4 ...
... habe sie gerade über eine Standard-Version 1.7.3 installiert ...
... und festgestellt, dass in der includes/constants.php wohl noch eine Änderung vorgenommen werden muss ...
... da mit der constants.php Vers. 1.7.4 auf jeder Seite sämtliche Querytimes am Seitenende mit ausgeben werden ...  8O

Ändere in includes/constants.php Zeile 146 :
Code: [Select]
define("PRINT_QUERIES", 1);

in :
Code: [Select]
// define("PRINT_QUERIES", 1);

19
Vorwort / Features :
  • Mit dieser Modifizierung wird im Benutzerprofil der jeweils letzte Bild-Upload des Mitglieds als Thumbnail angezeigt.
  • Der MOD ist schnell und einfach zu installieren.


Dateien die zu ändern sind :
  • member.php
  • templates/<dein_template>/member_profile.html


1. Schritt
finde in der member.php im Abschnitt  //--- Show Profile --- folgende Zeilen :
Code: [Select]
$site_template->register_vars(array(
      "user_id" => $user_row['user_id'],
      "user_name" => (isset($user_row['user_name'])) ? htmlspecialchars($user_row['user_name']) : REPLACE_EMPTY,
      "user_email" => $user_email,
      "user_email_save" => $user_email_save,
und füge unmittelbar davor den folgenden Code ein :
Code: [Select]
//--- Start Show Latest Upload in Profile ----------------------------------
    $sql = "SELECT * FROM ".IMAGES_TABLE." WHERE ".get_user_table_field("", "user_id")." = ".$user_row['user_id']." AND cat_id IN (".get_auth_cat_sql("auth_viewcat").")
            ORDER BY image_date DESC
            LIMIT 1";
    $user_image = "";
    if ($image_row = $site_db->query_firstrow($sql))
    {
      show_image($image_row);
      $user_image = 1;
    }
    $site_template->register_vars("user_image", $user_image);
//--- End Show Latest Upload in Profile ----------------------------------


2.Schritt
finde in member_profile.html folgendes :
Code: [Select]
        <tr>
          <td class="row2"><b>{lang_icq}</b></td>
          <td class="row2">{if user_icq}<a href="http://wwp.icq.com/scripts/search.dll?to={user_icq}">{user_icq}</a> (<b>{user_icq_status}</b>){endif user_icq}</td>
        </tr>
und füge dahinter folgendes ein :
Code: [Select]
        <tr>
          <td class="row1"><b>Letzter Bild-Upload:</b></td>
          <td class="row1">{if user_image}{thumbnail}{endif user_image}</td>
        </tr>
Selbstverständlich ist die Templategestaltung deine Sache und das Beispiel zeigt nur einen Einsatz im Default-Template.
Maßgebend ist der Einsatz des Tags {if user_image}{thumbnail}{endif user_image} .

Wie den Tag {thumbnail} kannst du hier auch alle anderen Tags aus deiner thumbnail_bit.html verwenden wie z.B :
... {image_name} {cat_name} {image_date} ... u.s.w. ...



Viel Spaß mit den letzten Bildern eurer User in ihren Benutzerprofilen ...  :wink:
mawenzi



20
Vorwort / Features :
  • Diese Modifizierung wurde hier im Forum angefragt.
  • Mit diesem MOD wird, gleich wie im ACP, beim Bild- / Datei-Upload für die Dauer des Uploads ein Popup mit einer Animation angezeigt. Dieses Fenster schließt sich dann automatisch nach abgeschlossenem Upload.
  • Dem User wird also auch beim Upload von größeren Dateien angezeigt, dass der Uploadprozess noch im Gange ist und er nicht voreilig die Seite wechselt.
  • In dieser Basisversion wird der gleiche Inhalt im Popup angezeigt wie im ACP.
  • Es ist aber natürlich auch möglich einen eigenen / anderen Inhalt im Popup anzeigen zu lassen. Wobei dann eine neue progress_2.php bzw. -.html erstellt werden müsste, auf die dann im Java Script verwiesen wird.


Dateien die zu ändern sind :
  • In dieser Basisversion ist nur eine Datei betroffen.
  • templates/<dein_template>/member_uploadform.html

Dateien die neu zu erstellen sind :
  • admin/progress_2.php


1. Schritt
folgendes Java-Script ist in den unmittelbaren Anfang der member_uploadform.html zu kopieren :
Code: [Select]
<script language="JavaScript">
    <!--
    var statusWin, toppos, leftpos;
    toppos = (screen.height - 401)/2;
    leftpos = (screen.width - 401)/2;
    function showProgress() {
      statusWin = window.open('admin/progress_2.php','Status','height=150,width=350,top='+toppos+',left='+leftpos+',location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes');
      statusWin.focus();
    }

    function hideProgress() {
      if (statusWin != null) {
        if (!statusWin.closed) {
          statusWin.close();
        }
      }
    }
   // -->
</script>


2. Schritt
finde folgende Zeile kurz vor Ende der member_uploadform.html :
Code: [Select]
<input type="submit" name="uploadbutton" value="{lang_submit}" class="button" />
und ersetze sie durch die folgende Zeile :
Code: [Select]
<input type="submit" name="uploadbutton" value="{lang_submit}" class="button" onClick="showProgress()" />


3. Schritt
folgendes Java-Script ist an das Ende der member_uploadform.html zu kopieren :
Code: [Select]
<script language=javascript>
   <!--
   showProgress();
   hideProgress();
   // -->
</script>


4.Schritt
Erstelle eine Kopie deiner admin/progress.php mit dem Namen progress_2.php, die auch im admin-Ordner zu speichern ist, wobei vorher noch folgende Änderungen vorzunehmen sind.
Finde in deiner neuen progress_2.php folgendes :
Code: [Select]
define('IN_CP', 1);
define('ROOT_PATH', './../');
require('admin_global.php');
und lösche es .

Weiterhin finde :
Code: [Select]
<title><?php echo $lang['upload_progress']; ?><</title>
und setze hier dein Titel für das Popupfenster ein, etwa so ...
Code: [Select]
<title>Dateiupload</title>
Wie bereits oben beschrieben ist die Datei nun im admin-Ordner zu speichern.


Viel Spaß beim Uploaden mit dem neuen Popup, natürlich auch für eure User ...  :wink:
mawenzi

21
FAQ, Tips / How can I show all images of my 4images website at once
« on: August 07, 2006, 03:52:28 PM »
If you would like to show all images of your 4images website from a link in your menu you will need :


1. Find in /includes/page_header.php :
Code: [Select]
"url_new_images" => $site_sess->url(ROOT_PATH."search.php?search_new_images=1"),
and add after :
Code: [Select]
"url_all_images" => $site_sess->url(ROOT_PATH."search.php?search_keywords=".str_pad("*", MIN_SEARCH_KEYWORD_LENGTH, "*")),


1.1 Find in /includes/page_header.php :
Code: [Select]
"lang_new_images" => $lang['new_images'],
and add after :
Code: [Select]
"lang_all_images" => $lang['all_images'],


2. Find in /lang/<your_lang>/main.php :
Code: [Select]
$lang['new_images'] = "New Images";
and add after :
Code: [Select]
$lang['all_images'] = "All Images";
( of course in your language ...  :wink: )


3. In /templates/<your_template>/user_loginform.html and user_logininfo.html you can add the following as link to show all of your images ( of course you can use it also in other templates ) ...
Code: [Select]
&nbsp;&raquo; <a href="{url_all_images}">{lang_all_images}</a>

4. Only for 4images version 1.7.3 :
for this version you need still this change ...
http://www.4homepages.de/forum/index.php?topic=13990.msg75500#msg75500
It is fixed in version 1.7.4 !

this tip is related to : show all pics


22
Mods & Plugins (Releases & Support) / [MOD] 4images Quiz V.1.0
« on: June 22, 2006, 03:37:39 AM »
Hey guys,
Im looking for a php Quiz script to integrate with my 4images..do you know of any MOD like that ?
Feature of my dream Quiz would be:

1. You can include image with an url pulled from your 4images database.
2. multiple choice questions
3. shows one question at a time
4. shows the answer and explanation when the question is answered
5. pulls question at random from a database
6. On/Off timing.
7. each question could have a score so more diff q. willhave higher scores
8. Hi-score table based on bell-shaped curves ( how the taker compares to the rest of the people taking the same test)
9. 4images registered users can save their hi-scores in the DB..and redo question they messed up etc..etc..

of course this is just the ideal variant... :mrgreen:

thnx.
ms

Just my example for your testing and downloading ...  :wink:

4images Quiz Version 1.0


it looks very good..

some questions and sugestions:

1. will it be free
2. does it give you score at the end. I did not go true all the q my German is nowere to be found. :lol:
3. are q pulled randomly from the db.
4. the picture is kinda small and clicking on it goes to the 4images so the people can cheat. I think just showind the image in full size rahter than thumb is better.
5. can you make it so the people can choose the number of q they want and then get random.

otherwize is exactly what Im looking for.
thnx.

... thanks ...  :mrgreen:

answers :

1. yes (as a registered user)
2.1 yes (test it by clicking some answer and as a registered user ...  :wink:)
3.1 at the moment ... no
3.2 questions are not stored in db ... are stored in a txt-file
4.1 the thumbnail link goes target="_blank" to the 4images details ... !
4.2 it is your thumbnail size ...
4.3 image full size is possible ... but not a good solution ... it is a quiz ... not a 2.gallery
5. at the moment ... no


23
Discussion & Troubleshooting / Image rating doesn't work
« on: January 28, 2006, 01:48:36 AM »
... I made some modifications in the last days on my Website ...
... and now my problem : image rating doesn't work ...
... I restored some backups of the modifyed files ... but ...
... the rating form works well ... the page reloaded ... but than ... nothing ... no message, no voting, no saved rating ...  :?

... now my question for restoring backups ...
... which files are involved for a image rating ... ?
1. page_header.php --- Save Rating ---  (no changes in this time)
2. sessions.php ---> $session_info  (no changes in this time)
3. functions.php ?  (some changes in this time)
4. details.php ?  (some changes in this time)
5. details.html ?  (some changes in this time)
6. rate_form.html  (no changes in this time)
... still other files ?

... has someone an / another idea to solve that problem ... ?

Thanks for the assistance ... mawenzi


24
Mods & Plugins (Releases & Support) / [MOD] News-RSS-Feed V.1.2
« on: December 09, 2005, 06:49:49 PM »
- Vorwort :
  • Dieser RSS-Feed präsentiert 4images-Website-News.
  • Im MOD-Forum existiert bereits ein MOD für einen RSS-Feed, jedoch zeigt dieser Feed die neusten Bilder auf der Website an.
  • Dieser News-RSS-Feed zeigt im News-Reader die aktuellsten News deiner 4images-Website an (nicht die neusten Bilder ... !)
- Preface :
  • This RSS-Feed presented 4images-Website-News.
  • In the MOD-Forum exist already a MOD for a RSS-Feed, but this feed shows the newest images from your website.
  • This News-RSS-Feed shows in a News-Reeder the most current news of your 4images website (not newest images...!).

- Demo zum MOD :
  • Gibt es auf meiner Seite zu sehen : hier !
  • Im IE 7.0 oder FF 2.0 kann der Feed direkt im Browser angezeigt werden : Teste hier !
  • Im NewsBee-Reader sehen die einzelnen News wie folgt aus : ...
- MOD-Demo :
  • You can see it on my site : here !
  • In IE 7.0 or FF 2.0 the feed can display directly in the browser : test here !
  • In NewsBee-Reader the News looks in such a way : ...

/ - Version :
  • 05.12.2006 - Version 1.2 - incl. RSS Symbol for Webbrowsers
  • 12.12.2005 - Version 1.1 - incl. News-MOD by janfy
  • 11.12.2005 - Version 1.0 - English MOD translation
  • 09.12.2005 - Version 1.0 - Veröffentlichung

- Features zum MOD :
  • Dieser News-Feed zeigt die News-Überschrift, die News-Nachricht, das Datum der Veröffentlichung der Nachricht, dein News-Image sowie allgemeine Infos deiner Website in einem News-Reader.
  • Die Präsentation der gesamten News im News-Reader erfolgt formatiert in einer Tabelle.
  • Ich habe einen Konfigurations-Teil vorgeschaltet (rss_news.php), so dass hier alle Einstellungen ... incl. der URLs, der Tabellenfarben, der Anzahl der News, der Bilder, und des Sprachteils dort gemacht werden können. Der Code muss daher zu Anpassung nicht geändert werden (Ich denke, dass sollte einigen helfen ...)
  • Das Datum der News wird im W3C Date and Time Format dargestellt, was für uns Mitteleuropäer gewöhnungsbedürftig ist. Mit jedem anderen Format jedoch scheitert die Freigabe/Prüfung des RSS-Feeds am FEED Validator !
- Features of this MOD :
  • This News-Feed show the news-headline, the news-message, the date of the news, your News-Image and general informations of your website in a News-Reader.
  • The presentation of the entire news in the News-Reader is shown as a table.
  • I have made a configuration part on the top (rss_news.php), so that there all attitudes ... inclusive URLs, the table colors, the number of the news, the News-Image, and language part can be made. The rest of the code does not have to be changed therefore to adjustment. (I think that should help ...)
  • The date of the news is represented in the W3C Date and Time Format . With every other format the release/examination of the RSS-Feed fails by FEED Validator !

- Voraussetzungen an MODs :
Die Grundlage für die Erstellung der News auf deiner 4images-Webseite, die mit diesem RSS-Feed veröffentlicht werden sollen, muss der geniale  News-MOD von Fugaziman sein !
- Conditions of MODs :
The basis for the production of the News on your 4images-website, which are to be published with this RSS-Feed, must be the ingenious News-MOD by Fugaziman !

- NEU : Die Grundlage für die Erstellung der News auf deiner 4images-Webseite, die mit diesem RSS-Feed veröffentlicht werden sollen, kann auch der News-MOD von janfy sein !
- NEW :The basis for the production of the News on your 4images-website, which are to be published with this RSS-Feed, also can be the News-MOD by janfy !
*) - are the same ...

- Neue Dateien :
- New files :
  • rss_news.php
  • templates/<your_template>/rss_news.html
  • templates/<your_template>/rssitem_news.html

Installation :

- Schritt 1.1 (News-MOD by Fugaziman)
lege im Root-Verzeichnis die neue Datei rss_news.php mit dem folgenden Inhalt an :
- Step 1.1 (News-MOD by Fugaziman)
in the root directory make a new file rss_news.php with following contents :
Code: [Select]
<?php
/************************************************************
* RSS Feed für 4images - NEWS                               *
* Version 1.0 - Stand 09.12.2005                            *
* Autor : www.detlev-kostka.de                              *
************************************************************/

//--- START CONFIGUGATION -----------------------------------
define('SCRIPT_URL''http://your_website.de'); //no trailing slash
define('LANGUAGE''de-de');
define('ROOT_PATH''./');
//-----------------------------------------------------------
$news_image_id 0000// Image_id of your News Image (only News-MOD by Fugaziman)
$num_news 3;  // Number of News to show in RSS-Reader
$news_image SCRIPT_URL."/.../news.jpg"// URL News Image
$width 100// width News Image
$height 75// height News Image
$thc ="#cccccc"// table header color
$tcc ="#e6e6e6";  // table content color
$lang_top ="Neue Nachrichten auf www.deine_website.de"// language Topline
$lang_head ="Headline"// language Headline
$lang_news "Nachricht"// language News
$lang_date "Nachricht vom"// language News Date
$lang_vers "1.7";  // your 4image Script-Version
//------------------------------------------------------------
$iurl SCRIPT_URL."/.../logo.gif"// URL Logo Image
//--- END CONFIGURATION --------------------------------------

include(ROOT_PATH.'global.php');
include(
ROOT_PATH.'includes/sessions.php');
$main_template 'rss_news';

//--- Start: Part for News-MOD by Fugaziman ------------------
$sql "SELECT comment_headline, comment_text, comment_date, image_id
        FROM "
.COMMENTS_TABLE."
        WHERE image_id = 
$news_image_id
        ORDER BY comment_date DESC
        LIMIT 
$num_news";
$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);
$w3c_date_time_format="Y-m-d\TH:i:s+00:00";
while(
$comment_row $site_db->fetch_array($result)){
  
$news_date format_date($w3c_date_time_format$comment_row['comment_date']);
  
$news_head format_text($comment_row['comment_headline'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
  
$news_text format_text($comment_row['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
//--- End: Part for News-MOD by Fugaziman -------------------- 

  
$content  " <table width=\"100%\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\"><tr><td colspan=\"2\" valign=\"top\"  bgcolor=".$thc.">";
  
$content .= " <b><i>".$lang_top."</i></b>";
  
$content .= " </td></tr><tr><td rowspan=\"3\" width=\"2%\" valign=\"top\" bgcolor=".$tcc.">";
  
$content .= " <img src=\"".$news_image."\" border=\"1\" width=\"".$width."\" height=\"".$height."\" hspace=\"5\" vspace=\"5\" alt=\"".$lang_top."\" />";
  
$content .= " </td><td width=\"98%\" valign=\"top\" bgcolor=".$tcc.">";
  
$content .= " <b><i>".$lang_head." : ".$news_head."</i></b>";
  
$content .= " </td></tr><tr><td valign=\"top\" bgcolor=".$tcc.">";
  
$content .= " <b><i>".$lang_news." :</i></b><br>".$news_text."";
  
$content .= " </td></tr><tr><td valign=\"top\" bgcolor=".$tcc.">";
  
$content .= " <b><i>".$lang_date." : </i></b>".$news_date."";
  
$content .= " <tr><td colspan=\"2\" valign=\"top\" align=\"center\" bgcolor=".$tcc.">";
  
$content .= " <font size=\"2\"><i>RSS-Feed ... ".$config['site_name']." ... Powered by 4images".$lang_vers."</i></font>";
  
$content .= " </td><td></table>";
  
$site_template->register_vars(array(
  
"content" => $content,
  
"lang_news" => $lang_news,
  
"title" => $news_head,
  
"domain" => SCRIPT_URL."/index.php",
  
"link" => SCRIPT_URL."/index.php",
  
"date" => $news_date ,
  ));
  
$news.=$site_template->parse_template("rssitem_news");
 }
$site_template->register_vars(array(
  
"ctitle" => $config['site_name'],
  
"clink" => SCRIPT_URL,
  
"cdescription" => $lang_top,
  
"language" =>LANGUAGE,
  
"ititle" => $lang_top,
  
"iurl" => $iurl,
  
"ilink" => SCRIPT_URL,
  
"items" => $news,
  ));
header("Content-type: text/xml; charset=\"ISO-8859-1\"");
$site_template->print_template('<?xml version="1.0" encoding="ISO-8859-1"?>
'.$site_template->parse_template($main_template));
?>

- Schritt 1.1 (News-MOD by janfy)
Nur für den News MOD von janfy tausche in der rss_news.php den folgenden Code :
- Step 1.1 (News-MOD by janfy)
Only for the News MOD by janfy exchang in rss_news.php the following code :
Code: [Select]
//--- Start: Part for News-MOD by Fugaziman ------------------
....
//--- End: Part for News-MOD by Fugaziman --------------------
- durch den folgenden Code aus :
- by the following code :
Code: [Select]
//--- Start: Part for News-MOD by janfy ---------------------
$sql = "SELECT news_id, news_title, news_text, news_date
        FROM ".NEWS_TABLE."
        ORDER BY news_date DESC
        LIMIT $num_news";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
$w3c_date_time_format="Y-m-d\TH:i:s+00:00";
while($news_row = $site_db->fetch_array($result)){
  $news_date = format_date($w3c_date_time_format, $news_row['news_date']);
  $news_head = format_text($news_row['news_title'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
  $news_text = format_text($news_row['news_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
//--- End: Part for News-MOD by janfy ----------------------- 

- Schritt 1.2 - Einstellungsmöglichkeiten
Im Bereich zwischen Start Configuration / End Configuration musst du alle Anpassungen des RSS-Feeds an deine Website machen.
- Step 1.2 - Settings
Within the range between Start Configuration / End Configuration you must make all adjustments of the RSS-Feed to your Website.

- Schritt 2.
lege im Template-Verzeichnis die neue Datei /templates/<your_template>/rss_news.html mit dem folgenden Inhalt an :
- Step 2.
in template directory make a new file /templates/<your_template>/rss_news.html with the following contents :
Code: [Select]
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>{ctitle}</title>
    <link>{clink}</link>
    <language>{language}</language>
    <description> {cdescription} </description>
    <image><title>{ititle}</title><url>{iurl}</url><link>{ilink}</link></image>
    {items}
  </channel>
</rss>

- Schritt 3.
lege im Template-Verzeichnis die neue Datei /templates/<your_template>/rssitem_news.html mit dem folgenden Inhalt an :
- Step 3.
in template directory make a new file /templates/<your_template>/rssitem_news.html with the following contents :
Code: [Select]
<item>
  <title>{lang_news} : -> {title}</title>
  <dc:date>{date}</dc:date>
  <category domain="{domain}">{title}</category>
  <description><![CDATA[{content}]]></description>
  <link>{link}</link>
</item>

- Schritt 4.
Nun kannst du über einen Link oder natürlich über den allseits bekannten RSS-Button deinen Feed zum Download / Abonnement auf deiner Website anbieten. Die Links würden dann wie folgt aussehen :
- Step 4.
Now you can offer your feed over a link or the all-side well-known RSS-Button for download / subscription on your website. The link should look as follows:
Code: [Select]

<a href="http://your_website.de/rss_news.php" target="_blank">News-RSS-Feed</a>
- bzw. mit Button :
- and/or with button :
Code: [Select]
<a href="http://your_website.de/rss_news.php" target="_blank"><img src="http://your_website.de/.../rss_news-button.gif"></a>


- Schritt 5.
Um das RSS Symbol [ ... ... ] in deinem Webbrowser (IE oder FF) automatisch zu aktivieren, öffne die Datei /templates/<dein_template>/header.html und suche nach  :
- Step 5.
To activate automaticaly the RSS symbol [ ... ... ] in your webbrowser (IE or Firefox) open file /templates/<your_template>/header.html and search for :
Code: [Select]
{if has_rss}
<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}" />
{endif has_rss}
- oder (in Version < 1.7.3)
- or (in version < 1.7.3)
Code: [Select]
<link rel="stylesheet" href="{template_url}/style.css" />
- und füge danach ein :
- and insert below :
Code: [Select]
<link rel="alternate" type="application/rss+xml" title="RSS Feed: ***SITENAME*** (Neue Nachrichten)" href="rss_news.php" />


- Schritt 6.
Nachdem du deinen News-RSS-Feed fertiggestellt hast, kannst du dir die Gültig- und Rechtmäßigkeit deines RSS-Feeds von feedvalidator.org prüfen und bestätigen lassen.
Und damit keine Zweifel aufkommen, habe ich meinen News-RSS-Feed natürlich prüfen lassen und als Ergebnis folgendes erhalten :
- Step 6.
After you finished your News-RSS-Feed, you can let examine and confirm the valid and legal standard of your RSS-Feed by feedvalidator.org.
And for no doubts, of course I let examine my News-RSS-Feed and as result I get the following :

Congratulations !   This is a valid RSS feed.


mawenzi

25
    / - Vorwort / Preface :
    • Diese Art von MOD wurde schon mehrfach im Forum angefragt, so dass ich meine Variante die seit einiger Zeit erfolgreich auf meiner Website läuft, hier als MOD anbiete.
    • Mein Dank geht an Loda, mit dessen Hilfe es zur Umsetzung dieser Version gekommen ist !
    • Dieser MOD läßt sich gut als Erweiterung zu V@no's MOD Last Comments V.1 verwenden, wobei er absolut unabhängig von diesem MOD läuft und so auch unabhängig von diesem auf deiner 4images-Site eingesetzt werden kann.
    • A English MOD-translation is now available !
    • This MOD will show all comments of your website in a list with paging.

    - Demo zum MOD :
    • Gibt es auf meiner Seite zu sehen : hier !
    - MOD-Demo :
    • You can see it on my site : here !

    / - Versionen :
    • 27.10.2009 - "Alle Kategorie-Kommentare" Version 1.6 - als Erweiterung ist online
    • 06.08.2009 - Version 1.6 - "bug fix" Kommentar Counter: Thanks to Sun and V@no
    • 06.08.2009 - Version 1.5 - "bug fix" Gast ohne Profil-Link: Thanks to Schnick und Schnack
    • 17.01.2008 - Version 1.4 - Erweiterung Sprachteil Russisch : Thanks to Valery
    • 29.10.2007 - Version 1.4 - Erweiterung Counter : Kommentare pro Bild. Zu finden hier ...
    • 24.01.2007 - Version 1.3 - Erweiterung Link [Alle Kommentare des Users]. Zu finden hier ...
    • 06.12.2006 - Version 1.3 - "bug fix" der Name des Kommentarschreibers (wenn User) wird als Profillink angezeigt
    • 16.10.2006 - Version 1.2 - Query-Update für php5/mysql5 - danke an Ivan ... hier ... !
    • 14.09.2006 - Version 1.2 - "bug fix" für 4images 1.7.3 - von JinYoshi gepostet ... hier ... thanks ... !
    • 07.09.2006 - Version 1.2 - "bug fix" - $comment_user_info - [Gast]/[Member]/[Administrator] wird jetzt richtig angezeigt !
    • 21.01.2006 - Version 1.1 - Erweiterung {image_user_name}-Tag von V@no incl. "little bug fix"
    • 05.12.2005 - Version 1.0 - English MOD translation
    • 03.12.2005 - Version 1.0 - Einbindung der lang/<deine_Sprache>/main.html
    • 02.12.2005 - Version 1.0 - Admin-Links hinzugefügt
    • 01.12.2005 - Version 1.0 - Veröffentlichung

    - Features zum MOD :
    • Es werden alle für den jeweiligen Besucher (Gast, reg.Benutzer, Admin) zugänglichen Kommentare der Website fortlaufend mit vollem Inhalt und dazugehörigem Thumbnail und weiteren Informationen gelistet angezeigt.
    • Der Besucher kann eine Einstellung vornehmen, wieviel Kommentare er pro Seite angezeigt bekommen möchte.
    • Dementsprechend ist in dem MOD das Paging integriert.
    • Es wird der jeweils letzte Kommentar an erster Stelle angezeigt.
    • Es ist ein Kommentar-Counter integriert, so dass die Kommentare entsprechend der Anzeige absteigend auf jeder Seite fortlaufend nummeriert sind.
    • Der eingeloggte Admin kann direkt über die nur ihm angezeigten Admin-Links die Kommentare bearbeiten. (sehr komfortabel ...)
    • Es lassen sich diverse Einstellungen zur Anpassung an deine Website vornehmen.
    - Features of this MOD :
    • All accessible comments of the website are listed shown for the respective visitor (guest, user, admin) with full contents, with pertinent thumbnail and further informations.  
    • The visitor can adjust, how much comments per page are to be shown.  
    • The Paging is inserted.  
    • The latest comment is shown at the first place of the list.
    • A comment counter is integrated, so that all comments have a sequentially descending number on each page of the list.  
    • The logged in admin can directly edit / delete comments over a link, that is only shown to him. (very comfortably ...)  
    • Various settings can be made for the adjustment of your website.  

    - 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 :
    - 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 :

    - Dateien die zu ändern sind :
    - Files to be changed :
    • includes/page_header.php
    • lang/<your_lang>/main.php
    - und je nach Linkeinbindung in deine Templates
    - and for links in you templates e.g.
    • templates/<your_template>/home.html
    • templates/<your_template>/user_logininfo.html
    • templates/<your_template>/user_loginform.html

    - Neue Dateien :
    - New files :
    • comments_all.php
    • templates/<your_template>/comments_all.html
    • templates/<your_template>/comments_all_bit.html
    • templates/<your_template>/commentsperpage_dropdown_form.html

    - 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 ... .
    - Installation :
    IMPORTANT: Make a backup of your original files ... .


    - 1. Schritt
    lege im Root-Verzeichnis die neue Datei comments_all.php mit dem folgenden Inhalt an :
    - 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');
    ?>


    - 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) :
    - 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>

    - durch diesen neuen Code ersetzt (so ist schon mal das umgebene Design deines Templates gewahrt ... !) :
    - 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}

    - Die weitere Template-Gestaltung ist natürlich deine Sache .
    In der comments_all.html können die folgenden Tags verwendet werden :
    - 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}


    - Und diese Sprach-Tags :
    - And this language-tags :
    {lang_all_comments}
    {lang_variable_text}
    {lang_com_per_page}
    {lang_navigation}


    - Wobei die Bedeutung der Tags selbsterklärend sein dürfte ... .
    - You recognize the meaning of the tags alone ... .

    - 3. Schritt
    lege im Template-Verzeichnis die neue Datei /templates/<dein_Template>/comments_all_bit.html mit folgendem Inhalt an.
    - 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>

    - 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 :
    - 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}


    - Und diese Sprach-Tags :
    - 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}


    - Wobei die Bedeutung der Tags auch hier selbsterklärend sein dürfte ... .
    - You recognize the meaning of the tags alone ... .

    - 4. Schritt
    lege im Template-Verzeichnis die neue Datei /templates/<dein_Template>/commentsperpage_dropdown_form.html mit dem folgenden Inhalt an.
    - 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>

    - 5. Schritt
    Öffne die Datei includes/page_header.php und finde :
    - 5. Step
    Open the file includes/page_header.php and find :

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

    - und füge unmittelbar dahinter die folgende Codezeile ein.
    - and insert after the following code.

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


    - 6. Schritt
    Öffne die Datei /lang/deutsch/main.php und finde am Ende :
    - 6. Step
    Open the file /lang/<your_lang>/main.php and find at the end :
    Code: [Select]
    ?>

    - 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";


    - 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";


    - 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'] = "Комментариев на эту работу";

    - 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.
    - 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>

    - 8. Schritt - Einstellungmöglichkeiten
    Die folgenden Einstellungen lassen sich zur Anpassung an deine Website in der comments_all.php vornehmen:
    • Kommentare pro Seite : Standard = 10 ; Änderung unter - $commentperpage =  10;
    • Min. Kommentare pro Seite : Standard = 1 ; Änderung unter - for($i = 1; $i <=  20;
    • Max. Kommentare pro Seite : Standard = 20 ; Änderung unter - for($i = 1; $i <=  20;
    • Thumbnail-Größe : Standard = 100% ; Änderung unter - $dimension =  100;
    - 8. Step - Settings
    The following settings can be made for the adjustment of your website in comments_all.php :
    • Comments per page : standard = 10 ; change through - $commentperpage =  10;
    • Min. Comments per page : standard = 1 ; change through - for($i = 1; $i <=  20;
    • Max. Comments per page : standard = 20 ; change through - for($i = 1; $i <=  20;
    • Thumbnail-Size : standard = 100% ; change through - $dimension =  100;


    NEU / NEW :

      / - Erweiterung / Extension : Alle Kommentare einer Kategorie / All comments of a category
      • Diese Erweiterung "Alle Kategorie-Kommentare" zeigt alle Kommentare nur einer bestimmten Kategorie analog wie "Alle Kommentare" an.
      • Der Aufruf dieser Seiten erfolgt von der betreffenden Kategorie über den Link "Alle Kategorie-Kommentare".
      • This Extension "All Category-Comments" will show all comments of a certain category analogous "All Comments".
      • The calling of these sites in this category is via a link "All Category-Comments".


      - 1. Schritt
      lege im Root-Verzeichnis die neue Datei comments_cat.php mit dem folgenden Inhalt an :
      - 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 $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 == -) {
                        
      $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'];

            
      $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'], 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 -------------------------------------
      //-----------------------------------------------------
      $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');
      ?>


      - 2. Schritt
      in der Datei categories.php finde :
      - 2. Step
      in file categories.php find :

      "msg" => $msg,

      - und füge danach folgendes hinzu :
      - 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>",


      - 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 :
      - 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

      26
      - Vorwort :
      • Mit diesem MOD kann die Anzahl der versendeten Postkarten pro Bild auf der Detailseite und
        die insgesamt von der Website versendeten Postkarten z.B. in Statistiken ausgegeben werden.
      • Bei diesem MOD handelt es sich um eine "Wiederveröffentlichung" mit meinen Kommentaren und Erweiterungen.
      • Das Original wurde 2003 von Cr@zy Sash veröffentlicht und ist seit dem Forum-Hack verloren ...
      • Aus Fragmenten auf meiner Platte und auf besonderen Wunsch ( hier ) versuche ich nun die "republication" .
      - Preface :
      • With this MOD the number of dispatched postcards per picture can shown on detail page and
        all from the Website dispatched postcards can shown e.g. in statistics.
      • This MOD is a "republication" with my comments and extensions.
      • The original was published 2003 by Cr@zy Sash and is lost since the forum-hack ...
      • From fragments on my PC and on special desire ( here ) I try now a "republication".

      / - Version :
      • 12.12.2007 - Version 1.0 - Bugfix Größe Thumbnails in Top10
      • 18.09.2006 - Version 1.0 - Top10-Erweiterung php5-kompatibel
      • 28.02.2006 - Version 1.0 - Top10-Erweiterung
      • 30.12.2005 - Version 1.0 - English MOD translation
      • 15.11.2005 - Version 1.0 - Veröffentlichung

      - Dateien die zu ändern sind :
      - Files to change are :
      • details.php
      • postcards.php
      • includes/functions.php
      • templates/<your_template>/details.html
      • lang/<your_language>/main.php

      - Installation :
      WICHTIG : Mache vor der Installation von den genannten Dateien ein Backup. Zusätzlich auch von deiner DB, da es auch hier eine Veränderung geben wird. Nur zur eigenen Sicherheit und nicht dass keiner das Selbstverständliche nochmals erwähnt hätte ... .
      - Installation :
      IMPORTANT : Before the installation make a backup of the files. Additionally also of your database, there is also a change needed. Only for your own security ....


      - 1. Schritt
      Öffne die Datei details.php sowie die Datei search.php und finde :
      - 1. Step
      Open the file details.php and also the file search.php and find:
      Code: [Select]
      $sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email")."

      - und ersetze in beiden Dateien dieses durch den folgenden Code :
      - and replace in both files this by the following code :
      Code: [Select]
      $sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, i.image_postcards".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email")."

      - weiterhin finde :
      - further find :
      Code: [Select]
      "lang_comment" => $lang['comment'],

      - und füge darunter den folgenden Code ein :
      - and insert below it the following code:
      Code: [Select]
      "lang_postcards" => $lang['postcards'],



      - 2. Schritt
      Öffne die Datei postcards.php und finde :
      - 2. Step
      Open the file postcards.php and find:
      Code: [Select]
      $site_email->set_body("postcard_message", $config['language_dir']);
      $site_email->send_email(); 

      - und füge darunter den folgenden Code ein :
      - and insert below the following code :
      Code: [Select]
      $sql = "UPDATE ".IMAGES_TABLE."
                SET image_postcards = image_postcards + 1
                WHERE image_id = $image_id";
      $site_db->query($sql);


      - 3. Schritt
      Öffne die Datei includes/functions.php und finde :
      - 3. Step
      Open the file includes/functions.php and find :
      Code: [Select]
      "image_downloads" => $image_row['image_downloads'],

      - und füge darunter den folgenden Code ein :
      - and insert below the following code :
      Code: [Select]
      "image_postcards" => $image_row['image_postcards'],



      - 4. Schritt
      Öffne die Datei lang/<deine_Sprache>/main.php und finde :
      - 4. Step
      Open the file lang/<your_language>/main.php and find:
      Code: [Select]
      //-----------------------------------------------------
      //--- Postcards ---------------------------------------
      //-----------------------------------------------------

      - und füge darunter den folgenden Code ein :
      Code: [Select]
      $lang['postcards'] = "Postkarten:";
      $lang['total_postcards'] = "Alle Postkarten:";
      $lang['new_postcards'] = "Neue Postkarten:";
      - and insert below the following code :
      Code: [Select]
      $lang['postcards'] = "Postcards:";
      $lang['total_postcards'] = "All Postcards:";
      $lang['new_postcards'] = "New Postcards:";



      - 5. Schritt
      In deinem Details-Template kannst du nun folgende Tags verwenden : {lang_postcards} und {image_postcards}
      Für das Standard-Template (und ähnliche) kann das wie folgt realisiert werden.
      Öffne die Datei templates/<dein_Template>/details.html und finde :
      - 5. Step
      In your detail-template you can now use the following tags : {lang_postcards} and {image_postcards}
      For the standard-template (and similar) that can be realized as follows.
      Open the file templates/<your_template>/details.html and find :
      Code: [Select]
      <tr>
             <td valign="top" class="row1"><b>{lang_downloads}</b></td>
             <td valign="top" class="row1">{image_downloads}</td>
      </tr>
      <tr>
             <td valign="top" class="row2"><b>{lang_rating}</b></td>
             <td valign="top" class="row2">{image_rating} ({image_votes} {lang_votes})</td>
      </tr>
      <tr>
            <td valign="top" class="row1"><b>{lang_file_size}</b></td>
            <td valign="top" class="row1">{image_file_size}</td>
      </tr>
      <tr>
            <td valign="top" class="row2"><b>{lang_added_by}</b></td>
            <td valign="top" class="row2">{user_name_link}</td>
      </tr>

      - und ersetze dieses durch den folgenden Code :
      - and replace this by the following code :
      Code: [Select]
      <tr>
            <td valign="top" class="row1"><b>{lang_downloads}</b></td>
            <td valign="top" class="row1">{image_downloads}</td>
      </tr>
      <tr>
            <td valign="top" class="row2"><b>{lang_postcards}</b></td>
            <td valign="top" class="row2">{image_postcards}</td>
      </tr>
      <tr>
            <td valign="top" class="row1"><b>{lang_rating}</b></td>
            <td valign="top" class="row1">{image_rating} ({image_votes} {lang_votes})</td>
      </tr>
      <tr>
            <td valign="top" class="row2"><b>{lang_file_size}</b></td>
            <td valign="top" class="row2">{image_file_size}</td>
      </tr>
      <tr>
            <td valign="top" class="row1"><b>{lang_added_by}</b></td>
            <td valign="top" class="row1">{user_name_link}</td>
      </tr>



      - 6. Schritt
      • Datenbankerweiterung in der Tabelle '4images_images' um ein neues Feld ( 'image_postcards' ) mit einer Installations-Datei.
      • Lade dir dazu die im Anhang befindliche postcards_install.php als Zip-Datei auf deinen PC.
      • Entpacke die postcards_install.php und kopiere sie in dein Root-Verzeichnis von 4images.
      • Zur Installation rufe die postcards_install.php in deiner Browser-Adress-Leiste auf und folge den Anweisungen.
        ( z.B. http:.//.yourhost.com/your4images/postcards_install.php ).
      - 6. Step
      • Database extension in the table '4images_images' by a new field ( 'image_postcards' ) with an installation file.
      • Download the postcards_install.php as zip file on your PC.
      • Unpack postcards_install.php and copy it into your root directory of 4images.
      • For installation calls up postcards_install.php in your Browser address bar and follow the instructions.
        ( eg. http:.//.yourhost.com/your4images/postcards_install.php ).

      - Fertig : ... In der Detailansicht der Bilder wird nun auch die Anzahl der mit dem jeweiligen Bild verschickten Postkarten (eCards) angezeigt.
      - Finish : ... In detail pages of the pictures is now also shown the number of postcards (eCards), sent away with the respective picture.



      - 7. Statistik - Zusatz :
      Für die Verwendung in Statistik-MODs, d.h. für die Anzeige aller und aller neuen von der Website gesendeten Postkarten, können folgende SQL-Befehle / Codes verwendet werden. e.g. in den folgenden MODs ...
      - 7. Statistics - Additive :
      For the use in statistics MODs, i.e. for showing of all and all new postcards sent from the website , the following SQL- instructions / codes can be used. E.G. into the following MODs...


      - 7.1 Statistik - alle Postkarten
      - 7.1 Statistics - all postcards
      Code: [Select]
      //-----------------------------------------------------
      //--- Postcard - Counter - ALL ---
      //-----------------------------------------------------
        $sql = "SELECT SUM(image_postcards) AS sum
                FROM ".IMAGES_TABLE;
        $row = $site_db->query_firstrow($sql);

        $sum = (isset($row['sum'])) ? $row['sum'] : 0;
        $total_postcards = $row['sum'];
        $lang_total_postcards = $lang['total_postcards'];
       
        $site_template->register_vars("total_postcards", $total_postcards);
        $site_template->register_vars("lang_total_postcards", $lang_total_postcards);
        unset($total_postcards);
        unset($lang_total_postcards);

      - In dem entsprechenden Template können als Summe aller Postkarten (Counter) die folgenden Tags verwendet werden.
      - In the appropriate template the following tags can be used as sum of all postcards (Counter).
      Code: [Select]
      {lang_total_postcards} {total_postcards}
      - Und erzeugt die Anzeige z.B. so : Alle Postkarten: 375
      - And now the count is shown in such a way : All Postcards: 375



      - 7.2 Statistik - alle neuen Postkarten
      - 7.2 Statistics - all new postcards
      Code: [Select]
      //-----------------------------------------------------
      //--- Postcard - Counter - NEW ---
      //-----------------------------------------------------
        $new_postcard_cutoff = time() - 60 * 60 * 24 * $new_cutoff; 
        $sql = "SELECT COUNT(*) AS new_postcards
                FROM ".POSTCARDS_TABLE."
                WHERE postcard_date > ".$new_postcard_cutoff; 
        $row = $site_db->query_firstrow($sql);

        $new_postcards = $row['new_postcards'];
        $lang_new_postcards = $lang['new_postcards'];
       
        $site_template->register_vars("new_postcards", $new_postcards);
        $site_template->register_vars("lang_new_postcards", $lang_new_postcards);
        unset($new_postcards);
        unset($lang_new_postcards);

      - In dem entsprechenden Template können dann als Summe aller neuen Postkarten (Counter) die folgenden Tags verwendet werden.
      - In the appropriate template the following tags can be used as sum of all new postcards (Counter).

      Code: [Select]
      {lang_new_postcards} {new_postcards}
      - Und erzeugt die Anzeige z.B. so : Neue Postkarten: 12
      - And now the count is shown in such a way : New Postcards: 12



      - 8. Top10 - Zusatz :
       - füge in deine top.php den folgenden Code ein :
      - 8. Top 10 - Additive :
      - insert in your top.php the following code :
      Code: [Select]
      //--- Start Top10 nach Postkarten -----------------------------------------------
      $sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_postcards, c.cat_name".get_user_table_field(", u.", "user_name").", i.image_thumb_file, i.image_media_file
              FROM (".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
              LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
              WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id
              $cat_match_sql
              ORDER BY i.image_postcards DESC, i.image_name ASC
              LIMIT 10";
      $result = $site_db->query($sql);
      $top_list = array();
      $i = 1;
      while ($row = $site_db->fetch_array($result)) {
        $top_list[$i] = $row;
        $i++;
      }
      $site_db->free_result();

      for ($i = 1; $i <= 10; $i++) {
      if (isset($top_list[$i])) {
                 if (empty($top_list[$i]['image_thumb_file'])) {
                        $thumb_file = ICON_PATH."/".get_file_extension($top_list[$i]['image_media_file']).".gif";
               }else {
                         $thumb_file = (is_remote($top_list[$i]['image_thumb_file'])) ? $top_list[$i]['image_thumb_file'] : THUMB_PATH."/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file'];
               }
      }
        if (isset($top_list[$i])) {
          $register_array['image_postcards_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
          $register_array['image_postcards_openwindow_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
          if (isset($top_list[$i][$user_table_fields['user_name']]) && $top_list[$i]['user_id'] != GUEST) {
            $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $top_list[$i]['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'];
            $register_array['image_postcards_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".htmlspecialchars($top_list[$i][$user_table_fields['user_name']])."</a>";
          }
          else {
            $register_array['image_postcards_user_'.$i] = $lang['userlevel_guest'];
          }
          $register_array['image_postcards_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
          $register_array['image_postcards_number_'.$i] = "<b>".$top_list[$i]['image_postcards']."</b>";
          $register_array['image_postcards_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"".$thumb_file."\" border=\"1\" vspace=\"3\" alt=\"\" />";
        }
        else {
          $register_array['image_postcards_'.$i] = "--";
          $register_array['image_postcards_user_'.$i] = "--";
          $register_array['image_postcards_cat_'.$i] = "--";
          $register_array['image_postcards_number_'.$i] = "--";
          $register_array['image_postcards_thumb_'.$i] = "--";

        }
      }
      //--- Ende Top10 nach Postkarten -----------------------------------------------

      - 8.1 Top10 - Zusatz :
       - füge in deine top.html die folgenden Tags ein :
      - 8.1 Top 10 - Additive :
      - insert in your top.html the following tags :
      Code: [Select]
      {image_postcards_thumb_1}
      {image_postcards_1}
      {image_postcards_user_1}
      {image_postcards_cat_1}
      {image_postcards_number_1}
      .....

      {image_postcards_thumb_10}
      {image_postcards_10}
      {image_postcards_user_10}
      {image_postcards_cat_10}
      {image_postcards_number_10}



      Den MOD in Aktion findet ihr u.a. auch auf meiner Seite ...  :wink:
      You can find the MOD in action among others also on my website ...  :wink:   

      mawenzi

      27
      hi all,

      I want to restore the $row_bg_number after using a onmouseover-effect for a row of a list.
      I already tried some out, but however I got no result.

      at present I use the following, but of course it do not restore the bgcolor:
      Code: [Select]
      ...
      $count = 0;
      $bgcounter = 0;
      while ($row = $site_db->fetch_array($res)){
         if ($count == 0) {
            $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
            $list .= "<tr class=\"listrow".$row_bg_number."\" onmouseover=\"this.style.backgroundColor='#ffcccc'\" onmouseout=\"this.style.backgroundColor='#ffffff'\">\n";
          }
      ...

      Which code can I use for onmouseout to restore the bgcolor of the row ( class=\"listrow".$row_bg_number."\" ) ?
      Code: [Select]
      ...
      onmouseout=\"this.style. ?---???---? \">\n";
      ...

      thanks in advance
      mawenzi

      Pages: 1 [2]