4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: mawenzi on November 15, 2005, 09:50:05 AM

Title: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on November 15, 2005, 09:50:05 AM
(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Vorwort :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - Preface :

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

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Dateien die zu ändern sind :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - Files to change are :

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 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 ... .
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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 ....


(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 1. Schritt
Öffne die Datei details.php sowie die Datei search.php und finde :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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")."

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und ersetze in beiden Dateien dieses durch den folgenden Code :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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")."

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - weiterhin finde :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - further find :
Code: [Select]
"lang_comment" => $lang['comment'],

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und füge darunter den folgenden Code ein :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - and insert below it the following code:
Code: [Select]
"lang_postcards" => $lang['postcards'],



(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 2. Schritt
Öffne die Datei postcards.php und finde :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 2. Step
Open the file postcards.php and find:
Code: [Select]
$site_email->set_body("postcard_message", $config['language_dir']);
$site_email->send_email(); 

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und füge darunter den folgenden Code ein :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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);


(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 3. Schritt
Öffne die Datei includes/functions.php und finde :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 3. Step
Open the file includes/functions.php and find :
Code: [Select]
"image_downloads" => $image_row['image_downloads'],

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und füge darunter den folgenden Code ein :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - and insert below the following code :
Code: [Select]
"image_postcards" => $image_row['image_postcards'],



(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 4. Schritt
Öffne die Datei lang/<deine_Sprache>/main.php und finde :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 4. Step
Open the file lang/<your_language>/main.php and find:
Code: [Select]
//-----------------------------------------------------
//--- Postcards ---------------------------------------
//-----------------------------------------------------

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und füge darunter den folgenden Code ein :
Code: [Select]
$lang['postcards'] = "Postkarten:";
$lang['total_postcards'] = "Alle Postkarten:";
$lang['new_postcards'] = "Neue Postkarten:";
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - and insert below the following code :
Code: [Select]
$lang['postcards'] = "Postcards:";
$lang['total_postcards'] = "All Postcards:";
$lang['new_postcards'] = "New Postcards:";



(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 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 :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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>

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und ersetze dieses durch den folgenden Code :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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>



(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 6. Schritt
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 6. Step

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



(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 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 ...
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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...


(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 7.1 Statistik - alle Postkarten
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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);

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



(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 7.2 Statistik - alle neuen Postkarten
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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);

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - In dem entsprechenden Template können dann als Summe aller neuen Postkarten (Counter) die folgenden Tags verwendet werden.
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - In the appropriate template the following tags can be used as sum of all new postcards (Counter).

Code: [Select]
{lang_new_postcards} {new_postcards}
(http://img517.imageshack.us/img517/1378/deu8yc.gif) - Und erzeugt die Anzeige z.B. so : Neue Postkarten: 12
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - And now the count is shown in such a way : New Postcards: 12



(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 8. Top10 - Zusatz :
 - füge in deine top.php den folgenden Code ein :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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 -----------------------------------------------

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - 8.1 Top10 - Zusatz :
 - füge in deine top.html die folgenden Tags ein :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - 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
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: IWS_steffen on November 15, 2005, 09:39:17 PM
Hi mawenzi

Dickes Danke für die Veröffentlichung des MODS. Der Postcard Counter läuft hervorragend. KLASSE!  :D

Grüsse aus Hamburg

Steffen
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on November 16, 2005, 12:33:34 AM
... Der Postcard Counter läuft hervorragend ...

Danke für deinen Test und die Information dazu ...  :D
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: V@no on November 16, 2005, 01:00:18 AM
Very nice mod!

If I may suggest ;) you could save a few steps and some headache by using include/db_field_definistions.php ;)
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on November 16, 2005, 01:26:26 AM
Very nice mod!

... thanks for the flowers ... :D

... you could save a few steps and some headache by using include/db_field_definistions.php ...

... mmm, by using db_field_definitions.php ... but nevertheless ... now is it done ... and it works ... (vcio eto) ... :wink:

mawenzi
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: kj_4fire on December 27, 2005, 01:38:45 AM
is there anyone help me to translate to English please?
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: V@no on December 27, 2005, 07:51:24 AM
http://translate.google.com/translate?u=http%3A%2F%2Fwww.4homepages.de%2Fforum%2Findex.php%3Ftopic%3D10439.0&langpair=de%7Cen&hl=en&safe=off&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools

Please note, use this link only for the instructions, the code should be copyed from this original page
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: JensF on December 31, 2005, 02:00:07 AM
Quote
Und erzeugt die Anzeige z.B. so : Neue Postkarten: 12

Hab da mal ne Frage zu. Theoretisch ist diese Zahl doch gleich der Zahl der neuen Bilder, oder? Denn jedes neue Bild bedeutet doch auch eine neue Postkarte!?

Obwohl, es werden mir 3 neue Postkarten angezeigt aber ich habe mehr als 3 neue Bilder in der Galerie  8O  :?:
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on December 31, 2005, 03:20:15 PM
... Denn jedes neue Bild bedeutet doch auch eine neue Postkarte!? ...

... NEIN ! ...
... Neue Postkarten bedeutet : Postkarten verschickt innerhalb deines "neu-Zeitraumes" ($new_cutoff) ...
... Alle Postkarten bedeutet : Postkarten die jemals von deiner Seite verschickt wurden (nach dieser MOD-Installation) ...

( deine andere Interpretation [Bild = Postkarte] würde doch keinen Sinn machen und nicht diese MOD-Installation rechtfertigen ...  :wink: )

mawenzi
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: JensF on December 31, 2005, 04:00:05 PM
Quote
deine andere Interpretation [Bild = Postkarte] würde doch keinen Sinn machen und nicht diese MOD-Installation rechtfertigen

Genau deswegen habe ich gefragt :)

Aber jetzt weiß ich ja wie es funktioniert. Danke!!!!
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on December 31, 2005, 05:30:48 PM
is there anyone help me to translate to English please?

(http://img517.imageshack.us/img517/1378/deu8yc.gif) / (http://img517.imageshack.us/img517/7821/eng9tu.gif) - A English MOD-translation now available !

mawenzi
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: lemccoy on January 18, 2006, 04:08:46 AM
Quote
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/thereal2/public_html/drunkisland/postcards.php:1) in /home/thereal2/public_html/drunkisland/includes/sessions.php on line 84

Say WHAAA?
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: V@no on January 18, 2006, 05:49:10 AM
FAQ
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on February 06, 2006, 11:23:30 PM
hallo ivan,

... $new_cutoff setzt den Wert für deine im ACP eingestellten "Tage als neu" ...
... wie folgt für deine Statistik ...
Code: [Select]
...
$new_cutoff = $config['new_cutoff'];
$new_postcard_cutoff = time() - 60 * 60 * 24 * $new_cutoff;
...

... willst du nun abweichend von deiner ACP-Einstellung eine andere Tageszahl als neu definieren ...
... dann ändere für deine Statistik ...
Code: [Select]
...
$new_cutoff = 21; //Tageszahl für Postkarte neu
$new_postcard_cutoff = time() - 60 * 60 * 24 * $new_cutoff;
...

mawenzi
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: michi-w. on February 07, 2006, 11:29:16 PM
Wo finde ich denn die postcards_install.php ?
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on February 07, 2006, 11:39:50 PM
... im Anhang der MOD-Beschreibung ...  :wink:
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Vincent on February 28, 2006, 09:31:56 PM
@Mawenzi
danke für den tip - jetzt funktioniert es einwandfrei - denke ich!
was mich aber noch interssieren würde ist - welches sind die 5 meistverschickten postkarten - könnte man das im Top.php integrieren?

gruss
vincent
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on February 28, 2006, 10:39:43 PM
@ Vincent,

... natürlich ...  :wink:
... habe die Erweiterung für die Top10 in der MOD-Beschreibung unter Punkt 8. hinzugefügt ...

mawenzi
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: wallpapers on March 21, 2006, 07:50:53 PM
this is a great mod.
this mod is added in 4images 1.7.2 and it is working  :D
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on March 22, 2006, 09:42:09 AM
@Ivan,
der unter Punkt 8 aufgeführte Code wird nur in die top.php vor die Zeile :
Code: [Select]
$site_template->register_vars($register_array);
eingefügt ... diese Zeile ist vorhanden ... und muss nicht erneut eingefügt werden !
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: IcEcReaM on March 22, 2006, 09:45:42 AM
Ersetze das
Code: [Select]
$register_array['image_postcards_number_'.$i] = "<b>".$top_list[$i]['image_postcards']."</b>";
durch das

Code: [Select]
$register_array['image_postcards_number_'.$i] = ($top_list[$i]['image_postcards']) ? "<b>".$top_list[$i]['image_postcards']."</b>" : '';
damit steht nichts da, wenn der Wert auf 0 ist.
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Mirwais on March 31, 2006, 03:40:05 PM
Quote
$site_email->set_body("postcard_message", $config['language_dir']);
$site_email->send_email(); 


is not in postcards.php

please help
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on March 31, 2006, 04:14:54 PM
Code: [Select]
$site_email->set_body("postcard_message", $config['language_dir']);
$site_email->send_email(); 

is not in postcards.php

...  :roll: ...
to find in postcards.php :
- 4images V.1.7.0 on line - 112 / 113
- 4images V.1.7.1 on line - 112 / 113
- 4images V.1.7.2 on line - 114 / 115

Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Flo2005 on April 13, 2006, 09:07:08 AM
Well - the counter works, but since yesterday there is the same value for "all postcards" and "new postcards" :?

Something goes wrong...?
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on April 19, 2006, 04:02:55 PM
@Flo2005

... da die Tabelle "image_postcards" neu angelegt wird, sind zunächst alle Postkarten zunächst auch alles neue Postkarten. Erst wenn deine Zeit für "neu" entsprechend der Einstellung im ACP ($new_cutoff) abgelaufen ist, dann werden sich diese Counterstände auch unterscheiden (ändern) ...

mawenzi
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Flo2005 on April 19, 2006, 05:10:59 PM
Danke, das war zu hoch für mich :oops:
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: cookie on May 25, 2006, 06:22:46 AM
I've installed this and it seems to work fine.

However, when I am not logged in, the phrase "postcards" does not show up in the detail page.  The actual number of postcards that has been sent DOES show up though.

When I log in, the phrase "postcards" appears.  I've double checked my code changes, and can't figure out why this is happening.

Any Ideas?
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: cookie on May 30, 2006, 07:53:31 PM
I found out what my problem was.  Your instructions in Step one should be clarified.

Where is says find:
Quote
  "lang_comment" => $lang['comment'],

Add Below:
Code: [Select]
"lang_postcards" => $lang['postcards'],

You should let people know that this line appears twice in the details.php file
Quote
  "lang_comment" => $lang['comment'],

The added line should be added under this section:
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------

AND NOT THIS SECTION:
//-----------------------------------------------------
//--- BBCode & Form -----------------------------------
//-----------------------------------------------------
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on June 02, 2006, 10:24:31 PM
die zahl 1 angezeigt wird. bei dir jedoch die zahl 0. wie kann ich das umstellen?
hast du bei deinem code was geändert??

1. bist du dir sicher, dass keine aktuellen Postkarten bei dir vorliegen, schau in deine DB ...
2. da gibt es eigentlich nichts umzustellen, denn es wird nur die Tabelle ausgelesen ...
3. ich habe nichts im Code geändert ...  :wink:
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: amordeo on June 29, 2006, 01:49:19 AM
hallo
bei mir funktioniert das in der Topliste nicht. es wird nicht mal "--" angezeigt, nur der Titel: http://www.fanfotos.ch/top.php

hier ist der code von top.php:

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."\" width=\"".$new_width."\" height=\"".$new_height."\" 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 -----------------------------------------------
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on June 29, 2006, 02:04:04 AM
@ amordeo

hast du Punkt 8.1 abgearbeitet ?
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: amordeo on June 29, 2006, 10:12:06 AM
hallo
ja habe ich:

Code: [Select]
<td class="head1" valign="top" colspan="5">{lang_top_image_postcards}</td>
</tr>
<tr>
  <td valign="top" class="row1" align="center"><b>1</b></td>
  <td valign="top" class="row1">{image_postcards_thumb_1}</td>
  <td valign="top" class="row1">{image_postcards_1}</td>
  <td valign="top" class="row1">{image_postcards_user_1}</td>
  <td valign="top" class="row1">{image_postcards_cat_1}</td>
  <td valign="top" class="row1" nowrap>{image_postcards_number_1}</td>
</tr>
<tr>
  <td valign="top" class="row2" align="center"><b>2</b></td>
  <td valign="top" class="row2">{image_postcards_thumb_2}</td>
  <td valign="top" class="row2">{image_postcards_2}</td>
  <td valign="top" class="row2">{image_postcards_user_2}</td>
  <td valign="top" class="row2">{image_postcards_cat_2}</td>
  <td valign="top" class="row2" nowrap>{image_postcards_number_2}</td>
</tr>
<tr>
  <td valign="top" class="row1" align="center"><b>3</b></td>
  <td valign="top" class="row1">{image_postcards_thumb_3}</td>
  <td valign="top" class="row1">{image_postcards_3}</td>
  <td valign="top" class="row1">{image_postcards_user_3}</td>
  <td valign="top" class="row1">{image_postcards_cat_3}</td>
  <td valign="top" class="row1" nowrap>{image_postcards_number_3}</td>
</tr>
<tr>
  <td valign="top" class="row2" align="center"><b>4</b></td>
  <td valign="top" class="row2">{image_postcards_thumb_4}</td>
  <td valign="top" class="row2">{image_postcards_4}</td>
  <td valign="top" class="row2">{image_postcards_user_4}</td>
  <td valign="top" class="row2">{image_postcards_cat_4}</td>
  <td valign="top" class="row2" nowrap>{image_postcards_number_4}</td>
</tr>
<tr>
  <td valign="top" class="row1" align="center"><b>5</b></td>
  <td valign="top" class="row1">{image_postcards_thumb_5}</td>
  <td valign="top" class="row1">{image_postcards_5}</td>
  <td valign="top" class="row1">{image_postcards_user_5}</td>
  <td valign="top" class="row1">{image_postcards_cat_5}</td>
  <td valign="top" class="row1" nowrap>{image_postcards_number_5}</td>
</tr>
<tr>
  <td valign="top" class="row2" align="center"><b>6</b></td>
  <td valign="top" class="row2">{image_postcards_thumb_6}</td>
  <td valign="top" class="row2">{image_postcards_6}</td>
  <td valign="top" class="row2">{image_postcards_user_6}</td>
  <td valign="top" class="row2">{image_postcards_cat_6}</td>
  <td valign="top" class="row2" nowrap>{image_postcards_number_6}</td>
</tr>
<tr>
  <td valign="top" class="row1" align="center"><b>7</b></td>
  <td valign="top" class="row1">{image_postcards_thumb_7}</td>
  <td valign="top" class="row1">{image_postcards_7}</td>
  <td valign="top" class="row1">{image_postcards_user_7}</td>
  <td valign="top" class="row1">{image_postcards_cat_7}</td>
  <td valign="top" class="row1" nowrap>{image_postcards_number_7}</td>
</tr>
<tr>
  <td valign="top" class="row2" align="center"><b>8</b></td>
  <td valign="top" class="row2">{image_postcards_thumb_8}</td>
  <td valign="top" class="row2">{image_postcards_8}</td>
  <td valign="top" class="row2">{image_postcards_user_8}</td>
  <td valign="top" class="row2">{image_postcards_cat_8}</td>
  <td valign="top" class="row2" nowrap>{image_postcards_number_8}</td>
</tr>
<tr>
  <td valign="top" class="row1" align="center"><b>9</b></td>
  <td valign="top" class="row1">{image_postcards_thumb_9}</td>
  <td valign="top" class="row1">{image_postcards_9}</td>
  <td valign="top" class="row1">{image_postcards_user_9}</td>
  <td valign="top" class="row1">{image_postcards_cat_9}</td>
  <td valign="top" class="row1" nowrap>{image_postcards_number_9}</td>
</tr>
<tr>
  <td valign="top" class="row2" align="center"><b>10</b></td>
  <td valign="top" class="row2">{image_postcards_thumb_10}</td>
  <td valign="top" class="row2">{image_postcards_10}</td>
  <td valign="top" class="row2">{image_postcards_user_10}</td>
  <td valign="top" class="row2">{image_postcards_cat_10}</td>
  <td valign="top" class="row2" nowrap>{image_postcards_number_10}</td>
</tr>

habe auch noch die top10 von lightbox eingefügt, aber auch da, das gleiche problem. benutze übrigens 1.7.2
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on June 29, 2006, 11:00:10 AM
@ amordeo

... soweit schein alles i.O. zu sein ...
... die top.php ist soweit ich sehe von Vers.1.7 bis 1.7.2 identisch, es kann also nicht an der Version liegen ...
... hast du den Postcard-Code in der top.php vor ...
Code: [Select]
$site_template->register_vars($register_array);
... eingefügt, d.h. diese Codezeile folgt unmittelbar dahinter ... ?
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: amordeo on June 29, 2006, 12:14:03 PM
ja genau das war das problem, danke
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: myr2904 on July 07, 2006, 05:42:09 PM
How can i add this mod on the home page??? pls help me
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on July 07, 2006, 09:25:01 PM
... what is your problem ... ?
... please read the installation instruction -> http://www.4homepages.de/forum/index.php?topic=10439.msg51881#msg51881
... and implement everything step by step ...
... thats all ...
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: myr2904 on July 07, 2006, 09:32:08 PM
... what is your problem ... ?
... please read the installation instruction -> http://www.4homepages.de/forum/index.php?topic=10439.msg51881#msg51881
... and implement everything step by step ...
... thats all ...
It's not working for home page ... index.php ....  it's working only for top.php :(
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on July 07, 2006, 09:40:42 PM
It's not working for home page ... index.php .... 

... you are right ... !
... it is working on detail-pages ...
... see at : Files to change are : ...
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: myr2904 on July 07, 2006, 09:43:20 PM
(http://img193.imageshack.us/img193/1617/top0mc.jpg) I want like this but top order by number of card sent
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on July 11, 2006, 09:57:39 AM
@ myr2904

... it is all described here : http://www.4homepages.de/forum/index.php?topic=10439.msg51881#msg51881 ...
... Step 8. Top 10 - Additive ...
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on July 28, 2006, 02:39:11 PM
... ich glaube dein Verständnis von diesem Counter ist nicht ganz richtig ...  :wink: ... der Counter "Neue Postkarten" zeigt alle Postkarten an, die gespeichert sind und die nicht älter als "neu" sind. Eigentlich analog "Neue Bilder"... . Kommt also im Laufe der "neu"-Zeit eine Postkarte hinzu, so zählt der Counter die Karte dazu. Läuft für eine Karte die "neu"-Zeit ab, so wird sie vom Counter nicht mehr angezeigt. Der Counter vergleicht nur das Datum der Karten mit der "neu"-Zeit und zählt dann alle relevaten Karten, die halt "neu" sind, zusammen. Der Counter wird also nicht immer automatisch auf "Null" zurückgestellt, wenn zwischenzeitlich wieder Karten dazugekommen sind ! Wenn du dem Counter nicht traus, dann vergleiche die Daten doch mal per MyPhpAdmin bzw. Postkarten-Plugin ...

"neu" -> $new_cutoff -> Neu Einstellung im ACP

PS. dein Counter steht gerade auf -> 3
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Silversand on August 17, 2006, 07:43:57 PM
Hallo, super MOD! Danke dafür. Aber heute scheine ich bisschen zäh zu sein, daher eine dumme Frage:

Was mache ich mit dem SQL Code das unter Punkt 7.1 aufgelistet wird?

Danke schon mal für die Antwort.  :oops:

SIlver
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on August 17, 2006, 07:58:27 PM
... eigentlich ist es ja schon unter Pkt. 7 beschrieben ...
... dieser Code dient als Erweiterung der dort mit Links angegeben Statistik-MODs ...
... mit ihm werden 1. alle versendeten Postkarten bzw. 2. alle versendeten Postkarten der letzten z.B. 10 Tage angezeigt ...
... du kannst den Code aber auch ohne die Statistik-MODs verwenden ...
... z.B. in die index.php einfügen und in der home.html die entsprechenden Tags verwenden ...

PS. ... aber ich sehe gerade Pkt. 7.1 war zweimal gelistet ... hab es geändert ... natürlich in Pkt.7.2 ...
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Silversand on August 17, 2006, 08:21:20 PM
super, danke dir! das mit der index ist eigentlich genau was ich suche.  :D
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Forty on September 18, 2006, 04:03:33 PM
in die top eingebaut und nun bekomme ich fehlerhafte sql.

ich benutze 1.7.3 vielleicht hat sich ja was geändert.

Code: [Select]
DB Error: Bad SQL Query: SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_postcards, c.cat_name, u.user_name, i.image_thumb_file, i.image_media_file FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.cat_id NOT IN (0) AND i.cat_id = c.cat_id ORDER BY i.image_postcards DESC, i.image_name ASC LIMIT 10
Unknown column 'i.user_id' in 'on clause'

link zur galerie: http://www.geranet.de/forty/4images/top.php
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on September 18, 2006, 04:20:24 PM
... es liegt nicht an der 4images-version sondern an der php-version ...
... tausche den Query gegen den folgenden Query aus ...
Code: [Select]
$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);
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Forty on September 18, 2006, 04:35:32 PM
ok danke funzt. also ist der von mir gepostete sql code ein veralteter? denn ich verwende eigentlich neuestes mysql und php.
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on September 18, 2006, 06:07:47 PM
... der geänderte code ist für php5 ... bist also up to date ... ;)
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on October 26, 2006, 04:48:38 PM
hallo ivan ... schau ich mir heute abend an ... ;)
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Acidgod on October 28, 2006, 06:25:02 PM
Sieht so aus als wenn deine Seite auf einer Windows Gurke läuft...


Du musst dann noch "image_postcards" definieren...
Schreibe mal oberhalb von "$site_template->register_vars(array(" einfach "$image_postcards;"....
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: valbuz on October 29, 2006, 02:44:32 PM
....
leider hat dies nicht funktioniert
habe oberhalb  $image_postcards; eingefügt, brachte aber nichts!

Hallo zusammen.
Ich habe mein System ebenfalls auf IIS.
Bei mir werden die Variablen (image_postcards_xxx) anscheinend nicht gefüllt.

In der Top-Liste bleiben die Zeilen leer.....

Hat jemand einen Hinweis?

Danke im voraus.
Pat
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Acidgod on October 31, 2006, 01:43:01 PM
bei mir ist auf 424
"image_postcards" => $image_row['image_postcards'],   

Mache da mal dies draus:
"image_postcards" => $image_row[image_postcards],   
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: valbuz on October 31, 2006, 10:09:21 PM
bei mir ist auf 424
"image_postcards" => $image_row['image_postcards'],   

Mache da mal dies draus:
"image_postcards" => $image_row[image_postcards],   
...bei mir haben die Aenderungen leider nicht gebracht....

Bin für jede neue Idee dankbar  :wink:

Gruss
Pat
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Acidgod on November 01, 2006, 09:27:00 AM
HAbe leider kein Testsystem, daher bleibt nur das rumstochern... (o:

Schaue später nochmal nach...
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Yeti on December 10, 2006, 05:31:33 PM
Der Zähler funktioniert gut, aber wenn ich Bilder suche,(oder auf "neue Bilder" klicke,) erscheint oben mehrfach: Notice: Undefined index: image_postcards in /www/htdocs/v157014/Gallery/includes/functions.php on line 411
Line 411 enthält den Code: "image_postcards" => $image_row['image_postcards'],
Scheint ja etwas ähnliches zu sein, wie bei Ivan...
Wenn ich das so ändere wie Acidgod für Valbuz vorschlägt erhöht sich die Zahl der Meldungen: Für jedes gefundene Bild erscheint:
Notice: Use of undefined constant image_postcards - assumed 'image_postcards' in /www/htdocs/v157014/Gallery/includes/functions.php on line 411
Notice: Undefined index: image_postcards in /www/htdocs/v157014/Gallery/includes/functions.php on line 411
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on December 10, 2006, 05:47:47 PM
Hallo Yeti,

... habe nochmals einiges geprüft, kann die Ursache jedoch nicht nachvollziehen ...
... Ivan hat das Problem offensichtlich gelöst, denn bei einem Such-Test bekomme ich bei ihm keine Fehlermeldung ...
... denn so wie ich dich verstanden habe erscheint die Meldung nur über die Suche ...
... also warten wir mal auf Ivans Meldung ... ;)
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Yeti on December 10, 2006, 06:07:02 PM
Dann darf man nur hoffen, das er sich noch mal meldet... Danke für die flotte Antwort.
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Yeti on December 10, 2006, 07:58:02 PM
Vielen Dank für die schnelle Hilfe. Mir reicht es, wenn die Meldung ausgeblendet wird, da ja sonnst alles Klasse funktioniert :wink:
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Mirwais on February 23, 2007, 08:36:45 PM
Hello!!

I have installed this mod in 4images 1,7,4.

But when I send an ecard, it don't register it  and it just veiwing
Postcards: 0

Could anyone can tell what is the problem.

Thanks advance
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on February 23, 2007, 09:16:47 PM
...  :roll: ... no URL ... no error message ... ?
... and via PhpMyAdmin you can see the count  "image_postcards" for this image ... ?
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Mirwais on February 23, 2007, 10:30:22 PM
...  :roll: ... no URL ... no error message ... ?
... and via PhpMyAdmin you can see the count  "image_postcards" for this image ... ?

Yepp!
It gives no error and all other things work fine.
and in PhpMyAdmin I can see that data has been registered,
Data registered in image_postcards
Quote
postcard_id  image_id  postcard_date  postcard_bg_color  postcard_border_color  postcard_font_color  postcard_font_face  postcard_sender_name  postcard_sender_email  postcard_recipient_name  postcard_recipient_email  postcard_headline  postcard_message  postcard_confirm 
      ff0c066368c0f239b5f4e4fb3a1e7541 1 1172258715 #ffffff #000000 #000000 arial admin *******@gmail.com admin ********@gmail.com ølaksjdf øalskdjfølaskdjasdfasdf'as'df'as'df'asdfasf 0


Hope u have solution,
Thanks for reply
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: terravision on February 28, 2007, 05:41:01 PM
Ich habe den MOD auch instaliert.
Aber leider kommt sobald ich auf das Thump klicke um das Bild groß zu sehen folgende Fehlermeldung:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /www/htdocs/v079538/4images/details.php on line 460

Was kann ich jetzt tun ?
Habe die Details.php genau wie beschrieben geändert .

http://www.terravisions.de/4images/categories.php?cat_id=16

Vielen Dank im vorraus.
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on February 28, 2007, 05:49:19 PM
... da schau mal in deiner details.php in Zeile 460 nach ...
... offensichtlich hast du beim Code einfügen eine Klammer ')' zu viel drinn gelassen ...
... eigentlich sind Fehlermeldungen doch sehr selbsterklärend ...
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Darkness2001 on August 14, 2007, 12:13:52 AM
Hi,

also habe genau den selben Fehler wie Ivan, und blende es erstmal mit dem Code von Ivan aus.
Vielleicht gibts ja noch ne andere Lösung  :lol:

Grüße Torsten  :mrgreen:
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: glitzer on October 30, 2007, 05:34:08 PM
Hi alle!
Ich check das leider nicht..wo kann ich diesen Teil einfügen?
Auf postcards.php, oder detail.php?
Ich habs nun auf index.php und auf detail.php probiert.
Wenn ich dann die variablen einfüge in details.html oder home.html dann wird nichts ausgegeben! Bitte um hilfe! danke
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);
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Frank Götze on December 12, 2007, 09:27:25 PM
Hallo,

falls jemand bei der Ausgabe in den Top10 die Thumbnails vermissen sollte, muss unter Pkt.8 von mawenzi auch die Größenangabe hier:
Code: [Select]
    $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."\" width=\"".$new_width."\" height=\"".$new_height."\" border=\"1\" vspace=\"3\" alt=\"\" />"; eingefügt werden. Je nach Größe also etwa so:
Code: [Select]
    $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=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />"; Nun funktioniert die Sache auch bei mir.

Danke  Mawenzi.
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on December 12, 2007, 11:10:07 PM
Hallo Frank,
... ja die ... width=\"".$new_width."\" ... und ... height=\"".$new_height."\" ...
... diese Werte stammen noch aus der proportionalen Größenumrechnung der Thumbnails ...
... diese Modifikation verwende ich in meiner Toplist, um die Thumbnails kleiner anzeigen zu lassen ...
... werde das im ersten Post ändern, um es allgemeingültig zu machen ...
... entweder die Größenangabe fest vorgeben ( so wie du vorgeschlagen ) ...
... oder die Größenangabe komplett entfallen lassen, um die tatsächliche Größe der Thumbnails anzuzeigen ...

Danke für den Hinweis
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: rubberduck on January 30, 2008, 02:43:39 PM
Hat schon jemand eine Lösung in Bezug auf diesen Fehler

http://www.4homepages.de/forum/index.php?topic=10439.msg81429#msg81429

gefunden? Hab den Mod gerade eingebaut (1.7.4) und hab das gleiche Problem. Das wurde jetzt mit einer "Notlösung" (direkte Abfrage in der Funktion show_image) gelöst, ist aber nicht gerade die beste Lösung, daher die Frage, weil ich es auf einigen Seiten hab laufen sehen, insbesondere die Anzeige der Postkarten im Thumb.

Title: Re: [MOD] Addon Counter im ACP / Sortierung
Post by: shadowhunter on March 25, 2008, 06:45:07 PM
hallo zusammen,
mit diesem Addon ist es möglich...

-Postcard-Counter im ACP zu ändern
-Sortierung nach Postkarten
-Suche nach Postkarten grösser/kleiner als

Verbesserungen:

/admin/images.php
6) suche
Code: [Select]
    show_hidden_input("downloadslower", $downloadslower);
ersetze
Code: [Select]
    show_hidden_input("downloadslower", $downloadslower);
    show_hidden_input("postcardsupper", $postcardsupper);
    show_hidden_input("postcardslower", $postcardslower);

/lang/admin.php
7) suche
Code: [Select]
$lang['field_downloads'] = "Anzahl Downloads";
ersetze
Code: [Select]
$lang['field_downloads'] = "Anzahl Downloads";
$lang['field_postcards'] = "Anzahl Postkarten";

Grüsse
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: shadowhunter on March 28, 2008, 08:23:32 PM
@ivan:
Du hast noch etwas wichtiges vergessen bei deinem Addon für "Postcard-Counter im ACP ändern":

/admin/images.php

Suche:
Code: [Select]
$image_downloads = (trim($HTTP_POST_VARS['image_downloads']) != "") ? intval($HTTP_POST_VARS['image_downloads']) : 0;
Erstetze:
Code: [Select]
  $image_downloads = (trim($HTTP_POST_VARS['image_downloads']) != "") ? intval($HTTP_POST_VARS['image_downloads']) : 0;
  $image_postcards = (trim($HTTP_POST_VARS['image_postcards']) != "") ? intval($HTTP_POST_VARS['image_postcards']) : 0;

Gruss
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: nfdieter on April 13, 2008, 06:35:24 PM
Moin, fange ja gerade mit 4Images an, und versuche den ein und anderen Mod einzubauen, bis jetzt erfolgreich :wink:

Hier habe ich folgendes Problem:

In der einzelnen Bildvorschau klappt die Anzeige der versendeten Grußkarten :D

In der top.html wird unten wohl was angezeigt, aber warum sind da 9 Thumbs, die keiner als Postkarte gewählt hat? Und schon gar kein Mpeg?
Nur der erste Thumb ist (im Moment gerade natürlich, selbst geschickt) richtig: http://emmelsbuell.net/fotos/top.php, ganz unten und da HPIM0604 .

Weiter bekomme ich es absolut nicht hin da eine Überschrift reinzubekommen :cry:

Gruß Dieter
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: KurtW on April 20, 2008, 07:24:31 PM
bei mir ist auf 424
"image_postcards" => $image_row['image_postcards'],   

Mache da mal dies draus:
"image_postcards" => $image_row[image_postcards],   
...bei mir haben die Aenderungen leider nicht gebracht....

Bin für jede neue Idee dankbar  :wink:

Gruss
Pat

Hallo,
hab mir grade mal den Thread durchgelesen.
Habt ihr folgendes schon mal ausprobiert, um diesen Fehler zu beseitigen:

In search.php
suche:
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")."
ersetze mit:
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")."

oder:
in includes/db_field_definitions.php
Code: [Select]
$additional_image_fields['image_postcards'] = array($lang['postcards'], "text", 1); einfügen vor:
Code: [Select]
?>


KurtW
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: alkanderi on July 09, 2008, 05:37:12 PM
Thank you for counter :)

I did same your steps up to step No.6 , but now i have problem in my site , If i do search for anything inside my site or i click any keywords this message will come

Notice: Undefined index: image_postcards in /home/therigi2/public_html/cards/includes/functions.php on line 411

you can chech in the site http://www.the-right-religion.com/cards/ (http://www.the-right-religion.com/cards/)
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on July 09, 2008, 06:56:41 PM
... man ist das ein alter Fehler ...  :oops:
... das Problem war sicher auch, dass bei mir alles besten läuft und ich so den Fehler nicht nachvollziehen konnte ...
... und dann wird man sicher betriebsblind ...
... ich hatte einfach die notwendige Änderung in der search.php damals nicht gepostet ...

Problemlösung :
... Kurts Lösungsansatz zur "search.php" ist absolut richtig (die Option additional_image_fields wird in diesem MOD mal nicht verwendet) ...
... danke Kurt ...
... ich werde das gleich im ersten Post hinzufügen ...

For all and also for alkanderi :

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - In search.php suche nach :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - In search.php search for :
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")."

(http://img517.imageshack.us/img517/1378/deu8yc.gif) - und ersetze mit :
(http://img517.imageshack.us/img517/7821/eng9tu.gif) - and replace with :
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")."
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on July 09, 2008, 10:56:30 PM
@ivan

... beim Aufruf welcher Seite ... ?
Title: ÑÏ: [MOD] eCard Counter / Postkartenzähler
Post by: alkanderi on July 10, 2008, 12:41:54 AM
Still same error


Notice: Undefined index: image_postcards in /home/therigi2/public_html/cards/includes/functions.php on line 411
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on July 10, 2008, 09:32:01 AM
@ivan
... auf deiner Website konnte ich den Fehler nicht nachvollziehen ... ?
... unterdrückst du dort die Fehlermeldung ... ?
... der Postkartencount wird aber richtig angezeigt .... !
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on July 10, 2008, 11:57:56 AM
@alkanderi

... sorry, but I can't locate the reason for the error message ...
... for not showing this message, please use first Ivans solution ... here ..
... http://www.4homepages.de/forum/index.php?topic=10439.msg84570#msg84570 ...
Title: ÑÏ: [MOD] eCard Counter / Postkartenzähler
Post by: alkanderi on July 11, 2008, 11:36:37 PM
Thank you mawenzi

Now ok no error with search

But there is white space in the page edges

What I have to do now ?

:(
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Skaos on April 01, 2009, 08:17:19 AM
So habs nun installiert und es funzt gut.... aber...

wo muss ich die punkte 7.1 Statistik - alle Postkarten und 7.2 Statistik - alle neuen Postkarten einfügen?

Danke
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: mawenzi on April 01, 2009, 09:16:37 AM
@ Skaos ...

... nur für den Fall , wenn du die dann folgend aufgezählten Statistik-MOD's installiert hast ...
Title: Re: [MOD] eCard Counter / Postkartenzähler
Post by: Skaos on April 01, 2009, 10:35:36 AM
@ Skaos ...

... nur für den Fall , wenn du die dann folgend aufgezählten Statistik-MOD's installiert hast ...

ich wollte ja den rest ab 7 auch noch einbauen aber wie gesagt weiss nicht wohin mit 7.1. und 7.2