. .
pragmaMx Support Forum 11 Oktober 2008, 13:51:19 *
Willkommen Gast. Bitte einloggen oder registrieren.


Einloggen mit Benutzername und Passwort
News:
Brauchen Sie Hilfe? Bitte nutzen Sie unsere Suchfunktion bevor Sie Beiträge oder Fragen ins Board schreiben! Viele Fragen wurden bereits gestellt und beantwortet. Danke!
 
Übersicht Hilfe Forenregeln / Boardrules
 
Suche
Seiten: [1]   Nach unten
Drucken
Autor Thema: coppermine kommentare  (Gelesen 1453 mal)
0 Mitglieder und 1 Gast betrachten dieses Thema.
smartmusic
Inventar
*******
Offline Offline

Geschlecht: Männlich
Beiträge: 1.269


WWW
« am: 24 April 2007, 21:29:20 »

hallo,

weiss jemand in welcher datei ich folgendes finde:

die user geben unter den pics kommentare ab,
nun möchte ich das man auf den usernamen klicken kann und in deren profil landet.

habe so einiges durchgesehen aber ohne erfolg.
Gespeichert
SvenW
Beta-Tester
****
Offline Offline

Geschlecht: Männlich
Beiträge: 899



« Antworten #1 am: 30 Oktober 2007, 14:22:20 »

Hallo smartmusic,

konntest du den Profillink schon einbauen? Falls nicht, gibt es für die Standard Coppermine die Funktion schon. Zu finden in der themes.inc.php im coppermine modpack unter http://sourceforge.net/project/showfiles.php?group_id=89658.

Hier musst du nach der Funktion "// HTML template for the display of comments2 suchen...und es versuchen in deine theme.php zu implemtieren.

Leider habe ich es nicht gebacken bekommen!



Gruß

black
Gespeichert

Gruß,
Sven

CMS-Version:            pragmaMx 0.1.11, up-to-date
PHP-Version:             5.2.6 
MySQL-Version:        5.0.45-community-log
Server-Version:         Apache 2.0
SvenW
Beta-Tester
****
Offline Offline

Geschlecht: Männlich
Beiträge: 899



« Antworten #2 am: 30 Oktober 2007, 14:57:05 »

Kleiner Zusatz noch zur themes.inc.php im coppermine modpack.

Und die Funktion:

// Displays comments for a specific picture


Gespeichert

Gruß,
Sven

CMS-Version:            pragmaMx 0.1.11, up-to-date
PHP-Version:             5.2.6 
MySQL-Version:        5.0.45-community-log
Server-Version:         Apache 2.0
SvenW
Beta-Tester
****
Offline Offline

Geschlecht: Männlich
Beiträge: 899



« Antworten #3 am: 31 Oktober 2007, 17:03:56 »

Hallo,

also ich habe mich eben nochmal rangesetzt und konnte die Funktion einbauen. Da ich aber keine php- Kenntnisse habe, konnte ich es nur mit Flickwerk direkt in der themes.inc der coppermine einbauen.

Hat nicht jemand Interesse an einem workshop, damit wir es professionell im mx-port-Theme implementieren können?

Wie das mit dem Profilink mit Flickwerk ausschaut, könnt ihr auf meiner Seite sehen.

Schaust du hier: http://www.borderlineart.name/modules.php?name=workshop&act=displayimage&album=lastup&cat=0&pos=2

Wo fangen wir an?




Gruß

black
Gespeichert

Gruß,
Sven

CMS-Version:            pragmaMx 0.1.11, up-to-date
PHP-Version:             5.2.6 
MySQL-Version:        5.0.45-community-log
Server-Version:         Apache 2.0
SvenW
Beta-Tester
****
Offline Offline

Geschlecht: Männlich
Beiträge: 899



« Antworten #4 am: 31 Oktober 2007, 19:04:41 »

Habe es nun doch fast geschafft!?

Wenn Mann oder Frau nachfolgenden Codeabschnitt in die theme.php des mx-port Theme in die Zeile 2517 einfügt, funktioniert der Profilink.

Code: [Select]  
//ANFANG PROFILLINK KOMMENTARE//
function theme_html_comments($pid)
{
    global $CONFIG, $USER, $CURRENT_ALBUM_DATA, $comment_date_fmt, $HTML_SUBST;
    global $template_image_comments, $template_add_your_comment, $lang_display_comments;

    $html = '';

    // report to moderator buttons
    if (!(($CONFIG['report_post']==1) && (USER_CAN_SEND_ECARDS))) {
        template_extract_block($template_image_comments, 'report_comment_button');
    }

    if (!$CONFIG['enable_smilies']) {
        $tmpl_comment_edit_box = template_extract_block($template_image_comments, 'edit_box_no_smilies', '{EDIT}');
        template_extract_block($template_image_comments, 'edit_box_smilies');
        template_extract_block($template_add_your_comment, 'input_box_smilies');
    } else {
        $tmpl_comment_edit_box = template_extract_block($template_image_comments, 'edit_box_smilies', '{EDIT}');
        template_extract_block($template_image_comments, 'edit_box_no_smilies');
        template_extract_block($template_add_your_comment, 'input_box_no_smilies');
    }

    $tmpl_comments_buttons = template_extract_block($template_image_comments, 'buttons', '{BUTTONS}');
    $tmpl_comments_ipinfo = template_extract_block($template_image_comments, 'ipinfo', '{IPINFO}');

    if ($CONFIG['comments_sort_descending'] == 1) {
        $comment_sort_order = 'DESC';
    } else {
        $comment_sort_order = 'ASC';
    }
    $result = cpg_db_query("SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='$pid' ORDER BY msg_id $comment_sort_order");

    while ($row = mysql_fetch_array($result)) {
        $user_can_edit = (GALLERY_ADMIN_MODE) || (USER_ID && USER_ID == $row['author_id'] && USER_CAN_POST_COMMENTS) || (!USER_ID && USER_CAN_POST_COMMENTS && ($USER['ID'] == $row['author_md5_id']));
        $comment_buttons = $user_can_edit ? $tmpl_comments_buttons : '';
        $comment_edit_box = $user_can_edit ? $tmpl_comment_edit_box : '';
        $comment_ipinfo = ($row['msg_raw_ip'] && GALLERY_ADMIN_MODE)?$tmpl_comments_ipinfo : '';

        if ($CONFIG['enable_smilies']) {
            $comment_body = process_smilies(make_clickable($row['msg_body']));
            $smilies = generate_smilies("f{$row['msg_id']}", 'msg_body');
        } else {
            $comment_body = make_clickable($row['msg_body']);
            $smilies = '';
        }

        $ip = $row['msg_hdr_ip'];
        if ($row['msg_hdr_ip'] != $row['msg_raw_ip']) {
            $ip .= ' [' . $row['msg_raw_ip'] . ']';
        }

        $params = array('{EDIT}' => &$comment_edit_box,
            '{BUTTONS}' => &$comment_buttons,
            '{IPINFO}' => &$comment_ipinfo
            );

        $template = template_eval($template_image_comments, $params);
($row['author_id'] == 0 ) ? $profile_lnk = stripslashes($row['msg_author']): $profile_lnk = "<a href=\"profile.php?uid={$row['author_id']}\">".stripslashes($row['msg_author'])."</a>";

       $params = array('{MSG_AUTHOR}' => $profile_lnk,
'{MSG_AUTHOR_EDIT}' => stripslashes($row['msg_author']),
            '{MSG_ID}' => $row['msg_id'],
            '{PID}' => $row['pid'],
            '{EDIT_TITLE}' => &$lang_display_comments['edit_title'],
            '{CONFIRM_DELETE}' => &$lang_display_comments['confirm_delete'],
            '{MSG_DATE}' => localised_date($row['msg_date'], $comment_date_fmt),
            '{MSG_BODY}' => bb_decode($comment_body),
            '{MSG_BODY_RAW}' => $row['msg_body'],
            '{OK}' => &$lang_display_comments['OK'],
            '{SMILIES}' => $smilies,
            '{IP}' => $ip,
            '{REPORT_COMMENT_TITLE}' => &$lang_display_comments['report_comment_title'],
            '{WIDTH}' => $CONFIG['picture_table_width']
            );

        $html .= template_eval($template, $params);
    }

    if (USER_CAN_POST_COMMENTS && $CURRENT_ALBUM_DATA['comments'] == 'YES') {
        if (USER_ID) {
            $user_name_input = '<tr><td><input type="hidden" name="msg_author" value="' . stripslashes(USER_NAME) . '" /></td>';
            template_extract_block($template_add_your_comment, 'user_name_input', $user_name_input);
            $user_name = '';
        } else {
            if (isset($USER['name'])) {
              $user_name = strtr($USER['name'], $HTML_SUBST);
            } else {
              $user_name = $lang_display_comments['your_name'];
            }
        }

        $params = array('{ADD_YOUR_COMMENT}' => $lang_display_comments['add_your_comment'],
            // Modified Name and comment field
            '{NAME}' => $lang_display_comments['name'],
            '{COMMENT}' => $lang_display_comments['comment'],
            '{PIC_ID}' => $pid,
            '{USER_NAME}' => $user_name,
            '{MAX_COM_LENGTH}' => $CONFIG['max_com_size'],
            '{OK}' => $lang_display_comments['OK'],
            '{SMILIES}' => '',
            '{WIDTH}' => $CONFIG['picture_table_width'],
            );

        if ($CONFIG['enable_smilies']){
                        $params['{SMILIES}'] = generate_smilies();
                } else {
                        template_extract_block($template_add_your_comment, 'smilies');
                }

        $html .= template_eval($template_add_your_comment, $params);
    }

    return $html;
}
//ENDE PROFILLINK KOMMENTARE//





Nun vermute ich aber, dass da noch einiges an Codemüll raus kann und es auch doppelt gemoppelt ist.

Könnte mir das BITTE jemand entmüllen oder abändern, da ich immer eine weiße Seite angezeigt bekomme, wenn ich da etwas rausschmeiße.


1000 DANK!


black
Gespeichert

Gruß,
Sven

CMS-Version:            pragmaMx 0.1.11, up-to-date
PHP-Version:             5.2.6 
MySQL-Version:        5.0.45-community-log
Server-Version:         Apache 2.0
SvenW
Beta-Tester
****
Offline Offline

Geschlecht: Männlich
Beiträge: 899



« Antworten #5 am: 31 Oktober 2007, 19:43:32 »

Habe es nun doch fast geschafft!?

Wenn Mann oder Frau nachfolgenden Codeabschnitt in die theme.php des mx-port Theme in die Zeile 2517 einfügt, funktioniert der Profilink.


SORRY! Meinte die Zeile 191.

 rougi
Gespeichert

Gruß,
Sven

CMS-Version:            pragmaMx 0.1.11, up-to-date
PHP-Version:             5.2.6 
MySQL-Version:        5.0.45-community-log
Server-Version:         Apache 2.0
Seiten: [1]   Nach oben
Drucken
 
Gehe zu:  

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
design by hENNE, layout based on YAML