Advertisement:

Author Topic: VigLink  (Read 48582 times)

Offline mxcape21

  • Semi-Newbie
  • *
  • Posts: 75
    • TechMedia
Re: VigLink
« Reply #40 on: August 25, 2011, 07:17:05 PM »
yes I just saved it again, can you just give me a code snippet with "xxxxxx" for key and I will manually replace it in the index.template.php.

 Oh sorry i forgot to say i was using SMF 2.0 RC5
The only thing I can presume, since I know I'm not crazy (certifiably at least), is that everybody else is until they prove otherwise! 8)
http://techraffle.com/forum/index.php

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #41 on: August 25, 2011, 07:20:05 PM »
Well right at the bottom of your index.template.php you need to change this....

Code: [Select]
<script type="text/javascript">
        var vglnk = { api_url: '//api.viglink.com/api',key: '' };
 
  (function(d, t) {
    var s = d.createElement(t);
    s.type = 'text/javascript'; s.async = true;
    s.src = ('https:' == document.location.protocol ? vglnk.api_url :
             '//cdn.viglink.com/api') + '/vglnk.js';
    var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r);
  }(document, 'script'));
</script></body></html>

to this - replacing xxxxxxxxxxxxxxxxxx with your api key...

Code: [Select]
<script type="text/javascript">
        var vglnk = { api_url: '//api.viglink.com/api',key: 'xxxxxxxxxxxxxxxxxx' };
 
  (function(d, t) {
    var s = d.createElement(t);
    s.type = 'text/javascript'; s.async = true;
    s.src = ('https:' == document.location.protocol ? vglnk.api_url :
             '//cdn.viglink.com/api') + '/vglnk.js';
    var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r);
  }(document, 'script'));
</script></body></html>
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline mxcape21

  • Semi-Newbie
  • *
  • Posts: 75
    • TechMedia
Re: VigLink
« Reply #42 on: August 25, 2011, 07:34:21 PM »
Ok that's not at the bottom of my index.template.php

I see this but its a long way from the bottom

Code: [Select]
(function(d, t) {
    var s = d.createElement(t);
    s.type = \'text/javascript\'; s.async = true;
    s.src = (\'https:\' == document.location.protocol ? vglnk.api_url :
             \'//cdn.viglink.com/api\') + \'/vglnk.js\';
    var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r);
  }(document, \'script\'));
</script>';
                  }
The only thing I can presume, since I know I'm not crazy (certifiably at least), is that everybody else is until they prove otherwise! 8)
http://techraffle.com/forum/index.php

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #43 on: August 25, 2011, 07:36:27 PM »
Above that you should have something like...

Code: [Select]
var vglnk = { api_url: '//api.viglink.com/api',key: '' };
Change it to (replacing the xxx with your API):

Code: [Select]
var vglnk = { api_url: '//api.viglink.com/api',key: 'xxxxxxxxxxxxxxxxxx' };
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline mxcape21

  • Semi-Newbie
  • *
  • Posts: 75
    • TechMedia
Re: VigLink
« Reply #44 on: August 25, 2011, 07:45:11 PM »
Now I get this error -->
Code: [Select]

Parse error: syntax error, unexpected '(', expecting ',' or ';' in .../Themes/darkmodern_203/index.template.php on line 407

398: echo !empty($settings['forum_width']) ? '
399: </div>' : '', '
400: ';
401: global $modSettings;
402: if(!empty($modSettings['vigLinkCode']))
403:                                         {
404:         echo '<script type="text/javascript">
405:         var vglnk = { api_url: '//api.viglink.com/api',key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx' };
406:

407:   (function(d, t) {

408:     var s = d.createElement(t);
409:     s.type = 'text/javascript\'; s.async = true;
410:     s.src = (\'https:\' == document.location.protocol ? vglnk.api_url :
411:              \'//cdn.viglink.com/api\') + \'/vglnk.js\';

The only thing I can presume, since I know I'm not crazy (certifiably at least), is that everybody else is until they prove otherwise! 8)
http://techraffle.com/forum/index.php

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #45 on: August 25, 2011, 07:46:45 PM »
Attache your index.template.php file here and I'll take a look
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #46 on: August 25, 2011, 07:50:00 PM »
Sorry - I am half asleep - you need to change this...
Code: [Select]
global $modSettings;
if(!empty($modSettings['vigLinkCode']))
                                        {
        echo '<script type="text/javascript">
        var vglnk = { api_url: \'//api.viglink.com/api\',key: \''.$modSettings['vigLinkCode'].'\' };

  (function(d, t) {
    var s = d.createElement(t);
    s.type = \'text/javascript\'; s.async = true;
    s.src = (\'https:\' == document.location.protocol ? vglnk.api_url :
             \'//cdn.viglink.com/api\') + \'/vglnk.js\';
    var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r);
  }(document, \'script\'));
</script>';

to this....
Code: [Select]

global $modSettings;
if(!empty($modSettings['vigLinkCode']))
                                        {
        echo '<script type="text/javascript">
        var vglnk = { api_url: \'//api.viglink.com/api\',key: \'xxxxxxxxxxxxxxxxxx\' };

  (function(d, t) {
    var s = d.createElement(t);
    s.type = \'text/javascript\'; s.async = true;
    s.src = (\'https:\' == document.location.protocol ? vglnk.api_url :
             \'//cdn.viglink.com/api\') + \'/vglnk.js\';
    var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r);
  }(document, \'script\'));
</script>';
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline mxcape21

  • Semi-Newbie
  • *
  • Posts: 75
    • TechMedia
Re: VigLink
« Reply #47 on: August 25, 2011, 07:51:47 PM »
Ok here it is......thanks  :)

The only thing I can presume, since I know I'm not crazy (certifiably at least), is that everybody else is until they prove otherwise! 8)
http://techraffle.com/forum/index.php

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #48 on: August 25, 2011, 07:54:45 PM »
Whats your API key? its not private - so it doesn't matter if you post it here.
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline mxcape21

  • Semi-Newbie
  • *
  • Posts: 75
    • TechMedia
Re: VigLink
« Reply #49 on: August 25, 2011, 07:59:19 PM »
Do I leave the "\" at the end of the key?

88b8065c5fcc0df0d5ad104ca9f1331e

still fails the VIGLINK website test..
The only thing I can presume, since I know I'm not crazy (certifiably at least), is that everybody else is until they prove otherwise! 8)
http://techraffle.com/forum/index.php

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #50 on: August 25, 2011, 08:01:52 PM »
This should do it....
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline mxcape21

  • Semi-Newbie
  • *
  • Posts: 75
    • TechMedia
Re: VigLink
« Reply #51 on: August 25, 2011, 08:08:35 PM »
It still fails the test...
The only thing I can presume, since I know I'm not crazy (certifiably at least), is that everybody else is until they prove otherwise! 8)
http://techraffle.com/forum/index.php

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #52 on: August 25, 2011, 08:09:34 PM »
I see you've uploaded it - and the code is in place.

I ran the test, and it failed - however this is down to an issue with the way viglink is checking - perhaps due to spacing etc.

Leave the code in for a few days and you will see it working - the busier your site is with shopping links etc, and the more links people click on - the more you will see viglink recording the activity.
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline mxcape21

  • Semi-Newbie
  • *
  • Posts: 75
    • TechMedia
Re: VigLink
« Reply #53 on: August 25, 2011, 08:14:54 PM »
Ok thanks a lot.  :)
The only thing I can presume, since I know I'm not crazy (certifiably at least), is that everybody else is until they prove otherwise! 8)
http://techraffle.com/forum/index.php

Offline Babyfacemagee

  • Semi-Newbie
  • *
  • Posts: 61
  • Gender: Male
    • Nexus 7 Forum
Re: VigLink
« Reply #54 on: September 30, 2011, 04:48:40 PM »
Hi,  The viglink mod doesn't seem to be working with my new 2.0.1 forum install.  After I upload the file into the packages directory if I try to install it doesn't give me the option to install and only lists [list files] and [delete].  No install or uninstall options.   Funny thing is it worked in my 2.0 forum.   

The website is www.kindlefireforums.com

Any ideas?[/list]

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #55 on: September 30, 2011, 05:00:00 PM »
So this is a fresh 2.0.1 install - not an upgrade of your 2.0 forum?
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Babyfacemagee

  • Semi-Newbie
  • *
  • Posts: 61
  • Gender: Male
    • Nexus 7 Forum
Re: VigLink
« Reply #56 on: October 01, 2011, 12:34:18 PM »
yes, brand new install of 2.0.1.   

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #57 on: October 03, 2011, 07:21:15 AM »
I've uploaded a new version that should run fine on 2.0.1

Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts

Offline Babyfacemagee

  • Semi-Newbie
  • *
  • Posts: 61
  • Gender: Male
    • Nexus 7 Forum
Re: VigLink
« Reply #58 on: October 06, 2011, 02:26:00 AM »
New version is doing the same thing.  Once the package is downloaded or placed in the packages folder I only get the select files and delete options.   No install option.  By the way I have your viglink mod on 5 of my other forums but they are all either 2.0 rc4 or rc5.   It's only when I've tried to install on 2.0.1 forums that it isn't working for me and i'm getting the missing install option.

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,151
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #59 on: October 06, 2011, 03:06:14 AM »
How did you upload the package? via the package manager or FTP? also, can you check the file permissions.
Tony Reid


My Big Board
www.FertilityFriends.co.uk/forum - An SMF powered forum with over 5 million posts