Jump to content

Recommended Posts

Posted

Hi,

i am new to processwire and trying to setup a simple homepage.

I am allmost done with and it works god so far.

Now i want to use a statistik-script on my page. I copyed all file to a subdir under site/templates/stat/. But i get no access to that subfolder under processwire to install the script.

Also i need access to that script for counting and have the user set a opt-out cokkie.

How can i get access to files in that subfolder?

Thanks in advance for help!

 

Posted

Hi and welcome here! :)

What kind of 'script' ist that?

  1. Is it a complete application like Piwik? https://piwik.org or a GoogleAnalytics code?
  2. Or is it a simple php/js script?

Would you share a link so we could have a look how that is supposed to work?

cheers!
Steffen

Posted

For security reasons you can't directly access php files under site/templates. You will either need to put it in the root of your site, or create a page in the admin page tree and assign it a template that is linked to the required php file.

  • Like 2
Posted

Any non-pw code does not need to go into the templates folder. Just put it in a subfolder of your root directory and it should be installable.

Posted

The Statistik-Script is PHP-Web-Stat.

I copyed all files to the root/stat/ now and it works. Thanks a lot for your quick replys.

So if i want to include a file in a template from there it schould be include("../stat/config/tracking_code.php");

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...