Changeset 8250 for extensions
- Timestamp:
- Dec 23, 2010, 11:53:27 AM (13 years ago)
- Location:
- extensions/FacebookPlug/Plugin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/FacebookPlug/Plugin/admin.config.php
r8243 r8250 65 65 case 'social_plugin' : 66 66 { 67 // Like button 67 68 $conf['fbp']['social_plugin_like_button']['enabled'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED']) ? false : true; 68 69 $conf['fbp']['social_plugin_like_button']['url_type'] = $url_type[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_URL_TYPE']]; … … 71 72 $conf['fbp']['social_plugin_like_button']['action'] = $action[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ACTION']]; 72 73 $conf['fbp']['social_plugin_like_button']['colorscheme'] = $colorscheme[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BUTTON_COLORSCHEME']]; 73 74 // Like box 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']]; 77 $conf['fbp']['social_plugin_like_box']['colorscheme'] = $colorscheme[$_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_COLORSCHEME']]; 78 $conf['fbp']['social_plugin_like_box']['show_faces'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_SHOW_FACES']) ? false : true; 79 $conf['fbp']['social_plugin_like_box']['stream'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_STREAM']) ? false : true; 80 $conf['fbp']['social_plugin_like_box']['header'] = empty($_POST['FBP_SOCIAL_PLUGIN_LIKE_BOX_HEADER']) ? false : true; 74 81 break; 75 82 } … … 119 126 'COLORSCHEME_OPTIONS_SELECTED' => array_search($conf['fbp']['social_plugin_like_button']['colorscheme'], $colorscheme), 120 127 ), 128 'like_box' => array 129 ( 130 'FB_PAGE' => 'http://developers.facebook.com/docs/reference/plugins/like-box', 131 '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), 134 'COLORSCHEME_OPTIONS' => $colorscheme_l10n, 135 'COLORSCHEME_OPTIONS_SELECTED' => array_search($conf['fbp']['social_plugin_like_box']['colorscheme'], $colorscheme), 136 'SHOW_FACES' => ($conf['fbp']['social_plugin_like_box']['show_faces'] ? 'checked="checked"' : ''), 137 'STREAM' => ($conf['fbp']['social_plugin_like_box']['stream'] ? 'checked="checked"' : ''), 138 'HEADER' => ($conf['fbp']['social_plugin_like_box']['header'] ? 'checked="checked"' : ''), 139 ), 121 140 )); 122 141 break; -
extensions/FacebookPlug/Plugin/include/conf.inc.php
r8248 r8250 41 41 'colorscheme' => 'dark', 42 42 ), 43 'social_plugin_like_box' => array 44 ( 45 'enabled' => false, 46 'url_type' => 'page', 47 'colorscheme' => 'dark', 48 'show_faces' => true, 49 'stream' => true, 50 'header' => true, 51 ), 43 52 ), 44 53 unserialize($conf['fbp']) -
extensions/FacebookPlug/Plugin/include/picture.inc.php
r8248 r8250 92 92 } 93 93 94 //~ function fbp_loc_end_picture() 94 function fbp_bool2str($value) 95 { 96 return ($value ? 'true' : 'false'); 97 } 98 95 99 function fbp_render_element_content($content, $current_picture) 96 100 { … … 103 107 } 104 108 105 if ($conf['fbp']['social_plugin_like_button']['enabled'] )109 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_like_box']['enabled']) 106 110 { 107 // iframe implementation108 /* $$content = '109 <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>110 ';*/111 // XFBML implementation112 $content .= '113 <div id="fb-xfbml">114 <fb:like href="{$FBP_URL_PICTURE}" layout="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.layout}" show_faces="{if $FBP_SOCIAL_PLUGIN_LIKE_BUTTON.show_faces}true{else}false{/if}" width="{$WIDTH_IMG}" action="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.action}" colorscheme="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.colorscheme}"></fb:like>115 </div>';116 $content2 = '117 <fb:like href="{$FBP_URL_PICTURE}" layout="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.layout}" show_faces="{if $FBP_SOCIAL_PLUGIN_LIKE_BUTTON.show_faces}true{else}false{/if}" width="{$WIDTH_IMG}" action="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.action}" colorscheme="{$FBP_SOCIAL_PLUGIN_LIKE_BUTTON.colorscheme}"></fb:like>118 ';119 120 //~ $template->set_prefilter('default_content', 'fbp_add_social');121 // Always use full url for FB social plugin122 //~ set_make_full_url();123 111 // define language 124 112 $template->assign('LANGUAGE', $user['language']); 125 113 // define picture FB link 114 // Always use full url for FB social plugin 126 115 set_make_full_url(); 127 116 if ($conf['fbp']['social_plugin_like_button']['url_type'] == 'image') 128 117 { 129 $fbp_url_picture = get_element_url($ picture['current']);118 $fbp_url_picture = get_element_url($current_picture); 130 119 } 131 120 else … … 134 123 } 135 124 unset_make_full_url(); 136 $template->assign('FBP_URL_PICTURE', $fbp_url_picture); 137 $template->assign('FBP_SOCIAL_PLUGIN_LIKE_BUTTON', $conf['fbp']['social_plugin_like_button']); 138 } 125 //~ $template->assign('FBP_URL_PICTURE', $fbp_url_picture); 126 //~ $template->assign('FBP_SOCIAL_PLUGIN_LIKE_BUTTON', $conf['fbp']['social_plugin_like_button']); 127 //~ $template->assign('FBP_SOCIAL_PLUGIN_LIKE_BOX', $conf['fbp']['social_plugin_like_box']); 128 129 // iframe implementation 130 /* $$content = ' 131 <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> 132 ';*/ 133 // XFBML implementation 134 //~ $content .= ' 135 //~ <div id="fb-xfbml">'; 136 if ($conf['fbp']['social_plugin_like_button']['enabled']) 137 { 138 $content .= ' 139 <div id="fb-xfbml"> 140 <fb:like href="'.$fbp_url_picture.'" layout="'.$conf['fbp']['social_plugin_like_button']['layout'].'" show_faces="'.fbp_bool2str($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> 141 </div>'; 142 } 143 if ($conf['fbp']['social_plugin_like_box']['enabled']) 144 { 145 $content .= ' 146 <div id="fb-xfbml"> 147 <fb:like-box href="'.$fbp_url_picture.'" width="'.@$current_picture['scaled_width'].'" show_faces="'.fbp_bool2str($conf['fbp']['social_plugin_like_box']['show_faces']).'" stream="'.fbp_bool2str($conf['fbp']['social_plugin_like_box']['stream']).'" header="'.fbp_bool2str($conf['fbp']['social_plugin_like_box']['header']).'"></fb:like-box> 148 </div>'; 149 } 150 151 //~ $content .= ' 152 //~ </div>'; 153 } 139 154 140 155 return $content; … … 145 160 global $conf; 146 161 147 if ($conf['fbp']['social_plugin_like_button']['enabled'] )162 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_like_box']['enabled']) 148 163 { 149 164 if ($conf['fbp']['allow_fb_access_private_page']) … … 166 181 } 167 182 168 if ($conf['fbp']['social_plugin_like_button']['enabled'] )183 if ($conf['fbp']['social_plugin_like_button']['enabled'] or $conf['fbp']['social_plugin_like_box']['enabled']) 169 184 { 170 185 add_event_handler('loc_begin_picture', 'fbp_loc_begin_picture'); -
extensions/FacebookPlug/Plugin/language/en_UK/plugin.lang.php
r8241 r8250 43 43 $lang['Verb to display'] = 'Texte à afficher'; 44 44 $lang['Color scheme'] = 'Jeu de couleurs'; 45 $lang['Like box'] = 'Like box'; 46 $lang['Show stream'] = 'Show stream'; 47 $lang['Show header'] = 'Show header'; 45 48 46 49 ?> -
extensions/FacebookPlug/Plugin/language/fr_FR/plugin.lang.php
r8241 r8250 43 43 $lang['Verb to display'] = 'Verb to display'; 44 44 $lang['Color scheme'] = 'Color scheme'; 45 $lang['Like box'] = 'Boite "J\'aime"'; 46 $lang['Show stream'] = 'Voir le flux'; 47 $lang['Show header'] = 'Voir l\'entête'; 48 //~ $lang[''] = ''; 49 //~ $lang[''] = ''; 50 //~ $lang[''] = ''; 45 51 46 52 ?> -
extensions/FacebookPlug/Plugin/tpl/admin.config.tpl
r8241 r8250 6 6 <form method="post" class="properties"> 7 7 8 <fieldset id="fbpConf"> 9 {if isset($social_plugin)} 8 {if isset($social_plugin)} 9 <fieldset> 10 10 <ul> 11 11 <h3><a href="{$social_plugin.like_button.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like button'|@translate}</a></h3> … … 26 26 </label> 27 27 </li> 28 29 28 <li> 30 29 <label> … … 57 56 </label> 58 57 </li> 59 60 58 {* <li> 61 59 <span class="property"> … … 66 64 </div> 67 65 </ul> 68 {/if}{* isset $social_plugin*} 66 </fieldset> 69 67 70 {if isset($advanced)} 68 <fieldset> 69 <ul> 70 <h3><a href="{$social_plugin.like_box.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like box'|@translate}</a></h3> 71 <li> 72 <label> 73 <span class="property">{'Enabled'|@translate}</span> 74 <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED" {$social_plugin.like_box.ENABLED} /> 75 </label> 76 </li> 77 78 <div id='like_box'> 79 <li> 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> 85 </label> 86 </li> 87 <li> 88 <label> 89 <span class="property">{'Color scheme'|@translate}</span> 90 <select name="FBP_SOCIAL_PLUGIN_LIKE_BOX_COLORSCHEME" size="1"> 91 {html_options options=$social_plugin.like_box.COLORSCHEME_OPTIONS selected=$social_plugin.like_box.COLORSCHEME_OPTIONS_SELECTED} 92 </select> 93 </label> 94 </li> 95 <li> 96 <label> 97 <span class="property">{'Show faces'|@translate}</span> 98 <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_SHOW_FACES" {$social_plugin.like_box.SHOW_FACES} /> 99 </label> 100 </li> 101 <li> 102 <label> 103 <span class="property">{'Show stream'|@translate}</span> 104 <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_STREAM" {$social_plugin.like_box.STREAM} /> 105 </label> 106 </li> 107 <li> 108 <label> 109 <span class="property">{'Show header'|@translate}</span> 110 <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_HEADER" {$social_plugin.like_box.HEADER} /> 111 </label> 112 </li> 113 </div> 114 </ul> 115 </fieldset> 116 {/if}{* isset $social_plugin*} 117 118 {if isset($advanced)} 119 <fieldset> 71 120 <ul> 72 121 <li> … … 84 133 </li> 85 134 </ul> 86 {/if}{* isset $advanced*} 135 </fieldset> 136 {/if}{* isset $advanced*} 87 137 88 </fieldset>89 138 90 139 <p> … … 125 174 //Init all main checkbox 126 175 init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "like_button"); 176 init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED", "like_box"); 127 177 }); 128 178
Note: See TracChangeset
for help on using the changeset viewer.