| 
Welcome, Guest

CBAuthorBot Hack - Show CB Avatar in articles
(1 viewing) (1) Guest

TOPIC: CBAuthorBot Hack - Show CB Avatar in articles

Re:CBAuthorBot Hack - Avatar popup on mouseover 5 years, 4 months ago #21367

  • Posts:
  • Karma:
ericfoster3 wrote:
Here's a new twist to the same idea. I hacked CBAuthorBot to display the avatar in a popup when you mouseover it.

This also works in my Newest Users module, and Who Is Online module.

Check it out at my site to see what I am talking about.

Arundel Class of 1983


Can you tell us how this is done?

Re:CBAuthorBot Hack - Avatar popup on mouseover 5 years, 4 months ago #21959

  • Posts:
  • Karma:
asteroidy wrote:
ericfoster3 wrote:
Here's a new twist to the same idea. I hacked CBAuthorBot to display the avatar in a popup when you mouseover it.

This also works in my Newest Users module, and Who Is Online module.

Check it out at my site to see what I am talking about.

Arundel Class of 1983


Can you tell us how this is done?


I double this, could you post your modifications?

cheers,
Benson

Re:CBAuthorBot Hack - Avatar popup on mouseover 5 years, 4 months ago #21963

  • Posts:
  • Karma:
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:
<?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 : http://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;
 
}
 
 
?>


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
CB 3rd Party Developer: DatsoTab | KarmaTab
Joomla! 1.0.10
Community Builder 1.0
joomlaboard 1.1.2

Re:CBAuthorBot Hack - Avatar popup on mouseover 5 years, 4 months ago #21965

  • Posts:
  • Karma:
Thank you very much for your answer!

cheers,
Benson

Re:CBAuthorBot Hack - Show CB Avatar in articles 5 years, 4 months ago #22388

  • Posts:
  • Karma:
This is exactly what I am looking for!

However I can't tell from the thread where to start or what the most updated version is.

I can't tell if it is a mambot I upload or a just some code I add in.

Any help would be awesome. I am notorious for teaing up code so I want to make sure I know exactly what I am doing.

Thanks!

Re:CBAuthorBot Hack - Avatar popup on mouseover 5 years, 4 months ago #22424

  • Posts:
  • Karma:
Thats awesome I get it work at my page:) thxxx and karma up
Time to create page: 0.82 seconds