Author |
Message |
semperaye
Worker


Joined: Oct 31, 2011
Posts: 100
Location: North Carolina
|
Posted:
Mon Jan 21, 2013 10:15 am |
|
How do you get Virglink to automatically appear/work in all of your news posts? Or is there a better way to use it with RN?
Thanx
From Virglink:
This 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. |
|
|
|
 |
spasticdonkey
RavenNuke(tm) Development Team

Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Mon Jan 21, 2013 11:29 am |
|
Can you post the code you are supposed to insert? |
|
|
|
 |
semperaye

|
Posted:
Mon Jan 21, 2013 1:43 pm |
|
<script type="text/javascript">
var vglnk = { api_url: '//api.viglink.com/api',
key: 'youracct#' };
(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>
Thanx for taking a look |
|
|
|
 |
spasticdonkey

|
Posted:
Mon Jan 21, 2013 2:09 pm |
|
I would paste the contents inside the script tag into a new javascript file, name and upload to
includes/jquery/viglink.js
then create a head-viglink.php file and upload to includes/addons/
Code:<?php
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
header('Location: ../../index.php');
exit('Access Denied');
}
addJSToBody('includes/jquery/viglink.js', 'file');
?>
|
this is a quick example of what I'm talking about. I would paste the code they gave you into viglink.js instead of using the code that has been pasted into the forums as some changes could have occurred. Note I have no way of testing this
http://www.rtsforce.com/files/Viglink.zip |
|
|
|
 |
semperaye

|
Posted:
Mon Jan 21, 2013 4:37 pm |
|
spasticdonkey wrote: | I would paste the contents inside the script tag into a new javascript file, name and upload to
includes/jquery/viglink.js
then create a head-viglink.php file and upload to includes/addons/
Code:<?php
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
header('Location: ../../index.php');
exit('Access Denied');
}
addJSToBody('includes/jquery/viglink.js', 'file');
?>
|
this is a quick example of what I'm talking about. I would paste the code they gave you into viglink.js instead of using the code that has been pasted into the forums as some changes could have occurred. Note I have no way of testing this
http://www.rtsforce.com/files/Viglink.zip |
Good God..where to start lol. Thanx for doing that! But...how do i edit that jscript file notepad haha? Also it has to be at the end of pages it says...not sure if being a header matters, I really dont know what I'm doing |
|
|
|
 |
nuken
RavenNuke(tm) Development Team

Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Mon Jan 21, 2013 5:21 pm |
|
|
|
 |
semperaye

|
Posted:
Tue Jan 22, 2013 6:32 pm |
|
Thanx for the help guys! I did as you said spasticdonkey, and edited that file with my account number with notepad plus When I check the installation on Viglink I get this message:
"VigLink was not detected, but this might help:
Using an ad blocker? Disable it and try again.
Make sure the code is installed on that page. (We only check this page, not other pages on the same site.)
Check that the "key" value exactly matches the one above.
Still having trouble? Ask us for help!"
Note: I am using the default url of my page to check. Maybe it takes time for it to work? I'll let you know if all of a sudden it works But I think maybe I missed something somewhere.
*Update*
I was to impatient, got the ok on install from viglink I think you did it, grats lol. |
|
|
|
 |
|