This topic has 19 replies, 3 voices, and was last updated 9 years by bruce7075.

  • Author
  • #80533
     bruce7075
    Participant

    Hi,

    I ever asked for help about how to add social share for each activity stream in the Themeforest comment section. I get the below code:

    add_action(‘bp_activity_entry_meta’, ‘kleo_social_activity_share’, 999);
    function kleo_social_activity_share() {
    ?>
    <span class=”kleo-social-activity-share <?php echo bp_get_activity_type(); ?>”>
    &u=<?php echo bp_get_activity_thread_permalink(); ?>”><i class=”icon-facebook” />
    &url=<?php echo bp_get_activity_thread_permalink(); ?>”><i class=”icon-twitter” />
    “><i class=”icon-gplus” />
    <?php echo bp_get_activity_thread_permalink(); ?>”><i class=”icon-mail” />
    </span>
    <?php
    }

    However, after I add the above code to functions.php, it has below issues.

    1. Page layout. I use left and right sidebars layout. Now these 2 sidebars are overlapped with the central content area.

    2. Social icons. All the social icons show twice. One is clickable, the other is not clickable. Also, there are social icons located in the left sidebar area.

    3. After I click the facebook icon, it shows the text of Contact Form (theme option), not the activity stream contents.

    Please kindly help. Thank you very much in advance!!!

    #80799
     Laura
    Moderator

    Hello, will assign the ticket to a higher support lever who can help and advise you in your query.
    Thanks! 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #83118
     bruce7075
    Participant

    Is there any good news?

    #83209
     Radu
    Moderator

    Hi,

    Can you provide URL and admin credentials ?

    Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #83212
     bruce7075
    Participant

    Hi,

    Please kindly advise to what capabilities you would need. Thanks!

    #83238
     Radu
    Moderator

    Hi,

    I need wp administrator credentials and FTP

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #83306
     bruce7075
    Participant
    This reply has been set as private.
    #83552
     Radu
    Moderator

    Hi,

    The ftp details are correct but the Wp details aren’t correct, can you check please ?

    Meanwhile add this code to kleo-child/functions.php

    COPY CODE
    
    // add activity item share icons
    add_action('bp_activity_entry_meta', 'kleo_social_activity_share', 999);
    function kleo_social_activity_share() {
        ?>
        <span class="kleo-social-activity-share <?php echo bp_get_activity_type(); ?>">
            <a class="kleo-social-activity-share-item facebook" onclick="window.open(this.href,'Share','width=600,height=400'); return false;" href="https://www.facebook.com/sharer/sharer.php?t=<?php echo bp_get_activity_feed_item_title(); ?>&u=<?php echo bp_get_activity_thread_permalink(); ?>"><i class="icon-facebook"></i></a>
            <a class="kleo-social-activity-share-item twitter" onclick="window.open(this.href,'Share','width=600,height=400'); return false;" href="http://twitter.com/share?text=<?php echo bp_get_activity_feed_item_title(); ?>&url=<?php echo bp_get_activity_thread_permalink(); ?>"><i class="icon-twitter"></i></a>
            <a class="kleo-social-activity-share-item google" onclick="window.open(this.href,'Share','width=600,height=400'); return false;" href="https://plus.google.com/share?url=<?php echo bp_get_activity_thread_permalink(); ?>"><i class="icon-gplus"></i></a>
            <a class="kleo-social-activity-share-item mail" href="mailto:?body=<?php echo bp_get_activity_feed_item_title(); ?> <?php echo bp_get_activity_thread_permalink(); ?>"><i class="icon-mail"></i></a>
        </span>
        <?php
    }
    

    Let me know if it works.

    Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #83565
     bruce7075
    Participant
    This reply has been set as private.
    #83744
     Radu
    Moderator

    Hi,

    I’ve added the social incos in activity stream ,take a look.

    Best Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #83748
     bruce7075
    Participant

    Hi Radu,

    Thanks SO MUCH, indeed!

    However, I just share 2 stream activities with Facebook. It shows only text, the image is not missing (these 2 stream activities have images). Is it normal? Is it possible to share the image as well?

    Thank you so much for your very kind help on my issue. Thank you!

    #83749
     bruce7075
    Participant

    Correct: the images are missing

    #83779
     Radu
    Moderator

    Hi,

    I will take a look again today or tomorrow, don’t change the credentials,

    I will get back.

    Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #83781
     bruce7075
    Participant

    Sure, no problem! Very much appreciated.

    #83868
     Radu
    Moderator

    Hi,

    Just i’ve looked again and the script works correctly, the issue with images on facebook is not coming from theme or from my modification, it seems to be a facebook related issue.

    Just share that activity post on google plus and see the google parse correct image for that certain activity.

    Regards

    RAdu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #83973
     bruce7075
    Participant

    Hi Radu,

    Thank you so much for your very kind help on this case! Thank you!

    By the way, is it possible to add the icon ‘heart’ and the numbers as well? Similar to that used at post/page.

    Thank you very much!

    #84246
     Radu
    Moderator

    Hi,

    This is not really possible yet, the heart feature doesn’t have possibility to view who have liked the post, i suggest you to search on google for a plugin that allows you to add likes for each activity.

    Best Regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #85038
     bruce7075
    Participant

    Hi,

    We ckeck the Facebook share and find that the content it shares does not match the one intended. Please kindly help. Thank you very much!

    #85518
     Radu
    Moderator

    Hi,

    Just i’ve shared this post on facebook and it shows ok image, title and content it belongs to this post ( https://ichibichi.com.tw/%E8%8C%83%E7%89%B9%E5%96%9C9%E8%99%9F%E5%BA%97/ )

    Make sure that is not a caching issue.

    Regards

    RAdu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #85519
     bruce7075
    Participant

    Hi,

    Yes, it’s indeed caching issue. It’s fixed now. Truly sorry that I forgot to change the ticket status as resolved.

Viewing 20 posts - 1 through 20 (of 20 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?