Hi Frederic,
frederic.pege@steria.com schrieb:
Hello,
I’m developping my own egw app.
I’ve been able to successfully hook it with the preferences, admin,
sidebow_menu.
But the search_link still does not work proprely.
This is the registration :
$setup_info[‘stats’][‘hooks’][‘search_link’] = ‘stats.statshooks.all_hooks’;
The function all_hooks is used for all hooks.
The ‘search_link’ part is :
if ($location == ‘search_link’) {
include_once(EGW_INCLUDE_ROOT.’/stats/inc/class.statsbo.inc.php’);
$bo =& new statsbo();
return $bo->search_link($location);
}
The search_link function is :
function search_link($location)
{
return array(
‘query’ => ‘stats.statsbo.link_query’,
‘title’ => ‘stats.statsbo.link_title’,
‘view’ => array(‘menuaction’ =>
‘stats.statsui.show_flux’),
‘view_id’ => ‘id’,
‘add’ => array(‘menuaction’ =>
‘stats.statsui.new_flux’),
);
}
Very complicated, but it should work.
Best in Trunk is to have a class called stats_hooks, which can be
autoloaded, for all static hooks:
class stats_hooks
{
static function search_link($data)
{
return array(
‘query’ => ‘stats.statsbo.link_query’,
‘title’ => ‘stats.statsbo.link_title’,
‘view’ => array(‘menuaction’ =>
‘stats.statsui.show_flux’),
‘view_id’ => ‘id’,
‘add’ => array(‘menuaction’ =>
‘stats.statsui.new_flux’),
);
}
}
Then you can use in stats/setup/setup.inc.php:
$setup_info[‘stats’][‘hooks’][‘search_link’] = ‘stats_hooks::search_link’;
link_query and link_title have the same output type has there infolog
homonyms.
I can only guess, somethings wrong with them, as they are used for the
not working functinality, you describe …
The ‘add’ part works. My app appears in the ‘add’ section on the
right-top of the web page.
The link functionnality does work. My app appears in the list in the
links tab but the search button does nothing. No erros, no datas.
Also nothing in the error_log?
Put some error_log() messages in statsbo::link_query() to see it get’s
called.
Ralf
The documentation on this part is enough for me to understand what i did
wrong.
Can you help me, plz ?
Ce message est à l’attention exclusive des destinataires désignés. Il
peut contenir des informations confidentielles. Si vous n’êtes pas
destinataire du message, merci d’en avertir immédiatement l’expéditeur
et de détruire ce message. Le contenu de ce message ne pourrait engager
la responsabilité de Steria que s’il a été émis par une personne dûment
habilitée agissant dans le strict cadre de ses fonctions et à des fins
non étrangères à ses attributions. Bien que les meilleurs efforts soient
faits pour maintenir cette transmission exempte de tout virus,
l’expéditeur ne donne aucune garantie à cet égard et sa responsabilité
ne saurait être engagée pour tout dommage résultant d’un virus transmis.
This message is intended exclusively for the designated addressee. It
may contain confidential material. If you are not the correct addressee,
please notify the sender immediately and destroy the message. The
content of this message will engage the responsibility of Steria only if
it has been sent by an authorized person acting in the strict scope of
his functions and for purposes that are related to his competence.
Although reasonable efforts have been made to keep this transmission
free from viruses, the sender will not be liable for damages caused by a
transmitted virus.
This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers
–
Ralf Becker
eGroupWare Training & Support ==> http://www.egroupware-support.de
Outdoor Unlimited Training GmbH [www.outdoor-training.de]
Handelsregister HRB Kaiserslautern 3587
Geschäftsführer Birgit und Ralf Becker
Leibnizstr. 17, 67663 Kaiserslautern, Germany
Telefon +49 (0)631 31657-0
This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers