1
I’m trying to create an own block to show content of a page in a block.
What Im trying to do exactly is to show the content of the vwar-script nexactions.php in a block.
Well I managed this by creating an custom system block in blocks section selecting php – script and using an “include ‘http://www.blabla.org/nextactions.php.’;”
So this works perfectly.
But now my problem.
I want to make en if in this script accessing to the $_COOKIE variable. If your logged in to vwar show content if not show vwar login.
I´ve changed the nextactions.php script and if I open the script directly over the browser it works perfectly.
http://www.blabla.org/nextactions.php.
But in the block, it seams that I´m out of the variable scope. And I can’t access to the $_COOKIE variable. If I include an print_r($_COOKIE); in the script in the block it shows an empty array( ) directly I get all info in the $_COOKIE.
I´ve been testing a while and it seems to be a problem with the include, cause if I don’t do an URL include it seems to work, and I can access the $_COOKIE, but the if do that the whole script stops to work.
So here is where I need some help.
Someone know how I can pass a variable to that include?
I tried to register another variable as global in the block but I can’t access it from the script.
Perhaps I can re-import the cookie in the nextactions.php script but Im not sure how to do it.
Would be nice if I would get an hand on this.
Thanks in advance.