This forum is for assistance with theme development.

selectively prevent cache for anonymous

Hey guys, I just noticed that a php library I've included to detect browser enviornments becomes useless when caching is enabled. I've searched around but the closest answers are still outside the scope of my problem.

I have this included in the head of the page.tpl.php file:

<?php
    include('env_detect.php');
    $what_os = browser_detection('os'); 
    $what_browser = browser_detection('browser');
    $browser_num = browser_detection('number');
    $dom_safe = browser_detection('dom');
    $win_ie56 = ( $what_os == 'nt' ) && 
        ( $what_browser == 'ie' ) && 
        ( $browser_num >= 5 ) && 
        ( $browser_num < 7  );
?>

<?php if ($what_os == 'nt') { ?>
    <style type="text/css" media="all">@import "win.css";</style>
<?php } ?>

<?php	if ($win_ie56) { 
    $ie7_dir = $scripts_dir .'ie7/';
?>
    <style type="text/css" media="all">@import "win-ie.css";</style>
    <script src="ie7-combined.js" type="text/javascript"></script>
    <script type="text/javascript">
        var PNGuin_Transparent_GIF = 'blank.gif';
    </script>
    <script src="alphaloader.js" type="text/javascript"></script>
<?php } ?>

With cache enabled it will go through all the arguments for the first visitor and then cache it for everyone else. It's supposed to be dynamic but the drupal cache breaks it. There are other bits in the body that are related to this too. The caching encompasses way too much. For now the caching is disabled.

I still don't get it - Themes and Drupal

First of all, read NEWBIE all over this post.

I've read most of the posts (so I probably missed the ONE with my answer) about themes and Drupal. But, I still don't get it.

My old approach - Photoshop/Illustrator the graphics and layout. Switch to Dreamweaver - slice and dice then add functionality. Voila! A website. I understand this part.

Out on the Drupal frontier - I get (I think) the Drupal mindset and can set up nodes, menus, views.... I've switched themes that I have downloaded from drupal.org. A major learning curve, but well worth the effort.

Overwritte Node.tpl.php for profile and flexinode

Hi,

I have overwritte my node.tpl.php of one of my flexinode. I rename the file to node node-flexinode-1.tpl.php. I have remove the variable $content and replace it by each of my variable. This way I have better flexibility on the theme of my flexinode.

More on (multiple) floating boxes

Hi all... Here I come again with another problem with floating boxes.
As long as I've arranged the right menu bar as a floating box, now I discover another problem.
All the images have been defined as float too: and right now this is how it works:
the image (as a float box) goes just under the floating right menu block.

here's the screenshot.

4.7 Menu System

Hello Drupallers!

I've got "Site Menu Item" (basicaly menu)
-S.M.I
----About
---------sub 1
-----------subsub
---------sub 2
----Contacts
---------sub 1
---------sub 2

Here the code that renders About section.

$menuhtml = theme_menu_tree(37);
print $menuhtml;

It render About section ('cause it's 37th id)
Q: How can I implement in my template that this number "id" depends on menu sectioin where I am now?

newbie shopping process calculator help

I hope this is the right place to post this
i am trying to write a little calculator for our shopping process, what i want the user to be able to do is take a product for sale and customize it; specifying color and size etc, thus altering the cost of the product in the end when submitted to the shopping cart-
can i do this with drupal? and the newbie in me needs to know, uh, sort of how also :)

Pages

Subscribe with RSS Subscribe to RSS - Theme development