in pligg adding new modules to the the main pligg template pligg.tpl is quite straight forward, however, i want to add a new module to the story. located in link_summary.tpl. the problem is that when the link summary template is created, a new variable $main_smarty is created with it's own local scope, not available to my modulename_main.php file. when I use the global $main_smarty variable, it refferences the main pligg template smarty object. So i have used to quick and somewhat dirty fix to the main architecture php code, to the link.php file I added a new call back:
$vars = '';
check_actions('add_to_summary', $vars);
and then created a new global variable refferencing the $main_smarty object in the link.php file, which i then used in my modulename_main.php
global $link_smarty;
global $link_variables;
$link_variables = $this;
$link_smarty = $main_smarty;
is there a more native, proper and cleaner way of doing this without tweaking the main architecture pligg code?