Changeset 8282 for extensions/FacebookPlug
- Timestamp:
- Dec 24, 2010, 1:46:18 PM (13 years ago)
- Location:
- extensions/FacebookPlug/Plugin
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/FacebookPlug/Plugin/admin.config.php
r8275 r8282 50 50 $tabsheet = new tabsheet(); 51 51 $tabsheet->add('social_plugin', 52 l10n('Social plugin '),52 l10n('Social plugins'), 53 53 add_url_params($base_url, array('tab' => 'social_plugin'))); 54 54 $tabsheet->add('advanced', … … 72 72 $conf['fbp']['social_plugin_like_button']['action'] = $action[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ACTION']]; 73 73 $conf['fbp']['social_plugin_like_button']['colorscheme'] = $colorscheme[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_COLORSCHEME']]; 74 // Facepile 75 $conf['fbp']['social_plugin_facepile']['enabled'] = empty($_POST['FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED']) ? false : true; 76 $conf['fbp']['social_plugin_facepile']['max_rows'] = intval($_POST['FBP_SOCIAL_PLUGIN_FACEPILE_MAX_ROWS']); 74 77 // Like box 75 78 $conf['fbp']['social_plugin_like_box']['enabled'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED']) ? false : true; … … 86 89 $conf['fbp']['async_script'] = empty($_POST['FBP_ASYNC_SCRIPT']) ? false : true; 87 90 $conf['fbp']['allow_fb_access_private_page'] = empty($_POST['FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE']) ? false : true; 88 //~ if (isset($_POST['fbp_day_number']))89 //~ {90 //~ $conf['fbp']['day_number'] = $_POST['fbp_day_number'];91 //~ }92 91 break; 93 92 } … … 121 120 'like_button' => array 122 121 ( 123 'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like ',122 'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like/', 124 123 'ENABLED' => ($conf['fbp']['social_plugin_like_button']['enabled'] ? 'checked="checked"' : ''), 125 124 'URL_TYPE_OPTIONS' => $url_type_l10n, … … 133 132 'COLORSCHEME_OPTIONS_SELECTED' => array_search($conf['fbp']['social_plugin_like_button']['colorscheme'], $colorscheme), 134 133 ), 134 'facepile' => array 135 ( 136 'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/facepile/', 137 'ENABLED' => ($conf['fbp']['social_plugin_facepile']['enabled'] ? 'checked="checked"' : ''), 138 'MAX_ROWS' => $conf['fbp']['social_plugin_facepile']['max_rows'], 139 ), 135 140 'like_box' => array 136 141 ( 137 'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like-box ',142 'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like-box/', 138 143 'ENABLED' => ($conf['fbp']['social_plugin_like_box']['enabled'] ? 'checked="checked"' : ''), 139 144 'URL' => $conf['fbp']['social_plugin_like_box']['url'], -
extensions/FacebookPlug/Plugin/include/conf.inc.php
r8275 r8282 26 26 global $conf; 27 27 28 /*$conf['fbp'] = array_merge(29 // default values30 array31 (32 'allow_fb_access_private_page' => true,33 'async_script' => false,34 'social_plugin_like_button' => array35 (36 'enabled' => true,37 'url_type' => 'page',38 'layout' => 'standard',39 'show_faces' => true,40 'action' => 'like',41 'colorscheme' => 'dark',42 ),43 'social_plugin_like_box' => array44 (45 'enabled' => false,46 'url' => 'http://www.facebook.com/Piwigo',47 'url_type' => 'page',48 'colorscheme' => 'dark',49 'show_faces' => true,50 'stream' => true,51 'header' => true,52 ),53 ),54 unserialize($conf['fbp'])55 );*/56 57 28 $conf['fbp'] = array_merge( 58 29 // default values … … 63 34 'social_plugin_like_button' => array(), 64 35 'social_plugin_like_box' => array(), 36 'social_plugin_facepile' => array(), 65 37 ), 66 38 unserialize($conf['fbp'])); … … 76 48 'action' => 'like', 77 49 'colorscheme' => 'dark', 78 'width' => '',50 'width' => null, 79 51 ), 80 52 $conf['fbp']['social_plugin_like_button']); … … 90 62 'stream' => true, 91 63 'header' => true, 92 'width' => '210',64 'width' => 210, 93 65 ), 94 66 $conf['fbp']['social_plugin_like_box']); 67 68 $conf['fbp']['social_plugin_facepile'] = array_merge( 69 // default values 70 array 71 ( 72 'enabled' => true, 73 //'url_type' => 'page', 74 'max_rows' => 1, 75 'width' => null, 76 ), 77 $conf['fbp']['social_plugin_facepile']); 78 79 // Same value of like button 80 $conf['fbp']['social_plugin_facepile']['url_type'] = $conf['fbp']['social_plugin_like_button']['url_type']; 95 81 96 82 //~ print_r($conf['fbp']); -
extensions/FacebookPlug/Plugin/include/picture.inc.php
r8275 r8282 27 27 include_once(FBP_DIR.'/include/header.inc.php'); 28 28 29 /*function fbp_header($content, &$smarty)30 {31 global $conf;32 33 // replace tag html34 $search = '<html ';35 $replacement = '<html xmlns:fb="http://www.facebook.com/2008/fbml" ';36 37 //~ $content = preg_replace('#'.$search.'#', $replacement, $content);38 return preg_replace('#'.$search.'#', $replacement, $content);39 //~ $fbp_content = file_get_contents(FBP_DIR.'/tpl/init.fb.tpl');40 41 $search = '<div id="the_page">';42 return preg_replace('#'.$search.'#', $fbp_content.$search, $content);43 }*/44 45 /*function fbp_loc_begin_picture()46 {47 global $template, $user, $page, $conf, $picture;48 49 // set prefilter50 $template->set_prefilter('header', 'fbp_header');51 52 $template->assign('FACEBOOK_APP_ID', FACEBOOK_APP_ID);53 // define language54 $template->assign('LANGUAGE', $user['language']);55 $template->assign('fbp', $conf['fbp']);56 $template->smarty->register_modifier('boolean_to_string', 'boolean_to_string');57 58 $template->set_filename('init.fb', FBP_DIR.'/tpl/init.fb.tpl');59 $template->append('head_elements', $template->parse('init.fb', true));60 }*/61 62 29 function fbp_render_element_content($content, $current_picture) 63 30 { 64 31 global $template, $user, $page, $conf, $picture; 65 32 66 if ($page['slideshow'] )33 if ($page['slideshow'] and $conf['fbp']['social_plugin_facepile']['enabled']) 67 34 { 68 // nothing to do on slideshow other media aren't usable 35 $tpl = 'social.plugin.facepile'; 36 $type = $conf['fbp']['social_plugin_facepile']['url_type']; 37 } 38 else if ($conf['fbp']['social_plugin_like_button']['enabled']) 39 { 40 $tpl = 'social.plugin.like.button'; 41 $type = $conf['fbp']['social_plugin_like_button']['url_type']; 42 } 43 else 44 { 45 // nothing to do 69 46 return $content; 70 47 } … … 73 50 // Always use full url for FB social plugin 74 51 set_make_full_url(); 75 if ($ conf['fbp']['social_plugin_like_button']['url_type']== 'image')52 if ($type == 'image') 76 53 { 77 54 $fbp_url_picture = get_element_url($current_picture); … … 85 62 86 63 // XFBML implementation 87 //~ $content .= ' 88 //~ <div id="fb-xfbml">'; 89 if ($conf['fbp']['social_plugin_like_button']['enabled']) 90 { 91 //~ $content .= ' 92 //~ <div id="fb-xfbml"> 93 //~ <fb:like href="'.$fbp_url_picture.'" layout="'.$conf['fbp']['social_plugin_like_button']['layout'].'" show_faces="'.boolean_to_string($conf['fbp']['social_plugin_like_button']['show_faces']).'" width="'.@$current_picture['scaled_width'].'" action="'.$conf['fbp']['social_plugin_like_button']['action'].'" colorscheme="'.$conf['fbp']['social_plugin_like_button']['colorscheme'].'"></fb:like> 94 //~ </div>'; 95 $template->set_filename('social.plugin.like.button', FBP_DIR.'/tpl/social.plugin.like.button.tpl'); 96 $content .= $template->parse('social.plugin.like.button', true); 97 } 64 $template->set_filename($tpl, FBP_DIR.'/tpl/'.$tpl.'.tpl'); 65 $content .= $template->parse($tpl, true); 98 66 99 67 return $content; … … 125 93 } 126 94 127 if ($conf['fbp']['social_plugin_like_button']['enabled'] )95 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_facepile']['enabled']) 128 96 { 129 97 //~ add_event_handler('loc_begin_picture', 'fbp_loc_begin_picture'); -
extensions/FacebookPlug/Plugin/language/en_UK/plugin.lang.php
r8275 r8282 18 18 // | USA. | 19 19 // +-----------------------------------------------------------------------+ 20 20 21 if (!defined('PHPWG_ROOT_PATH')) 21 22 { … … 33 34 $lang['light'] = 'light'; 34 35 $lang['dark'] = 'dark'; 35 $lang['Social plugin '] = 'Social plugin';36 $lang['Social plugins'] = 'Social plugins'; 36 37 $lang['Advanced'] = 'Advanced'; 37 38 $lang['Asynchronous Facebook access'] = 'Asynchronous Facebook access'; … … 53 54 $lang['Data updated with error'] = 'Data updated with error'; 54 55 56 $lang['Facepile'] = 'Facepile'; 57 $lang['on slideshow pages'] = 'on slideshow pages'; 58 $lang['Num rows'] = 'Num rows'; 59 $lang[''] = ''; 60 $lang[''] = ''; 61 $lang[''] = ''; 62 $lang[''] = ''; 63 $lang[''] = ''; 64 $lang[''] = ''; 65 $lang[''] = ''; 66 $lang[''] = ''; 67 $lang[''] = ''; 68 $lang[''] = ''; 69 $lang[''] = ''; 70 $lang[''] = ''; 71 $lang[''] = ''; 72 $lang[''] = ''; 73 $lang[''] = ''; 74 $lang[''] = ''; 75 55 76 ?> -
extensions/FacebookPlug/Plugin/language/fr_FR/plugin.lang.php
r8275 r8282 18 18 // | USA. | 19 19 // +-----------------------------------------------------------------------+ 20 20 21 if (!defined('PHPWG_ROOT_PATH')) 21 22 { … … 33 34 $lang['light'] = 'clair'; 34 35 $lang['dark'] = 'foncé'; 35 $lang['Social plugin '] = 'Plugin social';36 $lang['Social plugins'] = 'Modules sociaux'; 36 37 $lang['Advanced'] = 'Avancé'; 37 38 $lang['Asynchronous Facebook access'] = 'Accès asynchrone à Facebook'; … … 52 53 $lang['Data updated with success'] = 'Données mises à jour avec succès'; 53 54 $lang['Data updated with error'] = 'Données mises à jour avec erreur'; 54 //~ $lang[''] = ''; 55 $lang['Facepile'] = 'Facepile'; 56 $lang['on slideshow pages'] = 'sur les diaporamas'; 57 $lang['Num rows'] = 'Nombre de lignes'; 55 58 56 59 ?> -
extensions/FacebookPlug/Plugin/tpl/admin.config.tpl
r8275 r8282 56 56 </label> 57 57 </li> 58 {* <li> 59 <span class="property"> 60 <label for="fbp_day_number">{'fbp_day_number'|@translate}</label> 61 </span> 62 <input type="text" size="3" maxlength="4" name="fbp_day_number" id="fbp_day_number" value="{$fbp_DAY_NUMBER}" /> 63 </li>*} 58 </div> 59 </ul> 60 </fieldset> 61 62 <fieldset> 63 <ul> 64 <h3><a href="{$social_plugin.facepile.FB_PAGE}" onclick="window.open(this.href); return false;">{'Facepile'|@translate}</a> {'on slideshow pages'|@translate}</h3> 65 <li> 66 <label> 67 <span class="property">{'Enabled'|@translate}</span> 68 <input type="checkbox" name="FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED" {$social_plugin.facepile.ENABLED} /> 69 </label> 70 </li> 71 72 <div id='facepile'> 73 <li> 74 <label> 75 <span class="property">{'Num rows'|@translate}</span> 76 <input type="text" size="3" maxlength="4" name="FBP_SOCIAL_PLUGIN_FACEPILE_MAX_ROWS" value="{$social_plugin.facepile.MAX_ROWS}" /> 77 </label> 78 </li> 64 79 </div> 65 80 </ul> … … 80 95 <label> 81 96 <span class="property">{'Facebook Page URL'|@translate}</span> 82 <input type="text" size=" 79" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_URL" value="{$social_plugin.like_box.URL}" />97 <input type="text" size="39" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_URL" value="{$social_plugin.like_box.URL}" /> 83 98 </label> 84 99 </li> … … 172 187 //Init all main checkbox 173 188 init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "like_button"); 189 init_checkbox("FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED", "facepile"); 174 190 init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED", "like_box"); 175 191 }); -
extensions/FacebookPlug/Plugin/tpl/social.plugin.like.button.tpl
r8275 r8282 1 1 <div id="fb-xfbml-like-button"> 2 <fb:like href="{$fbp_url_picture}" width="{$fbp.social_plugin_like_button.width}" layout="{$fbp.social_plugin_like_button.layout}" show_faces="{$fbp.social_plugin_like_button.show_faces|@boolean_to_string}" {*width="{$WIDTH_IMG}"*}action="{$fbp.social_plugin_like_button.action}" colorscheme="{$fbp.social_plugin_like_button.colorscheme}"></fb:like>2 <fb:like href="{$fbp_url_picture}" width="{$fbp.social_plugin_like_button.width}" layout="{$fbp.social_plugin_like_button.layout}" show_faces="{$fbp.social_plugin_like_button.show_faces|@boolean_to_string}" action="{$fbp.social_plugin_like_button.action}" colorscheme="{$fbp.social_plugin_like_button.colorscheme}"></fb:like> 3 3 </div>
Note: See TracChangeset
for help on using the changeset viewer.