assign('GPLUS1_URL', get_absolute_root_url().ltrim(duplicate_picture_url(), './')); } else if (script_basename() == 'index') { $conf['GooglePlusOne']['position'] = 'index'; $template->assign('GPLUS1_URL', get_absolute_root_url().ltrim(duplicate_index_url(array(), array('start')), './')); } else { return; } // if the link is in the toolbar, we must use smallier buttons if ( script_basename() == 'index' OR $conf['GooglePlusOne']['position'] == 'toolbar') { if ($conf['GooglePlusOne']['size'] == 'tall' AND $conf['GooglePlusOne']['annotation'] == 'bubble') { $conf['GooglePlusOne']['size'] = 'standard'; } } // config $template->assign(array( 'GPLUS1_SIZE' => $conf['GooglePlusOne']['size'], 'GPLUS1_ANNO' => $conf['GooglePlusOne']['annotation'], 'GPLUS1_POSITON' => $conf['GooglePlusOne']['position'], )); // button language if ( in_array(str_replace('_','-',$user['language']), $conf['GooglePlusOne']['lang']) ) { $template->assign('GPLUS1_LANG', str_replace('_','-',$user['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'); } $template->set_filename('gplus1_button', dirname(__FILE__).'/button.tpl'); $button = $template->parse('gplus1_button', true); switch ($conf['GooglePlusOne']['position']) { case 'index': // $template->add_index_button('