Zum Inhalt springen

Abgleich der FE-USer Bilder mit mm_forum Avatar

Erstellt am 15. Mai 2007 · 15 Antworten · letzte Antwort am 8. Februar 2010

Tags: Bilder, Frontend-Benutzer, Frage

just2b ·

hab das mal direkt geändert, war aber nicht in einer aktuellen version sofern ich mich erinnern kann

<?php
            $userranking = $this->get_userranking($uid,$conf).'<br />';
            if($uid == $threadauthor) $userranking .= $this->cObj->wrap($this->pi_getLL('topic.topicauthor'),$this->conf['list_posts.']['userinfo_topicauthor_wrap']);
            $content .= $userranking;
            // mod ringer.it
            //if ($user_array['tx_mmforum_avatar']) {
            if ($user_array['image']) {
            		// mod ringer.it
            		$tmpImage = explode(',',$user_array['image']);
                 $content   .=   tx_mmforum_tools::res_img('uploads/tx_srfeuserregister/'.$tmpImage[0],$conf['avatar_height'],$conf['avatar_width']);
                 //$content   .=   tx_mmforum_tools::res_img($conf['path_avatar'].$user_array['tx_mmforum_avatar'],$conf['avatar_height'],$conf['avatar_width']);
                // mod ringer.it
            } else {
                 $content   .=   tx_mmforum_tools::res_img($conf['path_avatar'].$user_array['tx_mmforum_avatar'],$conf['avatar_height'],$conf['avatar_width']);
            }


?>

mm_forum/pi1/class.tx_mmforum_pi1.php > so ab #4011

georg

jousch ·

hallo Georg!

Vielen Dank für deine Arbeit! eine Frage noch, wird das in einer zukünftigen Version berücksichtigt oder via Contants einstellbar gemacht?

Das ist jedenfalls schon eine große Hilfe!

jousch ·

Hallo georg!

Funktioniert die Modifikation? Bei mir sind danach keine Änderungen zu sehen. #paralyzed#

Stimmt doch so, oder:

<?php
        } else {
            if($user_array === FALSE)
                return '<strong>'.$this->pi_getLL('user.deleted').'</strong>';
            
            $content        = '<strong>'.$user_array['username'].'</strong><br />';
            
            if($this->conf['list_posts.']['userinfo_realName'] && $user_array['name'])
                $content .= $this->cObj->wrap($user_array['name'], $this->conf['list_posts.']['userinfo_realName_wrap']);

            $userranking = $this->get_userranking($uid,$conf).'';
            if($uid == $threadauthor) $userranking .= $this->cObj->wrap($this->pi_getLL('topic.topicauthor'),$this->conf['list_posts.']['userinfo_topicauthor_wrap']);
            $content .= $userranking;
            // mod ringer.it
            //if ($user_array['tx_mmforum_avatar']) {
            if ($user_array['image']) {
                    // mod ringer.it
                    $tmpImage = explode(',',$user_array['image']);
                 $content   .=   tx_mmforum_tools::res_img('uploads/tx_srfeuserregister/'.$tmpImage[0],$conf['avatar_height'],$conf['avatar_width']);
                 //$content   .=   tx_mmforum_tools::res_img($conf['path_avatar'].$user_array['tx_mmforum_avatar'],$conf['avatar_height'],$conf['avatar_width']);
                // mod ringer.it
            } else {
                 $content   .=   tx_mmforum_tools::res_img($conf['path_avatar'].$user_array['tx_mmforum_avatar'],$conf['avatar_height'],$conf['avatar_width']);
            }
            
            $content .= $this->cObj->wrap($this->pi_getLL('user.regSince').': '.date("d.m.Y",$user_array['crdate']).'<br />'.$this->pi_getLL('user.posts').': '.$user_array['tx_mmforum_posts'],$this->conf['list_posts.']['userinfo_content_wrap']);
            
  
?>
jousch ·

Hmm.. OK Dann muss ich nochmal gucken!

Ich hab mir die neue Version installiert.. und stell mal die originale Datei wieder ein.

jousch ·

OK, wie ich dem Bugtracker entnehmen kann ist es ab 0.1.6 drinnen. 🙂

Ich habe mein Forum nun auf das default-Template gestellt das mit 0.1.5 mitkommt. Auch wenn ich einen "mm_forum-Avatar" hochlade erscheint nichts im Forum...

An was kann es da liegen?

jlang ·

Hallo!

Ich habe diese Ergänzung in 0.1.7 hinzufügen müssen, dann hat es funktioniert.
Was nicht läuft ist die Avataranzeige im Template userdetail.html, hier wird kein Bild ausgegeben.

Welche Ergänzung ist noch notwenig?

Beste Grüße

J.Lang

j.​koenig ·

Hallo zusammen,

ich würde auch gerne das Bild von sr_feuser_register in der Profilanzeige /userdetail.html sehen wie J. Lang. Hat jemand eine Lösung?

Viele Grüße
Jürgen

j.​koenig ·

Hallöchen,

ich habe die Lösung für die Anzeige des Bildes von sr_feuser_register in der Profilansicht jetzt gefunden. In der Datei typo3conf/ext/mm_forum/pi1/class.tx_mmforum_pi1.php habe ich in ca. Zeile 3667 folgenden Originalcode

      // Avatar
            if ($conf['path_avatar'] && $row['tx_mmforum_avatar'])  {
                
                $marker['###AVATAR###']             = tx_mmforum_tools::res_img($conf['path_avatar'].$row['tx_mmforum_avatar'],$conf['avatar_width'],$conf['avatar_height']);
            } else {
                $marker['###AVATAR###']             = "";
            }

durch folgende Zeile ergänzt:

  if ($conf['path_avatar'] && $row['tx_mmforum_avatar'])  {
                
                $marker['###AVATAR###']             = tx_mmforum_tools::res_img($conf['path_avatar'].$row['tx_mmforum_avatar'],$conf['avatar_width'],$conf['avatar_height']);
            } elseif ($row['image']) {
                $marker['###AVATAR###']             = tx_mmforum_tools::res_img('uploads/pics/'.$row['image'],$conf['avatar_width'],$conf['avatar_height']);
 
            } else {
                $marker['###AVATAR###']             = "";
            }

Dies gilt, wenn die Bilder von sr_feuer_register in uploads/pics/ gespeichert werden. Ansonsten müsste der Pfad angepasst werden oder eine weitere Abfrage erstellt werden.

Ich hoffe dies ist hilfreich,
viele Grüße
Jürgen

Unbekannter Benutzer ·

oder ab neueren Versionen (z.Bsp: 1.8.1) in dieser Form:

elseif ($user->data['image']) {
				$marker['###AVATAR###']             = tx_mmforum_tools::res_img('uploads/tx_srfeuserregister/'.$user->data['image'],$conf['avatar_width'],$conf['avatar_height']);
			}

in Anlehnung an Jürgens Lösung.