Osclass Support Forums - Rackons.in

Other Osclass Support => Other Questions Related to Osclass => Topic started by: Lucasdelton on September 19, 2018, 05:21:00 AM

Title: [SOLVED] how to add whatsapp share on the whole site in Osclass?
Post by: Lucasdelton on September 19, 2018, 05:21:00 AM
how to add whatsapp share on the whole site?
My website: www.classmega.com
Title: Re: how to add whatsapp share on the whole site?
Post by: Osclass Developer on September 19, 2018, 05:32:47 AM
Hello @Lucasdelton

Please below steps then you can use whatsapp share option for whole site.

Step 1) Open oc-content/themes/CURRENT_THEME/footer.php

Quote

<?php
       
          if(osc_is_ad_page()) {
            $rac_url = osc_item_url();
            $rac_title = osc_item_title();
          } else {
            $rac_url = osc_base_url();
            $rac_title = meta_title();
          }
        ?>

Step 2 : put this code with above code.
Quote
<a style="#25D366" href="whatsapp://send?text=<?php echo $rac_url; ?>" data-action="share/whatsapp/share"><i class="fa fa-whatsapp"></i></a>

Then check your website and above both code should put after
Code: [Select]
<div id="footer"> .
Title: Re: how to add whatsapp share on the whole site?
Post by: Lucasdelton on September 20, 2018, 07:31:02 AM
 whatsapp appears but a small icon in the corner.
it does not appear along with the other sharing networks
Title: Re: how to add whatsapp share on the whole site?
Post by: Osclass Developer on September 20, 2018, 07:36:01 AM
So you want your whatsapp icon fixed in sidebar ?
Title: Re: how to add whatsapp share on the whole site?
Post by: Osclass Developer on September 20, 2018, 07:42:41 AM
If you want fixed whatsapp icon in sidebar so use below code  :


Step 1 : ut below code in footer.php
Code: [Select]
<div class="fsi">
<ul><li>
<?php
       
          
if(osc_is_ad_page()) {
            
$rac_url osc_item_url();
            
$rac_title osc_item_title();
          } else {
            
$rac_url osc_base_url();
            
$rac_title meta_title();
          }
        
?>


<a style="#25D366" href="whatsapp://send?text=<?php echo $rac_url?>" data-action="share/whatsapp/share"><i class="fa fa-whatsapp"></i></a>
</li>
    </ul>

</div>




Step 2 : Open your style.css and put below code in style.css

Code: [Select]
.fsi ul {
 font-family: "Quicksand", sans-serif;
  font-size: 1em;
  line-height: 1.6;
  font-weight: 600;
   margin-left: -30px;
  list-style: none;
  position: absolute;
  top: 50%;
  left: 0%;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
}
.fsi ul li a {
  display: block;
  margin-left: -2px;
  height: 60px;
  width: 60px;
  border-radius: 0 25px 25px 0;
  border: 2px solid #000;
  background: #FFF;
  margin-bottom: 1em;
  -webkit-transition: all .4s ease;
  transition: all .4s ease;
  color: #2980b9;
  text-decoration: none;
  line-height: 60px;
  position: relative;
}
.fsi ul li a:hover {
  cursor: pointer;
  width: 180px;
  color: #fff;
}
Title: Re: how to add whatsapp share on the whole site?
Post by: Lucasdelton on September 20, 2018, 07:50:50 AM
I want whatsapp to appear along with the other partner networks as it appears on the item page in the mobile version
Title: Re: how to add whatsapp share on the whole site?
Post by: Osclass Developer on September 20, 2018, 07:53:58 AM
I want whatsapp to appear along with the other partner networks as it appears on the item page in the mobile version

So your other social icons display in mobile only with whatsapp. and you tell us for desktop and mobile for both. so other social media is not display in desktop mode.

So where we will use your whatsapp with other social network. Please provide screenshot for that. then we will understand better.
Title: Re: how to add whatsapp share on the whole site?
Post by: Lucasdelton on September 20, 2018, 08:20:33 AM
I want it to appear this way only for mobile version
Title: Re: how to add whatsapp share on the whole site?
Post by: Osclass Developer on September 20, 2018, 08:23:41 AM
Code: [Select]
<?php if(osc_is_ad_page()) { ?>
          <span class="whatsapp"><a href="whatsapp://send?text=<?php echo $share_url?>" data-action="share/whatsapp/share"><i class="fa fa-whatsapp"></i></a></span>
        <?php ?>

search above code in footer.php and replace with our below code.

Code: [Select]
<?php
       
          
if(osc_is_ad_page()) {
            
$rac_url osc_item_url();
            
$rac_title osc_item_title();
          } else {
            
$rac_url osc_base_url();
            
$rac_title meta_title();
          }
        
?>
https://forums.rackons.in/Themes/default/images/bbc/code.gif

  <span class="whatsapp"><a href="whatsapp://send?text=<?php echo $rac_url?>" data-action="share/whatsapp/share"><i class="fa fa-whatsapp"></i></a></span>

Title: Re: how to add whatsapp share on the whole site?
Post by: Lucasdelton on September 20, 2018, 09:26:13 AM
ALREADY, THANK YOU VERY MUCH