In one of my EE templates, I’ve included a script using
<?php include() ?>
. When using an EE template, some of the scripts functionality stops working. I created a standalone PHP file with the same exact code as the EE template and everything works fine.
To the best of my debugging ability, I’ve narrowed the broken functionality to the use of
global $var1, $var2, $var3;
For example, the basic structure of the script looks like this:
$var1 = "hello";
function foobar($item) {
global $var1;
if($var1 == 'hello') {
// This code never gets executed within an EE template
// because it seems like the previous call to "global $var1;"
// doesn't get executed properly within an EE template.
}
}
I hope I’ve explained this clearly enough. The script I’m trying to use can be found here.
Thanks,
-Alex
P.S. On a random side note, any ideas on implementing “tell-a-friend, evite” functionality within EE? The Freeform module from Solspace doesn’t seem to support the functionality which is why I’m using the script above (with minor modifications).
