Changeset 8275
- Timestamp:
- Dec 24, 2010, 1:01:39 AM (13 years ago)
- Location:
- extensions/FacebookPlug/Plugin
- Files:
-
- 5 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/FacebookPlug/Plugin/admin.config.php
r8250 r8275 74 74 // Like box 75 75 $conf['fbp']['social_plugin_like_box']['enabled'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED']) ? false : true; 76 $conf['fbp']['social_plugin_like_box']['url _type'] = $url_type[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_URL_TYPE']];76 $conf['fbp']['social_plugin_like_box']['url'] = $_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_URL']; 77 77 $conf['fbp']['social_plugin_like_box']['colorscheme'] = $colorscheme[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_COLORSCHEME']]; 78 78 $conf['fbp']['social_plugin_like_box']['show_faces'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_SHOW_FACES']) ? false : true; … … 101 101 param = \'fbp\' 102 102 ;'; 103 pwg_query($query); 103 if (pwg_query($query)) 104 { 105 array_push($page['infos'], l10n('Data updated with success')); 106 } 107 else 108 { 109 array_push($page['errors'], l10n('Data updated with error')); 110 } 104 111 } 105 112 … … 130 137 'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like-box', 131 138 'ENABLED' => ($conf['fbp']['social_plugin_like_box']['enabled'] ? 'checked="checked"' : ''), 132 'URL_TYPE_OPTIONS' => $url_type_l10n, 133 'URL_TYPE_OPTIONS_SELECTED' => array_search($conf['fbp']['social_plugin_like_box']['url_type'], $url_type), 139 'URL' => $conf['fbp']['social_plugin_like_box']['url'], 134 140 'COLORSCHEME_OPTIONS' => $colorscheme_l10n, 135 141 'COLORSCHEME_OPTIONS_SELECTED' => array_search($conf['fbp']['social_plugin_like_box']['colorscheme'], $colorscheme), -
extensions/FacebookPlug/Plugin/include/admin.inc.php
r8241 r8275 24 24 } 25 25 26 27 26 function fbp_get_admin_plugin_menu_links($menu) 28 27 { -
extensions/FacebookPlug/Plugin/include/conf.inc.php
r8254 r8275 26 26 global $conf; 27 27 28 $conf['fbp'] = array_merge(28 /*$conf['fbp'] = array_merge( 29 29 // default values 30 30 array … … 53 53 ), 54 54 unserialize($conf['fbp']) 55 ); 55 );*/ 56 57 $conf['fbp'] = array_merge( 58 // default values 59 array 60 ( 61 'allow_fb_access_private_page' => true, 62 'async_script' => false, 63 'social_plugin_like_button' => array(), 64 'social_plugin_like_box' => array(), 65 ), 66 unserialize($conf['fbp'])); 67 68 $conf['fbp']['social_plugin_like_button'] = array_merge( 69 // default values 70 array 71 ( 72 'enabled' => true, 73 'url_type' => 'page', 74 'layout' => 'standard', 75 'show_faces' => true, 76 'action' => 'like', 77 'colorscheme' => 'dark', 78 'width' => '', 79 ), 80 $conf['fbp']['social_plugin_like_button']); 81 82 $conf['fbp']['social_plugin_like_box'] = array_merge( 83 // default values 84 array 85 ( 86 'enabled' => false, 87 'url' => 'http://www.facebook.com/Piwigo', 88 'colorscheme' => 'dark', 89 'show_faces' => true, 90 'stream' => true, 91 'header' => true, 92 'width' => '210', 93 ), 94 $conf['fbp']['social_plugin_like_box']); 56 95 57 96 //~ print_r($conf['fbp']); -
extensions/FacebookPlug/Plugin/include/constants.inc.php
r8241 r8275 26 26 define('FACEBOOK_APP_ID', '111499825588662'); 27 27 define('FBP_DIR', dirname(dirname(__FILE__))); 28 define('FBP_PATH' , PHPWG_PLUGINS_PATH.basename(FBP_DIR)); 28 29 define('FBP_IP_FB', '66.220.'); 29 30 -
extensions/FacebookPlug/Plugin/include/picture.inc.php
r8254 r8275 24 24 } 25 25 26 function fbp_header($content, &$smarty) 26 include_once(FBP_DIR.'/include/common.inc.php'); 27 include_once(FBP_DIR.'/include/header.inc.php'); 28 29 /*function fbp_header($content, &$smarty) 27 30 { 28 31 global $conf; … … 38 41 $search = '<div id="the_page">'; 39 42 return preg_replace('#'.$search.'#', $fbp_content.$search, $content); 40 } 43 }*/ 41 44 42 function fbp_loc_begin_picture()45 /*function fbp_loc_begin_picture() 43 46 { 44 47 global $template, $user, $page, $conf, $picture; … … 55 58 $template->set_filename('init.fb', FBP_DIR.'/tpl/init.fb.tpl'); 56 59 $template->append('head_elements', $template->parse('init.fb', true)); 57 } 60 }*/ 58 61 59 62 function fbp_render_element_content($content, $current_picture) … … 67 70 } 68 71 69 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_like_box']['enabled']) 72 // define picture FB link 73 // Always use full url for FB social plugin 74 set_make_full_url(); 75 if ($conf['fbp']['social_plugin_like_button']['url_type'] == 'image') 70 76 { 71 // define picture FB link 72 // Always use full url for FB social plugin 73 set_make_full_url(); 74 if ($conf['fbp']['social_plugin_like_button']['url_type'] == 'image') 75 { 76 $fbp_url_picture = get_element_url($current_picture); 77 } 78 else 79 { 80 $fbp_url_picture = make_picture_url(array('image_id' => $page['image_id'])); 81 } 82 unset_make_full_url(); 83 $template->assign('fbp_url_picture', $fbp_url_picture); 84 //~ $template->assign('FBP_SOCIAL_PLUGIN_LIKE_BUTTON', $conf['fbp']['social_plugin_like_button']); 85 //~ $template->assign('FBP_SOCIAL_PLUGIN_LIKE_BOX', $conf['fbp']['social_plugin_like_box']); 77 $fbp_url_picture = get_element_url($current_picture); 78 } 79 else 80 { 81 $fbp_url_picture = make_picture_url(array('image_id' => $page['image_id'])); 82 } 83 unset_make_full_url(); 84 $template->assign('fbp_url_picture', $fbp_url_picture); 86 85 87 // iframeimplementation88 /* $$content= '89 <iframe src="http://www.facebook.com/plugins/like.php?href={$SRC_IMG}&layout=standard&show_faces=true&width={$WIDTH_IMG}&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:{$WIDTH_IMG}px; height:80px;" allowTransparency="true"></iframe> 90 ';*/91 // XFBML implementation86 // XFBML implementation 87 //~ $content .= ' 88 //~ <div id="fb-xfbml">'; 89 if ($conf['fbp']['social_plugin_like_button']['enabled']) 90 { 92 91 //~ $content .= ' 93 //~ <div id="fb-xfbml">';94 if ($conf['fbp']['social_plugin_like_button']['enabled'])95 {96 //~ $content .= '97 92 //~ <div id="fb-xfbml"> 98 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> 99 94 //~ </div>'; 100 $template->set_filename('social.plugin.like.button', FBP_DIR.'/tpl/social.plugin.like.button.tpl'); 101 $content .= $template->parse('social.plugin.like.button', true); 102 } 103 if ($conf['fbp']['social_plugin_like_box']['enabled']) 104 { 105 //~ $content .= ' 106 //~ <div id="fb-xfbml"> 107 //~ <fb:like-box href="'.$fbp_url_picture.'" width="'.@$current_picture['scaled_width'].'" show_faces="'.boolean_to_string($conf['fbp']['social_plugin_like_box']['show_faces']).'" stream="'.boolean_to_string($conf['fbp']['social_plugin_like_box']['stream']).'" header="'.boolean_to_string($conf['fbp']['social_plugin_like_box']['header']).'"></fb:like-box> 108 //~ </div>'; 109 $template->set_filename('social.plugin.like.box', FBP_DIR.'/tpl/social.plugin.like.box.tpl'); 110 $content .= $template->parse('social.plugin.like.box', true); 111 } 112 113 //~ $content .= ' 114 //~ </div>'; 115 } 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 } 116 98 117 99 return $content; … … 122 104 global $conf; 123 105 124 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_like_box']['enabled'])106 if ($conf['fbp']['social_plugin_like_button']['enabled']) 125 107 { 126 108 if ($conf['fbp']['allow_fb_access_private_page']) … … 143 125 } 144 126 145 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_like_box']['enabled'])127 if ($conf['fbp']['social_plugin_like_button']['enabled']) 146 128 { 147 add_event_handler('loc_begin_picture', 'fbp_loc_begin_picture');129 //~ add_event_handler('loc_begin_picture', 'fbp_loc_begin_picture'); 148 130 add_event_handler('render_element_content', 'fbp_render_element_content', EVENT_HANDLER_PRIORITY_NEUTRAL+1 /*in order to have picture content*/, 2); 149 131 //~ add_event_handler('loc_end_picture', 'fbp_loc_end_picture'); -
extensions/FacebookPlug/Plugin/language/en_UK/plugin.lang.php
r8250 r8275 23 23 } 24 24 25 // English 25 26 $lang['page'] = 'page'; 26 27 $lang['image'] = 'image'; … … 40 41 $lang['URL type'] = 'URL type'; 41 42 $lang['Layout style'] = 'Layout style'; 42 $lang['Show faces'] = ' Voir lesfaces';43 $lang['Verb to display'] = ' Texte à afficher';44 $lang['Color scheme'] = ' Jeu de couleurs';43 $lang['Show faces'] = 'Show faces'; 44 $lang['Verb to display'] = 'Verb to display'; 45 $lang['Color scheme'] = 'Color scheme'; 45 46 $lang['Like box'] = 'Like box'; 46 47 $lang['Show stream'] = 'Show stream'; 47 48 $lang['Show header'] = 'Show header'; 49 $lang['Facebook Page URL'] = 'Facebook Page URL'; 50 $lang['on picture pages'] = 'on picture pages'; 51 $lang['on main pages'] = 'on main pages'; 52 $lang['Data updated with success'] = 'Data updated with success'; 53 $lang['Data updated with error'] = 'Data updated with error'; 48 54 49 55 ?> -
extensions/FacebookPlug/Plugin/language/fr_FR/plugin.lang.php
r8250 r8275 23 23 } 24 24 25 // Français 25 26 $lang['page'] = 'page'; 26 27 $lang['image'] = 'image'; … … 35 36 $lang['Advanced'] = 'Avancé'; 36 37 $lang['Asynchronous Facebook access'] = 'Accès asynchrone à Facebook'; 37 $lang['Allow Facebook to see private page (recommended)'] = 'Permettre à Facebook de voir les pages privées (recomm endé)';38 $lang['Allow Facebook to see private page (recommended)'] = 'Permettre à Facebook de voir les pages privées (recommandé)'; 38 39 $lang['Like button'] = 'Bouton "J\'aime"'; 39 40 $lang['Enabled'] = 'Activé'; 40 41 $lang['URL type'] = 'Type d\'URL'; 41 42 $lang['Layout style'] = 'Style d\'affichage'; 42 $lang['Show faces'] = ' Show face';43 $lang['Verb to display'] = ' Verb to display';44 $lang['Color scheme'] = ' Color scheme';43 $lang['Show faces'] = 'Voir les faces'; 44 $lang['Verb to display'] = 'Texte à afficher'; 45 $lang['Color scheme'] = 'Jeu de couleurs'; 45 46 $lang['Like box'] = 'Boite "J\'aime"'; 46 47 $lang['Show stream'] = 'Voir le flux'; 47 48 $lang['Show header'] = 'Voir l\'entête'; 48 //~ $lang[''] = ''; 49 //~ $lang[''] = ''; 49 $lang['Facebook Page URL'] = 'URL de la page Facebook'; 50 $lang['on picture pages'] = 'sur les pages d\'images'; 51 $lang['on main pages'] = 'sur les pages principales'; 52 $lang['Data updated with success'] = 'Données mises à jour avec succès'; 53 $lang['Data updated with error'] = 'Données mises à jour avec erreur'; 50 54 //~ $lang[''] = ''; 51 55 -
extensions/FacebookPlug/Plugin/main.inc.php
r8241 r8275 38 38 include_once(FBP_DIR.'/include/picture.inc.php'); 39 39 } 40 else if (script_basename() == 'index') 41 { 42 include_once(dirname(__FILE__).'/include/common.inc.php'); 43 include_once(FBP_DIR.'/include/index.inc.php'); 44 } 40 45 else 41 46 if (script_basename() == 'admin') -
extensions/FacebookPlug/Plugin/tpl/admin.config.tpl
r8254 r8275 9 9 <fieldset> 10 10 <ul> 11 <h3><a href="{$social_plugin.like_button.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like button'|@translate}</a> </h3>11 <h3><a href="{$social_plugin.like_button.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like button'|@translate}</a> {'on picture pages'|@translate}</h3> 12 12 <li> 13 13 <label> … … 68 68 <fieldset> 69 69 <ul> 70 <h3><a href="{$social_plugin.like_box.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like box'|@translate}</a> </h3>70 <h3><a href="{$social_plugin.like_box.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like box'|@translate}</a> {'on main pages'|@translate}</h3> 71 71 <li> 72 72 <label> … … 79 79 <li> 80 80 <label> 81 <span class="property">{'URL type'|@translate}</span> 82 <select name="FBP_SOCIAL_PLUGIN_LIKE_BOX_URL_TYPE" size="1"> 83 {html_options options=$social_plugin.like_box.URL_TYPE_OPTIONS selected=$social_plugin.like_box.URL_TYPE_OPTIONS_SELECTED} 84 </select> 81 <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}" /> 85 83 </label> 86 84 </li> -
extensions/FacebookPlug/Plugin/tpl/social.plugin.like.box.tpl
r8254 r8275 1 <div id="fb-xfbml-like-box"> 2 <fb:like-box href="{$fbp.social_plugin_like_box.url}" {*width="???"*} show_faces="{$fbp.social_plugin_like_box.show_faces|@boolean_to_string}" stream="{$fbp.social_plugin_like_box.stream|@boolean_to_string}" header="{$fbp.social_plugin_like_box.header|@boolean_to_string}"></fb:like-box> 3 </div> 1 <dd> 2 <ul> 3 <div id="fb-xfbml-like-box"> 4 <fb:like-box href="{$fbp.social_plugin_like_box.url}" width="{$fbp.social_plugin_like_box.width}" show_faces="{$fbp.social_plugin_like_box.show_faces|@boolean_to_string}" stream="{$fbp.social_plugin_like_box.stream|@boolean_to_string}" header="{$fbp.social_plugin_like_box.header|@boolean_to_string}" colorscheme="{$fbp.social_plugin_like_box.colorscheme}"></fb:like-box> 5 </div> 6 </ul> 7 </dd> -
extensions/FacebookPlug/Plugin/tpl/social.plugin.like.button.tpl
r8254 r8275 1 <div id="fb-xfbml-like ">2 <fb:like href="{$fbp_url_picture}" 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>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> 3 3 </div>
Note: See TracChangeset
for help on using the changeset viewer.