Plugin SQL Queries?

(csanders) #1

public function getListHooksRegistered()
return array(
‘Tracker.saveVisitorInformation’ => ‘StageOne’,

function StageOne($notification)
	$visitorInfo =& $notification->getNotificationObject();
	// High priority targets.
            $ip = "test";
	//$sql = "SELECT * FROM " . Piwik_Common::prefixTable('log_visit'); 
	//$output = Piwik_FetchAll($sql);
	$visitorInfo['Algo_Test'] = $ip;

In the above code when the SQL comments are uncommented the plugin will no longer work however when they are commented the plugin works as expected. This code is functional when part of a menu driven plugin. Is there a way to make it work in a hook?

(vipsoft) #2

Does getInformation() contain:

                'TrackerPlugin' => true,

(csanders) #3

[quote=vipsoft @ Jun 25 2010, 08:02 PM]Does getInformation() contain:

                'TrackerPlugin' => true,


Altered TrackerPlugin to = false and the plugin started working.

(csanders) #4

when trackerplugin is disabled is it possible to access information from the notification object on the call backs specified earlier? (i.e any field collected by Piwik)