This forum is for assistance with theme development.

critical Problem with IE

hello,
I have developed a nice site, by using drupal: http://www.metro-vanlines.com

I am using FireFox, and just after I made it online.
I noticed a wierd BUG...

In IE, every page that has embeded movies (from you tube),
has a full page blank page, and if you scroll the mouse one page down,
you see that the real page exist, but it is just move down from some reason.

views override for title??

hi,

i have views creating tables which display the title, date created, and author. I need to wrap all titles around a div tag. I was told that I should use this:

phptemplate_views_handle_field_node_title

but I don't know where to go from there. Any help?

Where does repetitive template PHP code go? template.php or omnibus module?

For my personal weblog, I had PHP code in node-blog.tpl.php and node-aggregator2.tpl.php which was exactly the same. (A modification of the just tags code, if you must know.) Originally I stuck some repetitive code in template.php, but those functions weren't overwriting any themeable functions, they were brand new functions that pulled data out of the database. The other day I heard of the practice of writing your own custom modules for doing repetitive tasks, each individual task being too small for a full module, and now after trying that, I'm wondering what are the best practices around functions that are used in themes? Here's my thinking, but thoughtful corrections are welcome!

  • use template.php only to override "theme underscore" functions, like theme_item_list()/theme('item_list').
  • if you don't think PHP code that doesn't override "theme underscore" functions, it can go directly in the theme
  • if you think PHP code will repeat, or know it does repeat, then move that code into a module, and in that theme, be sure to use if (module_exist('omnibus_module')) or if (function_exists('omnibus_function')) before calling the function
  • if the functions seem like they could be generally useful, and apply only to a certain module, then consider modifying that module directly and submitting the code to the module developer, or at least make the patch public so that others can +1 or -1 it.

Overriding style.css filename in my theme

Hi guys,

A quick question: how can I override my "style.css" filename from within my theme? I want it to be renamed to "style.php"

I can think of two methods:
1) by hacking the template.engine but I dont like the idea of hacking any core files just my theme files.
2) i can hardcode the filename into my theme but I dont like breaking the Drupal convension as well as any duplicates because of print $styles

Both of these are out of the question.

Apply style to Web master comments

I was wondering if anyone knows any way to apply a specific background style to comments replied or posted by the web master.

I tried this but had no luck. Is there an easier way to go about this
<div class="<?php if($name == "Web Master") print "master" ?> <?php print $zebra ?>">

Thank you.

i've designed my own theme.

i've designed my own theme. how can i add login entrance, last comments, recently posted articles, polls, etc. to the left side ? i want to add these by coding.i don't want to work with add/remove block from the admin panel. i want to add codes over my own theme. if you help i'd be glad.

thanks.

Pages

Subscribe with RSS Subscribe to RSS - Theme development