MicrostockGroup

Agency Based Discussion => Shutterstock.com => Topic started by: TnT Designs on January 28, 2019, 07:07

Title: Embed code to share latest images in WP widget?
Post by: TnT Designs on January 28, 2019, 07:07
 Hi all

The code I embedded to show my latest images in a widget on my Wordpress site just stopped working out of the blue.  I tried to find the code snippet on my contributor space, and I can't seem to locate it or remember how I got it in the first place.

Can someone help me?  I tried on the SS forum and received no help  :-\

Thanks!
Title: Re: Embed code to share latest images in WP widget?
Post by: Uncle Pete on January 28, 2019, 09:51
Not sure, try this,

By Member ID Number - link to your gallery:  http://www.shutterstock.com/gallery-970624.html (http://www.shutterstock.com/gallery-970624.html)

where your user number is 970624 - this one redirects, but is easiest

This works for anyone who puts their own user number between the - and the .html

http://www.shutterstock.com/gallery-######.html (http://www.shutterstock.com/gallery-######.html)
Title: Re: Embed code to share latest images in WP widget?
Post by: TnT Designs on January 28, 2019, 10:26
Thanks for replying.  I'm not trying to put in a link - it's the code snippet that shows thumbnails of best selling or latest images.  You used to be able to copy the code from somewhere in your catalogue.  Possibly under promotion?  But nothing's there now.
Title: Re: Embed code to share latest images in WP widget?
Post by: georgep7 on January 28, 2019, 13:20
I cannot help on that, have no idea. Sorry.
But it sounds interesting. I wouod like to try.
If it is free code, can I ask for a copy or author's site link?

:)
Title: Re: Embed code to share latest images in WP widget?
Post by: TnT Designs on January 29, 2019, 00:37
This is the code:

Code: [Select]
<div data-id='fcf89473-10e9-4020-b820-41e2c4248f10' class='sstk_widget' style='position: relative; width: 300px; height: 600px;'> <a href="https://submit.shutterstock.com" target="_blank" style="position: absolute; bottom: -1px; right: 1px;"> <img src="https://sstkcbstorage.blob.core.windows.net/content/img/red_grey.png" style="height: 26px;"/> </a><script type='text/javascript'>window._wdata = window._wdata || [];_wdata.push({server_url: 'https://promote.shutterstock.com', widget_id: 'fcf89473-10e9-4020-b820-41e2c4248f10', host_url: document.URL,width: 300,height: 600});(function(){if (typeof (alensa_widget) !== 'undefined' ) return;var alensa_js = document.createElement('script'); alensa_js.type = 'text/javascript'; alensa_js.async = true;alensa_js.id = 'alensa_w_script';alensa_js.src = 'https://promote.shutterstock.com/content/embed.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(alensa_js, s);})();</script></div>
Title: Re: Embed code to share latest images in WP widget?
Post by: georgep7 on January 29, 2019, 05:43
thanks for giving the code. I don't know of coding, usually struggle to understand and repair my own errors.

May I ask, you are asking for what is in bold below? I mean the alphanumeric sequence that replaced with bold text?

Sorry for messing lines nelow.

&lt;div data-id=’ARE YOU LOOKING FOR THIS ALPHANUMERIC SEQUENCE?’
class=’sstk_widget’ style=’position: relative; width: 620px; height: 400px;’&gt; &lt;a
href=”https://submit.shutterstock.com” target=”_blank” style=”position: absolute; bottom: -1px; right: 1px;”&gt; &lt;img src=”https://sstkcbstorage.blob.core.windows.net/content/img/red_grey.png”
style=”height: 26px;”/&gt; &lt;/a&gt;&lt;script type=’text/javascript’&gt;window._
wdata = window._wdata || [];_wdata.push({server_url: ‘https://promote.shutterstock.com’,
widget_id: ‘ARE YOU LOOKING FOR THIS ALPHANUMERIC SEQUENCE?, host_url: document.URL,width: 620,height: 400});
(function(){if (typeof (alensa_widget) !== ‘undefined’ ) return;var alensa_js = document.createElement(‘script’);
alensa_js.type = ‘text/javascript’; alensa_js.async = true;alensa_js.id = ‘alensa_w_script’;
alensa_js.src = ‘https://promote.shutterstock.com/content/embed.js’;var
s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(alensa_js, s);})();&lt;/script&gt;&lt;/div&gt;

I just copied code from another site using the code you provides and while googling "sstk_widget"
if yours doesn't work, maybe you can try someone elses with your ID:
fcf89473-10e9-4020-b820-41e2c4248f10
and troubleshoot and repair yours.

Sorry I cannot think of anything else :)
Title: Re: Embed code to share latest images in WP widget?
Post by: TnT Designs on January 29, 2019, 06:03
Thanks for your efforts! 
I'm not sure I can solve this.  I've got the exact same code working perfectly on an old Joomla website, but it stopped working in Wordpress.  I think I'm just going to put in a static link with an image. 
Thanks again for trying  ;)
Title: Re: Embed code to share latest images in WP widget?
Post by: georgep7 on January 29, 2019, 06:39
No special effort, I also learned a few things on this!

Wordpress have a great support communtiy to ask, although I guess that the first answered addressed it will be if you used a Joomla to WP migration tool to import your site :) Offtopic There is a similar (free blogging) widget for latest instagram pics. So why not be possible with simple way for a payed site?
Title: Re: Embed code to share latest images in WP widget?
Post by: TnT Designs on January 29, 2019, 06:42
 ;D
Title: Re: Embed code to share latest images in WP widget?
Post by: Uncle Pete on January 29, 2019, 12:02
Thanks for replying.  I'm not trying to put in a link - it's the code snippet that shows thumbnails of best selling or latest images.  You used to be able to copy the code from somewhere in your catalogue.  Possibly under promotion?  But nothing's there now.


OK thumbnail gallery not link to newest images on portfolio.

I don't know if the code will copy right, inside a message here. It's a shutterstock mini gallery.

<div style="width: 400px; padding: 20px; border: 1px solid #E0E0E0">
   <center>
   <span style="font-size: 9pt; font-family: Sans-Serif">
      My latest images for sale at Shutterstock (http://submit.shutterstock.com/?rid=111418):
      


   </span>
   <script language='javascript'>var shutterstock_table='';</script>
   <script src="http://www.shutterstock.com/mini_gallery.js?s=111418&t=l" language='javascript'></script>
   <script language='javascript'>document.write(shutterstock_table);</script>
   </center>
</div>
<p>
<div style="width: 400px; padding: 20px; border: 1px solid #E0E0E0">
   <center>
   <span style="font-size: 9pt; font-family: Sans-Serif">
      My most popular images for sale at Shutterstock (http://submit.shutterstock.com/?rid=111418):
      


   </span>
   <script language='javascript'>var shutterstock_table='';</script>
   <script src="http://www.shutterstock.com/mini_gallery.js?s=111418&t=p" language='javascript'></script>
   <script language='javascript'>document.write(shutterstock_table);</script>
   </center>
</div>

Or go here, right click, on a blank area, View Page Source. Old cobweb page of mine:

http://gizex.com/chinesesportsbar/ (http://gizex.com/chinesesportsbar/)

Copy the section between the <div style=> and </div> for newest and most popular (which isn't anymore, so take your pick), change the ID number to yours, unless you want to show my latest images.  ;)

I think the code in this message is correct?