views:

42

answers:

2

How do i get this plugin triggered in the joomla core "user manager" when a list of user is displayed?
1. I have already enabled in the plugins table but it is still not working. What I have not done?

// no direct access
    defined('_JEXEC') or die('Restricted access');
    // register the handler
    $mainframe->registerEvent('onPrepareContent', 'plgContentUserswi');
    /**
     * 
     * 
     * @param object Content item
     * @param JParameter Content parameters
     * @param int Page number
     */
    function plgContentUserswi(&$row, &$params, $page)
    {
      var_dump($row);
    }
A: 

This page contains the list of all events that you can observe with a plugin. Unfortunately it does not look like you can use any of those to achieve what you need :(

silvo
A: 

I might be wrong or misuderstood this book here. I am not saying the book is wrong but maybe I have misunderstand the interpretation or some earlier explaination that i have missed. on page 223 of this book it says the following:

Content
The content plugins allow us to modify content items before we display them. The most commonly used content event is onPrepareContent. This event, always the frst of all the content events to be triggered, is used to modify the text content. Let's imagine we want to create a content plugin which will replace all occurrences of :) with a small smiley face icon. This is how we could implement this:

// no direct access
defined('_JEXEC') or die('Restricted access');
// register the handler
$mainframe->registerEvent('onPrepareContent', 
                          'plgContentSmiley');
/**
 * Replaces :) with a smiley icon.
 * 
 * @param object Content item
 * @param JParameter Content parameters
 * @param int Page number
 */
function plgContentSmiley(&$row, &$params, $page)
{
  $pattern = '/\:\)/';
  $icon = '<img src="plugins/content/smiley.gif" />';
  $row->text = preg_replace($pattern, $icon, $row->text);
}
tweakmy
Content means articles, which are displayed by the com_content component...
silvo