Ok, here the steps you need to follow:
1. Upload wz_tooltip.js to the same directory, where the joomla configuration files is stored.
2. Open the index.php of your template and at this at the bottom before the </body> tag:
<script language="JavaScript" type="text/javascript" src="wz_tooltip.js"></script>
3. upload my CBAuthorBot.php and replace the original one.
I tried to attach the file wz_tooltip.js to this post. Didn't work. You can get it from my profile as soon as Nant approves it.
Here is the code of my CBAuthorBot.php file:
[code:1]<?php
/**
* CB Link 2 author mambot
* @package Community Builder
* @subpackage CB Link 2 author mambot
* @Copyright (C) MamboJoe
* @ All rights reserved
* @ Released under GNU/GPL License :
www.gnu.org/copyleft/gpl.html
* @version $Revision: 1 $
**/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$_MAMBOTS->registerFunction( 'onBeforeDisplayContent', 'CBAuthorBot');
function CBAuthorBot (&$row, &$params, $page) {
global $database, $mosConfig_live_site;
//var_dump($row);
$query = "SELECT avatar FROM #__comprofiler WHERE user_id = $row->created_by AND avatarapproved = '1'";
$database->setQuery( $query );
$avatar = $database->loadResult();
if ($avatar!='')
{
$image = "<img src=/images/comprofiler/".$avatar." width=40>";
}
else
{
$image = "<img src=/components/com_comprofiler/images/english/tnnophoto.jpg width=40>";
}
/**
* $content.= "<a href='".sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=$row->userid"«»)
*
* ."' class='mod_login".$class_sfx."' onmouseover=\"this.T_WIDTH=40;return escape('".$image."')\">".($row->created_by_alias!='' ? $row->created_by_alias : $row->author)."</a>\n";
*
**/
$row->created_by_alias="<a href=\"".sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&Itemid=2&user='.$row->created_by)."\" onmouseover=\"this.T_WIDTH=40;return escape('".$image."')\">".($row->created_by_alias!='' ? $row->created_by_alias : $row->author)."</a>";
//echo $row->created_by_alias;
}
?>[/code:1]
I remember having trouble getting this to work, but it was so long ago, I forgot what the issues were.
Good luck.
.
Post edited by: ericfoster3, at: 2006/10/03 21:31