I'm trying out the Slash theme - I quite like it. Unfortunately it doesn't display the primary links tabs quite correctly in IE. There is no space between the tabs. Works well in Firefox though. A sample of the theme in action can be seen at http://xdeb.org/.
GOAL: Completely custom search BLOCK (my HTML source) located in the header .
EXPERIENCE TO DATE: With phptemplate, overriding the content of the global (top) search_box is fairly easy, by placing a theme_search_form() function and a callback in template.php.
Fine.
BUT.. if you want to tweak the format of the search BLOCK (in the header, or side blocks), that function is not even called.
So how do I now override the source HTML for the search BLOCK?
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.
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