This forum is for assistance with theme development.

CCK date.module theming

This may be a silly question, but how does one go about theming CCK date fields? It doesn't seem like you can use date('Y m', $variable) format. Thanks to anyone who can point me in the right direction.

Two php snippets in page.tpl.php

I am using the excellent links package and am using the following code to pull out links by taxonomy to my homepage:

<?php
/**
* This php snippet creates a list of urls
* from weblinks nodes of a particular category
* or from a list of categories
* specified in the first line ($taxo_id)
* where list items link directly to the linked website
* and not the node describing the website.
* Click-through tracking is maintained.
*
* To increase/decrease the number of nodes listed
* change the $nlimit value to suit.
*
* This is tested on Drupal 4.7.
*/
$taxo_id = 17; /* if an array of terms, enclose in "" and separate by commas */
$nlimit = 10;
$result = db_query(db_rewrite_sql("SELECT n.nid, n.title, w.lid, nr.body
FROM {node} n
INNER JOIN {term_node} tn USING(nid)
INNER JOIN {links_node} wn ON n.nid = wn.nid
INNER JOIN {links} w ON wn.lid = w.lid
INNER JOIN {node_revisions} nr ON n.nid = nr.nid
WHERE n.type = 'weblink'
AND n.status = 1
AND n.moderate = 0
AND tn.tid in ($taxo_id)
ORDER BY n.title ASC
LIMIT $nlimit"));
while ($node = db_fetch_object($result)) {
$items[] = l($node->title, 'links/goto/' . $node->nid . '/' . $node->lid .'/links_weblink', array(title=>$node->body));
}
$output .= theme('item_list', $items);
print $output;
?>

All fine so far. But I want to use two taxonomy terms (in different places) and know I must begin each succeeding snippet with: <?php

Issue rewriting HTML in page.tpl.php with str_replace and preg_replace

Bit of a PHP problem that's cropped up. I'm trying to get drupal to highlight the current primary link (shown as tabs via CSS) and to do this with my design the 'class=active' must be in the LI element, not the A element.

It would appear something is going very wrong however, as my preg_replace seems to be setting the Home link LI (the first one it comes to) as 'class=active' no matter which primary link is clicked on...!

Could well be my php, here's the code:

In page.tpl.php:

Ack! Lost all of the block display code right before the client presentation - help please!

I have been working on getting the site ready for the client. One of the things that I've been working on is menus and links that are displayed on the left side to enable the client to administer the web site.

Suddenly all of the formatting has been lost in my left side blocks/menus.

When I view the page now I see:

link link link
link link link

Instead of
(img) link
(img) link
(img) link
(img) link

When I view the source, it's as if the images were never there.

secondary_nav and custom nav issues

Hello everyone. I am new to Drupal and so far i am really enjoying it. Thank you to everyone who made this a reality. I just started trying to build a theme and I am running into some walls. I decided to take a website I recently built for a client and convert it to Drupal.

Here is the original site for reference: http://www.weldaloy.com.

Here is the new Drupal version: http://www.brokenninja.com

Okay, on to the first question.

Tooltip

Tooltip.js is the NEXT GENERATION in Tooltips; using the Web 2.0 approach of doing a simple thing, and doing it well.

Anyone try to add this to drupal!! ?

http://tooltip.crtx.org/index.php?page=Demos

Pages

Subscribe with RSS Subscribe to RSS - Theme development