source: extensions/SocialButtons/include/linkedin.inc.php @ 26017

Last change on this file since 26017 was 25178, checked in by mistic100, 11 years ago

add linkedin

File size: 1.1 KB
Line 
1<?php
2defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
3
4function socialbutt_linkedin($basename, $root_url, &$tpl_vars, &$buttons) 
5{
6  global $conf, $template, $user;
7 
8  $linkedin_langs = array(
9    'en_US','fr_FR','es_ES','ru_RU','de_DE','it_IT','pt_BR','ro_RO','tr_TR','ja_JP',
10    'in_ID','ms_MY','ko_KR','sv_SE','cs_CZ','nl_NL','pl_PL','no_NO','da_DK'
11    );
12 
13 
14  // if the link is in the toolbar, we must use smaller buttons
15  if ($conf['SocialButtons']['position'] == 'index' or $conf['SocialButtons']['position'] == 'toolbar')
16  {
17    if ($conf['SocialButtons']['linkedin']['counter'] == 'top')
18    {
19      $conf['SocialButtons']['linkedin']['counter'] = 'right';
20    }
21  }
22 
23 
24  // config
25  $tpl_vars['LINKEDIN'] = $conf['SocialButtons']['linkedin'];
26 
27  // button language
28  if ( in_array($user['language'], $linkedin_langs) )
29  {
30    $tpl_vars['LINKEDIN']['lang'] = $user['language'];
31  }
32  else
33  {
34    $tpl_vars['LINKEDIN']['lang'] = 'en_US';
35  }
36 
37 
38  $template->set_filename('linkedin_button', realpath(SOCIALBUTT_PATH .'template/linkedin.tpl'));
39  $buttons[] = 'linkedin_button';
40}
41
42?>
Note: See TracBrowser for help on using the repository browser.