12.04.2017, 15:12
Witam, potrafi ktoś dodać do tego, aby na forum wyświetlała się strona facebooka do danego fanpagea?
Bo jak narazie wyświetla sie biale tlo
Link do fp: https://www.facebook.com/VSTransSud/
Bo jak narazie wyświetla sie biale tlo
Link do fp: https://www.facebook.com/VSTransSud/
Kod PHP:
<?php
/**
===============================================================
@author : Snake_;
@last act. : 04.03.2015;
@version : 1.6.0;
@mybb : compatibility MyBB 1.8.x;
@description: Plugin dodaje do wybranej krawędzi strony społecznościową wtyczkę Facebook'a.
===============================================================
*/
if(!defined("IN_MYBB")){
exit;
}
define('SLIDER_VER', '1.6.0');
$plugins->add_hook("pre_output_page", "fbslider_main");
function fbslider_info()
{
global $lang, $db;
$lang->load("fbslider_acp");
$paypal_me = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="float:right;">' .
'<input type="hidden" name="cmd" value="_s-xclick">' .
'<input type="hidden" name="hosted_button_id" value="CYCBUYFB3EBTC">' .
'<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">' .
'<img alt="" border="0" src="https://www.paypalobjects.com/pl_PL/i/scr/pixel.gif" width="1" height="1">' .
'</form>';
return array(
"name" => $db->escape_string($lang->fbslider_name_plugin),
'description' => $db->escape_string($lang->fbslider_desc_plugin).$paypal_me,
"website" => "http://mybboard.pl",
"author" => "Snake_",
"authorsite" => "http://mybboard.pl",
"version" => SLIDER_VER,
"guid" => "",
"compatibility" => "18*"
);
}
function fbslider_install()
{
global $db, $lang;
$lang->load("fbslider_acp");
$settingsgroup = array(
"gid" => "NULL",
"name" => "plugin_fbslider",
"title" => $db->escape_string($lang->fbslider_settingsg_name_1),
'description' => $db->escape_string($lang->fbslider_settingsg_desc_1),
"disporder" => "250",
"isdefault" => "no",
);
$db->insert_query("settinggroups", $settingsgroup);
$d = -1;
$gid = (int)$db->insert_id();
$setting_array[] = array(
'name' =>'fbslider_url',
'title' => $db->escape_string($lang->fbslider_settings_name_1),
'description' => $db->escape_string($lang->fbslider_settings_desc_1),
'optionscode' => 'text',
'value' => '',
);
$setting_array[] = array(
'name' =>'fbslider_page',
'title' => $db->escape_string($lang->fbslider_settings_name_2),
'description' => $db->escape_string($lang->fbslider_settings_desc_2),
'optionscode' => 'select\n0=Lewa\n1=Prawa',
'value' => 1,
);
$setting_array[] = array(
'name' =>'fbslider_fast',
'title' => $db->escape_string($lang->fbslider_settings_name_3),
'description' => $db->escape_string($lang->fbslider_settings_desc_3),
'optionscode' => 'text',
'value' => '300',
);
$setting_array[] = array(
'name' => 'fbslider_clickhover',
'title' => $db->escape_string($lang->fbslider_settings_name_4),
'description' => $db->escape_string($lang->fbslider_settings_desc_4),
'optionscode' => 'select\n0=Kliknięcie\n1=Najechanie',
'value' => 1,
);
foreach($setting_array as &$current_setting)
{
$current_setting['sid'] = NULL;
$current_setting['disporder'] = ++$d;
$current_setting['gid'] = $gid;
}
$db->insert_query_multiple('settings', $setting_array);
rebuild_settings();
}
function fbslider_is_installed()
{
global $mybb;
return isset($mybb->settings['fbslider_url']);
}
function fbslider_uninstall()
{
global $db;
$db->delete_query("settings", "name LIKE ('fbslider_%')");
$db->delete_query("settinggroups", "name='plugin_fbslider'");
rebuild_settings();
}
function fbslider_main(&$page)
{
global $mybb;
if($mybb->settings['fbslider_clickhover'] == 1) {
switch($mybb->settings['fbslider_page'])
{
case 1:
$js_css = '<script type="text/javascript">
$(document).ready(function () {
$("#facebook-slider").mouseenter(function () {
$("#facebook-slider").animate({
right: "0px"
}, ' . $mybb->settings['fbslider_fast'] . ');
}).mouseleave(function () {
$("#facebook-slider").animate({
right: "-220px"
}, ' . $mybb->settings['fbslider_fast'] . ');
});
});
</script>
<style type="text/css">
#facebook-slider {
padding:5px;
border: solid #0170cf 3px;
background: #fff;
width: 200px;
position: fixed;
margin-top: -100px;
right: -220px;
top: 50%;
}
.slide_button_fb {
background: url(images/fb_slider_right.png);
display: block;
height: 110px;
text-indent: -9999px;
width: 30px;
position: absolute;
left: -33px;
top: 0px;
}
.zamknij {
background-position: 0 0;
}
a:focus {
outline:none;
}
div#bg-menu {
}
#bg-menu a {
color: #000;
text-decoration: none;
}
#bg-menu a:hover {
text-decoration: underline;
}</style>';
break;
default:
$js_css = '<script type="text/javascript">
$(document).ready(function () {
$("#facebook-slider").mouseenter(function () {
$("#facebook-slider").animate({
left: "0px"
}, ' . $mybb->settings['fbslider_fast'] . ');
}).mouseleave(function () {
$("#facebook-slider").animate({
left: "-220px"
}, ' . $mybb->settings['fbslider_fast'] . ');
});
});
</script>
<style type="text/css">
#facebook-slider {
padding:5px;
border: solid #0170cf 3px;
background: #fff;
width: 200px;
position: absolute;
margin-top: -100px;
left: -220px;
top: 50%;
}
.slide_button_fb {
background: url(images/fb_slider_left.png);
display: block;
height: 110px;
text-indent: -9999px;
width: 30px;
position: absolute;
right: -30px;
top: 0px;
}
.zamknij {
background-position: 0 0;
}
a:focus {
outline:none;
}
div#bg-menu {
}
#bg-menu a {
color: #000;
text-decoration: none;
}
#bg-menu a:hover {
text-decoration: underline;
}</style>';
}
}
else {
switch($mybb->settings['fbslider_page'])
{
case 1:
$js_css = '<script type="text/javascript">
$(document).ready( function() {
$(".slide_button_fb").click(function () {
xx = $(this).attr("class");
if (xx=="slide_button_fb") {
$("#facebook-slider").animate({
right: "0px"
}, ' . $mybb->settings['fbslider_fast'] . ');
} else {
$("#facebook-slider").animate({
right: "-220px"
}, ' . $mybb->settings['fbslider_fast'] . ');
}
$(".slide_button_fb").toggleClass("zamknij");
});
});</script>
<style type="text/css">
#facebook-slider {
padding:5px;
border: solid #0170cf 3px;
background: #fff;
width: 200px;
position: fixed;
margin-top: -100px;
right: -218px;
top: 50%;
}
.slide_button_fb {
background: url(images/fb_slider_right.png);
display: block;
height: 110px;
text-indent: -9999px;
width: 30px;
position: absolute;
left: -33px;
top: 0px;
}
.zamknij {
background-position: 0 0;
}
a:focus {
outline:none;
}
div#bg-menu {
}
#bg-menu a {
color: #000;
text-decoration: none;
}
#bg-menu a:hover {
text-decoration: underline;
}</style>';
break;
default:
$js_css = '<script type="text/javascript">
$(document).ready( function() {
$(".slide_button_fb").click(function () {
xx = $(this).attr("class");
if (xx=="slide_button_fb") {
$("#facebook-slider").animate({
left: "0px"
}, ' . $mybb->settings['fbslider_fast'] . ');
} else {
$("#facebook-slider").animate({
left: "-220px"
}, ' . $mybb->settings['fbslider_fast'] . ');
}
$(".slide_button_fb").toggleClass("zamknij");
});
});</script>
<style type="text/css">
#facebook-slider {
padding:5px;
border: solid #0170cf 3px;
background: #fff;
width: 200px;
position: fixed;
margin-top: -100px;
left: -220px;
top: 50%;
}
.slide_button_fb {
background: url(images/fb_slider_left.png);
display: block;
height: 110px;
text-indent: -9999px;
width: 30px;
position: absolute;
right: -30px;
top: 0px;
}
.zamknij {
background-position: 0 0;
}
a:focus {
outline:none;
}
div#bg-menu {
}
#bg-menu a {
color: #000;
text-decoration: none;
}
#bg-menu a:hover {
text-decoration: underline;
}</style>';
}
}
$html = '<div id="facebook-slider">
<div id="bg-menu">
<iframe src="//www.facebook.com/plugins/likebox.php?href=' . $mybb->settings['fbslider_url'] . '&width=200&height=290&colorscheme=light&show_faces=true&header=true&stream=false&show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:290px;" allowTransparency="true"></iframe>
</div>
<a href="#clickx" class="slide_button_fb">Menu</a>
</div>';
$page = str_replace("</body>", $js_css."</body>".$html, $page);
}
?>