-
Author
-
October 3, 2015 at 09:08 #80533bruce7075Participant
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!!!
October 4, 2015 at 20:23 #80799LauraModeratorHello, 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 solutionLaura 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 🙂
October 19, 2015 at 19:06 #83209RaduModeratorHi,
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 solutionOctober 19, 2015 at 19:14 #83212bruce7075ParticipantHi,
Please kindly advise to what capabilities you would need. Thanks!
October 19, 2015 at 21:30 #83238RaduModeratorHi,
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 solutionOctober 21, 2015 at 17:38 #83552RaduModeratorHi,
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 solutionOctober 22, 2015 at 17:07 #83744RaduModeratorHi,
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 solutionOctober 22, 2015 at 17:36 #83748bruce7075ParticipantHi 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!
October 22, 2015 at 19:48 #83779RaduModeratorHi,
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 solutionOctober 23, 2015 at 16:03 #83868RaduModeratorHi,
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 solutionOctober 24, 2015 at 10:37 #83973bruce7075ParticipantHi 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!
October 26, 2015 at 15:31 #84246RaduModeratorHi,
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 solutionOctober 30, 2015 at 10:57 #85038bruce7075ParticipantHi,
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!
November 3, 2015 at 18:34 #85518RaduModeratorHi,
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 -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.