Support Forum

Share this plugin tweaking 🙂

CC critterGuide.ca
critterGuide.ca
Member

hey guys 🙂

I have integrated social networking to my forum using a social network login plugin that works wonderfully with the forum and i installed the Share this plugin for the forum.

the share this plugin does not show the post when you share something but uses the topmost image and text on my page… and i do not want these to be in there. can i change the saring image and text manualy? 

or can i somehow get it to take the title of the post and first couple of rows? and have my logo as a picture? it does not look good at all as of now..

here is a shared post from the website: (the most recent one)

https://www.facebook.com/aquariumjunkiescanada/?fref=nf

38 Answers

New Answer

CC critterGuide.ca
critterGuide.ca
Member

  i can probably just overwrite the

$url, $title, $summary

variables inside 

sp_share_this_do_sharing

as all the button use the same ones but i dont see how to change the image and i dont want to tweak this without loosing it next update 🙂

IK Ike
Ike
Member

Might be worth taking a look at Forum > Components > SEO and enabling open graph support. Also, you can set a forum level featured image which can be used if no other page specific image options exist – check out the SEO panel help popup for more info..

MP Mr Papa
Mr Papa
Member

not exactly sure what you want to do, but based on what you have written, I believe you should be able to hook into:

sph_share_this_chicklets

its a filter where you are pass 5 arguments:  $out, $options, $style, $url, $title, $summary

$out is the markup about to be written out..  you have access to $url, $title and $summary… you probably have to do a string replace in $out for those variables with what you want…

do you know how to do a standard wp hook?  something like:

add_filter('sph_share_this_chicklets', 'my_sharethis', 10 ,5);
function my_sharethis($out, $options, $style, $url, $title, $summary) {
    # now adjust $out however you want
    # be sure to return it
    return $out;
}
CC critterGuide.ca
critterGuide.ca
Member

these are my settings:1.jpg

wht do i need to change to make it work 🙂 ?

none of these seem to help.. of or on..

MP Mr Papa
Mr Papa
Member

settings???  did you try the filter I suggested??

CC critterGuide.ca
critterGuide.ca
Member

didnt see your post there 🙂 we posted at the same time..

 

i just want the share buttons to show  the forum info and not the page containing the forum info..

and only if that option isn’t posible to have a manual set data in there..Ike said it can be changed by the SEO setting.. so i am explotring this option first.. less invasive..

 

but i cant seem to get it working with that…

MP Mr Papa
Mr Papa
Member

invasive?? nothing invasive about using a hook… means you only make change once and dont lose it on updates…

I do not understand what you want…  but I dont see how the seo options affect what is passed to facebook…  we share a url, a title and a summary (ie excerpt)…   the opengraph seo usage can impact the image shared…

but if you want to change the url, the title or the summary, you need to adjust via the hook I gave you…

IK Ike
Ike
Member

Sorry if I caused any misunderstanding, my post on the SEO option for opengraph was really in reference to the image.

CC critterGuide.ca
critterGuide.ca
Member

So.. Now I’m kinda lost 🙂

How does the share button get a title, content and image?

It does not work for me and gets text and images from the page containing the forum and not the actual forum post..

So I am sharing the website and not the forum ..take a look at the link provided at the first post. There is no title even in the share.

Or go to my website and try to share..

MP Mr Papa
Mr Papa
Member

As I have said repeatedly, I do not know what you want to do and asked for clarity…  but you said

i can probably just overwrite the

$url, $title, $summary

variables inside

sp_share_this_do_sharing

but didnt want to edit code in the plugin… I gave you a hook that allows you adjust those variables without editing the plugin code itself…

so perhaps best if we start over and you explain what you want to do…

CC critterGuide.ca
critterGuide.ca
Member

Yes, let’s start over. Sorry about that 🙂

 

I installed ‘share this’ plugin for the forum. When a share bottom is pressed in one of my forum posts I do not get the forum information in the share title, summary and picture. Instead  I get the information from the page housing the forum. The info that is always displayed at sharing in the text and picture I have above the forum on the same page.

Go to:

AquariumJunkiesCanada.com/forum

And press share to see what I am talking about.

 

I want the share title, summary and picture to come from the forum post and not the page.

 

Sorry for the confusion guys. 

MP Mr Papa
Mr Papa
Member

I am a little confused as to what is going on…

take this forum post as example:  http://www.aquariumjunkiescanada.com/forum/forum-rules-and-information/how-to-get-your-own-webpage-on-aquariumjunkiescanada

if you look at the code for sharethis share on FB button, you see:

<span class="st_facebook_hcount" displaytext="Facebook" st_summary="At AJC we offer Free custom webpages for our active members. ABSOLUTELY FREE  (Donations will be greatly appreciated) Photo galleries are controlled by you! pictures can be added, deleted or changed any time. Page layout is fully customizable and page Design/colors can be changes by request. Ads can..." st_title="How to get your own webpage on AquariumJunkiesCanada" st_url="http%3A%2F%2Fwww.aquariumjunkiescanada.com%2Fforum%2Fforum-rules-and-information%2Fhow-to-get-your-own-webpage-on-aquariumjunkiescanada%23p13" st_processed="yes">
<span class="stButton" style="text-decoration:none;color:#000000;display:inline-block;cursor:pointer;">
<span>
<span class="stMainServices st-facebook-counter" style="background-image: url("http://w.sharethis.com/images/facebook_counter.png");"> </span>
<span class="stArrow">
<span class="stButton_gradient stHBubble" style="display: inline-block;">
<span class="stBubble_hcount">9</span>
</span>
</span>
</span>
</span>
</span>

which looks right to me…  the url, title and excerpt that FB is notified of appear all correct…

yet, when FB goes to share, its wrong…

I think what is going on is that you are also running jetpack for WordPress and you have turned on the OG tags stuff in jetpack… and it does them wrong for the forum page…  so you end up with multiple open graphs tags – jetpack which is wrong and ours which is correct….  so FB gets confused…

so first question, are you really using the jetpack (which is horribly greedy btw) sharing functions elsewhere in your wp site?  If not, you should disable that feature of jetpack…  jetpack stupidly enables dozens of features and relies on you to disable the ones you dont want – good for slowing down sites…

if you do need the jetpack sharing elsewhere on site, then you will need to disable it (via jetpack hooks) on the forum page only so it doesn screw up facebook…

CC critterGuide.ca
critterGuide.ca
Member

I did not know jetpack does all of that!

first of all thank for telling me about jetpack. i deactivated about 200 thousand features there…

second, that did the trick. now it works. when sharing we get the post data.

I actualy just used it to see site downtime, brute force block and ‘related posts’

i deactivated all the rest.

Thank you again.

MP Mr Papa
Mr Papa
Member

yup, folks have complained and complained about the bloat in jetpack with everything turned on by default…  it has some nice features, but they should be opt in vs opt out…

glad everything is sorted now!