Dołącz do zespołu ekspertów! Backend lub Frontend Developer?

Sprawdź najnowsze oferty pracy naszego partnera - 8lines.io!

FB Slider

Założony przez  Karol3000.

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/

<?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'] . '&amp;width=200&amp;height=290&amp;colorscheme=light&amp;show_faces=true&amp;header=true&amp;stream=false&amp;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);
}
?>
Użyj tego: https://developers.facebook.com/docs/plu...age-plugin
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna.
Nie bardzo kumam o co tutaj chodzi i gdzie co i jak powklejac
Czego nie rozumiesz? Do Facebook Page URL wklejasz adres do fanpage i dajesz get code, chyba, że chcesz coś jeszcze zmienić.
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna.
"Do Facebook Page URL wklejasz adres do fanpage i dajesz get code," właśnie tego.
Do headerinclude nad {$stylesheets} dodaj: 
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/pl_PL/sdk.js#xfbml=1&version=v2.8";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

a w miejsce, gdzie ma być wyświetlany fb: 
<div class="fb-page" data-href="https://www.facebook.com/VSTransSud/" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/VSTransSud/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/VSTransSud/">Trans Sud Wirtualna Spedycja</a></blockquote></div>
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna.
<html>
<
head>
<
title>{$mybb->settings['bbname']}</title>
{
$headerinclude}
<
script type="text/javascript">
<!--
    
lang.no_new_posts "{$lang->no_new_posts}";
    
lang.click_mark_read "{$lang->click_mark_read}";
// -->
</script>
</
head>
<
body id="forums">
    {
$header}
<
div id="fb-root"></div>
<
script>(function(dsid) {
  var 
jsfjs d.getElementsByTagName(s)[0];
  if (
d.getElementById(id)) return;
  
js d.createElement(s); js.id id;
  
js.src "//connect.facebook.net/pl_PL/sdk.js#xfbml=1&version=v2.8";
  
fjs.parentNode.insertBefore(jsfjs);
}(
document'script''facebook-jssdk'));</script>
{
$ps_header_index}
{
$changfcb} <br />
https://www.facebook.com/VSTransSud
    
<class="clickedbuttons"><class="fa fa-angle-left"></i></a>
    <
div class="forums">
        
{
$forums}
{
$ps_footer_index}
    </
div>
    <
div class="sidebar">
        <
table class="tborder" border="0" cellpadding="5" cellspacing="0"><tbody>
            <
tr><td class="thead" colspan="1">TeamSpeak 3</td></tr>
            <
tr><td class="trow1">Firmowy teamspeak87.98.234.128 .</td></tr>
        </
tbody></table>
        
        
    <
br />
        
        <
table class="tborder" border="0" cellpadding="5" cellspacing="0"><tbody>
            <
tr><td class="thead" colspan="1">Fanpage</td></tr>
            <
tr><td class="trow1">/.</td></tr>
        </
tbody></table>
        
    <
br />

        <
table class="tborder" border="0" cellpadding="5" cellspacing="0"><tbody>
            <
tr><td class="thead" colspan="1">Malowanie</td></tr>
            <
tr><td class="trow1">[img]http://i.imgur.com/Nrr29c1.jpg[/img]</td></tr>
            
</tbody></table>
    </
div>
    <
br class="clear" />
    {
$boardstats}
    <
br class="clear" />
    {
$footer}
</
body>
</
html

W ten sposób?
(12.04.2017, 15:40)Conors napisał(a): Do headerinclude nad {$stylesheets} dodaj:
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/pl_PL/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

a ty to wstawiłeś do index
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna.
Gdzie to "headerinclude" się znajduje?
Niezgrupowane szablony
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna.
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<
link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<
meta http-equiv="Content-Type" content="text/html; charset={$charset}/>
<
meta http-equiv="Content-Script-Type" content="text/javascript" />
<
script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.js?ver=1804"></script>
<
script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.plugins.min.js?ver=1804"></script>
<
script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1804"></script>
<
link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" />
<
script type="text/javascript" src="{$mybb->settings['bburl']}/images/darkv1/func.js"></script>
<
div id="fb-root"></div>
<
script>(function(dsid) {
  var 
jsfjs d.getElementsByTagName(s)[0];
  if (
d.getElementById(id)) return;
  
js d.createElement(s); js.id id;
  
js.src "//connect.facebook.net/pl_PL/sdk.js#xfbml=1&version=v2.8";
  
fjs.parentNode.insertBefore(jsfjs);
}(
document'script''facebook-jssdk'));</script>

<
div class="fb-page" data-href="https://www.facebook.com/VSTransSud/" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/VSTransSud/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/VSTransSud/">Trans Sud Wirtualna Spedycja</a></blockquote></div>

{
$stylesheets}
<
script type="text/javascript">
    
lang.unknown_error "{$lang->unknown_error}";

    
lang.select2_match "{$lang->select2_match}";
    
lang.select2_matches "{$lang->select2_matches}";
    
lang.select2_nomatches "{$lang->select2_nomatches}";
    
lang.select2_inputtooshort_single "{$lang->select2_inputtooshort_single}";
    
lang.select2_inputtooshort_plural "{$lang->select2_inputtooshort_plural}";
    
lang.select2_inputtoolong_single "{$lang->select2_inputtoolong_single}";
    
lang.select2_inputtoolong_plural "{$lang->select2_inputtoolong_plural}";
    
lang.select2_selectiontoobig_single "{$lang->select2_selectiontoobig_single}";
    
lang.select2_selectiontoobig_plural "{$lang->select2_selectiontoobig_plural}";
    
lang.select2_loadmore "{$lang->select2_loadmore}";
    
lang.select2_searching "{$lang->select2_searching}";

    var 
cookieDomain "{$mybb->settings['cookiedomain']}";
    var 
cookiePath "{$mybb->settings['cookiepath']}";
    var 
cookiePrefix "{$mybb->settings['cookieprefix']}";
    var 
deleteevent_confirm "{$lang->deleteevent_confirm}";
    var 
removeattach_confirm "{$lang->removeattach_confirm}";
    var 
loading_text '{$lang->ajax_loading}';
    var 
saving_changes '{$lang->saving_changes}';
    var 
use_xmlhttprequest "{$mybb->settings['use_xmlhttprequest']}";
    var 
my_post_key "{$mybb->post_code}";
    var 
rootpath "{$mybb->settings['bburl']}";
    var 
imagepath "{$theme['imgdir']}";
      var 
yes_confirm "{$lang->yes}";
    var 
no_confirm "{$lang->no}";
    var 
MyBBEditor null;
    var 
spinner_image "{$theme['imgdir']}/spinner.gif";
    var 
spinner "<img src='" spinner_image +"' alt='' />";
    var 
modal_zindex 9999;
</
script

Tak?
Czy ty czytasz ze zrozumieniem? Kazałem dodać ci tylko to do headerinclude:
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/pl_PL/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
a ty dodałeś to:

<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/pl_PL/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-page" data-href="https://www.facebook.com/VSTransSud/" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/VSTransSud/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/VSTransSud/">Trans Sud Wirtualna Spedycja</a></blockquote></div>

widzisz różnice?

<div class="fb-page" data-href="https://www.facebook.com/VSTransSud/" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/VSTransSud/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/VSTransSud/">Trans Sud Wirtualna Spedycja</a></blockquote></div>
dodaj do index, tam gdzie ma być fb...
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna.



Użytkownicy przeglądający ten wątek:

2 gości