This forum is for assistance with theme development.

How to properly query Drupal DB?

Hello,

I'm quite new to SQL and Drupal. Would anyone be so kind an gave mi a valid example of querying the database to fetch recent node links? I found an example here - http://drupal.org/node/75781 - yet, the moderator says it's insecure. Would someone be so kind and help me with this humble issue? I need an example code and some short explanation what is what :) Is there any database documentation for Drupal 5?

Disable page cache for XML prolog?

i have enabled caching on my site... and i have a browser detection function in my template.php. The problem is now, if my first request to this page is done with Firefox the XML prolog is added to the page - all ok. But if an IE comes to the page it get the cached Firefox version and the site may break, while IE struggling about the XML tag.

Is there any way to add something dynamically to a page in cached mode?

Color theme

My color theme (drupal 5.0)

Overriding Primary Links

I am working to override the primary links for themeing. Here is what I've got:

template.php

// Catches theme_menu_links function and passes through menu_links.tpl.php
function phptemplate_menu_links($links = array()) {
	// Pass to phptemplate, including translating the parameters to an associative array.
	return _phptemplate_callback('menu_links', array('links' => $links));
}

menu_links.tpl.php

Problem with modified template.php and node.tpl.php bluebreeze

I am having a problem with my sidebar block displaying properly. I am using the bluebreeze_fixed theme. In order to create a new region for blocks, I went through this tutorial to add a new "articles block" region. To be specific, I had to:
-Override default functions in phptemplate.engine
-Create new regions to place blocks
-Pass block region to node.tpl.php
-Customize presentation in style.css

How to print the node text only ?

Hi !
I'm looking for a way to print the main text of a node. Do you know how to to do that ?

I've added a new field for an image for the blog entry so I want to include the image in the

tag.
I've tried this but it doesn't work

<p><?php print theme('imagecache', 'mid', $field_image_blog[0]['filepath']); ?>
<?php print $body_filter?></p>

Thank you fo your help.

Pages

Subscribe with RSS Subscribe to RSS - Theme development