assign(array( 'GPLUS1_SIZE' => $conf['GooglePlusOne'][0], 'GPLUS1_POSITON' => $conf['GooglePlusOne'][1], )); $template->set_prefilter('picture', 'gplus1_add_button_prefilter'); } else if (script_basename() == 'index') { $template->assign(array( 'GPLUS1_SIZE' => $conf['GooglePlusOne'][0], 'GPLUS1_POSITON' => 'index', )); $template->set_prefilter('index', 'gplus1_add_button_prefilter'); } // if the link is in the toolbar, we must use smallier buttons if ( script_basename() == 'index' OR $conf['GooglePlusOne'][1] == 'toolbar') { if ($conf['GooglePlusOne'][0] == 'tall') { $template->assign('GPLUS1_SIZE', 'standard'); } } // button language if ( in_array(substr($user['language'],0,2), $conf['GooglePlusOne']['lang']) ) { $template->assign('GPLUS1_LANG', substr($user['language'],0,2)); } else { $template->assign('GPLUS1_LANG', 'en-GB'); } } function gplus1_add_button_prefilter($content, &$smarty) { global $template; switch ($template->get_template_vars('GPLUS1_POSITON')) { case 'top': $search = '