This forum is for assistance with theme development.

font resizer

Hello. I am using the latest release (4.7) of Drupal. I would like to allow visitors to press a button to resize the font on any given page. I found a font resizer at this site, http://www.dyn-web.com/dhtml/sizefont/index.php, but do not know anything about php and have no idea how to integrate the code into my page template. I would like the words "increase" and "decrease" and "restore" to appear just above the right hand sidebar.

If someone would be so kind as to show me how to do this I would be very grateful. Thanks, david

Here is the relevant code that I need to insert in my template:

<div id="sizer">
  <a href="" onclick="dw_fontSizerDX.adjust(2); return false">Increase</a> | 
  <a href="" onclick="dw_fontSizerDX.adjust(-2); return false">Decrease</a> |
  <a href="" onclick="dw_fontSizerDX.reset(); return false">Restore</a>
</div>

Here is the template (chameleon.theme) I am using:

<?php
// $Id: chameleon.theme,v 1.43 2006/04/04 23:36:18 unconed Exp $

/**
* @file
* A slim, CSS-driven theme.
*/

function chameleon_features() {
return array(
'toggle_logo',
'toggle_favicon',
'toggle_name',
'toggle_slogan');
}

function chameleon_regions() {
return array(
'left' => t('left sidebar'),
'right' => t('right sidebar')
);

}

function chameleon_page($content) {

Adding <hr>'s between blog posts?

Hi,

I'm using the phptemplate version of the "Blue Marine" theme.

I'd like to insert horizontal rules (<hr>'s) between blog posts.

Is it possible to do this?

Thanks,

fcmisc.

http://www.blapper.com/

theme font & color like drupal.org

Greetings,

Does anyone have a theme like drupal.org, im talking about the current design of drupal.org. I like it very much, the blue color, the font used?.

Thanks,
eli

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.

Pages

Subscribe with RSS Subscribe to RSS - Theme development