Author Topic: [MOD] eCard Counter / Postkartenzähler  (Read 136189 times)

0 Members and 1 Guest are viewing this topic.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #15 on: February 07, 2006, 11:39:50 PM »
... im Anhang der MOD-Beschreibung ...  :wink:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #16 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
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #17 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
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline wallpapers

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • Tuned-Cars.Net
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #18 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



Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #19 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 !
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #20 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.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Mirwais

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #21 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

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #22 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

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #23 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...?

Project offline

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #24 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
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #25 on: April 19, 2006, 05:10:59 PM »
Danke, das war zu hoch für mich :oops:

Project offline

Offline cookie

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #26 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?

Offline cookie

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #27 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 -----------------------------------
//-----------------------------------------------------

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #28 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:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline amordeo

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [MOD] eCard Counter / Postkartenzähler
« Reply #29 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 -----------------------------------------------