Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [CSS][PHP]Nie wyświetla mi bocznego modułu - Facebook
Forum PHP.pl > Forum > Przedszkole
saviola15
Witam,

Próbuje wgrać boczny pasek według instrukcji która jest tutaj: http://newdivide.pl/jak-zrobic-wysuwany-li...acebook-slider/ Ale niestety zamiast panelu mam tylko link:

Strona gdze próbuje zainstalować skrypt:AdrianBialek.pl

Kod header.php gdzie go wkleiłem: (Ostatnie linie jest dodany kod z facebooka)
  1. <!DOCTYPE html>
  2.  
  3. <!--[if IE 9 ]><html class="ie9" <?php language_attributes(); ?>> <![endif]-->
  4. <!--[if (gt IE 9)|!(IE)]><!--><html <?php language_attributes(); ?>><!--<![endif]-->
  5.  
  6. <head>
  7.  
  8. <?php wp_head(); ?>
  9.  
  10. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  11. <script>
  12. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  13. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  14. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  15. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  16.  
  17. ga('create', 'UA-56278230-1', 'auto');
  18. ga('require', 'displayfeatures');
  19. ga('send', 'pageview');
  20.  
  21. </script>
  22.  
  23. </head>
  24.  
  25.  
  26. <body id="<?php print get_stylesheet(); ?>" <?php body_class('ct-body'); ?>>
  27.  
  28. <div class="overflow-container">
  29.  
  30. <a class="skip-content" href="#main">Skip to content</a>
  31. <header id="site-header" class="site-header" role="banner">
  32.  
  33.  
  34.  
  35.  
  36. <?php
  37.  
  38. $social_icon_setting = get_theme_mod('social_icons_display_setting');
  39.  
  40. if(
  41. // if secondary menu is set, or...
  42. (has_nav_menu( 'secondary' )) ||
  43.  
  44. // if search bar is on, or...
  45. (get_theme_mod('search_input_setting') == 'show') ||
  46.  
  47. // if the social icon setting has been entered by a user and is not 'no'
  48. ( $social_icon_setting != 'no' && $social_icon_setting != NULL) ) {
  49.  
  50. echo "<div class='top-navigation'>";
  51.  
  52. echo "<div class='container'>";
  53.  
  54. // add secondary menu if set
  55. get_template_part( 'menu', 'secondary' );
  56.  
  57. // add search input if set
  58. if(get_theme_mod('search_input_setting') == 'show'){
  59. get_search_form();
  60. }
  61. // display social icons if set
  62. if( (get_theme_mod('social_icons_display_setting') == 'header-footer') || (get_theme_mod('social_icons_display_setting') == 'header')){
  63. ct_tracks_customizer_social_icons_output();
  64. }
  65.  
  66. echo "</div>";
  67.  
  68. echo "</div>";
  69. } ?>
  70. <div class="container">
  71.  
  72. <div id="title-info" class="title-info">
  73. <?php get_template_part('logo') ?>
  74. </div>
  75.  
  76. <?php get_template_part( 'menu', 'primary' ); // adds the primary menu ?>
  77. </div><!-- .container -->
  78.  
  79. </header>
  80. <script>
  81. $(function(){
  82. $('#face-slider').hover(
  83. function(){ $('#face-slider').stop().animate({"right": "0"}, 1000); },
  84. function(){ $('#face-slider').stop().animate({"right": "-302px"}, 1000); }
  85. );
  86. });
  87. </script>
  88. <div id="main" class="main" role="main">
  89. <div id="face-slider">
  90. <div id="tab"></div>
  91. <div id="face-code">http://www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2Fadrianbialekpl%2F768915043145251%3Ffref%3Dts&width&height=290&colorscheme=light&show_faces=true&header=true&stream=false&show_border=true</div>
  92. </div>
  93.  
bahh
No ale przecież wyświetli Ci link bo nie dałeś skryptu tylko sam odnośnik
Masz dać na przykład
  1. <div id="face-code">
  2. <iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FFacebookDevelopers&amp;width&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; height:290px;" allowTransparency="true"></iframe>
  3. </div>

czyli klikasz po wypełnieniu formularza na https://developers.facebook.com/docs/plugin...es?locale=pl_PL przycisk GET CODE i to co tam otrzymasz, to wklejasz
trueblue
Use this URL in an iframe or as a link to your plugin.
Wstawiłeś link w iframe lub masz plugin, który zamienia go w button?
saviola15
dodałem w <iframe> ale niestety zamiast wysuwanego panelu z boku jest teraz pod logo sad.gif Jakieś pomysły ?
bahh
Nie chce mi się sprawdzać tego co ty masz na stronie - oto gotowy kod z iframe do konkretnego fanpage adrianbialek.pl, wszystko działa i dokładnie to wklejasz u siebie w skrypcie w takiej samej kolejności:
  1. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  2.  
  3. #face-slider{
  4. position:fixed;
  5. right:-302px;
  6. top:190px;
  7. z-index:100;
  8. }
  9. #face-slider #tab{
  10. cursor:pointer;
  11. height:110px;
  12. width:35px;
  13. float:left;
  14. background: url(http://www.newdivide.pl/demos/2013-04-06/img/facebook-slider.png) no-repeat center center;
  15. }
  16. #face-code{
  17. padding:5px;
  18. border: solid #0170cf 3px;
  19. background: #fff;
  20. float:left;
  21. width:286px;
  22. height:296px;
  23. -moz-border-radius: 0 0 0 8px;
  24. -webkit-border-radius: 0 0 0 8px;
  25. border-radius: 0 0 0 8px;
  26. }
  27.  
  28. <div id="face-slider">
  29. <div id="tab"></div>
  30. <div id="face-code">
  31. <iframe src="https://www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2Fadrianbialekpl%2F768915043145251%3Fref%3Dbr_rs&width&height=290&colorscheme=light&show_faces=true&header=true&stream=false&show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:287px; height:290px;" allowTransparency="true"></iframe>
  32. </div>
  33. </div>
  34.  
  35. $(function(){
  36. $('#face-slider').hover(
  37. function(){ $('#face-slider').stop().animate({"right": "0"}, 1000); } ,
  38. function(){ $('#face-slider').stop().animate({"right": "-302px"}, 1000); }
  39. );
  40. });
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.