Solved Pinterest button doesn't display via a jssocials Custom module.

More
6 years 6 days ago - 5 years 11 months ago #677 by Tommy Slash
Hi,

I load jssocials from a custom module, everything works fine apart from the Pinterest button does not appear.

In the jssocials debug, it shows; Pinterest_image: - (Pinterest disabled), however there is an image in the article.

On further testing, if I change the plugin setting under the [Auto buttons] tab, Auto insert buttons: Yes, then the social buttons will also appear in the article with the Pinterest button also displaying. However, my custom module continues to not display the Pinterest button.

Next, setting the Auto insert buttons: No, then inserting the jssocials tag inside an article, the social buttons display and include the Pinterest button. Again, the jssocials from the custom module does not show the Pinterest button.

To confirm, as its a custom module I want to use with jssocials, the Prepare Content setting inside the module is set to Yes.

My guess is that from a custom module the jssocials' Pinterest button doesn't correctly see images inside the article.

Is there a way this can be fixed?

Thanks,
Tom.

This message contains confidential information


DOWNLOADLINK to TEST version:
This message contains confidential information
Last edit: 5 years 11 months ago by Ruud van Lent. Reason: EDIT: added downloadlink to testversions
The topic has been locked.
More
6 years 5 days ago #680 by Ruud van Lent
Hi Tom,
you have configured everything correct. And your analysis is spot-on. What happens 'under the hood' is that jssocials fetches the image from the context / component it is called from.
When being called via adding the tag to the article or via autobuttons, then the context is the article. The article consists of text and images (if set): those are passed to jssocials so they can be used.

When being called from a custom module, the context is 'mod_custom'. mod_custom can have text, but doesn't have an image field. So no image is passed to jssocials to be used with the pinterest button.

The challenge is as follows: the title used when sharing is either from the context (e.g. when an article) or from the browser (when using custom modules).
Every component / every page displayed has a title. So this is a safe way to get the title.

Now when in mod_custom, when I want to use the image on the page, there is the problem that not every page has an image and that the extensions all use a different way of storing their images.

So in you specific use case I would need to check if we are running mod_custom on a joomla article, and if so use that article as source for jssocials.
This is something that could be implemented, but this is also something that can introduce problems: unfortunately some components 'act' like they are a joomla articles but they are not. This is bad developer behaviour, but it happens unfortunately more then you can imagine :(

So, long story short :) I am open for this change, just need some time to fully understand the consequences to be able to prevent problems
The following user(s) said Thank You: Tommy Slash
The topic has been locked.
More
6 years 4 days ago #686 by Tommy Slash
Hi Ruud,

Interesting insight into why its not working and the problems associated with implementing it.

It would be great if possible to have the pinterest icon, but I understand it will take more time to investigate and implement (if feasible).

Thanks,
Tom.
The topic has been locked.
More
5 years 11 months ago #688 by Ruud van Lent
Hi Tom,

I have a testversion for you. The donload link is in this thread's first post.
If it doesn't work, you can install previous version over the test version.

Let me know if this works.
regards,
Ruud.
The topic has been locked.
More
5 years 11 months ago #689 by Tommy Slash
Hi Ruud.

That is great news, I didn't think you'd get a fix so fast.

Its been several days and I'm only now trying this, but the download page reports: Error - The requested share does not exist anymore

I've probably left it too long to try, but will happily test with a new download link if that is still possible?

Thanks,
Tom.
The topic has been locked.
More
5 years 11 months ago #691 by Ruud van Lent

slashdottom wrote: I've probably left it too long to try, but will happily test with a new download link if that is still possible?



First post updated with new link: get it while it's hot :)
The following user(s) said Thank You: Tommy Slash
The topic has been locked.
More
5 years 11 months ago #693 by Tommy Slash
Thanks Ruud,
Its installed on the website listed in my original post and on another test website, both work great and no problems as far as I can tell.
Thanks,
Tom.
The topic has been locked.
More
5 years 11 months ago - 5 years 11 months ago #695 by Ruud van Lent
Top Tom, thanks for testing.
Will be in next release!

If you have any other questions / request: feel free to ask.
regards,
Ruud
Last edit: 5 years 11 months ago by Ruud van Lent.
The topic has been locked.
More
5 years 11 months ago - 5 years 11 months ago #698 by Tommy Slash
Hi Ruud,

A somewhat moot point, in the jsSocial tab the "Display [P]interest button" tooltip has "iimage" typo.

Tom
Last edit: 5 years 11 months ago by Tommy Slash.
The topic has been locked.
More
5 years 11 months ago #699 by Ruud van Lent

slashdottom wrote: A somewhat moot point, in the jsSocial tab the "Display [P]interest button" tooltip has "iimage" typo.


Fixed, Thanks for reporting :)
The topic has been locked.