This forum is for assistance with theme development.

"print $terms?" now obeying url_alias?

When I place:

<?php print $terms?>

in my templates, it displays:

http://www.technologyandchange.com/taxonomy/term/60

not

http://www.technologyandchange.com/Asia

as I have specified in my url alias?

Anyone experience this? Any solutions?

Getting a Flash-based MP3 to work with MP3s and the attachment module.

Not sure where this should go, and I'm a drupal rookie, so no diff/patch or anything fun like that. Appologies if this is the wrong location to post this in. Sorry folks ... I'll get up to speed soon. In the meantime, here is some information about how to get a Flash-based MP3 to work with MP3s and the attachment module.

Download the MP3 Player ...
http://sourceforge.net/projects/emff/
http://www.marcreichelt.de/spezial/musicplayer/#english

at around line 350 (inside function theme_attachments) add the following ... note that object and data are misspelled and will need to be corrected in your code (had to do this to get around the suspicious input check).

  if ($attachment['mimetype'] == 'audio/mp3'){
   $mLink = module_invoke('filemanager', 'url', $attachment['fid']);
   $player  = "<div class=\"player\">\n";
   $player .= '<obbject type="application/x-shockwave-flash" daata="/player.swf?src='.$mLink.'" align="middle" height="18" width="160">';
   $player .= '<param name="movie" value="/player.swf?src='.$mLink.'">';
   $player .= '</object>';    
   $player .= "</div>\n";
  }
 $output .= "</div>\n";        
 

then modify the query inside attachment_load to read ...

<?php
$result = db_query("Select attachment.aid, attachment.title, attachment.description, attachment.fid, attachment.filename, attachment.size, attachment.hidden, `file`.mimetype From attachment Inner Join `file` ON `file`.fid = attachment.fid WHERE nid = %d", $node->nid);

Making secondary links appear on only some pages

Hi,

I would like to have my secondary links appear on one page only.

The page I'm working on is here: http://chris.threedd.com/drupal/. I'm using PHPTemplate.

The primary links appear in the top right, under the search box.

When a person clicks on "My Business" , some extra buttons are going to appear in the blue cube area. When they click on the other primary links those buttons will disappear. Is this possible? My thought is that it would probably done in the node.tpl.php file, but I'm not sure.

How do I wrap all comments in a single div?

Ok, this seems like it would be really easy, but it's throwing me for a loop.

At the bottom of a node, *if there are comments, I would like to wrap all of them in a div and insert a headline like so:

Background Image not working in Explorer 5.2 Mac

I have 2 background images coded using CSS on my site. It works on every browser except 5.2 Explorer Mac.

My css code is as follows ...

body {
background-image: url(bg_grid.gif);
}
#main {
width: 765px;
height: 600px;
background-image: url(bg_wtrmark.gif);
margin-left: 70px;
margin-top: 30px;
}

add "active" class to primary secondary menu in xtemplate

Hi all,

I use pushbutton theme for its very nice usability and standards complaints. As reported here http://drupal.org/node/24827 for phptemplate , I would like to insert an "active" class to the current link in the primary/secondary menu.

Then I will add some different CSS to highlight the current position of the user. (see http://www.ubuntulinux.org/ main navigation as example)

Pages

Subscribe with RSS Subscribe to RSS - Theme development