This forum is for assistance with theme development.

is the output of menu_tree(15) function similar to the $primary_links ?

I want to apply the css stylling of $primary_links to
a menu with parent id of 15.

So, can I use menu_tree() api function ?
is the output of menu_tree(15) similar to $primary_links, I mean the
array structure?

Thanks a lot,
Enky.

Theme Editor

I know most designers would hate doing theme design in drupal now matter what interface was provided. But theme tweaking (and even porting a html+css site) could be done in drupal directly. Are there any theme editing modules for drupal yet? Is anyone working on anything like this?

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.

Pages

Subscribe with RSS Subscribe to RSS - Theme development