I am not sure, but i think there is a problem with "$user" in CB 1.2...i would write an plugin...but everywhere there "$user" stands comes the notice:
Notice: Trying to get property of non-object in...
Our Community-Code is
class getProfileTab extends cbTabHandler {
function getProfileTab() {
$this->cbTabHandler();
}
function getDisplayTab($tab,$user,$ui) {
global $database, $my, $user, $i, $ui, $mosConfig_live_site, $mosConfig_absolute_path, $mosConfig_lang, $ueConfig, $acl, $_CB_framework, $_PLUGINS, $_POST, $mosConfig_emailpass, $mainframe;
$params = $this->params;
$profilbutton = '<table align="center"><tr><td align="center"><a href="index.php?option=com_comprofiler&task=userDetails"><img src="./components/com_comprofiler/enhanced/profil/images/profilaendern.jpg" border="0"></a><a href="index.php?option=com_comprofiler&task=userAvatar"><img src="./components/com_comprofiler/enhanced/profil/images/bildaendern.jpg" border="0"></a></td></tr></table>';
$pmsbuttonsusw = '<table align="center"><tr><td align="center"><a href="index.php?option=com_uddeim&recip='.$user->id.'&task=new"><img src="./components/com_comprofiler/enhanced/profil/images/nachrichtsenden.jpg" border="0"></a><a href="index.php?option=com_comprofiler&act=connections&task=addConnection&connectionid='.$user->id.'"><img src="./components/com_comprofiler/enhanced/profil/images/zufreunden.jpg" border="0"></a></td></tr></table><table align="center"><tr><td align="center">
<form name="sendeform" method="post" action="index.php?option=com_uddeim&Itemid=54&task=save">
<input type="hidden" name="backto" value="/index.php?option=com_comprofiler&task=userProfile&user='.$user->id.'">
<input type="hidden" name="to_name" id="input_to_name" value="' . $user->name . '">
<input type="hidden" name="pmessage" value="' . $my->name . ' hat dich ganz dolle geknuscht.[kiss][/kiss]">
<button type="submit"><img src="./kiss.jpg" alt="Jetzt knutschen"/></button>
</form>
</td></tr></table>';
if(!$my->id) {
}
elseif($user->id!=$my->id) {
$showprofilbutton = $pmsbuttonsusw;
} else {
$showprofilbutton = $profilbutton;
}
//Ende Profiländern
// Display Avatar/Image:
$return = "";
if ( $ueConfig['allowAvatar'] == '1' ) {
$cbMyIsModerator = isModerator( $my->id );
if ( $params->get( 'portrait_descrPos', 'above' ) == "above" ) {
$return .= $this->_writeTabDescription( $tab, $user, 'cbPortraitDescription' );
}
$name = htmlspecialchars(getNameFormat($user->name,$user->username,$ueConfig['name_format']));
$return .= "\n\t\t\t\t<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr>";
$uimage = $user->avatar;
if ( file_exists( "components/com_comprofiler/plugin/language/".$mosConfig_lang."/images" ) ) {
$uimagepath = "components/com_comprofiler/plugin/language/".$mosConfig_lang."/images/";
} else {
$uimagepath = "components/com_comprofiler/plugin/language/default_language/images/";
}
if ( $user->avatarapproved == 0 ) {
$uimage = $uimagepath."pendphoto.jpg";
} elseif ( $user->avatar == '' || $user->avatar == null ) {
$uimage = $uimagepath."nophoto.jpg";
}
else {
$uimage = "images/comprofiler/".$uimage;
}
$return .= "<head>
<link href=\"./multibox/multibox.css\" rel=\"stylesheet\" type=\"text/css\" />
<script type=\"text/javascript\" src=\"./_common/js/mootools.js\"></script>
<script type=\"text/javascript\" src=\"./multibox/overlay.js\"></script>
<script type=\"text/javascript\" src=\"./multibox/multibox.js\"></script>
<style type=\"text/css\">
body{ color: #333; font: 13px 'Lucida Grande', Verdana, sans-serif; }
</style>
</head><div class=\"cbClr\"></div>
<div class=\"cbPosTop\">
<div class=\"cbPosLeft\" style=\"width:49%;\">
<div class=\"cb_tab_html cb_tab_content\" id=\"cb_tabid_20\">
<table class=\"cbFieldsContentsTab cbFields\" id=\"cbtf_20\">
<tr class=\"sectiontableentry1\" id=\"cbfr_29\">
<td class=\"fieldCell\" id=\"cbfv_29\"><td align=\"center\" width=\"100%\"><a href=\"".$uimage."\" id=\"mb1\" class=\"mb\" title=\"".$user->name."\"><img src=\"".$uimage."\" alt=\"".$name."\" title=\"".$name."\" border=\"0\" width=\"300px\" /></a></td><div class=\"multiBoxDesc mb1\"></div><script type=\"text/javascript\">
var box = {};
window.addEvent('domready', function(){
box = new MultiBox('mb', {descClassName: 'multiBoxDesc', useOverlay: true});
});
</script>".$showprofilbutton."</td>
</tr>
</table>
</div>
<div class=\"cb_tab_html cb_tab_content\" id=\"cb_tabid_57\"><br />
Hier steht dann der VIP HTML-Code
</div>
</div>
<div class=\"cbPosRight\" style=\"width:49%;\">
<div class=\"cb_tab_html cb_tab_content\" id=\"cb_tabid_27\">
<table class=\"cbFieldsContentsTab cbFields\" id=\"cbtf_27\">
<tr class=\"sectiontableentry1\" id=\"cbfr_61\">
<td class=\"titleCell\"><label for=\"cbfl_61\">Geschlecht:</label></td>
<td class=\"fieldCell\" id=\"cbfv_61\">männlich</td>
</tr>
<tr class=\"sectiontableentry2\" id=\"cbfr_57\">
<td class=\"titleCell\"><label for=\"cbfl_57\">Geburtstag:</label></td>
<td class=\"fieldCell\" id=\"cbfv_57\">-</td>
</tr>
<tr class=\"sectiontableentry1\" id=\"cbfr_63\">
<td class=\"titleCell\"><label for=\"cbfl_63\">Herkunft:</label></td>
<td class=\"fieldCell\" id=\"cbfv_63\">Deutschland</td>
</tr>
<tr class=\"sectiontableentry2\" id=\"cbfr_65\">
<td class=\"titleCell\"><label for=\"cbfl_65\">(Ex-)Schule:</label></td>
<td class=\"fieldCell\" id=\"cbfv_65\">Gymi</td>
</tr>
<tr class=\"sectiontableentry1\" id=\"cbfr_104\">
<td class=\"titleCell\"><label for=\"cbfl_104\">Klasse:</label></td>
<td class=\"fieldCell\" id=\"cbfv_104\">10b</td>
</tr>
<tr class=\"sectiontableentry2\" id=\"cbfr_66\">
<td class=\"titleCell\"><label for=\"cbfl_66\">Lieblingsfach:</label></td>
<td class=\"fieldCell\" id=\"cbfv_66\">Chemie, Sozialkunde, Wirtschaft</td>
</tr>
<tr class=\"sectiontableentry1\" id=\"cbfr_67\">
<td class=\"titleCell\"><label for=\"cbfl_67\">Hassfach:</label></td>
<td class=\"fieldCell\" id=\"cbfv_67\">Kunst, Religion</td>
</tr>
<tr class=\"sectiontableentry2\" id=\"cbfr_69\">
<td class=\"titleCell\"><label for=\"cbfl_69\">Beziehung:</label></td>
<td class=\"fieldCell\" id=\"cbfv_69\">verknallt</td>
</tr>
<tr class=\"sectiontableentry1\" id=\"cbfr_70\">
<td class=\"titleCell\"><label for=\"cbfl_70\">Musikrichtung:</label></td>
<td class=\"fieldCell\" id=\"cbfv_70\">Kuschelrock und Rap</td>
</tr>
<tr class=\"sectiontableentry2\" id=\"cbfr_71\">
<td class=\"titleCell\"><label for=\"cbfl_71\">Lieblingsbands:</label></td>
<td class=\"fieldCell\" id=\"cbfv_71\">Linkin Park</td>
</tr>
<tr class=\"sectiontableentry1\" id=\"cbfr_72\">
<td class=\"titleCell\"><label for=\"cbfl_72\">Clubs/Vereine:</label></td>
<td class=\"fieldCell\" id=\"cbfv_72\">Fan von Motzing-Predators und TSV 1860 München</td>
</tr>
<tr class=\"sectiontableentry2\" id=\"cbfr_73\">
<td class=\"titleCell\"><label for=\"cbfl_73\">Ich mag:</label></td>
<td class=\"fieldCell\" id=\"cbfv_73\">Fussball, Freunde, PC, Essen, Mädlzzz</td>
</tr>
<tr class=\"sectiontableentry1\" id=\"cbfr_74\">
<td class=\"titleCell\"><label for=\"cbfl_74\">Ich mag nicht:</label></td>
<td class=\"fieldCell\" id=\"cbfv_74\">kleine Kinder</td>
</tr>
<tr class=\"sectiontableentry2\" id=\"cbfr_76\">
<td class=\"titleCell\"><label for=\"cbfl_76\">ICQ:</label></td>
<td class=\"fieldCell\" id=\"cbfv_76\">455-874-011</td>
</tr>
<tr class=\"sectiontableentry1\" id=\"cbfr_77\">
<td class=\"titleCell\"><label for=\"cbfl_77\">MSN:</label></td>
<td class=\"fieldCell\" id=\"cbfv_77\">Microsoft hab ich nicht!</td>
</tr>
<tr class=\"sectiontableentry2\" id=\"cbfr_78\">
<td class=\"titleCell\"><label for=\"cbfl_78\">Yahoo:</label></td>
<td class=\"fieldCell\" id=\"cbfv_78\">Fast-Microsoft erst recht nicht!</td>
</tr>
<tr class=\"sectiontableentry1\" id=\"cbfr_79\">
<td class=\"titleCell\"><label for=\"cbfl_79\">AIM:</label></td>
<td class=\"fieldCell\" id=\"cbfv_79\">braucht koa Sau</td>
</tr>
<tr class=\"sectiontableentry2\" id=\"cbfr_101\">
<td class=\"titleCell\"><label for=\"cbfl_101\">Skype:</label></td>
<td class=\"fieldCell\" id=\"cbfv_101\">watt ned schlecht, wenn ich ein guads Mikro hätt</td>
</tr>
<tr class=\"sectiontableentry1\" id=\"cbfr_102\">
<td class=\"titleCell\"><label for=\"cbfl_102\">Homepage:</label></td>
<td class=\"fieldCell\" id=\"cbfv_102\"><a href=\"http://www.google.de\" target=\"_blank\">www.google.de</a></td>
</tr>
</table>
</div>
</div></div><div class=\"cbClr\"></div>";
if ( $user->avatarapproved == 0 && $cbMyIsModerator ) {
$uimage = "images/comprofiler/".$user->avatar;
$return .= "<td align=\"center\" width=\"100%\">"._UE_IMAGE_ADMIN_SUB.":<br /><br />"
. "<img src=\"".$uimage."\" alt=\"".$name."\" title=\"".$name."\" /></td>";
}
$return .= "</tr></table>";
if ( $params->get( 'portrait_descrPos', 'above' ) == "below" ) {
$return .= $this->_writeTabDescription( $tab, $user, 'cbPortraitDescription' );
}
}
return $return;
}
}