ElkArte Community

Project Support => Support => Topic started by: davemc on April 23, 2015, 06:04:13 am

Title: Viglink
Post by: davemc on April 23, 2015, 06:04:13 am
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
Title: Re: Viglink
Post by: Spuds on April 23, 2015, 05:19:53 pm
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.
Title: Re: Viglink
Post by: emanuele on April 24, 2015, 03:20:50 am
Try the attached package, should work. :D
Spoiler (click to show/hide)

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 Spoiler (click to show/hide)

that the "click here" of the spoiler is inline with the text, while the actual spoiler is block?
Title: Re: Viglink
Post by: Spuds on April 24, 2015, 09:19:11 am
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? 
Title: Re: Viglink
Post by: emanuele on April 24, 2015, 10:42:37 am
No preferences, it was just to be sure. ;)
Title: Re: Viglink
Post by: davemc on April 24, 2015, 07:40:31 pm
@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

Spoiler (click to show/hide)

The instruction on the site says
 
QuoteThis code should be inserted at the very end of your pages, just before the </body> tag.
The code needs to be present on every page where you'd like VigLink to work. The best way to install this code everywhere is to add it to your site's template.
 

I was trying to insert it in the index.template.php file of the theme
Title: Re: Viglink
Post by: emanuele on April 25, 2015, 07:37:22 am
A typo, in the package-info I wrote VIgLink with an uppercase "I" instead of the lowercase.
Fixed package in attachment.
Title: Re: Viglink
Post by: davemc on April 26, 2015, 09:32:20 am
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 ::)
Title: Re: Viglink
Post by: emanuele on April 26, 2015, 09:39:17 am
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.