I've been trying to add viglink to my site for a few days. I keep getting error's when I try to add the code into the template though. It gives me a syntax error if I just plug the code in as it is.
If I try to write in the code through $modsettings though, it tells me the method is depreciated.
I am inside the html body tags and I'm in index.template.php.
Could it be my theme. I am using the lattice theme.
Any help is appreciated
Don't know much about Viglink but it should not be a problem to add the code to the template. What is the code and which template and where in it are you trying to add the code? If the code has some key that you can't share, just blank out the key.
Try the attached package, should work. :D
There should be a place in the general addons settings area in the admin panel to add the code.
@Spuds is that intended:
some text
that the "click here" of the spoiler is inline with the text, while the actual spoiler is block?
Thats how its supposed to work AFAIK. I seems natural to me, you read along until you hit the spoiler text and then get the block. Were you feeling the click to show part should be down with the block itself?
No preferences, it was just to be sure. ;)
@emanuele , Thanks but that isn't working. It's showing a 'modification parse error' in the VigLink.integrate.php file.
@Spuds this is the code
<script type="text/javascript">
var vglnk = { key: ************** };
(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>
The instruction on the site says
I was trying to insert it in the index.template.php file of the theme
A typo, in the package-info I wrote VIgLink with an uppercase "I" instead of the lowercase.
Fixed package in attachment.
Thanks, that seems to have fixed the insert box 8)
Viglink still isn't detecting the referral code for some reason.
I've tried disabling the portal and reverting back to the original theme but no luck so far. I'll keep working on it to see if I can find the reason. It'll probably be something small.
And more than likely something I've done ::)
I should really, really stop posting code without testing it even barely... :-[
I added too much stuff, that means the html script tags themselves and that breaks the javascript.
Remove the old one and use the one attached here. This time I did some basic testing and it seems to work as expected. Not having a proper viglink code I can't be 100% sure, but at least there are no javascript errors. :D
Replaced again the package with some different code.