Witam, poszukuje pomocy przy zmianie pliku w stylu Wordpressa aby wyskakiwała funkacja do polubienia i usostępnienia strony jak w linku
http://fust.pl/?videos=kuba-wojewodzki-atakuje-reportera
Znalazłem część kodu na tej stronie który ma być zmieniony w pliku single_videos
oto cały plik, zaznaczone jest w którym miejscu wkleiłem kod, nie wiem jaki jest problem :/
  1. <?php get_header(); ?>
  2. <?php
  3. $views_count = get_post_meta($post->ID,'views_count',true);
  4. update_post_meta($post->ID,'views_count',$views_count+1);
  5. ?>
  6.  
  7. <?php //if ( get_option( 'ptthemes_breadcrumbs' )) { yoast_breadcrumb('<div class="breadcrumb">','</div>'); } ?>
  8. <h1 class="single_head"><?php the_title(); ?></h1>
  9.  
  10.  
  11. <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/library/js/mootools.js"></script>
  12. <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/library/js/slimbox.js"></script>
  13.  
  14. <!-- POCZĄTEK KODU KTÓRY WKLEIŁEM -->
  15.  
  16.  
  17.  
  18. <div class="likethis">
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. </div>
  27.  
  28.  
  29.  
  30.  
  31.  
  32. <div id="content" class="clearfix" >
  33.  
  34. <div class="single_post">
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41. <div id="post-1604" class="posts post_spacer">
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. <div class="video_main">
  53.  
  54.  
  55.  
  56.  
  57.  
  58. <div id="fb-root"></div>
  59.  
  60. <script type="text/javascript">
  61.  
  62. $(window).load(function(){
  63.  
  64. FB.init({
  65.  
  66. appId: '407053639343684',
  67.  
  68. status: true,
  69.  
  70. cookie: true,
  71.  
  72. xfbml: true,
  73.  
  74. oauth: true
  75.  
  76. });
  77.  
  78. });
  79.  
  80. </script>
  81.  
  82. <div style="display:none">string(11) "utpxjgabowQ"
  83. </div>
  84.  
  85. <div id="movieDetail">
  86.  
  87. <div id="shareContainer" style="background: url('http://img.youtube.com/vi/utpxjgabowQ/0.jpg');">
  88.  
  89. <div id="opacityBox" >
  90.  
  91. <b>Aby obejrzeć, kliknij:</b>
  92.  
  93. <div class="squareBox">
  94.  
  95. <fb:like href="http://www.facebook.com/Motoryzacjaa?ref=hl" class="guzik" send="false" layout="button_count" width="80" show_faces="false"></fb:like>
  96.  
  97. </div>
  98.  
  99. <div class="roundBox">
  100.  
  101. <a href="" onclick="return postFeedOnFb();" title="Udostępnij wiadomość na Facebooku" id="postFeed" class="fbPostFeedBtn"><span>Udostępnij</span></a>
  102.  
  103. </div>
  104.  
  105. <!-- Facebook share button Start -->
  106.  
  107. <b:if cond='data:blog.pageType != &quot;static_page&quot;'>
  108.  
  109. <div style='float:left;padding:5px 5px 5px 0;' class="position">
  110.  
  111. <a expr:share_url='data:post.url' name='fb_share' type='button_count' >Share</a><script src='http://static.ak.fbcdn.net/connect.php/js/FB.Share' type='text/javascript'></script>
  112.  
  113. </div>
  114.  
  115. </b:if>
  116.  
  117. <!-- Facebook share button End -->
  118.  
  119.  
  120.  
  121. </div>
  122.  
  123. </div>
  124.  
  125. <script type="text/javascript">
  126.  
  127. var postFeedOnFb = function() {
  128.  
  129. FB.ui(
  130.  
  131. {
  132.  
  133. method: 'feed',
  134.  
  135. name: "Kuba Wojewódzki atakuje reportera",
  136.  
  137. link: 'http://fust.pl/?videos=kuba-wojewodzki-atakuje-reportera',
  138.  
  139. picture: 'http://img.youtube.com/vi/utpxjgabowQ/0.jpg',
  140.  
  141. caption: ':)',
  142.  
  143. description: ''
  144.  
  145. }, function(response) {
  146.  
  147. if(response && response.post_id) {
  148.  
  149. $('#shareContainer').hide();
  150.  
  151. $('#youtubeMovie').show();
  152.  
  153. $.ajax({
  154.  
  155. url: '/Statystyka.html',
  156.  
  157. dataType: 'json',
  158.  
  159. type: 'POST',
  160.  
  161. data: {
  162.  
  163. postId: response.post_id,
  164.  
  165. movieId: 753 }
  166.  
  167. });
  168.  
  169. } else {
  170.  
  171. alert('Aby uzyskać dostęp do strony, należy opublikować wiadomość!');
  172.  
  173. }
  174.  
  175. });
  176.  
  177. return false;
  178.  
  179. };
  180.  
  181.  
  182.  
  183. $(window).load(function(){
  184.  
  185. $('#shareBox li').show();
  186.  
  187. });
  188.  
  189. </script>
  190.  
  191. <!-- KONIEC KODU KTÓRY WKLEIŁEM -->
  192.  
  193. <div class="likethis">
  194.  
  195. <?php if ( get_option('ptthemes_tweet_button') ) { ?>
  196. <a href="http://twitter.com/share" class="twitter-share-button">Tweet</a>
  197. <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
  198.  
  199. <?php } ?>
  200.  
  201. <?php if ( get_option('ptthemes_facebook_button') ) { ?>
  202.  
  203. <iframe class="facebook" src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=290&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:290px; height:24px"></iframe>
  204. <?php } ?>
  205. </div>
  206.  
  207.  
  208. <div id="content" class="clearfix" >
  209. <div class="single_post">
  210. <?php if(have_posts()) : ?>
  211. <?php $post_images = bdw_get_images($post->ID,'large');?>
  212. <?php while(have_posts()) : the_post() ?>
  213.  
  214. <div id="post-<?php the_ID(); ?>" class="posts post_spacer">
  215.  
  216.  
  217.  
  218.  
  219. <?php if(get_post_meta($post->ID,'video',true)){?>
  220. <div class="video_main">
  221. <?php echo get_post_meta($post->ID,'video',true);?>
  222. </div>
  223.  
  224. <?php }?>
  225.  
  226.  
  227. <div class="bookmark_links">
  228. <?php if(function_exists('the_ratings')) { the_ratings(); } ?>
  229.  
  230.  
  231. <?php if(get_post_meta($post->ID,'views_count',true)){?>
  232. <span class="post-views" >
  233. Total Views : <?php echo get_post_meta($post->ID,'views_count',true);?>
  234. </span>
  235. <?php }?>
  236.  
  237.  
  238. <?php if(get_post_meta($post->ID,'twitter',true)){?>
  239. <a href="<?php echo get_post_meta($post->ID,'twitter',true);?>" target="_blank" class="i_twitter"> <?php _e('Twitter');?> </a>
  240. <?php }?>
  241.  
  242. <?php if(get_post_meta($post->ID,'facebook',true)){?>
  243. <a href=" <?php echo get_post_meta($post->ID,'facebook',true);?>" target="_blank" class="i_facebook"> <?php _e('Facebook');?> </a>
  244. <?php }?>
  245.  
  246. <div class="share">
  247. <div class="addthis_toolbox addthis_default_style">
  248. <a href="http://www.addthis.com/bookmark.php?v=250&amp;username=xa-4c873bb26489d97f" class="addthis_button_compact sharethis"><?php _e('Share Video');?></a>
  249. </div>
  250. <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4c873bb26489d97f"></script>
  251. </div>
  252.  
  253.  
  254. </div>
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261. </div> <!-- post #end -->
  262.  
  263.  
  264. <div class="pos_navigation clearfix">
  265. <div class="post_left fl"><?php previous_post_link('%link','&laquo; '.__('Previous')) ?></div>
  266. <div class="post_right fr"><?php next_post_link('%link',__('Next').' &raquo;') ?></div>
  267. </div>
  268. </div> <!-- single post content #end -->
  269. <?php get_related_posts($post); ?>
  270. <?php endwhile; ?>
  271. <?php endif; ?>
  272.  
  273. <div id="comments" class="clearfix"> <?php comments_template(); ?></div>
  274.  
  275.  
  276. </div> <!-- content #end -->
  277.  
  278.  
  279.  
  280. <div id="sidebar" class="sidebar_bnone">
  281. <h4> About Video </h4>
  282. <p class="uploaded_date">Uploaded on <?php the_time('j F') ?>, <?php the_time('Y') ?> </p>
  283.  
  284. <?php the_content(); ?>
  285.  
  286.  
  287. <?php if(get_post_meta($post->ID,'time',true)){?>
  288. <p class="common_text"><span> Length :</span> <?php echo get_post_meta($post->ID,'time',true);?> </p>
  289. <?php }?>
  290.  
  291.  
  292. <?php the_taxonomies(array('before'=>'<p class="common_text">','sep'=>'<p></p><p class="common_text">','after'=>'</p> ')); ?>
  293. <div class="single_sidebar">
  294. <?php dynamic_sidebar(8); ?>
  295. </div>
  296.  
  297. </div> <!-- sidebar right-->
  298.  
  299. <?php get_footer(); ?>