Advertisement
jcolding

fgsdfgsdfg

May 11th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <!-- INFOSPACE START-->
  4. <?php
  5.  
  6. require_once 'class.InfoSpaceRequestSigner.php';
  7. $token = 'yVJhbD-yaUqjo-6hZ0gTfg2';
  8. $signer = new InfoSpaceRequestSigner($token);
  9. $_ip = urlencode($_SERVER['REMOTE_ADDR']);
  10. $_ua = urlencode($_SERVER['HTTP_USER_AGENT']);
  11.  
  12. $signedUrl = str_replace('&signature=', '', $signer->signUrl(''));
  13.  
  14. $_click_tracking = "http://partner.clickserver.com/ClickHandler?parterCustomParamter=value1&secondParameter=value2&httpheaders=User-Agent%3d" . $_ua . "&enduserip=" . $_ip;
  15.  
  16. $search_URL = '/?s=' . str_replace(' ', '+', $_GET['s']);
  17.  
  18.  
  19. ?>
  20. <?php
  21.  
  22. $is = new InfoSpaceRequestSigner( $token );
  23. $signature = $is->getSignature( $queryTerm );
  24.  
  25. ?>
  26.  
  27. <!-- INFOSPACE END-->
  28. <div class="archive-wrap">
  29. <div class="archive-head clearfix">
  30. <div class="archive-title clearfix">
  31.  
  32. <h1><?php printf( __( 'Search Results for "%s"', 'abomb' ), get_search_query() ); ?></h1>
  33. <a class="rss-link" href="<?php echo esc_url(get_search_feed_link( get_search_query() )); ?>" target="_blank"><i class="fa fa-rss deskpadview"></i></a>
  34. </div>
  35. </div>
  36.  
  37. <div class="archive-search clearfix">
  38. <p><?php echo __("If you're not happy with the results, please do another search.","abomb"); ?></p>
  39. <?php get_search_form(); ?>
  40. </div>
  41.  
  42. <?php
  43. $post_loop_count = 1;
  44. $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
  45. if($page > 1) $post_loop_count = ((int) ($page - 1) * (int) get_query_var('posts_per_page')) +1;
  46.  
  47. ?>
  48. <div class="block">
  49. <?php if (have_posts()) : ?>
  50. <?php while (have_posts()) : the_post(); ?>
  51. <div class="search-post clearfix" itemscope="itemscope" itemtype="<?php echo rd_ssl(); ?>://schema.org/BlogPosting">
  52. <span class="search-number el-left"><?php echo $post_loop_count; ?></span>
  53. <div class="entry-header">
  54. <?php echo content_title(); ?>
  55. <div class="entry-meta">
  56. <?php echo __('By','abomb'); ?> <span class="meta-author"><?php echo the_author_posts_link(); ?></span> - <?php echo content_meta_complete_date(); ?>
  57. </div>
  58. </div>
  59. <div class="entry-content">
  60. <?php echo word_count(get_the_excerpt(),40); ?>
  61. </div>
  62. </div>
  63. <?php $post_loop_count++; ?>
  64. <?php endwhile; wp_reset_postdata(); ?>
  65. <?php rd_pagination(); ?>
  66.  
  67.  
  68. <!-- INFOSPACE -->
  69. <div id="topResults"></div>
  70. <div id="bottomResults"></div>
  71. <div id="relatedResults"></div>
  72. <div id="mainResults"></div>
  73.  
  74. <script type="text/javascript">
  75. insp.search.doSearch({
  76. query: '<?php echo $_GET['q']; ?>',
  77. accessId: 'find.find8',
  78. signature: '<?php echo $signedUrl; ?>',
  79. category: "web",
  80. page: 1,
  81. googleAdLinesCount: 3,
  82. containers: {
  83. "top": {id:"topResults"},
  84. "main": {id:"mainResults"},
  85. "bottom": {id:"bottomResults"},
  86. "related": {id:"relatedResults"}
  87. },
  88. clickTrackingUrl: '<?php echo $_click_tracking; ?>',
  89. searchUrlFormat: "/?s={searchTerm}",
  90. onComplete: function(complete) {
  91. },
  92. onError: function(error) {
  93. }
  94. });
  95. </script>
  96. <!-- INFOSPACE END-->
  97.  
  98.  
  99. <?php else: ?>
  100. <div class="block search-post clearfix">
  101. <div class="search-number el-left"><i class="fa fa-exclamation"></i></div>
  102. <div class="entry-content no-post">
  103. <?php echo __('Sorry, no posts matched your criteria. Please try another search.','abomb'); ?>
  104. </div>
  105. </div>
  106. <?php endif; ?>
  107. </div>
  108. </div>
  109. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement