Advertisement:

Author Topic: VigLink  (Read 49035 times)

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,509
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: VigLink
« Reply #100 on: April 03, 2013, 06:25:11 PM »
Link insertion has stopped working on one of my sites for some reason.  It was working perfectly up until two days ago.  Tried un-installing and re-installing, still not working. Checked my settings over at Viglink and it's all set correctly. 

Links are getting affiliated, but like I said the link insertion has stopped.  Running SMF 2.0.4  Any ideas why this might have happened?

I also have it running on two other SMF 2.0.4 sites without problems.

Offline johnpaul2k2

  • Sr. Member
  • ****
  • Posts: 738
  • Gender: Male
  • Okija amaka
    • Mgbenka
Re: VigLink
« Reply #101 on: May 10, 2013, 12:57:55 PM »
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.



what is the way forward???

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,509
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: VigLink
« Reply #102 on: May 10, 2013, 01:03:17 PM »
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.



what is the way forward???

Assuming you're using SMF 2.0.4 then emulate to 2.0.2 and it should install.  http://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: VigLink
« Reply #103 on: May 10, 2013, 01:11:47 PM »
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.



what is the way forward???

Not shouting in a huge font would also be a fantastic way forward.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Mick.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,077
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Re: VigLink
« Reply #104 on: May 10, 2013, 01:12:39 PM »
He's been here long enuff. I would imagine what to do when he sees that message.

Offline johnpaul2k2

  • Sr. Member
  • ****
  • Posts: 738
  • Gender: Male
  • Okija amaka
    • Mgbenka
Re: VigLink
« Reply #105 on: May 10, 2013, 01:51:58 PM »
thanks for the suggestion ;)

SORRY ABOUT THAT

i have done everything, please when am i expected to start seeing adverts

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,509
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: VigLink
« Reply #106 on: August 13, 2016, 08:21:19 AM »
Does this Viglink mod still work as expected?  I realise it will install ok, but the Viglink insert seems to have stopped working on my sites, and wondered if recent changes to the Viglink API code require this mod to be updated.


Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,154
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #107 on: August 13, 2016, 08:53:01 AM »
Hi Lurkalot,

I'd forgotten that I had written this mod.

With a quick look at the mod code, and what appears to be new javascript, the mod needs to be changed.

To manually update your code :

edit : ./Themes/default/index.template.php
find
Code: [Select]
</body>
Add Before:
Code: [Select]
';
global $modSettings;
if(!empty($modSettings['vigLinkCode']))
                                        {
   echo '<script type="text/javascript">
   var vglnk = { key: \''.$modSettings['vigLinkCode'].'\' };

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

echo '

I have not tested this at all - please make sure you backup any files!

You will need to remove the old code which looks something like 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>';
                  }

echo '


Hope that helps. Let me know if it works, and i'll update the mod with the new code.



Tony Reid


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

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,509
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: VigLink
« Reply #108 on: August 13, 2016, 09:24:04 AM »

Hope that helps. Let me know if it works, and i'll update the mod with the new code.

Thanks.  I've updated the code as you posted above, just got to see if it starts working. So far it isn't but that could be my shoddy editing.  :-[  It's here if you want to check the source code for me. ;)  Both default and the custom theme I'm using have the edit.

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,509
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: VigLink
« Reply #109 on: August 13, 2016, 11:05:39 AM »
Tony, gave it a good test, but for me it's still not working.  Tried it in both default and custom theme but the Viglink insert still doesn't produce any links.

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,154
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #110 on: August 13, 2016, 12:36:20 PM »
Can you provide a link to the forum in question please :)
Tony Reid


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

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,509
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: VigLink
« Reply #111 on: August 13, 2016, 02:20:04 PM »
Can you provide a link to the forum in question please :)

Sorry forgot to add the link in the post above.  This is the one using your code edit, http://guitaristguild.com/

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,154
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #112 on: August 13, 2016, 03:57:48 PM »
You have an additional bracket...... I edited it out immediately after posting, but you must have been quick off the mark.

Remove the Bracket on this line...
    s.src = ('//cdn.viglink.com/api\vglnk.js';
Tony Reid


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

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,509
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: VigLink
« Reply #113 on: August 13, 2016, 04:46:14 PM »
You have an additional bracket...... I edited it out immediately after posting, but you must have been quick off the mark.

Remove the Bracket on this line...
    s.src = ('//cdn.viglink.com/api\vglnk.js';

Thanks Tony.  Removed the bracket, let's see if it works now. ;)

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,154
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #114 on: August 13, 2016, 05:08:24 PM »
Failed to load resource: the server responded with a status of 403 (Forbidden) http://cdn.viglink.com/api%0Bglnk.js

this...
 
Code: [Select]
s.src = '//cdn.viglink.com/api\vglnk.js';
Should be : 
Code: [Select]
s.src = '//cdn.viglink.com/api/vglnk.js';
Sorry for all the edits, but that should sort you out fine :)

Tony Reid


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

Offline lurkalot

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,509
  • Gender: Male
  • Tinyportal Support
    • guitaristguild on Facebook
    • Tinyportal on GitHub
    • @GuitaristGuild on Twitter
    • Guitarist Guild
Re: VigLink
« Reply #115 on: August 14, 2016, 12:00:33 AM »

Sorry for all the edits, but that should sort you out fine :)


Thank you, seems to be working now.  I will keep an eye on it for a few days, it should be inserting more links than it is atm, but that's not down to your mod.  Look forward to your version update.  8)

Offline mj.

  • Semi-Newbie
  • *
  • Posts: 27
Re: VigLink
« Reply #116 on: February 04, 2017, 01:36:17 PM »
I just signed up with Viglinks and installed this mod.  Was a bit of a wild ride getting the code edits here correct, but I think I have it now, when I view source on my site it **LOOKS** right.  Can't really tell if it's working, the validation at Viglinks certainly doesn't think so.  If anyone more knowledgeable than I could take a quick peek I'd appreciate it. http://spaceciggysforum.com/

Offline Tony Reid

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,154
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #117 on: February 04, 2017, 02:01:55 PM »
Appears to be working. Check back in a day or so.

You have the mod on your board index, this is not necessary - it really only needs to be on the pages that display posts.

Separate issue though :
Failed to load resource: the server responded with a status of 404 (Not Found) http://spaceciggysforum.com/Themes/enterprise_smf20final/images/theme/main_block.png
http://spaceciggysforum.com/Themes/enterprise_smf20final/scripts/theme.js?fin20
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,154
  • Gender: Male
    • @AbsoluteBreeze on Twitter
    • www.fertilityfriends.co.uk
Re: VigLink
« Reply #118 on: February 04, 2017, 02:50:27 PM »
*Updated the mod for 2.0.13 compatibility.

Please uninstall the previous mod before installing this one.
Tony Reid


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

Offline mj.

  • Semi-Newbie
  • *
  • Posts: 27
Re: VigLink
« Reply #119 on: February 04, 2017, 03:00:43 PM »
Thanks Tony!  And thanks for the heads up on those errors, I'd meant to fix them for a while.  That poor theme is basically abandoned, it was never really updated properly for 2.something, I think that may be why the mod code is getting executed on the message index.  I've been applying duct tape and baling wire to the theme for some time now, but I really lack the php coding skills and theme knowledge to fix it correctly before the sun burns out...