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.


Messages - PaulHamann

Pages: [1]
1
Hello wh-em,

right. Thats a real good idea. I thought the same. Is any MOD out there? Or maby did you found something?

Greetz to the Community,
Paul Hamann

2
Chit Chat / Re: KurtW MODs and Templates
« on: July 20, 2009, 02:11:10 PM »
Hoffen wir das Beste, dass die Version 3 wieder freigegeben wird.  :?

War Version 3 denn schon für alle User verfügbar? Wer konkret hält Version 3 denn zurück und warum? Aus welchen Gründen? Ich möchte niemandem etwas unterstellen. Aber warum wird etwas zurückgehalten? Weil man was ist/hat/kann und jemand anderes nicht? Oder soll es was kosten?

Evtl. mag sich ja jemand finden, der das dann halt auf einer zweiten Spur macht, für normale Benutzer verfügbar. Scheinbar gibt es viel Interesse dieses MOD auch unter 1.7.7 laufen zu lassen.

Gruß an die Gemeinschaft,
Paul

3
Chit Chat / Re: KurtW MODs and Templates
« on: July 09, 2009, 09:11:52 PM »
Hallo Gemeinschaft,

also die PM-Funktion würde ich sehr begrüßen. Richtig dass das aktuelle MOD nicht mit 1.7.7 funktioniert? Dann werde ich auf Version 3 warten müssen?

Ein Lob an alle die hier für die Gemeinschaft programmieren!

Paul

4
Hello Scotnm, hello community,

i don't can help, but i want to do the same. Do you've found a solution? Did you searched this forum? I'll do this. Lets post here again, if anything will happen.

Best regards,
Paul
/ / / EDIT & UPDATE: / / /

Ok. It looks like nobody owns a MOD or something else. People (i forgot the name) said: Upload the Picture more than one - in every category you want. But it needs only one entry in the Database. Other People say they work more with tags, not with categories.
   
I guess I will choose the second solution. But i dont know how this will solve my problem.
My true Problem is (not the multiple categories):

I have 3 categories

Furniture (0 Pics)
- Seats (2 Pics)
- Tables (2 Pics)

When i click on "Furniture" i want to see pictures. The pictures from seats and teables! How can i solve this? Maby without multiple categories?

Best Regards,
Paul

5
Hallo Ozus, hallo Gemeinschaft,

danke. Nach kurzem Aufwand habe ich es zum laufen bekommen. Super. Folgenden Code habe ich direkt aus der index.php kopiert:

Code: [Select]
//-----------------------------------------------------
//--- Show Top Images ---------------------------------
//-----------------------------------------------------

$cat_match_sql = ($cat_id && check_permission("auth_viewcat", $cat_id)) ? "AND i.cat_id = '$cat_id' " : "";
$register_array = array();

$cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN");
// Rating
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".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)
        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_rating 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])) {
    $register_array['image_rating_'.$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'])."\">".format_text($top_list[$i]['image_name'], 2)."</a>" : format_text($top_list[$i]['image_name'], 2);
    $register_array['image_rating_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\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($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_rating_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".format_text($top_list[$i][$user_table_fields['user_name']])."</a>";
    }
    else {
      $register_array['image_rating_user_'.$i] = $lang['userlevel_guest'];
    }
    $register_array['image_rating_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".format_text($top_list[$i]['cat_name'])."</a>";
    $register_array['image_rating_number_'.$i] = "<b>".$top_list[$i]['image_rating']."</b> (".$top_list[$i]['image_votes']." ".$lang['votes'].")";
  }
  else {
    $register_array['image_rating_'.$i] = "--";
    $register_array['image_rating_user_'.$i] = "--";
    $register_array['image_rating_cat_'.$i] = "--";
    $register_array['image_rating_number_'.$i] = "--";
  }
}

// Votes
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".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)
        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_votes 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])) {
    $register_array['image_votes_'.$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'])."\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($top_list[$i]['image_name']);
    $register_array['image_votes_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\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($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_votes_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".format_text($top_list[$i][$user_table_fields['user_name']])."</a>";
    }
    else {
      $register_array['image_votes_user_'.$i] = $lang['userlevel_guest'];
    }
    $register_array['image_votes_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".format_text($top_list[$i]['cat_name'])."</a>";
    $register_array['image_votes_number_'.$i] = "<b>".$top_list[$i]['image_rating']."</b> (".$top_list[$i]['image_votes']." ".$lang['votes'].")";
  }
  else {
    $register_array['image_votes_'.$i] = "--";
    $register_array['image_votes_user_'.$i] = "--";
    $register_array['image_votes_cat_'.$i] = "--";
    $register_array['image_votes_number_'.$i] = "--";
  }
}

// Hits
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_hits, c.cat_name".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)
        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_hits 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])) {
    $register_array['image_hits_'.$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'])."\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($top_list[$i]['image_name']);
    $register_array['image_hits_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\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($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_hits_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".format_text($top_list[$i][$user_table_fields['user_name']])."</a>";
    }
    else {
      $register_array['image_hits_user_'.$i] = $lang['userlevel_guest'];
    }
    $register_array['image_hits_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".format_text($top_list[$i]['cat_name'])."</a>";
    $register_array['image_hits_number_'.$i] = "<b>".$top_list[$i]['image_hits']."</b>";
  }
  else {
    $register_array['image_hits_'.$i] = "--";
    $register_array['image_hits_user_'.$i] = "--";
    $register_array['image_hits_cat_'.$i] = "--";
    $register_array['image_hits_number_'.$i] = "--";
  }
}

// Downloads
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_downloads, c.cat_name".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)
        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_downloads 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])) {
    $register_array['image_downloads_'.$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'])."\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($top_list[$i]['image_name']);
    $register_array['image_downloads_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\">".format_text($top_list[$i]['image_name'])."</a>" : format_text($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_downloads_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".format_text($top_list[$i][$user_table_fields['user_name']])."</a>";
    }
    else {
      $register_array['image_downloads_user_'.$i] = $lang['userlevel_guest'];
    }
    $register_array['image_downloads_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".format_text($top_list[$i]['cat_name'])."</a>";
    $register_array['image_downloads_number_'.$i] = "<b>".$top_list[$i]['image_downloads']."</b>";
  }
  else {
    $register_array['image_downloads_'.$i] = "--";
    $register_array['image_downloads_user_'.$i] = "--";
    $register_array['image_downloads_cat_'.$i] = "--";
    $register_array['image_downloads_number_'.$i] = "--";
  }
}
$site_template->register_vars($register_array);
Oder sollte ich daran noch etwas ändern. Das "$site_template->register_vars($register_array);" kommt mir komisch vor. Sonnst alles ok mit dem Code? Hätte jemand Einwände / Vorschläge?

Ich bedanke mich vielmals und wünsche viel gutes.
Viele Grüße,

Paul

6
Hello Otus,

you asked an important question. I want to know it too. I use v1.7.7
How is it possible that i can show the "Top images" on home.php?
And i tried Mini-Top too and it works - but i think thats not the optimal way.
So i kicked Mini-Top and now i tried following

I want a style like "top.html". This list i want to right from "New images".

So i tried following:

Code: [Select]
<div id="home-zusammenfassung">

<div id="home-left">
TABLE BLA BLA
{lang_new_images}
TABLE BLA BLA
{new_images}
TABLE BLA BLA
</div><!-- div id home-left ENDE -->

<div id="home-right">
HERE I WANT TO GET THE TOP IMAGES
</div><!-- div id home-right ENDE -->

</div><!-- div id home-zusammenfassung ENDE -->

Of course I modified the CSS for the id's in an external File.
The Layout is ok.

Now i thought: hey, copy only the selected table from "top.html" into my created id="home-right" on "home.php".
For example i choose the code (direct copyd / not modified) for Showing images by rating. I only cutted the code for showing images by voting or downloading or something else.

Code: [Select]
                  <table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="bordercolor">
                        <table width="100%" border="0" cellpadding="3" cellspacing="0">
                          <tr>
                            <td class="head1" valign="top" colspan="5">{lang_top_image_rating}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1" align="center"><b>1</b></td>
                            <td valign="top" class="row1">{image_rating_1}</td>
                            <td valign="top" class="row1">{image_rating_user_1}</td>
                            <td valign="top" class="row1">{image_rating_cat_1}</td>
                            <td valign="top" class="row1" nowrap>{image_rating_number_1}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2" align="center"><b>2</b></td>
                            <td valign="top" class="row2">{image_rating_2}</td>
                            <td valign="top" class="row2">{image_rating_user_2}</td>
                            <td valign="top" class="row2">{image_rating_cat_2}</td>
                            <td valign="top" class="row2" nowrap>{image_rating_number_2}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1" align="center"><b>3</b></td>
                            <td valign="top" class="row1">{image_rating_3}</td>
                            <td valign="top" class="row1">{image_rating_user_3}</td>
                            <td valign="top" class="row1">{image_rating_cat_3}</td>
                            <td valign="top" class="row1" nowrap>{image_rating_number_3}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2" align="center"><b>4</b></td>
                            <td valign="top" class="row2">{image_rating_4}</td>
                            <td valign="top" class="row2">{image_rating_user_4}</td>
                            <td valign="top" class="row2">{image_rating_cat_4}</td>
                            <td valign="top" class="row2" nowrap>{image_rating_number_4}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1" align="center"><b>5</b></td>
                            <td valign="top" class="row1">{image_rating_5}</td>
                            <td valign="top" class="row1">{image_rating_user_5}</td>
                            <td valign="top" class="row1">{image_rating_cat_5}</td>
                            <td valign="top" class="row1" nowrap>{image_rating_number_5}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2" align="center"><b>6</b></td>
                            <td valign="top" class="row2">{image_rating_6}</td>
                            <td valign="top" class="row2">{image_rating_user_6}</td>
                            <td valign="top" class="row2">{image_rating_cat_6}</td>
                            <td valign="top" class="row2" nowrap>{image_rating_number_6}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1" align="center"><b>7</b></td>
                            <td valign="top" class="row1">{image_rating_7}</td>
                            <td valign="top" class="row1">{image_rating_user_7}</td>
                            <td valign="top" class="row1">{image_rating_cat_7}</td>
                            <td valign="top" class="row1" nowrap>{image_rating_number_7}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2" align="center"><b>8</b></td>
                            <td valign="top" class="row2">{image_rating_8}</td>
                            <td valign="top" class="row2">{image_rating_user_8}</td>
                            <td valign="top" class="row2">{image_rating_cat_8}</td>
                            <td valign="top" class="row2" nowrap>{image_rating_number_8}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1" align="center"><b>9</b></td>
                            <td valign="top" class="row1">{image_rating_9}</td>
                            <td valign="top" class="row1">{image_rating_user_9}</td>
                            <td valign="top" class="row1">{image_rating_cat_9}</td>
                            <td valign="top" class="row1" nowrap>{image_rating_number_9}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2" align="center"><b>10</b></td>
                            <td valign="top" class="row2">{image_rating_10}</td>
                            <td valign="top" class="row2">{image_rating_user_10}</td>
                            <td valign="top" class="row2">{image_rating_cat_10}</td>
                            <td valign="top" class="row2" nowrap>{image_rating_number_10}</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>

I upload the modified "home.php", reload the site and there is only ... i dont know how to say, but enough. I looked at the Sourcecode and it shows me:

Code: [Select]
CODE AND BLA BLA
                          <tr>
                            <td valign="top" class="row1" align="center"><b>1</b></td>
                            <td valign="top" class="row1"></td>
                            <td valign="top" class="row1"></td>
                            <td valign="top" class="row1"></td>
                            <td valign="top" class="row1" nowrap></td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2" align="center"><b>2</b></td>
                            <td valign="top" class="row2"></td>
                            <td valign="top" class="row2"></td>
                            <td valign="top" class="row2"></td>
                            <td valign="top" class="row2" nowrap></td>
                          </tr>
CODE AND BLA BLA

Do u see? Ther is no content in the td's. It looks like that the variables dosn't load.
Where is the failure? Do i have to change the "functions.php" too? Yes? - Where?
I really dont know why there is not the wished content.

I tried to explain the situation well. If any information important i will post it.
Thank everybody for help.

Paul

Pages: [1]