Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
semperaye
Worker
Worker


Joined: Oct 31, 2011
Posts: 100
Location: North Carolina

PostPosted: Mon Jan 21, 2013 10:15 am Reply with quote

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 Smile




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.
 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1692
Location: Texas, USA

PostPosted: Mon Jan 21, 2013 11:29 am Reply with quote

Can you post the code you are supposed to insert?
 
View user's profile Send private message Visit poster's website
semperaye
PostPosted: Mon Jan 21, 2013 1:43 pm Reply with quote

<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
PostPosted: Mon Jan 21, 2013 2:09 pm Reply with quote

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 Smile Only registered users can see links on this board! Get registered or login!
 
semperaye
PostPosted: Mon Jan 21, 2013 4:37 pm Reply with quote

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 Smile Only registered users can see links on this board! Get registered or login!


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

PostPosted: Mon Jan 21, 2013 5:21 pm Reply with quote

Edit it with nopepad++ Only registered users can see links on this board! Get registered or login!

It will be fine included in the head.

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
semperaye
PostPosted: Tue Jan 22, 2013 6:32 pm Reply with quote

Thanx for the help guys! I did as you said spasticdonkey, and edited that file with my account number with notepad plus Smile 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 Razz 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.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©