title: WP - Use file in plugin directory as custom Page Template?
body: <p>Is it possible for a file in the plugin directory to be used as a custom Page Template?</p>
  
  <p>Also, how do you make a plugin create a page?</p>
  
  <p>I'm developing a plugin for a client based on a theme, he wants this plugin to make sales pages while being able to use his theme on the homepage. This is a product that I'm making for him to market so it needs to be automated all through the plugin.</p>
  
  <p>Is this possible?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have the activation/deactivation hooks in my plugins main file, and it's <em>not working</em>. Here's the code:</p>
  
  <pre><code>$filename = __FILE__;
  
  register_activation_hook($filename, 'superActivation');
  register_deactivation_hook($filename, 'superDeactivation');
  
  global $myFile; global $fh; global $stringData; global $filename;
  
  $myFile = "testFile.txt";
  $stringData = "Testing\n";
  $fh = fopen($myFile, 'w') or die("can't open file");
  
  function superActivation() {
      global $myFile; global $fh; global $stringData; global $filename;
      fwrite($fh, $stringData);
      fclose($fh);
  }
  
  function superDeactivation() {
      $myFile = "testFile.txt";
      unlink($myFile);
  }
  </code></pre>