4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Turboss on October 23, 2005, 05:02:24 PM

Title: Profil erweitern
Post by: Turboss on October 23, 2005, 05:02:24 PM
Gibt es ein Script, mit dem ich mehr Angaben in das UserProfil erstellen kann. Da wären z.b. Hobbys, Beruf etc.
Danke im voraus!!
Title: Re: Profil erweitern
Post by: JensF on October 23, 2005, 06:03:03 PM
Ich hab da mal was. Vielleicht hilft es dir...

Quote
Anleitung für zusätzliche Felder im Profil.

Beispiel für ein Zusatzfeld um seinen Namen einzutragen.



1. Datenbank Tabelle in 4images_users erstellen

Feld: user_fullname | Typ: Varchar | Länge 255

-------------------------

2. öffne Datei includes/db_field_definations.php

über ?> folgendes einfügen

$additional_user_fields['user_fullname'] = array($lang['fullname'], "text", 0);

-------------------------

3. öffne includes/page_header.php

suche

"charset" => $lang['charset'],

danach einfügen

"lang_fullname" => $lang['fullname'],

---------------------------

4. öffne lang/deine Sprache/main.php

vor ?> einfügen

$lang['fullname'] = "Richtiger Name:";

---------------------------

5. öffne templates/default/member_editprofile.html

an gewünschter Stelle folgendes einfügen

          <tr>
            <td class="row2"><b> - {lang_fullname}</b></td>
            <td class="row2">
              <input type="text" name="user_fullname"  size="30" value="{user_fullname}" class="input" />
            </td>
          </tr>

--------------------------

6. öffne templates/default/member_profile.html

an gewünschter Stelle folgendes einfügen

        <tr>
          <td class="row2"><b> - {lang_fullname}</b></td>
          <td class="row2">{user_fullname}</td>
        </tr>

--------------------------


Um das ganze dann auch gleich beim registrieren zu haben

öffne templates/default/register_form.html

an gewünschter Stelle einfügen

          <tr>
            <td class="row2"><b> - {lang_fullname}</b></td>
            <td class="row2">
              <input type="text" name="user_fullname"  size="30" value="{user_fullname}" class="input" />
            </td>
          </tr>

-----------------------------
Title: Re: Profil erweitern
Post by: Turboss on October 23, 2005, 08:56:08 PM
Cool, das ging ja schnell!!
Vielen Dank, ich teste das gleich!







Prima - hat so geklappt, wie ich es mir gewünscht habe - danke!!!!
Title: Re: Profil erweitern
Post by: Michael on December 19, 2005, 12:13:25 PM
Hallo,
würde das ganze auch als Profil Signatur funktionieren und auch entsprechend unter dem Kommentar ausgegeben werden?

Gruß, Michael
Title: Re: Profil erweitern
Post by: Darkness2001 on December 19, 2005, 01:36:54 PM
Hallo Michael,

also ich suche da auch schon lange und habe einiges ausprobiert.

Also unter den Kommentaren habe ich es bisher n9och nicht funktionstüchtig einbauen können.
Funkt. leider nicht (bei mir)

Grüße Darkness  :mrgreen:

Ps: Vielleicht hat ja jemand nen Tip!
Title: Re: Profil erweitern
Post by: kim242 on December 19, 2005, 03:59:30 PM
super erklärt danke !!!!! :D
Title: Re: Profil erweitern
Post by: mawenzi on December 19, 2005, 04:34:06 PM
würde das ganze auch als Profil Signatur funktionieren und auch entsprechend unter dem Kommentar ausgegeben werden?

... na klar ...  :wink:

1. Schritt
wie oben von Jens erklärt ... ein zusätzliches Feld mit "user_signature" in der Tabelle "4images_users" anlegen. Wenn du das DreamBoard installiert hast, dann befindet sich diese Feld bereits in deiner User-Tabelle. Mit den anderen Schritten ist dann analog zu Jens Ausführungen zu verfahren ... .


2. Schritt
finde in details.php (hier Original-Code) nach --- Show Comments --- :
Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_id")"
und  füge .get_user_table_field(", u.", "user_signature") hinzu, wie folgt :
Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_signature")"


3. Schritt
finde in details.php :
Code: [Select]
$site_template->register_vars(array(
        "comment_id" => $comment_row[$i]['comment_id'],
und füge unmittelbar davor folgendes ein :
Code: [Select]
$signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
$sig = '<br><br>' . $signature ;
Optional :
wenn du das DreamBoard installiert hast, dann kannst du auch folgendes verwenden :
Code: [Select]
$signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
      if ($boardconfig['alow_sig'] == 1) {
                        $sig = '<br><br>' . $signature ;
                          } else {
                        $sig = "";
                          }
so wird je nach deiner Einstellung im ACP -> Board die Signatur angezeigt oder auch nicht ... !


4. Schritt
finde in details.php :
Code: [Select]
"comment_user_ip" => $comment_user_ip,
und füge unmittelbar dahinter folgendes ein :
Code: [Select]
"comment_sig" => $sig,


5. Schritt
finde in comment_bit.html :
Code: [Select]
{comment_text}
und füge unmittelbar dahinter folgendes ein :
Code: [Select]
{comment_sig}

... das wars ...  :wink:
mawenzi

Title: Re: Profil erweitern
Post by: Michael on December 19, 2005, 04:40:13 PM
WOW ... das nenne ich eine detaillierte Anleitung  :mrgreen:

Werde das heute im laufe des Abend mal testen.

DANKE  :D

Title: Re: Profil erweitern
Post by: Michael on December 19, 2005, 07:04:11 PM
Schon bei dem ersten Schritt erhalte ich folgende Fehlermeldungen:

Code: [Select]
DB Error: Bad SQL Query: 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_ip, c.comment_date, u.user_level, u.user_name, u.user_email, u.user_showemail, u.user_invisible, u.user_joindate, u.user_lastaction, u.user_comments, u.user_homepage, u.user_icq, u.user_id, i.user_id_last_vote, i.last_vote, i.last_rating, i.user_name_vote, i.image_photographer FROM 4images_comments c LEFT JOIN 4images_users u ON (u.user_id = c.user_id) WHERE c.image_id = 8599 ORDER BY c.comment_date ASC
Unknown table 'i' in field list

Das ganze soll ja in der details.php unter "show comments" rein, hier ein Ausschnitt:

Code: [Select]
//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------
if ($image_allow_comments == 1) {
  $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_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq")."
          FROM ".COMMENTS_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          WHERE c.image_id = $image_id
          ORDER BY c.comment_date ASC";
  $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 = "<tr><td class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
  }
  else {
    $comments = "";
    $bgcounter = 0;
    for ($i = 0; $i < $num_comments; $i++) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

      $comment_user_email = "";
      $comment_user_email_save = "";
      $comment_user_mailform_link = "";
      $comment_user_email_button = "";
      $comment_user_homepage_button = "";
      $comment_user_icq_button = "";
      $comment_user_profile_button = "";
      $comment_user_status_img = REPLACE_EMPTY;
      $comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);
      $comment_user_info = $lang['userlevel_guest'];

      $comment_user_id = $comment_row[$i]['user_id'];
      $user_row_comment = get_user_info($comment_user_id);

      if (isset($comment_row[$i][$user_table_fields['user_name']]) && $comment_user_id != GUEST) {
        $comment_user_name = htmlspecialchars($comment_row[$i][$user_table_fields['user_name']]);

        $comment_user_profile_link = !empty($url_show_profile) ? $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_show_profile)) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$comment_user_id);
        $comment_user_profile_button = "<a href=\"".$comment_user_profile_link."\"><img src=\"".get_gallery_image("profile.gif")."\" border=\"0\" alt=\"".$comment_user_name."\" /></a>";

        $comment_user_status_img = ($comment_row[$i][$user_table_fields['user_lastaction']] >= (time() - 300) && ((isset($comment_row[$i][$user_table_fields['user_invisible']]) && $comment_row[$i][$user_table_fields['user_invisible']] == 0) || $user_info['user_level'] == ADMIN)) ? "<img src=\"".get_gallery_image("user_online.gif")."\" border=\"0\" alt=\"Online\" />" : "<img src=\"".get_gallery_image("user_offline.gif")."\" border=\"0\" alt=\"Offline\" />";

        $comment_user_homepage = (isset($comment_row[$i][$user_table_fields['user_homepage']])) ? format_url($comment_row[$i][$user_table_fields['user_homepage']]) : "";
        if (!empty($comment_user_homepage)) {
          $comment_user_homepage_button = "<a href=\"".$comment_user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$comment_user_homepage."\" /></a>";
        }

        $comment_user_icq = (isset($comment_row[$i][$user_table_fields['user_icq']])) ? $comment_row[$i][$user_table_fields['user_icq']] : "";
        if (!empty($comment_user_icq)) {
          $comment_user_icq_button = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=".$comment_user_icq."\" target=\"_blank\"><img src=\"http://web.icq.com/whitepages/online?icq=".$comment_user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$comment_user_icq."\" /></a>";
        }

        if (!empty($comment_row[$i][$user_table_fields['user_email']]) && (!isset($comment_row[$i][$user_table_fields['user_showemail']]) || (isset($comment_row[$i][$user_table_fields['user_showemail']]) && $comment_row[$i][$user_table_fields['user_showemail']] == 1))) {
          $comment_user_email = $comment_row[$i][$user_table_fields['user_email']];
          $comment_user_email_save = str_replace("@", " at ", $comment_row[$i][$user_table_fields['user_email']]);
          if (!empty($url_mailform)) {
            $comment_user_mailform_link = $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_mailform));
          }
          else {
            $comment_user_mailform_link = $site_sess->url(ROOT_PATH."member.php?action=mailform&amp;".URL_USER_ID."=".$comment_user_id);
          }
          $comment_user_email_button = "<a href=\"".$comment_user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$comment_user_email_save."\" /></a>";
        }

        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'];
        }

        $comment_user_info .= "<br />";
        $comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_joindate']])) ? "<br />".$lang['join_date']." ".format_date($config['date_format'], $comment_row[$i][$user_table_fields['user_joindate']]) : "";
        $comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_comments']])) ? "<br />".$lang['comments']." ".$comment_row[$i][$user_table_fields['user_comments']] : "";
      }

      $comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";

      $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=\"_blank\">".$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=\"_blank\">".$lang['delete']."</a>";
      }
      elseif ($is_image_owner) {
        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
      }

      $site_template->register_vars(array(
        "comment_id" => $comment_row[$i]['comment_id'],
        "user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_row_comment['user_avatar'] == "") ? "blank.gif" : $user_row_comment['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" : "",
        "comment_user_id" => $comment_user_id,
        "comment_user_status_img" => $comment_user_status_img,
        "comment_user_name" => $comment_user_name,
        "comment_user_info" => $comment_user_info,
        "comment_user_profile_button" => $comment_user_profile_button,
        "comment_user_email" => $comment_user_email,
        "comment_user_email_save" => $comment_user_email_save,
        "comment_user_mailform_link" => $comment_user_mailform_link,
        "comment_user_email_button" => $comment_user_email_button,
        "comment_user_homepage_button" => $comment_user_homepage_button,
        "comment_user_icq_button" => $comment_user_icq_button,
        "comment_user_ip" => $comment_user_ip,
        "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
        "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
        "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
        "row_bg_number" => $row_bg_number,
        "admin_links" => $admin_links
      ));
      $comments .= $site_template->parse_template("comment_bit");
    } // end while
  } //end else
  $site_template->register_vars("comments", $comments);
  unset($comments);

das Problem liegt hier schon am:  .get_user_table_field(", u.", "user_signature").$additional_sql.
es werden neben der Fehlermeldung auch keinerlei Kommentare mehr angezeigt!

Gruß, Michael
Title: Re: Profil erweitern
Post by: mawenzi on December 19, 2005, 08:35:04 PM
@Michael,

1. ... der erste Schritt war die Datenbankerweiterung und die Eingabe über die member_profile.html ... ?
2. ... dein Bad SQL Query hat doch nichts mit dem Code aus Show Comments zu tun ... i.user_id_last_vote, i.last_vote, .... wo kommt denn das her ... ?
3. ... was sollen wir mit deinem Code --- Show Comments --- ?
4. ... habe es genau wie beschrieben bei mir eingebaut : hier zu sehen (http://klick.kl.funpic.de/details.php?image_id=3117)
5. ... bitte die Anleitung systematisch abarbeiten ... !


mawenzi

Title: Re: Profil erweitern
Post by: Michael on December 19, 2005, 09:54:20 PM
Hallo Mawenzi,

sorry ich meinte ab Schritt 2.

Die Fehler treten auf sobald ich den 2. Schritt tätige, Schritt 1 funktioniert ohne Probleme und ich kann über das Kontrollzentrum auch eine Signatur eingeben.

Quote
3. ... was sollen wir mit deinem Code --- Show Comments --- ?

Du schreibst:
Quote
2. Schritt
finde in details.php :

Code:
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS......

Genau das habe ich gesucht und entsprechend ersetzt, dieses steht in meiner details.php genau unter "show comments" und nur dort!
Ich habe das nun mehrmals ausprobiert und es kann gut sein das es bei mir nicht funktioniert da ich schon viele "Mods" mit eingebunden habe.

Fakt ist das bei Schritt 2 die Fehler, zumindest bei meinem Scribt, auftauchen.

Gruß, Michael
Title: Re: Profil erweitern
Post by: Loda on December 19, 2005, 11:52:59 PM
ich habe im schritt 3 die ";" semikolon am ende durch ein "," komma ersetzt.
dann ging es bei mir.
Title: Re: Profil erweitern
Post by: Michael on December 20, 2005, 12:05:45 AM
BINGO ...

nun klappts auch mit dem Nachbarn  :mrgreen:

DANKE

Gruß, Michael
Title: Re: Profil erweitern
Post by: mawenzi on December 20, 2005, 10:18:34 AM
ich habe im schritt 3 die ";" semikolon am ende durch ein "," komma ersetzt.

... habt ihr den Code von Schritt 3 vor $site_template->register_vars... eingefügt ?

5. ... bitte die Anleitung systematisch abarbeiten ... !

@Michael ... dann klappst ...  :wink:

mawenzi
Title: Re: Profil erweitern
Post by: Loda on December 20, 2005, 10:22:04 AM
hallo!
sorry.. das habe ich wohl überlesen..  :(
nächstes mal schaue mir das gründlicher an..
danke dir!
Title: Re: Profil erweitern
Post by: JensF on December 20, 2005, 06:34:36 PM
Hallo,

ich habe mal eine Frage zu Schritt 2. Diese Daten werden bei mir aus der comments table abgerufen. Dort befindet sich aber nichts zur Signature. Das befindet sich bei mir in der users table.

Daher denke ich ich muss die Zeile LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id) erweitern. Habe mal probiert aber ich bekomme es mal wieder nicht hin. Habe immer ne weiße Seite.

Die ganze Abfrage sieht bei mir so aus:

Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_id").$additional_sql."
          FROM ".COMMENTS_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          WHERE c.image_id = $image_id
          ORDER BY c.comment_date ASC
          LIMIT $offset, $commentperpage";
Title: Re: Profil erweitern
Post by: mawenzi on December 20, 2005, 06:59:52 PM
hier mein kompletter query ... mal zu Vergleich ... incl. "user_signature" ...
Code: [Select]
  $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_signature").$additional_sql."
          FROM ".COMMENTS_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          WHERE c.image_id = $image_id
          ORDER BY c.comment_date ASC
          LIMIT $offset, $commentperpage";

... hoffe du kommst damit weiter ...
Title: Re: Profil erweitern
Post by: JensF on December 20, 2005, 07:14:26 PM
Quote
... hoffe du kommst damit weiter ...

Leider nicht. Genau so hatte ich das erst eingebaut aber es wird keine Signatur in schon vorhandenen Kommentaren angezeigt und auch beim schreiben neuer Kommentare tut sich nix.

Daher dachte ich das es anders aussehen muss weil die signatur bei mir in der users Tabelle abgelegt ist....
Title: Re: Profil erweitern
Post by: mawenzi on December 20, 2005, 07:20:43 PM
... den Fehler in Schritt 3 ... wie Loda / Michael ... hast du nicht gemacht ... ?
Title: Re: Profil erweitern
Post by: Michael on December 20, 2005, 07:23:32 PM
Daher dachte ich das es anders aussehen muss weil die signatur bei mir in der users Tabelle abgelegt ist....

dort ist sie auch richtig abgelegt!
Title: Re: Profil erweitern
Post by: mawenzi on December 20, 2005, 07:29:58 PM
@Michael

... ich hoffe du hast die ;'s wieder replatziert ...  :wink:
Title: Re: Profil erweitern
Post by: JensF on December 20, 2005, 07:31:00 PM
... den Fehler in Schritt 3 ... wie Loda / Michael ... hast du nicht gemacht ... ?

Ich denke nicht. Habe es davor eingebaut. So sieht der Teil bei mir da aus...

Code: [Select]
elseif ($is_image_owner) {
        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
      }
      $signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
      if ($boardconfig['alow_sig'] == 1) {
                        $sig = '<br><br>' . $signature ;
                          } else {
                        $sig = "";
                          }
      $site_template->register_vars(array(
        "comment_id" => $comment_row[$i]['comment_id'],
        "user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($comment_row[$i]['user_avatar'] == "") ? "blank.gif" : $comment_row[$i]['user_avatar'])."\" name=\"icons\" border=\"0\" hspace=\"15\" alt=\"\">" : "",
        "comment_user_pm" => ($user_info['user_id'] != $comment_row[$i]['user_id'] && $user_info['user_level'] >= USER && $config['pm']) ? "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=quote&mode=comment&id=".$comment_row[$i]['comment_id']."user_id=".$comment_row[$i]['user_id'])."\" /><img src=\"".get_gallery_image("pm.gif")."\" border=\"0\" alt=\"".$lang['pm_user_pm_alt']."\" /></a>" : "",
        "lang_comments_per_page" => $lang['comments_per_page'],

Ich erhalte auch keine Fehlermeldung oder so.
Title: Re: Profil erweitern
Post by: Michael on December 20, 2005, 07:31:21 PM
@Michael

... ich hoffe du hast die ;'s wieder replatziert ...  :wink:

ja ja ... hab ich  :oops:
Title: Re: Profil erweitern
Post by: JensF on December 20, 2005, 07:35:27 PM
Habe was rausgefunden :)

Wenn ich das nutze

Code: [Select]
$signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
$sig = '<br><br>' . $signature ;

dann geht es. Aber wenn ich das vom Dreamboard nehme dann nicht...
Title: Re: Profil erweitern
Post by: mawenzi on December 20, 2005, 07:37:13 PM
@ Jens

... du hast den DreamBoard-Code genommen ... !
... dann must du auch im ACP->Config Board die Signatur erlauben (ganz unten) ... !
Title: Re: Profil erweitern
Post by: JensF on December 20, 2005, 07:44:54 PM
@ Jens

... du hast den DreamBoard-Code genommen ... !
... dann must du auch im ACP->Config Board die Signatur erlauben (ganz unten) ... !

Ja, hatte ich erst. Sig ist erlaubt im Dreamboard

Wir auch beim Forenpost ohne Probleme mit eingefügt.....Aber ist auch nicht so tragisch. Der andere Code geht und ich habe nicht vor die Signatur zu verbieten :)
Wenn das Problem allerdings gelöst wird wäre das natürlich nicht schlecht.
Title: Re: Profil erweitern
Post by: Darkness2001 on December 22, 2005, 12:30:49 PM
Hallo,

habe auch alles soweit eingebaut, doch bei den Kommentaren wird keine "signatur" angezeigt, egal ob ich :

$signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
$sig = '<br><br>' . $signature ;

oder

     $signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
      if ($boardconfig['alow_sig'] == 1) {
      $sig = '<br><br>' . $signature ;
       } else {
      $sig = "";
       }

das nehme? Woran kann das liegen, habe das Board installiert, da wird die "sig" angezeigt

Bei der sql Abfrage sieht es bei mir so aus:

  $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_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_signature").$additional_sql.", u.userpic
         FROM ".COMMENTS_TABLE." c

In der comment_bit.html habe ich das so eingefügt:

 {comment_text}
-{comment_sig}-

In der db_field sieh es so aus:

$additional_user_fields['user_signature'] = array($lang['user_signature'], "text", 0);

und in der page_header so:

  "lang_signature" => $lang['signature'],

(http://www.huebner-2.de/a-a-sig.jpg)

kann einfach den Fehler nicht finden, wer hat die Lösung ??

Grüße Darkness
Title: Re: Profil erweitern
Post by: mawenzi on December 22, 2005, 04:31:39 PM
... kann einfach den Fehler nicht finden ...

... ich auch nicht, zumindest nicht mit deinen Angaben ...
... aber es hat sich gezeigt, dass eigentlich immer Fehler bei der Code-Platzierung gemacht wurden ...
... bitte gehe die Anleitung nochmals durch und beachte ... davor ... dahinter ...

mawenzi
Title: Re: Profil erweitern
Post by: Darkness2001 on December 22, 2005, 04:51:05 PM
... kann einfach den Fehler nicht finden ...

... ich auch nicht, zumindest nicht mit deinen Angaben ...
... aber es hat sich gezeigt, dass eigentlich immer Fehler bei der Code-Platzierung gemacht wurden ...
... bitte gehe die Anleitung nochmals durch und beachte ... davor ... dahinter ...

mawenzi

Hi, ja bin ich schon dreimal  :oops:
Doch ich weiss echt nicht wo der Fuchs steckt


//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------
if ($image_allow_comments == 1) {
   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 = 5;
   }
   $commentsperpage_dropdown = "\n<select name=\"commentsetperpage\" onchange=\"if (this.options[this.selectedIndex].value != 0){ forms['commentsperpage'].submit() }\" class=\"select\">\n";
   for($i = 1; $i <= 15; $i++) {
    $setvalue = 1 * $i;
    $commentsperpage_dropdown .= "<option value=\"".$setvalue."\"";
      if ($setvalue == $commentperpage) {
      $commentsperpage_dropdown .= " selected=\"selected\"";
    }
    $commentsperpage_dropdown .= ">";
    $commentsperpage_dropdown .= $setvalue;
    $commentsperpage_dropdown .= "</option>\n";
   }
   $commentsperpage_dropdown .= "</select>\n";

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

 $sql = "SELECT COUNT(image_id) AS comments
     FROM ".COMMENTS_TABLE."
     WHERE image_id = $image_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."details.php?image_id=$image_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(
    "paging" => $getpaging->get_paging(),
    "paging_stats" => ($num_comments) ? $getpaging->get_paging_stats() : ""
   ));
   
 $additional_sql = "";
 if (!empty($additional_user_fields)) {
   $table_fields = $site_db->get_table_fields(USERS_TABLE);
   foreach ($additional_user_fields as $key => $val) {
     if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
       $additional_sql .= ", $key = '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
     }
   }
 }

  $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_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_signature").$additional_sql.", u.userpic
         FROM ".COMMENTS_TABLE." c
         LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
         WHERE c.image_id = $image_id
         ORDER BY c.comment_date ASC
         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 = "<tr><td class=\"row2\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
  }
  else {
    $comments = "";
    $bgcounter = 0;
    for ($i = 0; $i < $num_comments; $i++) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

      $comment_user_email = "";
      $comment_user_email_save = "";
      $comment_user_mailform_link = "";
      $comment_user_email_button = "";
      $comment_user_homepage_button = "";
      $comment_user_icq_button = "";
      $comment_user_profile_button = "";
      $comment_user_status_img = REPLACE_EMPTY;
      $comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);
     $comment_user_info = $lang['userlevel_guest'];
      $comment_user_id = $comment_row[$i]['user_id'];

      if (isset($comment_row[$i][$user_table_fields['user_name']]) && $comment_user_id != GUEST) {
        $comment_user_name = htmlspecialchars($comment_row[$i][$user_table_fields['user_name']]);

        $comment_user_profile_link = !empty($url_show_profile) ? $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_show_profile)) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$comment_user_id);
        $comment_user_profile_button = "<a href=\"".$comment_user_profile_link."\"><img src=\"".get_gallery_image("profile.gif")."\" border=\"0\" alt=\"".$comment_user_name."\" /></a>";

        $comment_user_status_img = ($comment_row[$i][$user_table_fields['user_lastaction']] >= (time() - 300) && ((isset($comment_row[$i][$user_table_fields['user_invisible']]) && $comment_row[$i][$user_table_fields['user_invisible']] == 0) || $user_info['user_level'] == ADMIN)) ? "<img src=\"".get_gallery_image("user_online.gif")."\" border=\"0\" alt=\"Online\" />" : "<img src=\"".get_gallery_image("user_offline.gif")."\" border=\"0\" alt=\"Offline\" />";

        $comment_user_homepage = (isset($comment_row[$i][$user_table_fields['user_homepage']])) ? format_url($comment_row[$i][$user_table_fields['user_homepage']]) : "";
        if (!empty($comment_user_homepage)) {
          $comment_user_homepage_button = "<a href=\"".$comment_user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$comment_user_homepage."\" /></a>";
        }

        $comment_user_icq = (isset($comment_row[$i][$user_table_fields['user_icq']])) ? $comment_row[$i][$user_table_fields['user_icq']] : "";
        if (!empty($comment_user_icq)) {
          $comment_user_icq_button = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=".$comment_user_icq."\" target=\"_blank\"><img src=\"http://web.icq.com/whitepages/online?icq=".$comment_user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$comment_user_icq."\" /></a>";
        }

        if (!empty($comment_row[$i][$user_table_fields['user_email']]) && (!isset($comment_row[$i][$user_table_fields['user_showemail']]) || (isset($comment_row[$i][$user_table_fields['user_showemail']]) && $comment_row[$i][$user_table_fields['user_showemail']] == 1))) {
          $comment_user_email = $comment_row[$i][$user_table_fields['user_email']];
          $comment_user_email_save = str_replace("@", " at ", $comment_row[$i][$user_table_fields['user_email']]);
          if (!empty($url_mailform)) {
            $comment_user_mailform_link = $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_mailform));
          }
          else {
            $comment_user_mailform_link = $site_sess->url(ROOT_PATH."member.php?action=mailform&amp;".URL_USER_ID."=".$comment_user_id);
          }
          $comment_user_email_button = "<a href=\"".$comment_user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$comment_user_email_save."\" /></a>";
        }

        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'];
        }

        $comment_user_info .= "<br />";
        $comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_joindate']])) ? "<br />".$lang['join_date']." ".format_date($config['date_format'], $comment_row[$i][$user_table_fields['user_joindate']]) : "";
        $comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_comments']])) ? "<br />".$lang['comments']." ".$comment_row[$i][$user_table_fields['user_comments']] : "";
      }

      $comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";

      $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=\"_blank\">".$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=\"_blank\">".$lang['delete']."</a>";
      }
      elseif ($is_image_owner) {
        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
      }

     $signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
      if ($boardconfig['alow_sig'] == 1) {
      $sig = '<br><br>' . $signature ;
       } else {
      $sig = "";
       }

      $site_template->register_vars(array(
       "comment_id" => $comment_row[$i]['comment_id'],
      "lang_comments_per_page" => $lang['comments_per_page'],
      "comment_user_pm" => ($config['pm'] && $comment_row[$i]['user_id']  != GUEST && $user_info['user_level'] > GUEST && $user_info['user_id'] != $comment_row[$i]['user_id']) ? "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=quote&mode=comment&id=".$comment_row[$i]['comment_id']."&user_id=".$comment_row[$i]['user_id'])."\" /><img src=\"".get_gallery_image("pm.gif")."\" border=\"0\" alt=\"".$lang['pm_user_pm_alt']."\" /></a>" : "",
        "comment_user_id" => $comment_user_id,
        "comment_user_status_img" => $comment_user_status_img,
        "comment_user_name" => $comment_user_name,
        "comment_user_info" => $comment_user_info,
        "comment_user_profile_button" => $comment_user_profile_button,
        "comment_user_email" => $comment_user_email,
        "comment_user_email_save" => $comment_user_email_save,
        "comment_user_mailform_link" => $comment_user_mailform_link,
        "comment_user_email_button" => $comment_user_email_button,
        "comment_user_homepage_button" => $comment_user_homepage_button,
        "comment_user_icq_button" => $comment_user_icq_button,
        "comment_user_ip" => $comment_user_ip,
      "comment_sig" => $sig,
      "comment_userpic" => ($config['userpic'] && $comment_row[$i]['userpic']) ? ROOT_PATH."data/userpic/".$comment_row[$i]['userpic'] : "",
        "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
        "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
        "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
        "row_bg_number" => $row_bg_number,
        "admin_links" => $admin_links
      ));
      $comments .= $site_template->parse_template("comment_bit");
    } // end while
  } //end else
  $site_template->register_vars("comments", $comments);
  unset($comments);


Das ist meine detail.php

Grüße Darkness


Title: Re: Profil erweitern
Post by: mawenzi on December 22, 2005, 05:20:32 PM
... im ACP->Board hast du Signatur erlauben eingestellt ... ?
... wird denn in deinem Board die Signatur angezeigt ... ?
Title: Re: Profil erweitern
Post by: Darkness2001 on December 22, 2005, 05:52:45 PM
... im ACP->Board hast du Signatur erlauben eingestellt ... ?
... wird denn in deinem Board die Signatur angezeigt ... ?

Hallo,
ja wird alles angezeigt.
Title: Re: Profil erweitern
Post by: Darkness2001 on December 22, 2005, 06:19:39 PM
Das waren meine Schritte:

1. db_field_definitions.php

$additional_user_fields['user_signature'] = array($lang['user_signature'], "text", 0);

2. page_header.php

  "lang_signature" => $lang['signature'],

3. detail.php

 $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_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_signature").$additional_sql.", u.userpic
         FROM ".COMMENTS_TABLE." c

3.a.

     elseif ($is_image_owner) {
        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
      }

     $signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
      if ($boardconfig['alow_sig'] == 1) {
      $sig = '<br><br>' . $signature ;
       } else {
      $sig = "";
       }
      $site_template->register_vars(array(
       "comment_id" => $comment_row[$i]['comment_id'],
      "lang_comments_per_page" => $lang['comments_per_page'],

3.b.

        "comment_user_ip" => $comment_user_ip,
      "comment_sig" => $sig,   
   "comment_userpic" => ($config['userpic'] && $comment_row[$i]['us


4. comment_bit.html

</table>
    <hr size="1" />
    {comment_text}
-{comment_sig}-  </td>
</tr>

Das wars soweit, in der db gibt es ja durch das board schon das feld user_signature

Grüße Darkness

Title: Re: Profil erweitern
Post by: mawenzi on December 22, 2005, 06:21:03 PM
... dein sql-query endet ohne " ...
... ").$additional_sql.", u.userpic ...
... das solltest du mal wieder richtig sortieren ... schau in dein Backup deiner detail.php ...
Title: Re: Profil erweitern
Post by: Darkness2001 on December 22, 2005, 06:32:04 PM
... dein sql-query endet ohne " ...
... ").$additional_sql.", u.userpic ...
... dein , u.userpic pack mal nach vorne hinter , c.comment_ip ...

So ?

  $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_ip, u.userpic, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_signature").$additional_sql."
         FROM ".COMMENTS_TABLE." c
 
Zeigt aber nix an
Title: Re: Profil erweitern
Post by: mawenzi on December 22, 2005, 06:38:59 PM
... ohne die Board-Option hast du auch schon ausprobiert ... ?
Title: Re: Profil erweitern
Post by: Darkness2001 on December 22, 2005, 06:44:33 PM
... ohne die Board-Option hast du auch schon ausprobiert ... ?

ja grade zeigt auch nix an

$signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
$sig = '<br><br>' . $signature ;

wenn ich das nehme, dann verdoppelt er bei jedem aufruf der detail.php den letzten eintrag
Title: Re: Profil erweitern
Post by: mawenzi on December 22, 2005, 06:54:37 PM
... tausche mal : "comment_sig" => $sig,
... gegen dieses aus : "comment_sig" => "<br><br>hier sollte die Signatur sein",
Title: Re: Profil erweitern
Post by: Darkness2001 on December 22, 2005, 06:58:34 PM
Habe ich gemacht und der Text wird auch in den kommentaren als Sig angezeigt
Title: Re: Profil erweitern
Post by: Stoleti on December 29, 2005, 09:59:50 PM
i've tried make it work and this not show the signature on comments , here is my code :

Code: [Select]
//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------
if ($image_allow_comments == 1) {
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 = 20;
}
$commentsperpage_dropdown = "\n<select name=\"commentsetperpage\" onchange=\"if (this.options[this.selectedIndex].value != 0){ forms['commentsperpage'].submit() }\" class=\"select\">\n";
for($i = 1; $i <= 20; $i++) {
$setvalue = 1 * $i;
$commentsperpage_dropdown .= "<option value=\"".$setvalue."\"";
   if ($setvalue == $commentperpage) {
   $commentsperpage_dropdown .= " selected=\"selected\"";
}
$commentsperpage_dropdown .= ">";
$commentsperpage_dropdown .= $setvalue;
$commentsperpage_dropdown .= "</option>\n";
}
$commentsperpage_dropdown .= "</select>\n";

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

 $sql = "SELECT COUNT(image_id) AS comments
     FROM ".COMMENTS_TABLE."
     WHERE image_id = $image_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."details.php?image_id=$image_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(
"paging" => $getpaging->get_paging(),
"paging_stats" => ($num_comments) ? $getpaging->get_paging_stats() : ""
));
 $additional_sql = "";
 if (!empty($additional_user_fields)) {
   $table_fields = $site_db->get_table_fields(USERS_TABLE);
   foreach ($additional_user_fields as $key => $val) {
     if (isset($HTTP_POST_VARS[$key]) && isset($table_fields[$key])) {
       $additional_sql .= ", $key = '".un_htmlspecialchars(trim($HTTP_POST_VARS[$key]))."'";
     }
   }
 }
  $additional_sql = "";
  if (!empty($additional_user_fields)) {
    $table_fields = $site_db->get_table_fields(USERS_TABLE);
    foreach ($additional_user_fields as $key => $val) {
      if (isset($table_fields[$key])) {
        $additional_sql .= ", u.$key";
      }
    }
  }
  $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_ip, u.userpic, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_signature").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_signature").$additional_sql."
         FROM ".COMMENTS_TABLE." c
         LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
         WHERE c.image_id = $image_id
         ORDER BY c.comment_date ASC
         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 = "<tr><td class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
  }
  else {
    $comments = "";
    $bgcounter = 0;
    for ($i = 0; $i < $num_comments; $i++) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

      $comment_user_email = "";
      $comment_user_email_save = "";
      $comment_user_mailform_link = "";
      $comment_user_email_button = "";
      $comment_user_homepage_button = "";
      $comment_user_icq_button = "";
      $comment_user_profile_button = "";
      $comment_user_status_img = REPLACE_EMPTY;
      $comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);
      $comment_user_info = $lang['userlevel_guest'];

      $comment_user_id = $comment_row[$i]['user_id'];

      if (isset($comment_row[$i][$user_table_fields['user_name']]) && $comment_user_id != GUEST) {
        $comment_user_name = htmlspecialchars($comment_row[$i][$user_table_fields['user_name']]);
       

        $comment_user_profile_link = !empty($url_show_profile) ? $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_show_profile)) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$comment_user_id);
        $comment_user_profile_button = "<a href=\"".$comment_user_profile_link."\"><img src=\"".get_gallery_image("profile.gif")."\" border=\"0\" alt=\"".$comment_user_name."\" /></a>";

        $comment_user_status_img = ($comment_row[$i][$user_table_fields['user_lastaction']] >= (time() - 300) && ((isset($comment_row[$i][$user_table_fields['user_invisible']]) && $comment_row[$i][$user_table_fields['user_invisible']] == 0) || $user_info['user_level'] == ADMIN)) ? "<img src=\"".get_gallery_image("user_online.gif")."\" border=\"0\" alt=\"Online\" />" : "<img src=\"".get_gallery_image("user_offline.gif")."\" border=\"0\" alt=\"Offline\" />";

        $comment_user_homepage = (isset($comment_row[$i][$user_table_fields['user_homepage']])) ? format_url($comment_row[$i][$user_table_fields['user_homepage']]) : "";
        if (!empty($comment_user_homepage)) {
          $comment_user_homepage_button = "<a href=\"".$comment_user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$comment_user_homepage."\" /></a>";
        }

        $comment_user_icq = (isset($comment_row[$i][$user_table_fields['user_icq']])) ? $comment_row[$i][$user_table_fields['user_icq']] : "";
        if (!empty($comment_user_icq)) {
          $comment_user_icq_button = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=".$comment_user_icq."\" target=\"_blank\"><img src=\"http://web.icq.com/whitepages/online?icq=".$comment_user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$comment_user_icq."\" /></a>";
        }

        if (!empty($comment_row[$i][$user_table_fields['user_email']]) && (!isset($comment_row[$i][$user_table_fields['user_showemail']]) || (isset($comment_row[$i][$user_table_fields['user_showemail']]) && $comment_row[$i][$user_table_fields['user_showemail']] == 1))) {
          $comment_user_email = $comment_row[$i][$user_table_fields['user_email']];
          $comment_user_email_save = str_replace("@", " at ", $comment_row[$i][$user_table_fields['user_email']]);
          if (!empty($url_mailform)) {
            $comment_user_mailform_link = $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_mailform));
          }
          else {
            $comment_user_mailform_link = $site_sess->url(ROOT_PATH."member.php?action=mailform&amp;".URL_USER_ID."=".$comment_user_id);
          }
          $comment_user_email_button = "<a href=\"".$comment_user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$comment_user_email_save."\" /></a>";
        }

        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'];
        }
elseif ($comment_row[$i][$user_table_fields['user_level']] == SPAMKING) {
          $comment_user_info = $lang['userlevel_spamking'];
        }

        $comment_user_info .= "<br />";
        $comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_joindate']])) ? "<br />".$lang['join_date']." ".format_date($config['date_format'], $comment_row[$i][$user_table_fields['user_joindate']]) : "";
        $comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_comments']])) ? "<br />".$lang['comments']." ".$comment_row[$i][$user_table_fields['user_comments']] : "";
      }

      $comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";

      $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=\"_blank\">".$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=\"_blank\">".$lang['delete']."</a>";
      }
      elseif ($is_image_owner) {
        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
      }
       $signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
      if ($boardconfig['alow_sig'] == 1) {
      $sig = '<br><br>' . $signature ;
       } else {
      $sig = "";
       }
      $site_template->register_vars(array(
        "comment_id" => $comment_row[$i]['comment_id'],
        "lang_comments_per_page" => $lang['comments_per_page'],
        "lang_pm" => ($user_info['user_id'] != $comment_row[$i]['user_id'] && $user_info['user_level'] >= USER && $comment_row[$i]['user_id'] >= USER) ? "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=reply&user_id=".$comment_row[$i]['user_id'])."\" alt=\"".$lang['pms_user_pm_alt']."\">".$lang['pms_user_pm']."</a>" : "",
        "comment_user_id" => $comment_user_id,
        "comment_user_status_img" => $comment_user_status_img,
        "comment_user_name" => $comment_user_name,
        "comment_user_info" => $comment_user_info,
        "comment_user_profile_button" => $comment_user_profile_button,
        "comment_user_email" => $comment_user_email,
        "comment_user_email_save" => $comment_user_email_save,
        "comment_user_mailform_link" => $comment_user_mailform_link,
        "comment_user_email_button" => $comment_user_email_button,
        "comment_user_homepage_button" => $comment_user_homepage_button,
        "comment_user_icq_button" => $comment_user_icq_button,
        "comment_user_ip" => $comment_user_ip,
        "comment_sig" => $sig,
        "comment_userpic" => ($config['userpic'] && $comment_row[$i]['userpic']) ? ROOT_PATH."data/userpic/".$comment_row[$i]['userpic'] : "",
                "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0, 1, 1),
        "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1 , 1),
        "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
        "row_bg_number" => $row_bg_number,
        "admin_links" => $admin_links
      ));
      $comments .= $site_template->parse_template("comment_bit");
    } // end while
  } //end else
  $site_template->register_vars("comments", $comments);
  unset($comments);


Db Fields ....:

Code: [Select]
$additional_user_fields['user_signature'] = array($lang['user_signature'], "text", 0);
all correctly ...  8O


Title: Re: Profil erweitern
Post by: Darkness2001 on January 03, 2006, 07:59:20 PM
Hi,

da bei mir die Signatur nicht ging aus dem Bord, habe ich mir eine alternative dazu gebastet, erst ein DB Fild anlegen, ich habe es hier
"user_full" genannt. (wird hier im Thema auf der ersten Seite erklärt)

Die sieht so aus und funktioniert (z.Z. leider nur mit Texteinträgen)

---------------------------------------------------------------------------------------------
since with me the signature did not go out of the board, has I an alternative to it gebastet, only railways a Fild to put on, I had called it here "user_full" (here in the topic on the first side avowedly) Those looks in such a way and functions (at present unfortunately only with text entries)
---------------------------------------------------------------------------------------------


1. detail.php
   finde:

 
Code: [Select]
    $comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);

gleich danach folgendes einsetzten:

     
Code: [Select]
  $comment_user_full = htmlspecialchars($comment_row[$i]['user_full']);

   finde:

          
    
Code: [Select]
  $site_template->register_vars(array(
    "comment_id" => $comment_row[$i]['comment_id'],


gleich darüber folgendes einsetzten:

    
Code: [Select]
        if (isset($comment_row[$i][$user_table_fields['user_full']]) && $comment_user_id != GUEST) {
        $comment_user_full = htmlspecialchars($comment_row[$i][$user_table_fields['user_full']]);
}



    finde:
 
Code: [Select]

$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, u.userpic, u.[color=Red]user_full[/color], c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_full").$additional_sql."
         FROM ".COMMENTS_TABLE." c
         LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id[color=Red]").get_user_table_field(", u.", "user_full")[/color]." = c.user_id)


dort die rot  gekennzeichneten Zelle einfügen
 
finde:

     
Code: [Select]
    "comment_user_ip" => $comment_user_ip,

gleich darunter einfügen:

   
Code: [Select]
      "comment_user_full" => $comment_user_full,

2. comment_bit.html:

finde:
 
Code: [Select]
{comment_user_info}

alles ersetzten bis :

 
Code: [Select]
<td class="commentrow{row_bg_number}">
    {comment_user_status_img}
    {comment_user_profile_button}


mit:

 
Code: [Select]
<table width="100%" border="0">
<tr>
<td class="kbalken"></td>
</tr>
<tr>
        <td class="row1">{comment_text}</td>
</tr>
<tr>
<td class="kbalken"></td>
</tr>
<tr>
<td class="row1" valign="bottom"><sub class="titel">{comment_user_full}</sub></td>
</tr></table>

[b][color=Blue]3. member_editprofile.html[/color][/b]

<tr>
            <td class="row2"><b>{lang_full}</b></td>
            <td class="row2">
              <input type="text" name="user_full"  size="30" value="{user_full}" class="input" />
            </td>
          </tr>


dort einsetzten wo Ihr wollt.

Grüße Darkness

Ps: Frohes neues Jahr <Happy new Year>  :mrgreen:


Title: Re: Profil erweitern
Post by: Chicco on January 17, 2006, 11:10:47 AM
Also ich habe mich nun strik an die Anleitung gehalten. Der einzige Unterschied ist, das ich nicht die Tabelle in der Datenbnak bei "4images_users" reingesetz habe sondern unter "allmyphp_user". So heisst es zumindest in meiner Datenbank und ich habe dies nicht geändert.

Auf jeden Fall kann ich zwar member_editform diese zusätzlichen, neuen Daten eingeben, aber sie werden nicht in meine Datenbank übernommen!!! Ich bekomme aber auch keine Fehlermeldung! Was ist da los???
Title: Re: Profil erweitern
Post by: Chicco on January 17, 2006, 11:44:26 AM
Okay, ich bin so blöd!!!!! :oops: :oops: :roll: :?
Da ich gestern noch was anderes programmiert habe und somit mit einer anderen Datenbank, habe ich ganz in Gedanken auch heute mit dieser Datenbank gearbeitet und nicht mit der für die Galerie! Kein Wunder das nichts eingetragen wurde! :lol:

Jetzt funtzt alles prima!

Doch nur noch eine Frage: Wenn ich nun möchte, das ein user auch ein kleines Passbildchen von sich in seinem Profil veröffentlichen kann: Was muss ich wo dafür tun?
Title: Re: Profil erweitern
Post by: JensF on January 17, 2006, 12:51:37 PM
Quote
Doch nur noch eine Frage: Wenn ich nun möchte, das ein user auch ein kleines Passbildchen von sich in seinem Profil veröffentlichen kann: Was muss ich wo dafür tun?

Nach Member Personal Photo suchen!
Title: Re: Profil erweitern
Post by: Chicco on January 17, 2006, 01:18:08 PM
Prima! Danke . Funtzt auch bisher alles. Noch eine Frage: (trau mich schon gar nicht mehr zu fragen):
Ich möchte gerne, das der User per Drowndown-Menü im "member_editform" oder im "register_form" seine Fotokenntnisse angeben kann.

Wie kann ich diese Abfrage machen? Denn immer wenn dann das Kontrollzentrum wieder neu geladen wird, steht bei dem Dropdownmenü nicht das drin, was als letztes gewählt wurde, sondern die oberstes Zeile von der <option>-form. Bei dem Feld eMail oder Fullname usw. stehen ja auch die Daten drin, welche zuvor mal gemacht wurden. Wie erreiche ich dies in einem Dropdownfeld??

hier der Code, welche ich bisher benutze:
Code: [Select]
      <tr>
            <td class="row2"><b>{lang_fotograf}</b></td>
            <td class="row2"><select name="user_fotograf" size=1>
<option>
<option>Anfänger
<option>Amateur
<option>Profi</select>
          </td>
          </tr>

Kann ich irgendwie die Funktion value="{user_fotograf}" dabei verwenden?
Title: Re: Profil erweitern
Post by: Darkness2001 on January 17, 2006, 09:39:32 PM
Prima! Danke . Funtzt auch bisher alles. Noch eine Frage: (trau mich schon gar nicht mehr zu fragen):
Ich möchte gerne, das der User per Drowndown-Menü im "member_editform" oder im "register_form" seine Fotokenntnisse angeben kann.

Wie kann ich diese Abfrage machen? Denn immer wenn dann das Kontrollzentrum wieder neu geladen wird, steht bei dem Dropdownmenü nicht das drin, was als letztes gewählt wurde, sondern die oberstes Zeile von der <option>-form. Bei dem Feld eMail oder Fullname usw. stehen ja auch die Daten drin, welche zuvor mal gemacht wurden. Wie erreiche ich dies in einem Dropdownfeld??

hier der Code, welche ich bisher benutze:
Code: [Select]
      <tr>
            <td class="row2"><b>{lang_fotograf}</b></td>
            <td class="row2"><select name="user_fotograf" size=1>

Hallo,

es gibt hier ein Thema wo Du das finden kannst. Es ist ganz einfach das Userbild in die Member zu bekommen.
Mußt mal suchen.

Grüße Darkness  :mrgreen:
<option>
<option>Anfänger
<option>Amateur
<option>Profi</select>
          </td>
          </tr>

Kann ich irgendwie die Funktion value="{user_fotograf}" dabei verwenden?
Title: Re: Profil erweitern
Post by: JensF on February 01, 2006, 04:17:46 PM
Hi,

ich habe ein kleines Problem mit der Signatur in den Kommentaren. Und zwar habe ich nun einen BBCode in die Signatur eingefügt aber leider wird der in der Signatur auch nur als Code dargestellt und nicht als Bild wie es sein sollte.

Im Forum geht es aber. Da wird der Code richtig umgesetzt.

Kann man das ändern das dies auch in den Kommenatern funktioniert???
Title: Re: Profil erweitern
Post by: manus-dei-dextra on February 10, 2006, 09:41:44 AM
DB Error: Bad SQL Query: 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_ip, c.comment_date, u.user_level, u.user_name, u.user_email, u.user_emailshow, u.user_ghost, u.signin , u.user_lastaction, u.user_comcount, u.user_hpage, u.user_icqid FROM 4images_comments c LEFT JOIN phpkit_user u ON (u.user_id = c.user_id) WHERE c.image_id = 61 ORDER BY c.comment_date ASC
Unknown column 'u.user_comcount' in 'field list'

was ist das für eine fehlermeldung? und wie behebe ich die?
Title: Re: Profil erweitern
Post by: desperate_housewif on August 17, 2006, 10:15:04 PM
Ich hab da mal was. Vielleicht hilft es dir...

Quote
Anleitung für zusätzliche Felder im Profil.

Beispiel für ein Zusatzfeld um seinen Namen einzutragen.



1. Datenbank Tabelle in 4images_users erstellen

Feld: user_fullname | Typ: Varchar | Länge 255

-------------------------

2. öffne Datei includes/db_field_definations.php

über ?> folgendes einfügen

$additional_user_fields['user_fullname'] = array($lang['fullname'], "text", 0);

-------------------------

3. öffne includes/page_header.php

suche

"charset" => $lang['charset'],

danach einfügen

"lang_fullname" => $lang['fullname'],

---------------------------

4. öffne lang/deine Sprache/main.php

vor ?> einfügen

$lang['fullname'] = "Richtiger Name:";

---------------------------

5. öffne templates/default/member_editprofile.html

an gewünschter Stelle folgendes einfügen

          <tr>
            <td class="row2"><b> - {lang_fullname}</b></td>
            <td class="row2">
              <input type="text" name="user_fullname"  size="30" value="{user_fullname}" class="input" />
            </td>
          </tr>

--------------------------

6. öffne templates/default/member_profile.html

an gewünschter Stelle folgendes einfügen

        <tr>
          <td class="row2"><b> - {lang_fullname}</b></td>
          <td class="row2">{user_fullname}</td>
        </tr>

--------------------------


Um das ganze dann auch gleich beim registrieren zu haben

öffne templates/default/register_form.html

an gewünschter Stelle einfügen

          <tr>
            <td class="row2"><b> - {lang_fullname}</b></td>
            <td class="row2">
              <input type="text" name="user_fullname"  size="30" value="{user_fullname}" class="input" />
            </td>
          </tr>

-----------------------------

Hi, ist zwar ein alter Eintrag aber ich hatte num mal das Problem erst heute! Habe auch alles wie angegeben bearbeitet. Funktioniert auch mit der Eingabe, lediglich, wenn ein anderer Benutzer meinen Benutzernamen unter einem Bild anklickt und sich das Kontrollzentrum öffnet, dann wird der Name nicht angegeben. Woran kann es liegen? Es bringt ja nichts, wenn man den Namen eingibt aber niemand ihn sehen kann, zumal ich das auf weitere Daten wie Hobby usw. erweitern will.
Title: Re: Profil erweitern
Post by: JensF on August 18, 2006, 05:49:40 PM
Hi,

sicher das du Punkt 3 gemacht hast???
Title: Re: Profil erweitern
Post by: Muckellein on January 18, 2007, 01:21:47 PM
Wo finde ich die 4images_users?

Danke für Antwort
Title: Re: Profil erweitern
Post by: mawenzi on January 18, 2007, 01:42:11 PM
@ Muckellein
... in deiner 4images Datenbank ...
Title: Re: Profil erweitern
Post by: maus on May 19, 2007, 10:55:11 AM
@ Muckellein
... in deiner 4images Datenbank ...


Ich habe ein kleines Problem mit der Profil erweitern Habe auch alles wie angegeben bearbeitet. Funktioniert auch mit der Eingabe, lediglich.
Es bringt ja nichts, wenn man den plz eingibt aber niemand  sehen kann
Title: Re: Profil erweitern
Post by: KurtW on May 19, 2007, 02:59:42 PM
Hallo maus,

Quote
wenn man den plz eingibt aber niemand  sehen kann


Wenn du aber laut Anleitung:
Quote
6. öffne templates/default/member_profile.html

an gewünschter Stelle folgendes einfügen

        <tr>
          <td class="row2"><b> - {lang_fullname}</b></td>
          <td class="row2">{user_fullname}</td>
        </tr>
gemacht hast (natürlich abgestimmt auf deine zusätzliche Angabe), ist es im Profil des Users zu sehen....

Kurt
Title: Re: Profil erweitern
Post by: maus on May 20, 2007, 10:58:12 AM
Hallo maus,

Quote
wenn man den plz eingibt aber niemand  sehen kann


Wenn du aber laut Anleitung:
Quote
6. öffne templates/default/member_profile.html

an gewünschter Stelle folgendes einfügen

        <tr>
          <td class="row2"><b> - {lang_fullname}</b></td>
          <td class="row2">{user_fullname}</td>
        </tr>
gemacht hast (natürlich abgestimmt auf deine zusätzliche Angabe), ist es im Profil des Users zu sehen....

Kurt


Hallo Kurt


page_header.php

<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: page_header.php                                      *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.4                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die("Security violation");
}

// Cache Templates
/*$template_list = 'header,footer,category_dropdown_form,user_logininfo,user_loginform';
if (isset($templates_used) && $templates_used != "") {
  $template_list = $template_list.",".$templates_used;
}
$site_template->cache_templates($template_list);*/

//-----------------------------------------------------
//--- Register Global Vars ----------------------------
//-----------------------------------------------------
$total_images = 0;
$total_categories = 0;
$auth_cat_sql['auth_viewcat']['IN'] = 0;
$auth_cat_sql['auth_viewcat']['NOTIN'] = 0;

$cache_id = create_cache_id(
  'data.auth_and_info',
  array($user_info[$user_table_fields['user_id']])
);

if (!$data = get_cache_file($cache_id, null)) {
  if (!empty($cat_cache)) {
    foreach ($cat_cache as $key => $val) {
      if (check_permission("auth_viewcat", $key)) {
        $total_categories++;
        if (isset($val['num_images'])) {
          $total_images += $val['num_images'];
        }
        else {
          $cat_cache[$key]['num_images'] = 0;
        }
        $auth_cat_sql['auth_viewcat']['IN'] .= ", ".$key;
      }
      else {
        $auth_cat_sql['auth_viewcat']['NOTIN'] .= ", ".$key;
      }
    }
  }

  $data = array();

  $data['total_images'] = $total_images;
  $data['total_categories'] = $total_categories;
  $data['auth_viewcat']['IN'] = $auth_cat_sql['auth_viewcat']['IN'];
  $data['auth_viewcat']['NOTIN'] = $auth_cat_sql['auth_viewcat']['NOTIN'];

  save_cache_file($cache_id, serialize($data));

} else {
  $data = unserialize($data);

  $total_images = $data['total_images'];
  $total_categories = $data['total_categories'];
  $auth_cat_sql['auth_viewcat']['IN'] = $data['auth_viewcat']['IN'];
  $auth_cat_sql['auth_viewcat']['NOTIN'] = $data['auth_viewcat']['NOTIN'];
}

$site_template->register_vars(array(
  "media_url" => MEDIA_PATH,
  "thumb_url" => THUMB_PATH,
  "icon_url" => ICON_PATH,
  "template_url" => TEMPLATE_PATH,
  "template_image_url" => TEMPLATE_PATH."/images",
  "template_lang_image_url" => TEMPLATE_PATH."/images_".$config['language_dir'],
  "site_name" => $config['site_name'],
  "site_email" => $config['site_email'],
  "user_loggedin" => ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) ? 0 : 1,
  "user_loggedout" => ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) ? 1 : 0,
  "is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0,
  "self" => $site_sess->url($self_url),
  "self_full" => $site_sess->url($script_url."/".$self_url),
  "script_version" => SCRIPT_VERSION,
  "cp_link" => ($user_info['user_level'] != ADMIN) ? "" : "\n<p align=\"center\">[<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php")."\">Admin Control Panel</a>]</p>\n",
  "total_categories" => $total_categories,
  "total_images" => $total_images,
  "url_new_images" => $site_sess->url(ROOT_PATH."search.php?search_new_images=1"),
  "url_top_images" => $site_sess->url(ROOT_PATH."top.php"),
  "url_top_cat_images" => $site_sess->url(ROOT_PATH."top.php".(($cat_id && preg_match("/categories.php/", $self_url)) ? "?".URL_CAT_ID."=".$cat_id : "")),
  "url_register" => (!empty($url_register)) ? $site_sess->url($url_register) : $site_sess->url(ROOT_PATH."register.php"),
  "url_search" => $site_sess->url(ROOT_PATH."search.php"),
  "url_user_pics" => $site_sess->url(ROOT_PATH."search.php?search_user=".$user_info['user_name'].""),
  "url_lightbox" => $site_sess->url(ROOT_PATH."lightbox.php"),
  "url_userlist" => $site_sess->url(ROOT_PATH."memberlist.php"),
  "url_control_panel" => (!empty($url_control_panel)) ? $site_sess->url($url_control_panel) : $site_sess->url(ROOT_PATH."member.php?action=editprofile"),
  "url_categories" => $site_sess->url(ROOT_PATH."categories.php"),
  "url_home" => $site_sess->url(ROOT_PATH."index.php"),
  "url_member_profil" => (!empty($url_member)) ? $site_sess->url($url_member) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$user_info['user_id'].""),
  "url_login" => (!empty($url_login)) ? $site_sess->url($url_login) : $site_sess->url(ROOT_PATH."login.php"),
  "url_logout" => (!empty($url_logout)) ? $site_sess->url($url_logout) : $site_sess->url(ROOT_PATH."logout.php"),
  "url_member" => (!empty($url_member)) ? $site_sess->url($url_member) : $site_sess->url(ROOT_PATH."member.php"),
  "url_upload" => (!empty($url_upload)) ? $site_sess->url($url_upload) : $site_sess->url(ROOT_PATH."member.php?action=uploadform"),
  "url_lost_password" => (!empty($url_lost_password)) ? $site_sess->url($url_lost_password) : $site_sess->url(ROOT_PATH."member.php?action=lostpassword"),
  "url_captcha_image" => $site_sess->url(ROOT_PATH."captcha.php"),
  "has_rss" => false,
  "rss_title" => "",
  "rss_url" => "",
  "copyright" => '
<p id="copyright" align="center">
  Powered by <b>4images</b> '.SCRIPT_VERSION.'
  <br />
  Copyright &copy; 2002-'.date('Y').' <a href="http://www.4homepages.de" target="_blank">4homepages.de</a>
</p>
',
));

if (!empty($additional_urls)) {
  $register_array = array();
  foreach ($additional_urls as $key => $val) {
    $register_array[$key] = $site_sess->url($val);
  }
  $site_template->register_vars($register_array);
}

// Replace Globals in $lang
$lang = $site_template->parse_array($lang);

$site_template->register_vars(array(
  "lang_site_stats" => $lang['site_stats'],
  "lang_registered_user" => $lang['registered_user'],
  "lang_random_image" => $lang['random_image'],
  "lang_categories" => $lang['categories'],
  "lang_sub_categories" => $lang['sub_categories'],
  "lang_new_images" => $lang['new_images'],
  "lang_top_images" => $lang['top_images'],
  "lang_search" => $lang['search'],
  "lang_advanced_search" => $lang['advanced_search'],
  "lang_lightbox" => $lang['lightbox'],
  "lang_userlist_title" => $lang['lang_userlist_title'],
  "lang_register" => $lang['register'],
  "lang_control_panel" => $lang['control_panel'],
  "lang_login" => $lang['login'],
  "lang_auto_login" => $lang['lang_auto_login'],
  "lang_logout" => $lang['logout'],
  "lang_lost_password" => $lang['lost_password'],
  "lang_user_name" => $lang['user_name'],
  "lang_password" => $lang['password'],
  "lang_go" => $lang['go'],
  "lang_images_per_page" => $lang['images_per_page'],
  "charset" => $lang['charset'],
  "lang_fullname" => $lang['fullname'],
  "lang_plz" => $lang['plz'],
  "direction" => $lang['direction']
));

//-----------------------------------------------------
//--- Category Dropdown -------------------------------
//-----------------------------------------------------

if (!$cache_enable) {
    $category_dropdown_selfjump = get_category_dropdown($cat_id, 1);
} else {
  $cache_id = create_cache_id(
    'data.dropdown_selfjump',
    array(
      $user_info[$user_table_fields['user_id']],
      $config['template_dir'],
      $config['language_dir']
    )
  );

  if (!$category_dropdown_selfjump = get_cache_file($cache_id)) {
    // Always append session id if cache is enabled
    $old_session_mode = $site_sess->mode;
    $site_sess->mode = 'get';

    // Set $cat_id to 0 to ensure that no category is selected
    $category_dropdown_selfjump = get_category_dropdown(0, 1);

    $site_sess->mode = $old_session_mode;

    save_cache_file($cache_id, $category_dropdown_selfjump);
  }
}

$site_template->register_vars("category_dropdown_selfjump", $category_dropdown_selfjump);
unset($category_dropdown_selfjump);

// -------------------------------------
if (!$cache_enable) {
    $category_dropdown_form = $site_template->parse_template("category_dropdown_form");
} else {
  $cache_id = create_cache_id(
    'data.dropdown_form',
    array(
      $user_info[$user_table_fields['user_id']],
      // $cat_id, // uncomment if the current category should be selected, will increase the number of cache files
      $config['template_dir'],
      $config['language_dir']
    )
  );

  if (!$category_dropdown_form = get_cache_file($cache_id)) {
    // Always append session id if cache is enabled
    $old_session_mode = $site_sess->mode;
    $site_sess->mode = 'get';

    $category_dropdown_form = $site_template->parse_template("category_dropdown_form");

    $site_sess->mode = $old_session_mode;

    save_cache_file($cache_id, $category_dropdown_form);
  }
}

$site_template->register_vars("category_dropdown_form", $category_dropdown_form);
unset($category_dropdown_form);

//-----------------------------------------------------
//--- Random Image ------------------------------------
//-----------------------------------------------------
$random_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" : get_random_image();
$site_template->register_vars("random_image", $random_image);
unset($random_image);

//-----------------------------------------------------
//--- Set Paging Vars ---------------------------------
//-----------------------------------------------------
if (isset($HTTP_POST_VARS['setperpage'])) {
  $setperpage = intval($HTTP_POST_VARS['setperpage']);
  if ($setperpage) {
    $site_sess->set_session_var("perpage", $setperpage);
    $session_info['perpage'] = $setperpage;
  }
}

if (isset($session_info['perpage'])) {
  $perpage = $session_info['perpage'];
}
else {
  $perpage = ceil($config['default_image_rows'] * $config['image_cells']);
}

//-----------------------------------------------------
//--- Set Perpage Dropdown ----------------------------
//-----------------------------------------------------
$setperpage_dropdown = "\n<select name=\"setperpage\" class=\"setperpageselect\">\n";
for($i = 1; $i <= $config['custom_row_steps']; $i++) {
  $setvalue = $config['image_cells'] * $i;
  $setperpage_dropdown .= "<option value=\"".$setvalue."\"";
    if ($setvalue == $perpage) {
    $setperpage_dropdown .= " selected=\"selected\"";
  }
  $setperpage_dropdown .= ">";
  $setperpage_dropdown .= $setvalue;
  $setperpage_dropdown .= "</option>\n";
}
$setperpage_dropdown .= "</select>\n";
if ($cat_id != 0) {
  $setperpage_dropdown .= "<input type=\"hidden\" name=\"cat_id\" value=\"".$cat_id."\" />\n";
}
if (isset($show_result) && $show_result == 1) {
  $setperpage_dropdown .= "<input type=\"hidden\" name=\"show_result\" value=\"1\" />\n";
}
$site_template->register_vars("setperpage_dropdown", $setperpage_dropdown);
$setperpage_dropdown_form = $site_template->parse_template("setperpage_dropdown_form");
$site_template->register_vars("setperpage_dropdown_form", $setperpage_dropdown_form);

$site_template->un_register_vars("setperpage_dropdown");
unset($setperpage_dropdown);
unset($setperpage_dropdown_form);

//-----------------------------------------------------
//--- Add & Delete from Lists -------------------------
//-----------------------------------------------------
if ($action == "addtolightbox" && $id) {
  if ($user_info['user_level'] >= USER) {
    $msg = (add_to_lightbox($id)) ? $lang['lightbox_add_success'] : $lang['lightbox_add_error'];
  }
  else {
    $msg = $lang['lightbox_register'];
  }
}
if ($action == "removefromlightbox" && $id) {
  if ($user_info['user_level'] >= USER) {
    $msg = (remove_from_lightbox($id)) ? $lang['lightbox_remove_success'] : $lang['lightbox_remove_error'];
  }
  else {
    $msg = $lang['lightbox_register'];
  }
}
if ($action == "clearlightbox") {
  if ($user_info['user_level'] >= USER) {
    $msg = (clear_lightbox()) ? $lang['lightbox_delete_success'] : $lang['lightbox_delete_error'];
  }
  else {
    $msg = $lang['lightbox_register'];
  }
}

//-----------------------------------------------------
//--- Save Rating -------------------------------------
//-----------------------------------------------------
if ($action == "rateimage" && $id) {
  $rating = intval($HTTP_POST_VARS['rating']);
  $cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
  $cookie_rated = isset($HTTP_COOKIE_VARS[$cookie_name.'rated']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'rated'])) : array();
  if ($rating && $rating <= MAX_RATING && $id) {
    if (!isset($session_info['rated_imgs'])) {
      $session_info['rated_imgs'] = $site_sess->get_session_var("rated_imgs");
    }
    $split_list = array();
    if (!empty($session_info['rated_imgs'])) {
      $split_list = explode(" ", $session_info['rated_imgs']);
    }
    if (!in_array($id, $split_list) && !in_array($id, $cookie_rated)) {
      $session_info['rated_imgs'] .= " ".$id;
      $session_info['rated_imgs'] = trim($session_info['rated_imgs']);
      $site_sess->set_session_var("rated_imgs", $session_info['rated_imgs']);
      $cookie_rated[] = $id;
      $cookie_expire = time() + 60 * 60 * 24 * 4;
      setcookie($cookie_name.'rated', serialize($cookie_rated), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
      update_image_rating($id, $rating);
      $msg = $lang['voting_success'];
    }
    else {
      $msg = $lang['already_voted'];
    }
  }
  else {
    $msg = $lang['voting_error'];
  }
}

//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------
if ($user_info['user_level'] >= USER) {
  $site_template->register_vars("lang_loggedin_msg", preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU", format_text($user_info['user_name'], 2), $lang['lang_loggedin_msg']));
  $user_box = $site_template->parse_template("user_logininfo");
  $site_template->register_vars(array(
    "user_box" => $user_box,
    "user_loggedin" => 1,
    "user_loggedout" => 0,
    "is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0
  ));
  $site_template->un_register_vars("user_logininfo");
  unset($user_box);
}
else {
  $user_box = $site_template->parse_template("user_loginform");
  $site_template->register_vars(array(
    "user_box" => $user_box,
    "user_loggedin" => 0,
    "user_loggedout" => 1,
    "is_admin" => 0
  ));
  $site_template->un_register_vars("user_loginform");
  unset($user_box);
}

?>


Funktioniert  nicht


db_field_definitions.php

<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: db_field_definitions.php                             *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.4                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die("Security violation");
}

/* ------------------------------------------------------------------------
If you want to add additional fields in order to store more info on
each image or user, set up these fields by inserting a column to the "4images_images"
or "4images_users" table in your database.

If you add an additional image field and allow upload from the gallery,
add the columns to "4images_images_temp" as well.

Add one line for each new column in the following format:

  $additional_image_fields['%column_name%'] = array("%field_description%", "%admin_field_type%", %is_required%);
or
  $additional_user_fields['%column_name%'] = array("%field_description%", "%admin_field_type%", %is_required%);

At the bottom of this file, you will find examples for adding a new field.

----------
%column_name% string

  Replace %column_name% with name of the table column.
  You can use the tag {%column_name%} in the templates to display the value of the
  database field.
  If you want to add a textfield to the templates, do this such like:

    <input type="text" name="%column_name%" value="{%column_name%}" />

----------
%field_description% string

  Replace %field_description% with a custom name. This name will be displayed in the Control Panel.
  The value can be displayed in the templates with the tag {lang_%column_name%}.
  It is also recommended to add this tag to the language files (main.php) and to replace "%field_description%"
  with $lang['%column_name%'].

----------
%admin_field_type% string

  Replace %admin_field_type% with the type of input field you would like to use in your
  Control Panel.

  You can use the following formats:

   "text"
     will display an input field type="text".

   "textarea"
     will display a textarea.

   "radio"
     will display radio buttons with Yes/No options.
     Please make sure that the database field type is an integer (for example: "tinyint(1)").
     You can use this field tag for conditional statements in your templates:

     {if %column_name%} Some text {endif %column_name%}

----------
%is_required% bool

  Sets up the field as required when adding data through the Control Panel or the user upload form.

------------------------------------------------------------------------ */

// Example for additional image fields:
//$additional_image_fields['image_photographer'] = array($lang['image_photographer'], "text", 1);

// Example for additional user fields
//$additional_user_fields['user_adress'] = array($lang['user_adress'], "text", 1);
//$additional_user_fields['user_fullname'] = array($lang['fullname'], "text", 0);
$additional_user_fields['user_plz'] = array($lang['plz'], "text", 0);
?>
Title: Re: Profil erweitern
Post by: KurtW on May 20, 2007, 01:57:04 PM
Hallo,

ich sehe keinen Fehler...
Wird die plz Angabe in die Datenbank gespeichert?
Link und Testaccount...

Gruß
KUrt
Title: Re: Profil erweitern
Post by: maus on May 20, 2007, 07:00:51 PM
Hallo,

ich sehe keinen Fehler...
Wird die plz Angabe in die Datenbank gespeichert?
Link und Testaccount...

Gruß
KUrt

http://www.lach-lach.de/kot-07/member.php?action=showprofile&user_id=3
Title: Re: Profil erweitern
Post by: KurtW on May 20, 2007, 07:15:02 PM
Tja, hab mir die Sache angesehen....
Beim Updaten des Profils wird nichts übernommen.
Besteht halt wieder die Frage, die ich schon gestellt habe: Werden die Daten in die Datenbank eingetragen oder nicht  :?: :?:


Also ich glaube nicht... weil:

Wenn ich mir folgenden Code in der member.php ansehe:
Code: [Select]
//-----------------------------------------------------
//--- Edit Profile ------------------------------------
//-----------------------------------------------------
$update_process = 0;
$new_email_msg = "";
if ($action == "updateprofile") {
  $txt_clickstream = $lang['control_panel'];
  if ($user_info['user_level'] == GUEST) {
    show_error_page($lang['no_permission']);
    exit;
  }
  $user_email = (isset($HTTP_POST_VARS['user_email'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_email'])) : "";
  $user_email2 = (isset($HTTP_POST_VARS['user_email2'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_email2'])) : "";
  $user_homepage = (isset($HTTP_POST_VARS['user_homepage'])) ? format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['user_homepage']))) : "";
  $user_icq = (isset($HTTP_POST_VARS['user_icq'])) ? ((intval(trim($HTTP_POST_VARS['user_icq']))) ? intval(trim($HTTP_POST_VARS['user_icq'])) : "") : "";
  $user_showemail = (isset($HTTP_POST_VARS['user_showemail'])) ? intval($HTTP_POST_VARS['user_showemail']) : 0;
  $user_allowemails = (isset($HTTP_POST_VARS['user_allowemails'])) ? intval($HTTP_POST_VARS['user_allowemails']) : 0;
  $user_invisible = (isset($HTTP_POST_VARS['user_invisible'])) ? intval($HTTP_POST_VARS['user_invisible']) : 0;

werden ja hier nur diese UserDaten aus dem Übermitteln des Updates ausgelesen und übernommen.
In dem folgenden sql update ist dann zwar der code für einen additionalen Eintrag vorhanden, aber wo sollte der den herkommen,
wenn nichts ausgelesen werden kann.
Also würde ich bei den obigen Code noch die zusätzlichen Userinfos dazupacken.

Und auch bei der Übergabe aus der Datenbank zum Profil werden ja nur die Standartangaben übergeben:
Code: [Select]
  $site_template->register_vars(array(
    "user_name" => format_text(stripslashes($user_name), 2),
    "user_email" => format_text(stripslashes($user_email), 2),
    "user_email2" => format_text(stripslashes($user_email2), 2),
    "user_homepage" => format_text(stripslashes($user_homepage), 2),
    "user_icq" => $user_icq,
    "user_showemail_yes" => $user_showemail_yes,
    "user_showemail_no" => $user_showemail_no,
    "user_allowemails_yes" => $user_allowemails_yes,
    "user_allowemails_no" => $user_allowemails_no,
    "user_invisible_yes" => $user_invisible_yes,
    "user_invisible_no" => $user_invisible_no,

Wenns dann immer noch nicht klappt, dann  :cry:


Kurt
Title: Re: Profil erweitern
Post by: maus on May 21, 2007, 01:40:02 PM
Tja, hab mir die Sache angesehen....
Beim Updaten des Profils wird nichts übernommen.
Besteht halt wieder die Frage, die ich schon gestellt habe: Werden die Daten in die Datenbank eingetragen oder nicht  :?: :?:


Also ich glaube nicht... weil:

Wenn ich mir folgenden Code in der member.php ansehe:
Code: [Select]
//-----------------------------------------------------
//--- Edit Profile ------------------------------------



//-----------------------------------------------------
$update_process = 0;
$new_email_msg = "";
if ($action == "updateprofile") {
  $txt_clickstream = $lang['control_panel'];
  if ($user_info['user_level'] == GUEST) {
    show_error_page($lang['no_permission']);
    exit;
  }
  $user_email = (isset($HTTP_POST_VARS['user_email'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_email'])) : "";
  $user_email2 = (isset($HTTP_POST_VARS['user_email2'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['user_email2'])) : "";
  $user_homepage = (isset($HTTP_POST_VARS['user_homepage'])) ? format_url(un_htmlspecialchars(trim($HTTP_POST_VARS['user_homepage']))) : "";
  $user_icq = (isset($HTTP_POST_VARS['user_icq'])) ? ((intval(trim($HTTP_POST_VARS['user_icq']))) ? intval(trim($HTTP_POST_VARS['user_icq'])) : "") : "";
  $user_showemail = (isset($HTTP_POST_VARS['user_showemail'])) ? intval($HTTP_POST_VARS['user_showemail']) : 0;
  $user_allowemails = (isset($HTTP_POST_VARS['user_allowemails'])) ? intval($HTTP_POST_VARS['user_allowemails']) : 0;
  $user_invisible = (isset($HTTP_POST_VARS['user_invisible'])) ? intval($HTTP_POST_VARS['user_invisible']) : 0;

werden ja hier nur diese UserDaten aus dem Übermitteln des Updates ausgelesen und übernommen.
In dem folgenden sql update ist dann zwar der code für einen additionalen Eintrag vorhanden, aber wo sollte der den herkommen,
wenn nichts ausgelesen werden kann.
Also würde ich bei den obigen Code noch die zusätzlichen Userinfos dazupacken.

Und auch bei der Übergabe aus der Datenbank zum Profil werden ja nur die Standartangaben übergeben:
Code: [Select]
  $site_template->register_vars(array(
    "user_name" => format_text(stripslashes($user_name), 2),
    "user_email" => format_text(stripslashes($user_email), 2),
    "user_email2" => format_text(stripslashes($user_email2), 2),
    "user_homepage" => format_text(stripslashes($user_homepage), 2),
    "user_icq" => $user_icq,
    "user_showemail_yes" => $user_showemail_yes,
    "user_showemail_no" => $user_showemail_no,
    "user_allowemails_yes" => $user_allowemails_yes,
    "user_allowemails_no" => $user_allowemails_no,
    "user_invisible_yes" => $user_invisible_yes,
    "user_invisible_no" => $user_invisible_no,

Wenns dann immer noch nicht klappt, dann  :cry:


Kurt
Title: Re: Profil erweitern
Post by: maus on May 21, 2007, 02:09:34 PM
Hallo Kurt,

also ich habe einiges ausprobiert ich bekomme es mal wieder nicht hin ich bin so blöd!!!!!
Kannst du das UserProfil erstellen



Angaben:
Wohnort / Region:
Postleitzahlenbereich:
Sie oder Paar ER:
Land:
MSN Messenger:
Yahoo Messenger:


Freiwillige Angaben:
Interessen:
Geburtstag:
Sternzeichen:
Größe in cm:
Gewicht in kg:
Figur:
Augenfarbe:
Haarfarbe:
Haarlänge:
Körperbehaarung:
Intimbehaarung:
Sexualität:
Raucher:
Tattoo:
Piercings:
Über mich:

Gruß
Maus
Title: Re: Profil erweitern
Post by: ccsakuweb on June 09, 2007, 12:13:47 AM
hi i have a problem with signature. in my sig doesn't work bbcode . why is it??
i has that and it doesnt work. maybe.. could anyone  help me?

Code: [Select]
$signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
Title: Re: Profil erweitern
Post by: UFOSWORLD on November 30, 2007, 08:35:16 PM
Gibt es nee Möglichkeit wenn man neue Felder in die Datenbank eingebaut hat, und diese im Profil befüllt werden können, dem User beim nächsten einloggen
aufzufordern diese Daten einzugeben.... 

Praktisch nach dem einloggen soll das System kucken... sind die Felder befüllt... wenn nicht dann geh ins UserProfil und lass den User die Felder befüllen...

Dann kann ers speichern und dann erst dir Fotos kucken

gruss UFO
Title: Re: Profil erweitern
Post by: thunderstrike on February 27, 2008, 01:56:33 PM
I no get this ...

Quote
get_user_table_field(", u.", "user_signature")"

Where is field in $user_table_fields in includes/sessions.php file ? If additional user field ... is like this:

Code: [Select]
", u.user_signature

or $additional_sql if add $additional_user_fields array in condition before ...
Title: Re: Profil erweitern
Post by: mawenzi on February 27, 2008, 02:08:39 PM
... in 2005 I used the original 4images code for the extension ...
Title: Re: Profil erweitern
Post by: thunderstrike on February 27, 2008, 02:11:29 PM
This line is need edit in 1st post ...
Title: Re: Profil erweitern
Post by: thunderstrike on February 27, 2008, 07:47:46 PM
If check this: http://www.4homepages.de/forum/index.php?topic=19297.0

No need for add manual additional image fields or additional user fields in details . . .
With this, is possible for use signature in template after add in includes/db_field_definitions.php file (same for lang tag).
Title: Re: Profil erweitern
Post by: mawenzi on February 27, 2008, 08:18:08 PM
... and as I said ... your tweak is from 2007 ... and my post is from 2005 ... and it works since then ...
... and if anyone install your tweak first ... then please ... and then use additional user fields in this way ...
Title: Re: Profil erweitern
Post by: thunderstrike on February 27, 2008, 08:27:37 PM
Ah ! very good.
Title: Re: Profil erweitern
Post by: Carpfish on September 20, 2008, 03:52:28 PM
Ich hätte auch noch eine Frage zu den Profilerweiterungen.
Ich habe einige Zeilen im Profil und Uploadbereich gemacht.

Kann ich diese auch zur suche hinzufügen.
Denn genau diese zusätzlichen Angaben sind bei mir zur suche notwendig.

Thanks
Title: Re: Profil erweitern
Post by: Carpfish on September 21, 2008, 08:28:07 AM
Danke Ivan

Funktioniert super....
Title: Re: Profil erweitern
Post by: Pumaaa on November 26, 2008, 04:03:56 PM
Ich bekomme es einfach nicht hin, dass meine hinzugefügten Felder auch im ACP angezeigt werden und das wenn man etwas im Kontrollzentrum in die neu angelegten Felder schreibt, dies auch nach dem speichern noch drin bleibt!

Ich habe es genau so gemacht, wie in zwei Anleitungen hier beschrieben.
Bei der Registrierung und im Kontrollzentrum wird dsas Feld aber angezeigt.

Kann mir da jemand helfen?

Danke!
Gruß
Title: Re: Profil erweitern
Post by: Pumaaa on November 26, 2008, 10:10:21 PM
Ja du hast recht, die ist wirklich besser,  aber nach der Anleitung hat es bei mir auch nicht geklappt. :(

Zu Punkt 5.)

Ich habe in myphpadmin wie auch hier beschrieben eine neue Tabelle hinzugefügt.
Du schreibst in der Anleitung von ALTER TABLE ... usw.
Kann ich das in meine Datenbank im ordner data/database/default/ in der mysql_default.sql eintragen?

Danke!
Gruß
Pumaaa
Title: Re: Profil erweitern
Post by: Pumaaa on November 27, 2008, 08:02:52 AM
Hab ich gemacht, aber es will einfach nicht klappen!
Ich habe exakt nach deiner Anleitung gearbeitet :(
Woran kann das jetzt liegen?

Gruß
Pumaaa
Title: Re: Profil erweitern
Post by: westfalenpeppe on January 06, 2009, 04:46:36 PM
habe alles wie angegeben eingebaut und mehrfach kontrolliert.

In der Datenbank steht auch meine Signatur drin.

schreibe ich nun ein kommentar so wird die Signatur aber nicht angezeigt !?

Hat noch jemand eine Idee?
Title: Re: Profil erweitern
Post by: westfalenpeppe on January 08, 2009, 12:50:43 PM
Bitte nochmals um Hilfe. Danke  :wink:
Title: Re: Profil erweitern
Post by: westfalenpeppe on January 13, 2009, 04:27:51 PM
wirklich keiner der helfen kann? :cry:
Title: Re: Profil erweitern
Post by: mawenzi on January 13, 2009, 04:33:14 PM
... wenn du das Dreamboard nicht installiert hast, so hoffe ich doch, dass du Schritt 3, optional nicht ausgeführt hast ...
... ein Link zu einer solchen Kommentar-Seite wäre nicht schlecht ...
Title: Re: Profil erweitern
Post by: westfalenpeppe on January 13, 2009, 04:53:37 PM
danke....

habe dir eine pn geschickt.....
Title: Re: Profil erweitern
Post by: 4ella on May 29, 2009, 01:45:18 AM
Hello diese thread ist in deutsch und meine deutsch is sehr schlecht , aber ich probiere erzahlen ,  kann jemand mir sagen ob ist diese signaturen wie in diese forum ist (text oder image below komentar)  , funkzioniert das wie forum signaturen ? ich wolte signature im 4images zu haben - in kommentaren) wie hier in diese board - forum ist , viele users in meine website in seine kommentaren mussen seine kontakt info/logo etc immer wiederholen , wie funzioniert diese Mod ? Ich brauche nicht ubersetzung die erste post - ich glaube ich wurde das allein instalieren , ich weisse wie , aber ich wollte nur wissen ob ist diese Mod was genau ich will. Kann jemand mich erzahlen dass ich kann diese Mod installieren ? Ich verstehe wie installiert diese sache aber ich weiss nicht ob ist das gut fur mich , das ist sehr schwer fur mich alles threads hier in deutsch lessen . Sie konnen in deutsch oder auch in english , italian und czech antworten , vielen dank Daniel .
Title: Re: Profil erweitern
Post by: mawenzi on May 29, 2009, 10:13:24 AM
Hallo Daniel ...

... mit dieser Modifikation lassen sich Signaturen, genauso wie hier im Forum, automatisch bei den Bildkommentaren anfügen ...
... eine Anleitung gibt es hier : http://www.4homepages.de/forum/index.php?topic=10164.msg54940#msg54940 ...
... und nach Fertigstellung sollte es dann wie z.B. hier (http://klick.kl.funpic.de/details.php?image_id=3759) oder hier (http://klick.kl.funpic.de/details.php?image_id=2864) aussehen ...
Title: Re: Profil erweitern
Post by: 4ella on May 29, 2009, 04:32:47 PM
Wunderbar :D , it works perfect , thank you very much Mawenzi , its exactly what i needed .
Title: Re: Profil erweitern
Post by: luener on April 16, 2010, 01:20:18 PM
Habe die User-Signatur eingebaut.
Im Profil wird sie auch einwandfrei angezeigt.

Bei den Kommentaren tut sich allerdings nichts...!

Habe alles 3x durchgesehen, finde allerdings nix...!!!

Da ich ein absoluter PHP-Laie bin, habe ich mal meine details.php angefügt.
Vielleicht kann mir jemand helfen.

Gruß
Ralf

details.php

<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: details.php                                          *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.7                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template = 'details';

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');

//######################################## Start MOD: More Pictures on Detail Page #################################################



$sql = "SELECT  image_id,image_group



FROM ".IMAGES_TABLE."



WHERE image_id = '$image_id' ";



$result = $site_db->query($sql);



$row = mysql_fetch_object($result);
                $image_group = $row->image_group;




  if($image_group >= 1){



$sql = "SELECT image_id, cat_id, image_name, image_active, image_media_file, image_thumb_file, image_group
                FROM ".IMAGES_TABLE."



WHERE image_group = '$image_group'



";



$result = $site_db->query($sql);



$num_rows = $site_db->get_numrows($result);

//echo " Group ";
//echo $image_group;
$thumbnails = "<table style=\"border:0px solid #cccccc; \">\n";
          $thumbnails .= "<tr style=\"margin:0px;\" >\n";
  $count = 0;
  $bgcounter = 0;
  while ($image_row = $site_db->fetch_array($result)){
      if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
         $thumbnails .= "<td  style=\"padding:1px 10px;\">\n";
       }
        show_image($image_row);
         $thumbnails .= $site_template->parse_template("group_thumbnail_bit");
         $thumbnails .= "\n</td>\n";
       }
         $thumbnails .= "</tr>\n";
         $thumbnails .= "</table>\n";
    $site_template->register_vars("group_preview", $thumbnails);
}
unset($thumbnails);

//######################################## End MOD: More Pictures on Detail Page #################################################





if (!$image_id) {
    redirect($url);
}

$additional_sql = "";



if (!empty($additional_user_fields)) {
  foreach ($additional_user_fields as $key => $val) {
    $additional_sql .= ", u.".$key;
  }
}



if (!empty($additional_image_fields)) {
  foreach ($additional_image_fields as $key => $val) {
    $additional_sql .= ", i.".$key;
  }
}

$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")."
        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_id = $image_id AND i.image_active = 1 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;
$is_image_owner = ($image_row['user_id'] > USER_AWAITING && $user_info['user_id'] == $image_row['user_id']) ? 1 : 0;

if (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id) || !$image_row) {
  redirect($url);
}

$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" : get_random_image($cat_id);
$site_template->register_vars("random_cat_image", $random_cat_image);
unset($random_cat_image);

//-----------------------------------------------------
//--- Show Image --------------------------------------
//-----------------------------------------------------



//--- Start Histogramm 27.02.2006 ----------------------
$hist_image = $image_row['image_media_file'] ;
$hist_file= "hist_".substr($hist_image,0,strlen($hist_image)-4).".png";
$hist_path = "data/media/".$cat_id."/";

$ext = substr($hist_image, strpos($hist_image, ".")+1, strlen($hist_image));
$AutorisedImageType = array ("jpg", "jpeg", "JPG", "JPEG");  // Dateitypen für die das Histogramm gezeigt werden soll

if (in_array($ext, $AutorisedImageType)) {
   $histogramm_image = "<img src='histo.php?hist_image=".$hist_image."&hist_file=".$hist_file."&hist_path=".$hist_path."' border=\"1\">";
} else {
   $histogramm_image = REPLACE_EMPTY;
}

$site_template->register_vars(array(
   "histogramm" => "Histogramm:",
   "histogramm_image" => $histogramm_image
));
//--- Ende Histogramm 27.02.2006 ------------------------





$image_allow_comments = (check_permission("auth_readcomment", $cat_id)) ? $image_row['image_allow_comments'] : 0;
$image_name = format_text($image_row['image_name'], 2);
show_image($image_row, $mode, 0, 1);


    //--- SEO variables -------------------------------
    
    $meta_keywords  = !empty($image_row['image_keywords']) ? implode(", ", explode(" ", $image_row['image_keywords'])) : "";
    $meta_description = !empty($image_row['image_description']) ? strip_tags($image_row['image_description']) . ". " : "";
    
    $site_template->register_vars(array(
            "detail_meta_description"   => $meta_description,
            "detail_meta_keywords"      => $meta_keywords,
            "prepend_head_title"        => $image_name . " - ",
            ));


$in_mode = 0;

$sql = "";
if ($mode == "lightbox") {
  if (!empty($user_info['lightbox_image_ids'])) {
    $image_id_sql = str_replace(" ", ", ", trim($user_info['lightbox_image_ids']));
    $sql = "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
            FROM ".IMAGES_TABLE."
            WHERE image_active = 1 AND image_id IN ($image_id_sql) AND (cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
            ORDER BY ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort'];
    $in_mode = 1;
  }
}
elseif ($mode == "search") {
  if (!isset($session_info['searchid']) || empty($session_info['searchid'])) {
    $session_info['search_id'] = $site_sess->get_session_var("search_id");
  }

  if (!empty($session_info['search_id'])) {
    $search_id = unserialize($session_info['search_id']);
  }

  $sql_where_query = "";

  if (!empty($search_id['image_ids'])) {
    $sql_where_query .= "AND image_id IN (".$search_id['image_ids'].") ";
  }

  if (!empty($search_id['user_ids'])) {
    $sql_where_query .= "AND user_id IN (".$search_id['user_ids'].") ";
  }

  if (!empty($search_id['search_new_images']) && $search_id['search_new_images'] == 1) {
    $new_cutoff = time() - 60 * 60 * 24 * $config['new_cutoff'];
    $sql_where_query .= "AND image_date >= $new_cutoff ";
  }

  if (!empty($search_id['search_cat']) && $search_id['search_cat'] != 0) {
    $cat_id_sql = 0;
    if (check_permission("auth_viewcat", $search_id['search_cat'])) {
      $sub_cat_ids = get_subcat_ids($search_id['search_cat'], $search_id['search_cat'], $cat_parent_cache);
      $cat_id_sql .= ", ".$search_id['search_cat'];
      if (!empty($sub_cat_ids[$search_id['search_cat']])) {
        foreach ($sub_cat_ids[$search_id['search_cat']] as $val) {
          if (check_permission("auth_viewcat", $val)) {
            $cat_id_sql .= ", ".$val;
          }
        }
      }
    }
    $cat_id_sql = $cat_id_sql !== 0 ? "AND cat_id IN ($cat_id_sql)" : "";
  }
  else {
    $cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN");
    $cat_id_sql = $cat_id_sql !== 0 ? "AND cat_id NOT IN (".$cat_id_sql.")" : "";
  }

  if (!empty($sql_where_query)) {
    $sql = "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
            FROM ".IMAGES_TABLE."
            WHERE image_active = 1
            $sql_where_query
            $cat_id_sql
            ORDER BY ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort'];
    $in_mode = 1;
  }
}
if (!$in_mode || empty($sql)) {
  $sql = "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
          FROM ".IMAGES_TABLE."
          WHERE image_active = 1 AND cat_id = $cat_id
          ORDER BY ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort'];
}
$result = $site_db->query($sql);

$image_id_cache = array();
$next_prev_cache = array();
$break = 0;
$prev_id = 0;
while($row = $site_db->fetch_array($result)) {
  $image_id_cache[] = $row['image_id'];
  $next_prev_cache[$row['image_id']] = $row;
  if ($break) {
    break;
  }
  if ($prev_id == $image_id) {
    $break = 1;
  }
  $prev_id = $row['image_id'];
}
$site_db->free_result();

if (!function_exists("array_search")) {
  function array_search($needle, $haystack) {
    $match = false;
    foreach ($haystack as $key => $value) {
      if ($value == $needle) {
        $match = $key;
      }
    }
    return $match;
  }
}

$act_key = array_search($image_id, $image_id_cache);
$next_image_id = (isset($image_id_cache[$act_key + 1])) ? $image_id_cache[$act_key + 1] : 0;
$prev_image_id = (isset($image_id_cache[$act_key - 1])) ? $image_id_cache[$act_key - 1] : 0;
unset($image_id_cache);

// Get next and previous image
if (!empty($next_prev_cache[$next_image_id])) {
  $next_image_name = format_text($next_prev_cache[$next_image_id]['image_name'], 2);
  $next_image_url = $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$next_image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""));
  if (!get_file_path($next_prev_cache[$next_image_id]['image_media_file'], "media", $next_prev_cache[$next_image_id]['cat_id'], 0, 0)) {
    $next_image_file = ICON_PATH."/404.gif";
  }
  else {
    $next_image_file = get_file_path($next_prev_cache[$next_image_id]['image_media_file'], "media", $next_prev_cache[$next_image_id]['cat_id'], 0, 1);
  }
  if (!get_file_path($next_prev_cache[$next_image_id]['image_thumb_file'], "thumb", $next_prev_cache[$next_image_id]['cat_id'], 0, 0)) {
    $next_thumb_file = ICON_PATH."/".get_file_extension($next_prev_cache[$next_image_id]['image_media_file']).".gif";
  }
  else {
    $next_thumb_file = get_file_path($next_prev_cache[$next_image_id]['image_thumb_file'], "thumb", $next_prev_cache[$next_image_id]['cat_id'], 0, 1);
  }
}
else {
  $next_image_name = REPLACE_EMPTY;
  $next_image_url = REPLACE_EMPTY;
  $next_image_file = REPLACE_EMPTY;
  $next_thumb_file = REPLACE_EMPTY;
}

if (!empty($next_prev_cache[$prev_image_id])) {
  $prev_image_name = format_text($next_prev_cache[$prev_image_id]['image_name'], 2);
  $prev_image_url = $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$prev_image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""));
  if (!get_file_path($next_prev_cache[$prev_image_id]['image_media_file'], "media", $next_prev_cache[$prev_image_id]['cat_id'], 0, 0)) {
    $prev_image_file = ICON_PATH."/404.gif";
  }
  else {
    $prev_image_file = get_file_path($next_prev_cache[$prev_image_id]['image_media_file'], "media", $next_prev_cache[$prev_image_id]['cat_id'], 0, 1);
  }
  if (!get_file_path($next_prev_cache[$prev_image_id]['image_thumb_file'], "thumb", $next_prev_cache[$prev_image_id]['cat_id'], 0, 0)) {
    $prev_thumb_file = ICON_PATH."/".get_file_extension($next_prev_cache[$prev_image_id]['image_media_file']).".gif";
  }
  else {
    $prev_thumb_file = get_file_path($next_prev_cache[$prev_image_id]['image_thumb_file'], "thumb", $next_prev_cache[$prev_image_id]['cat_id'], 0, 1);
  }
}
else {
  $prev_image_name = REPLACE_EMPTY;
  $prev_image_url = REPLACE_EMPTY;
  $prev_image_file = REPLACE_EMPTY;
  $prev_thumb_file = REPLACE_EMPTY;
}

$site_template->register_vars(array(
  "next_image_id" => $next_image_id,
  "next_image_name" => $next_image_name,
  "next_image_url" => $next_image_url,
  "next_image_file" => $next_image_file,
  "next_thumb_file" => $next_thumb_file,
  "prev_image_id" => $prev_image_id,
  "prev_image_name" => $prev_image_name,
  "prev_image_url" => $prev_image_url,
  "prev_image_file" => $prev_image_file,
  "prev_thumb_file" => $prev_thumb_file
));
unset($next_prev_cache);
//-----------------------------------------------------
//--- Show Count Lightbox -----------------------------
//-----------------------------------------------------

$sql = "SELECT COUNT(*) AS counter
        FROM ".LIGHTBOXES_TABLE."
        WHERE lightbox_image_ids REGEXP '([^0-9]|^)".$image_row['image_id']."([^0-9]|$)'";
        
$lightbox_count = $site_db->query_firstrow($sql);

$site_template->register_vars(array(
  "lang_image_lightbox_count" => $lang['image_lightbox_count'],
  "lightbox_count" => (isset($lightbox_count['counter']) && $lightbox_count['counter']) ? $lightbox_count['counter'] : 0
));

unset($lightbox_count);

//-----------------------------------------------------
//--- Save Comment ------------------------------------
//-----------------------------------------------------
$error = 0;
if ($action == "postcomment" && isset($HTTP_POST_VARS[URL_ID])) {
  $id = intval($HTTP_POST_VARS[URL_ID]);
  $sql = "SELECT cat_id, image_allow_comments
          FROM ".IMAGES_TABLE."
          WHERE image_id = $id";
  $row = $site_db->query_firstrow($sql);

  if ($row['image_allow_comments'] == 0 || !check_permission("auth_postcomment", $row['cat_id']) || !$row) {
    $msg = $lang['comments_deactivated'];
  }
  else {
    $user_name = un_htmlspecialchars(trim($HTTP_POST_VARS['user_name']));
    $comment_headline = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_headline']));
    $comment_text = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text']));

    $captcha = (isset($HTTP_POST_VARS['captcha'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['captcha'])) : "";

    // Flood Check
    $sql = "SELECT comment_ip, comment_date
            FROM ".COMMENTS_TABLE."
            WHERE image_id = $id
            ORDER BY comment_date DESC
            LIMIT 1";
    $spam_row = $site_db->query_firstrow($sql);
    $spamtime = $spam_row['comment_date'] + 180;

    if ($session_info['session_ip'] == $spam_row['comment_ip'] && time() <= $spamtime && $user_info['user_level'] != ADMIN)  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['spamming'];
      $error = 1;
    }

    $user_name_field = get_user_table_field("", "user_name");
    if (!empty($user_name_field)) {
      if ($site_db->not_empty("SELECT $user_name_field FROM ".USERS_TABLE." WHERE $user_name_field = '".strtolower($user_name)."' AND ".get_user_table_field("", "user_id")." <> '".$user_info['user_id']."'")) {
        $msg .= (($msg != "") ? "<br />" : "").$lang['username_exists'];
        $error = 1;
      }
    }
    if ($user_name == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['name_required'];
      $error = 1;
    }

    if ($comment_text == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['comment_required'];
      $error = 1;
    }

    if ($captcha_enable_comments && !captcha_validate($captcha)) {
      $msg .= (($msg != "") ? "<br />" : "").$lang['captcha_required'];
      $error = 1;
    }

    if (!$error)  {
      
      
      //-----------------------------------------------------
//--- Save Rating -------------------------------------
//-----------------------------------------------------
if (intval($HTTP_POST_VARS['rating']) != "") {
  $rating = intval($HTTP_POST_VARS['rating']);
  $cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
  $cookie_rated = isset($HTTP_COOKIE_VARS[$cookie_name.'rated']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'rated'])) : array();
  if ($rating && $rating <= MAX_RATING && $id) {
    if (!isset($session_info['rated_imgs'])) {
      $session_info['rated_imgs'] = $site_sess->get_session_var("rated_imgs");
    }
    $split_list = array();
    if (!empty($session_info['rated_imgs'])) {
      $split_list = explode(" ", $session_info['rated_imgs']);
    }
    if (!in_array($id, $split_list) && !in_array($id, $cookie_rated)) {
      $session_info['rated_imgs'] .= " ".$id;
      $session_info['rated_imgs'] = trim($session_info['rated_imgs']);
      $site_sess->set_session_var("rated_imgs", $session_info['rated_imgs']);
      $cookie_rated[] = $id;
      $cookie_expire = time() + 60 * 60 * 24 * 4;
      setcookie($cookie_name.'rated', serialize($cookie_rated), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
      update_image_rating($id, $rating);
      $msg_color = 1;
      $msg = $lang['voting_success'];
    }
    else {
      $msg = $lang['already_voted'];
    }
  }
  else {
    $msg = $lang['voting_error'];
  }
}
//////////////////////////////////////////

      
      
      
      
      
      
      
      
      
      
      
      $sql = "INSERT INTO ".COMMENTS_TABLE."
              (image_id, user_id, user_name, comment_headline, comment_text, comment_ip, comment_date)
              VALUES
              ($id, ".$user_info['user_id'].", '$user_name', '$comment_headline', '$comment_text', '".$session_info['session_ip']."', ".time().")";
      $site_db->query($sql);
      $commentid = $site_db->get_insert_id();
      update_comment_count($id, $user_info['user_id']);
      
      
      
      
      
      
         $sql = "SELECT image_name FROM ".IMAGES_TABLE." WHERE image_id = $id";
    $image_name = $site_db->query($sql);
    $sql = "SELECT user_id FROM ".IMAGES_TABLE." WHERE image_id = $id";
    $user_id = $site_db->query($sql);
    
    $recipient_name = $image_row['user_name'];
    $recipient_email = $image_row['user_email'];
    $image_url = $script_url."/details.php?".URL_IMAGE_ID."=".$id."";
    
       // Start Emailer für comments
    include(ROOT_PATH.'includes/email.php');
    $site_email = new Email();
    $site_email->set_to($recipient_email);
    $site_email->set_from($config['site_email'], $config['site_name']);
    $site_email->set_subject("Kommentar erhalten");
    $site_email->register_vars(array(
      "user_name" => $image_row['user_name'],
      "recipient_name" => $recipient_name,
      "image_name" => $image_row['image_name'],
      "comment_date" => format_date($config['date_format']." ".$config['time_format'], $current_time),
      "site_name" => $config['site_name'],
      "image_url" => $image_url,
          ));
    $site_email->set_body("comment_email", $config['language_dir']);
    $site_email->send_email();
      
      
      
      
      
      
      
      $msg = $lang['comment_success'];  
        
    }
  }
  unset($row);
  unset($spam_row);
}

//-----------------------------------------------------
//--- Show Comments -----------------------------------
//-----------------------------------------------------
if ($image_allow_comments == 1) {




  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 = 1000;
  }
  $commentsperpage_dropdown = "\n<select name=\"commentsetperpage\" onchange=\"if (this.options[this.selectedIndex].value != 0){ forms['commentsperpage'].submit() }\" class=\"select\">\n";
  for($i = 1; $i <= 15; $i++) {
    $setvalue = 1 * $i;
    $commentsperpage_dropdown .= "<option value=\"".$setvalue."\"";
      if ($setvalue == $commentperpage) {
      $commentsperpage_dropdown .= " selected=\"selected\"";
    }
    $commentsperpage_dropdown .= ">";
    $commentsperpage_dropdown .= $setvalue;
    $commentsperpage_dropdown .= "</option>\n";
  }
  $commentsperpage_dropdown .= "</select>\n";

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

  $sql = "SELECT COUNT(image_id) AS comments
          FROM ".COMMENTS_TABLE."
          WHERE image_id = $image_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."details.php?image_id=$image_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(
    "paging" => $getpaging->get_paging(),
    "paging_stats" => ($num_comments) ? $getpaging->get_paging_stats() : ""
  ));
  $additional_sql = "";
  if (!empty($additional_user_fields)) {
    $table_fields = $site_db->get_table_fields(USERS_TABLE);
    foreach ($additional_user_fields as $key => $val) {
      if (isset($table_fields[$key])) {
        $additional_sql .= ", u.$key";
      }
    }
  }




  $site_template->register_vars(array(
      "has_rss"   => true,
      "rss_title" => "RSS Feed: ".$image_name." (".str_replace(':', '', $lang['comments']).")",
      "rss_url"   => $script_url."/rss.php?action=comments&amp;".URL_IMAGE_ID."=".$image_id
  ));

    $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_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_signature").", u.userpic
          FROM ".COMMENTS_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
          WHERE c.image_id = $image_id
          ORDER BY c.comment_date ASC
          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 = "<tr><td class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
  }
  else {
    $comments = "";
    $bgcounter = 0;
    for ($i = 0; $i < $num_comments; $i++) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

      $comment_user_email = "";
      $comment_user_email_save = "";
      $comment_user_mailform_link = "";
      $comment_user_email_button = "";
      $comment_user_homepage_button = "";
      $comment_user_icq_button = "";
      $comment_user_profile_button = "";
      $comment_user_status_img = REPLACE_EMPTY;
      $comment_user_name = format_text($comment_row[$i]['comment_user_name'], 2);
      $comment_user_info = $lang['userlevel_guest'];

      $comment_user_id = $comment_row[$i]['user_id'];

      if (isset($comment_row[$i][$user_table_fields['user_name']]) && $comment_user_id != GUEST) {
        $comment_user_name = format_text($comment_row[$i][$user_table_fields['user_name']], 2);

        $comment_user_profile_link = !empty($url_show_profile) ? $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_show_profile)) : $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$comment_user_id);
        $comment_user_profile_button = "<a href=\"".$comment_user_profile_link."\"><img src=\"".get_gallery_image("profile.gif")."\" border=\"0\" alt=\"".$comment_user_name."\" /></a>";

        $comment_user_status_img = ($comment_row[$i][$user_table_fields['user_lastaction']] >= (time() - 300) && ((isset($comment_row[$i][$user_table_fields['user_invisible']]) && $comment_row[$i][$user_table_fields['user_invisible']] == 0) || $user_info['user_level'] == ADMIN)) ? "<img src=\"".get_gallery_image("user_online.gif")."\" border=\"0\" alt=\"Online\" />" : "<img src=\"".get_gallery_image("user_offline.gif")."\" border=\"0\" alt=\"Offline\" />";

        $comment_user_homepage = (isset($comment_row[$i][$user_table_fields['user_homepage']])) ? format_url($comment_row[$i][$user_table_fields['user_homepage']]) : "";
        if (!empty($comment_user_homepage)) {
          $comment_user_homepage_button = "<a href=\"".$comment_user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$comment_user_homepage."\" /></a>";
        }

        $comment_user_icq = (isset($comment_row[$i][$user_table_fields['user_icq']])) ? format_text($comment_row[$i][$user_table_fields['user_icq']]) : "";
        if (!empty($comment_user_icq)) {
          $comment_user_icq_button = "<a href=\"http://www.icq.com/people/about_me.php?uin=".$comment_user_icq."\" target=\"_blank\"><img src=\"http://status.icq.com/online.gif?icq=".$comment_user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$comment_user_icq."\" /></a>";
        }

        if (!empty($comment_row[$i][$user_table_fields['user_email']]) && (!isset($comment_row[$i][$user_table_fields['user_showemail']]) || (isset($comment_row[$i][$user_table_fields['user_showemail']]) && $comment_row[$i][$user_table_fields['user_showemail']] == 1))) {
          $comment_user_email = format_text($comment_row[$i][$user_table_fields['user_email']]);
          $comment_user_email_save = format_text(str_replace("@", " at ", $comment_row[$i][$user_table_fields['user_email']]));
          if (!empty($url_mailform)) {
            $comment_user_mailform_link = $site_sess->url(preg_replace("/{user_id}/", $comment_user_id, $url_mailform));
          }
          else {
            $comment_user_mailform_link = $site_sess->url(ROOT_PATH."member.php?action=mailform&amp;".URL_USER_ID."=".$comment_user_id);
          }
          $comment_user_email_button = "<a href=\"".$comment_user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$comment_user_email_save."\" /></a>";
        }

        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'];
        }

        $comment_user_info .= "<br />";
        $comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_joindate']])) ? "<br />".$lang['join_date']." ".format_date($config['date_format'], $comment_row[$i][$user_table_fields['user_joindate']]) : "";
        $comment_user_info .= (isset($comment_row[$i][$user_table_fields['user_comments']])) ? "<br />".$lang['comments']." ".$comment_row[$i][$user_table_fields['user_comments']] : "";
      }

      $comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";

      $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=\"_blank\">".$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=\"_blank\">".$lang['delete']."</a>";
      }
      elseif ($is_image_owner) {
        $admin_links .= ($config['user_edit_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editcomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['edit']."</a>&nbsp;";
        $admin_links .= ($config['user_delete_comments'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removecomment&amp;".URL_COMMENT_ID."=".$comment_row[$i]['comment_id'])."\">".$lang['delete']."</a>";
      }
$signature = format_text($comment_row[$i]['user_signature'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
$sig = '<br><br>' . $signature ;
      $site_template->register_vars(array(
        "comment_id" => $comment_row[$i]['comment_id'],
        "lang_comments_per_page" => $lang['comments_per_page'],
        "comment_user_id" => $comment_user_id,
        "comment_user_status_img" => $comment_user_status_img,
        "comment_user_name" => $comment_user_name,
        "comment_user_info" => $comment_user_info,
        "comment_user_profile_button" => $comment_user_profile_button,
        "comment_user_email" => $comment_user_email,
        "comment_user_email_save" => $comment_user_email_save,
        "comment_user_mailform_link" => $comment_user_mailform_link,
        "comment_user_email_button" => $comment_user_email_button,
        "comment_user_homepage_button" => $comment_user_homepage_button,
        "comment_user_icq_button" => $comment_user_icq_button,
        "comment_user_ip" => $comment_user_ip,
        
        "comment_sig" => $sig,
        
        "comment_userpic" => ($config['userpic'] && $comment_row[$i]['userpic']) ? ROOT_PATH."data/userpic/".$comment_row[$i]['userpic'] : "",
        "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
        "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
        "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
        "row_bg_number" => $row_bg_number,
        "admin_links" => $admin_links
      ));
      $comments .= $site_template->parse_template("comment_bit");
    } // end while
  } //end else
  $site_template->register_vars("comments", $comments);
  unset($comments);









//----------------AWARDS-GOLD-------------------------------

  $sql = "SELECT image_id
  FROM 4images_voted
  WHERE image_id = $image_id";
  $bestof_row = $site_db->query_firstrow($sql);

  if ($image_row['image_rating'] > 59)
  {
      if ($bestof_row['image_id'] = $image_row['image_id'])
      {
       $bestof = '&nbsp;&nbsp;<img src="./templates/4light_grey/images/gold.gif" alt="Gold-Award">&nbsp;&nbsp;</div>';
      }
      else
      {
       $bestof = "Gold-Award";
      }
  }
  else
  {
  $bestof = "";
}

$site_template->register_vars("bestof", $bestof);


//----------------END AWARDS-GOLD-------------------------------



//----------------AWARDS-SILVER------------------------------

  $sql = "SELECT image_id
  FROM 4images_voted
  WHERE image_id = $image_id";
  $bestof2_row = $site_db->query_firstrow($sql);

  if ($image_row['image_rating'] > 39)
  {
      if ($bestof2_row['image_id'] = $image_row['image_id'])
      {
       $bestof2 = '&nbsp;&nbsp;<img src="./templates/4light_grey/images/silver.gif" alt="Silver-Award">&nbsp;&nbsp;</div>';
      }
      else
      {
       $bestof2 = "Silver-Award";
      }
  }
  else
  {
  $bestof2 = "";
}

$site_template->register_vars("bestof2", $bestof2);


//----------------END AWARDS-SILVER-----------------------------


//----------------AWARDS-BRONZE------------------------------


  if ($image_row['image_rating'] > 19)
  {
      if ($bestof3_row['image_id'] = $image_row['image_id'])
      {
       $bestof3 = '&nbsp;&nbsp;<img src="./templates/4light_grey/images/bronze.gif" alt="Bronze-Award">&nbsp;&nbsp;';
      }
      else
      {
       $bestof3 = "Bronze-Award";
      }
  }
  else
  {
  $bestof3 = "";
}

$site_template->register_vars("bestof3", $bestof3);


//----------------END AWARDS-BRONZE-----------------------------


//----------------AWARDS-HITS------------------------------


  if ($image_row['image_hits'] > 10)
  {
      if ($bestof_hits_row['image_id'] = $image_row['image_id'])
      {
       $bestof_hits = '&nbsp;&nbsp;<img src="./templates/4light_grey/images/bestof.gif" alt="Top-Hits">&nbsp;&nbsp;';
      }
      else
      {
       $bestof_hits = "Top-Hits";
      }
  }
  else
  {
  $bestof_hits = "";
}

$site_template->register_vars("bestof_hits", $bestof_hits);


//----------------END AWARDS-HITS-----------------------------











  //-----------------------------------------------------
  //--- BBCode & Form -----------------------------------
  //-----------------------------------------------------
  $allow_posting = check_permission("auth_postcomment", $cat_id);
  $bbcode = "";
  if ($config['bb_comments'] == 1 && $allow_posting) {
    $site_template->register_vars(array(
      "lang_bbcode" => $lang['bbcode'],
      "lang_tag_prompt" => $lang['tag_prompt'],
      "lang_link_text_prompt" => $lang['link_text_prompt'],
      "lang_link_url_prompt" => $lang['link_url_prompt'],
      "lang_link_email_prompt" => $lang['link_email_prompt'],
      "lang_list_type_prompt" => $lang['list_type_prompt'],
      "lang_list_item_prompt" => $lang['list_item_prompt']
    ));
    $bbcode = $site_template->parse_template("bbcode");
  }

  if (!$allow_posting) {
    $comment_form = "";
  }
  else {
    $user_name = (isset($HTTP_POST_VARS['user_name']) && $error) ? format_text(trim(stripslashes($HTTP_POST_VARS['user_name'])), 2) : (($user_info['user_level'] != GUEST) ? format_text($user_info['user_name'], 2) : "");
    $comment_headline = (isset($HTTP_POST_VARS['comment_headline']) && $error) ? format_text(trim(stripslashes($HTTP_POST_VARS['comment_headline'])), 2) : "";
    $comment_text = (isset($HTTP_POST_VARS['comment_text']) && $error) ? format_text(trim(stripslashes($HTTP_POST_VARS['comment_text'])), 2) : "";

    $site_template->register_vars(array(
      "bbcode" => $bbcode,
      "user_name" => $user_name,
      "comment_headline" => $comment_headline,
      "comment_text" => $comment_text,
      "lang_post_comment" => $lang['post_comment'],
      "lang_name" => $lang['name'],
      "lang_headline" => $lang['headline'],
      "lang_comment" => $lang['comment'],
      "lang_captcha" => $lang['captcha'],
      "lang_captcha_desc" => $lang['captcha_desc'],
      "captcha_comments" => (bool)$captcha_enable_comments
    ));
    $comment_form = $site_template->parse_template("comment_form");
  }
  $site_template->register_vars("comment_form", $comment_form);
  unset($comment_form);
} // end if allow_comments

// Admin Links
$admin_links = "";
if ($user_info['user_level'] == ADMIN) {
  $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=editimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['edit']."</a>&nbsp;";
  $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=removeimage&amp;image_id=".$image_id))."\" target=\"_blank\">".$lang['delete']."</a>";
}
elseif ($is_image_owner) {
  $admin_links .= ($config['user_edit_image'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['edit']."</a>&nbsp;";
  $admin_links .= ($config['user_delete_image'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removeimage&amp;".URL_IMAGE_ID."=".$image_id)."\">".$lang['delete']."</a>";
}
$site_template->register_vars("admin_links", $admin_links);

// Update Hits
if ($user_info['user_level'] != ADMIN) {
  $sql = "UPDATE ".IMAGES_TABLE."
          SET image_hits = image_hits + 1
          WHERE image_id = $image_id";
  $site_db->query($sql);
}

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

if ($mode == "lightbox" && $in_mode) {
  $page_url = "";
 if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
    if (!empty($regs[1]) && $regs[1] != 1) {
      $page_url = "?".URL_PAGE."=".$regs[1];
    }
  }
  $clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."lightbox.php".$page_url)."\" class=\"clickstream\">".$lang['lightbox']."</a>".$config['category_separator'];
}
elseif ($mode == "search" && $in_mode) {
  $page_url = "";
  if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
    if (!empty($regs[1]) && $regs[1] != 1) {
      $page_url = "&amp;".URL_PAGE."=".$regs[1];
    }
  }
  $clickstream .= "<a href=\"".$site_sess->url(ROOT_PATH."search.php?show_result=1".$page_url)."\" class=\"clickstream\">".$lang['search']."</a>".$config['category_separator'];
}
else {
  $clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
}
$clickstream .= $image_name."</span>";




//-----------------------------------------------------
//--- Voted stats -------------------------------------
//-----------------------------------------------------
$sql = "SELECT v.user_id, v.vote, u.user_name
        FROM ".VOTED_TABLE." v
        LEFT JOIN ".USERS_TABLE." u ON (u.user_id = v.user_id)
        WHERE u.user_id = v.user_id AND image_id = ".$image_id;
$result = $site_db->query($sql);
$voted_list = "";
$vcnt = 0;
$sdelimeter = "";
while ($row = $site_db->fetch_array($result))
{
  if ($vcnt > 0)
 $sdelimeter = ", ";
  $vcnt++;
  
  $vote = ($user_info['user_level'] >= USER) ? " (".$row['vote'].")" : "";
  
  
  $voted_list .= $sdelimeter."<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$row['user_id'])."\">".$row['user_name']."</a>".$vote;
  //member name WITH a link to their profile page

//$voted_list .= $row['user_name'].$vote."<br />"; //member name WITHOUT a link to their profile page
}
$site_template->register_vars(array(
  "voted_list" => $voted_list,
  "lang_voted_list" => $lang['voted_list']
));
//----- End Voted stats ----------------












//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  "msg" => $msg,
  "clickstream" => $clickstream,
  "lang_category" => $lang['category'],
  "lang_added_by" => $lang['added_by'],
  "lang_description" => $lang['description'],
  "lang_keywords" => $lang['keywords'],
  "lang_date" => $lang['date'],
  "lang_hits" => $lang['hits'],
  "lang_downloads" => $lang['downloads'],
  "lang_rating" => $lang['rating'],
  "lang_votes" => $lang['votes'],
  "lang_author" => $lang['author'],
  "lang_comment" => $lang['comment'],
  "lang_prev_image" => $lang['prev_image'],
  "
Title: Re: Profil erweitern
Post by: Holzwurm on May 11, 2010, 07:08:00 PM
Funktioniert mit 1.7.7 einwandfrei.

Danke an die, die es entworfen haben

Hubert
Title: Re: Profil erweitern
Post by: joloebig on October 06, 2014, 08:53:40 PM
geht bei 1.7.11 ohne problem

kann mir jemand sagen wie ich die neuen felder auch in der email verwenden kann
ein eintrag von {user_fullname} fürt zur ausgabe [user_fullname]

denke mal die varable muss noch eingebaut werden, ich weiss aber nicht wo

gruss und danke
jo
Title: Re: Profil erweitern
Post by: Jan-Lukas on October 06, 2014, 10:19:59 PM
schaue dir hier mal ab Schritt 2 an
http://www.4homepages.de/forum/index.php?topic=20747.0
Title: Re: Profil erweitern
Post by: joloebig on October 07, 2014, 10:17:24 PM
die mod geht bei mir; ich hab 2 zusätzliche felder eingebaut und die werden in der userregistrierung wie auch auf der adminseite angezeigt.

was nicht geht ist wenn ich die varialbe user_fullname und user_mitgliedsnr in eine mail einbaue.

das ist deiner tut auch nicht beschrieben

gruss
jo
Title: Re: Profil erweitern
Post by: Rembrandt on October 08, 2014, 06:31:03 PM
Hi!
.... in eine mail einbaue.
..
Das ist der springende Punkt, in welche email?
In der Registrierung?

mfg Andi
Title: Re: Profil erweitern
Post by: joloebig on October 08, 2014, 08:53:11 PM
Hallo Andy

Das ist der springende Punkt, in welche email?
4images/lang/deutsch/email/admin_activation.html

meine code:
Code: [Select]
Der Account von "{user_name}","{fullname}","{mitgliedsnr}" wurde deaktiviert oder neu erstellt und muss aktiviert werden.

User Details ansehen:
{user_details_url}

User aktivieren:
{activation_url}

--
Mit freundlichen Grüßen,
{site_name}
Title: Re: Profil erweitern
Post by: Rembrandt on October 08, 2014, 09:30:20 PM
in deinen vorigen Post hast du "user_fullname" geschrieben, jetzt schreibst du wieder nur "fullname", schreibe es so wie du das DB Feld angelegt hast.
suche in der member.php:

 "activation_url" => $activation_url,

füge darunter ein:

"user_fullname" => $user_info['user_fullname'],


dann solltest du auch im mail template "{user_fullname}" schreiben.

mfg Andi