Author Topic: [SOLVED] how to add whatsapp share on the whole site in Osclass?  (Read 3036 times)

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

Lucasdelton

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • classmega
how to add whatsapp share on the whole site?
My website: www.classmega.com
« Last Edit: September 21, 2018, 05:20:18 AM by Administrator »



Osclass Developer

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: how to add whatsapp share on the whole site?
« Reply #1 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"> .

Osclass Support Forums - Rackons.in

Re: how to add whatsapp share on the whole site?
« Reply #1 on: September 19, 2018, 05:32:47 AM »

Lucasdelton

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • classmega
Re: how to add whatsapp share on the whole site?
« Reply #2 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

Osclass Developer

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: how to add whatsapp share on the whole site?
« Reply #3 on: September 20, 2018, 07:36:01 AM »
So you want your whatsapp icon fixed in sidebar ?

Osclass Developer

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: how to add whatsapp share on the whole site?
« Reply #4 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;
}

Lucasdelton

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • classmega
Re: how to add whatsapp share on the whole site?
« Reply #5 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

Osclass Developer

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: how to add whatsapp share on the whole site?
« Reply #6 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.

Lucasdelton

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • classmega
Re: how to add whatsapp share on the whole site?
« Reply #7 on: September 20, 2018, 08:20:33 AM »
I want it to appear this way only for mobile version

Marked as best answer by admin on September 19, 2018, 10:58:24 PM

Osclass Developer

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: how to add whatsapp share on the whole site?
« Reply #8 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>


Lucasdelton

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • classmega
Re: how to add whatsapp share on the whole site?
« Reply #9 on: September 20, 2018, 09:26:13 AM »
ALREADY, THANK YOU VERY MUCH

Osclass Support Forums - Rackons.in

Re: how to add whatsapp share on the whole site?
« Reply #9 on: September 20, 2018, 09:26:13 AM »