How to make web widgets work
Thread poster: Samuel Murray
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 07:10
Member (2006)
English to Afrikaans
+ ...
Mar 15, 2020

Hello

Today, I experimented briefly with the web widgets feature:
https://www.proz.com/web-widgets/follow
but I was unable to get the "Follow" button to work.

Here is what my HTML code looks like:
html code

All I get are three horizontal lines. Any ideas? According to Staff, this feature should already work.

Thanks
Samuel


 
Thomas T. Frost
Thomas T. Frost  Identity Verified
Portugal
Local time: 06:10
Danish to English
+ ...
Works here Mar 15, 2020

I made a test at https://frosttranslation.com/test/testwidget.html . It works.

Right-click to see the source.

I don't have a hr tag in the middle (before the div tag). Maybe that's what messes it up for you. Try to
... See more
I made a test at https://frosttranslation.com/test/testwidget.html . It works.

Right-click to see the source.

I don't have a hr tag in the middle (before the div tag). Maybe that's what messes it up for you. Try to copy and paste the widget from https://www.proz.com/web-widgets/follow again.
Collapse


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 07:10
Member (2006)
English to Afrikaans
+ ...
TOPIC STARTER
@Thomas Mar 15, 2020

Thomas T. Frost wrote:
I made a test at https://frosttranslation.com/test/testwidget.html . It works.


Yes, I see. It works for me when it's on https://frosttranslation.com/ but not when it's on file:///C:/. I also tried various browsers -- they all show your example when it's on your web server but not when it's on my computer. The HR tags should not affect it. Perhaps ProZ.com checks to see if they approve of the "web site" the widget is being requested from.


 
Thomas T. Frost
Thomas T. Frost  Identity Verified
Portugal
Local time: 06:10
Danish to English
+ ...
Doesn't work from local file Mar 15, 2020

I can't get it to work from a local file either. Many such features don't work when tested locally. Is that important?

But I have included yours, so now my test has two widgets.

As we don't indicate any 'authorised' domain anywhere in our profiles, I don't see how Proz could check if a given widget belongs to a given domain. As you can see, you have your widget on my site now.


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 07:10
Member (2006)
English to Afrikaans
+ ...
TOPIC STARTER
@Thomas Mar 15, 2020

Thomas T. Frost wrote:
Many such features don't work when tested locally. Is that important?


No, it's not important.

I did not test the code on my own web server simply because I could not be bothered to do so, but from what I can see in the code, there is no reason why it *should* not work locally. There are no "local" elements in the HTML code, which suggests that it should work locally. I can see that the DIV tag contains relative path information, but since we are not required to upload a separate CSS file to our own web servers (and since no external CSS file is referenced in the code), those relative paths ought to be captured by the script in the SCRIPT tag, so that shouldn't affect a local test either. Therefore (was my logic), if it doesn't work locally, it would probably not work on a server either.

Except... in this case, it does.


 
Thomas T. Frost
Thomas T. Frost  Identity Verified
Portugal
Local time: 06:10
Danish to English
+ ...
Well Mar 15, 2020

Well, you can spend your afternoon analysing the script to try to figure out why it doesn't work locally – or just be happy that it works on the server.

 
Aline Amorim
Aline Amorim  Identity Verified
Brazil
Local time: 03:10
English to Portuguese
+ ...
How to make web widgets work Mar 15, 2020

Samuel Murray wrote:

Hello

Today, I experimented briefly with the web widgets feature:
https://www.proz.com/web-widgets/follow
but I was unable to get the "Follow" button to work.

Here is what my HTML code looks like:
html code

All I get are three horizontal lines. Any ideas? According to Staff, this feature should already work.

Thanks
Samuel



Hello Samuel,
Do you need help yet?


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 07:10
Member (2006)
English to Afrikaans
+ ...
TOPIC STARTER
@Thomas Mar 15, 2020

Thomas T. Frost wrote:
Well, you can spend your afternoon analysing the script to try to figure out why it doesn't work locally...


I spent no more than 5 minutes in total. (-:


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

How to make web widgets work






CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »
Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »