All, I'm trying to show a block only if a particular cookie has been set. Is there any reason why this statement isn't working? <?php if($_COOKIE['FONALITYreseller']) { return TRUE; } else { return FALSE; } ?> thanks -t Tony Guntharp Co-Founder SourceForge.net fusion94@damagestudios.net 1-415-692-5507 1-415-680-5361
here's one of my that is working, I think the return may throw things for a loop: <?php echo drupal_is_front_page() ?> saludos, Victor Kane http://awebfactory.com.ar On 8/30/07, Tony Guntharp <fusion94@damagestudios.net> wrote:
All, I'm trying to show a block only if a particular cookie has been set. Is there any reason why this statement isn't working?
<?php if($_COOKIE['FONALITYreseller']) { return TRUE; } else { return FALSE; } ?>
thanks
-t
Tony Guntharp Co-Founder SourceForge.net fusion94@damagestudios.net 1-415-692-5507 1-415-680-5361
You're using that in the block visibility PHP code correct? What isn't working? If $_COOKIE['FONALITYreseller'] evaluates to TRUE the block will show. What's a var_dump($_COOKIE['FONALITYreseller']) give you? Tony Guntharp wrote:
All, I'm trying to show a block only if a particular cookie has been set. Is there any reason why this statement isn't working?
<?php if($_COOKIE['FONALITYreseller']) { return TRUE; } else { return FALSE; } ?>
thanks
-t
Tony Guntharp Co-Founder SourceForge.net fusion94@damagestudios.net 1-415-692-5507 1-415-680-5361
Rob, I am using that in the block visibility PHP code yes. The cookie is in firefox yet it's not showing the block. A var_dump is returning: bool(false) -t Tony Guntharp Co-Founder SourceForge.net fusion94@damagestudios.net 1-415-692-5507 1-415-680-5361 On Aug 30, 2007, at 3:48 PM, Rob Barreca wrote:
You're using that in the block visibility PHP code correct? What isn't working? If $_COOKIE['FONALITYreseller'] evaluates to TRUE the block will show. What's a var_dump($_COOKIE ['FONALITYreseller']) give you?
Tony Guntharp wrote:
All, I'm trying to show a block only if a particular cookie has been set. Is there any reason why this statement isn't working?
<?php if($_COOKIE['FONALITYreseller']) { return TRUE; } else { return FALSE; } ?>
thanks
-t
Tony Guntharp Co-Founder SourceForge.net fusion94@damagestudios.net 1-415-692-5507 1-415-680-5361
Try something like this to help you track it down: <?php if($_COOKIE['FONALITYreseller']) { drupal_set_message("returning TRUE"); return TRUE; } else { drupal_set_message("returning FALSE"); return FALSE; } ?> And, this is just a hunch, delete any extra whitespace after your "?>". -Dave On Thursday 30 August 2007 16:36, Tony Guntharp wrote:
Rob, I am using that in the block visibility PHP code yes. The cookie is in firefox yet it's not showing the block. A var_dump is returning: bool(false)
-t
Tony Guntharp wrote:
Rob, I am using that in the block visibility PHP code yes. The cookie is in firefox yet it's not showing the block. A var_dump is returning: bool(false)
Well if the var_dump is returning false then the cookie is the issue, not any type of block visibility code. Or, am I missing something? -R
Can you take this sort of minor debugging to IRC or the d.o forum rather than sending it to the whole devel list? -Peter On 8/31/07, Rob Barreca <rob@electronicinsight.com> wrote:
Tony Guntharp wrote:
Rob, I am using that in the block visibility PHP code yes. The cookie is in firefox yet it's not showing the block. A var_dump is returning: bool(false)
Well if the var_dump is returning false then the cookie is the issue, not any type of block visibility code. Or, am I missing something?
-R
Depends, need more info. Who set the cookie? If the cookie was set by another domain, you will not be able to read it from the $_COOKIE variable. - Earnest Tony Guntharp wrote:
All, I'm trying to show a block only if a particular cookie has been set. Is there any reason why this statement isn't working?
<?php if($_COOKIE['FONALITYreseller']) { return TRUE; } else { return FALSE; } ?>
thanks
-t
Tony Guntharp Co-Founder SourceForge.net fusion94@damagestudios.net 1-415-692-5507 1-415-680-5361
participants (6)
-
Dave Cohen -
Earnest Berry -
Peter Wolanin -
Rob Barreca -
Tony Guntharp -
Victor Kane