This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Izzyboi

  • ***
  • 59 posts
Hello Osclass users
Please how do I replace osclass default search box with google custom search box

Here is the code I need to  edit
Code: [Select]
<div id="home-search">
  <div class="inside">
    <div class="cover"></div>
    <div class="slide-wrap">
      <div class="slide"></div>
    </div>


    <div class="box">
      <h2><?php _e('Search, Sell & Buy''beta'); ?></h2>
      <h3><span><?php _e('Free classifieds''beta'); ?></span> <?php _e('in Nigeria''beta'); ?> </h3>
      <h4><?php _e('aMart is a free classifieds website. Our aim is to empower every person in Nigeria to connect with buyers and sellers online in a safe and secure environment. ''beta'); ?></h4>

      <div class="wrap">
        <form action="<?php echo osc_base_url(true); ?>" method="GET" class="nocsrf" id="home-form" >
          <input type="hidden" name="page" value="search" />
          <input type="hidden" name="sCountry" id="sCountry" value="<?php echo Params::getParam('sCountry'); ?>"/>
          <input type="hidden" name="sRegion" id="sRegion" value="<?php echo Params::getParam('sRegion'); ?>"/>
          <input type="hidden" name="sCity" id="sCity" value="<?php echo Params::getParam('sCity'); ?>"/>

          <div class="line1">
            <div class="col1">
              <div class="box">
                <div id="query-picker" class="query-picker">
                  <input type="text" name="sPattern" class="pattern" placeholder="<?php _e('What are you looking for?''beta'); ?>" value="<?php echo Params::getParam('sPattern'); ?>" autocomplete="off"/>

                  <div class="shower-wrap">
                    <div class="sho

« Last Edit: April 04, 2020, 01:03:29 PM by Izzyboi »

*

MB Themes

@Izzyboi
You must follow google documentation, but it will not work well I think
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Izzyboi

  • ***
  • 59 posts
@Izzyboi
You must follow google documentation, but it will not work well I think

It will, I've seen a site using it
This is the code from google, how do I integrate it with the above php code
Code: [Select]
<script async src="https://cse.google.com/cse.js?cx=001353264572073540476:6qw7xmzm0xv"></script>
<div class="gcse-search"></div>

Marked as best answer by frosticek on March 18, 2020, 01:35:39 PM
*

MB Themes

@Izzyboi
You put it into main.php / inc.search.php and replace current search form.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Izzyboi

  • ***
  • 59 posts
Done
Thanks