This forum is for assistance with theme development.

trying to build custom theme--web developer

Hi all,

I'm a web dev, I've built about 60 sites or so, using css/xhtml.

I work in xhtml strict 1.0. I've also worked with some php, other people's codes, and done ok by it.

My question concerns templating/theme development. I am having a lot of problems--even just choosing a theme and then viewing content in it beside the admin pages. I really want to build my own, and have done the xhtml/css, but don't know which tags to drop where.

HOWTO: Create image submit button

Hello, I wanted to change the search box appearance from an ugly grey button to some custom image and I found this task being far from trivial (I even think that there is a bug in Drupal Forms API but I'm a total newbie so I don't want to make quick conclusions). If you have the same issue, read on.

First, please forget the technique which uses CSS only. You may hear of an image replacement trick which substitutes textual 'input type=submit' by some image. Forget it - you will never achieve cross-browser compatibility, I tried hard but failed (I published some results on my Czech blog - you won't understand much but you might appreciate code samples).

The right approach is to change the page rendering and to emit 'input type=image' instead of 'input type=submit'. Here's step-by-step guide:

  1. Navigate to your theme directory and open the template.php file (create it if it doesn't exist).
  2. Add this function:
    function phptemplate_search_theme_form($form) {
      $form['submit']['#theme'] = 'button';
      $form['submit']['#button_type'] = 'image';
      $form['submit']['#attributes'] = array(
        'src' => '/path-to-your-theme/img/search-button.png',
        'alt' => t(Search)
      );
      return form_render($form);
    }
    

    This function changes the search form tree (see the Forms API Quick Start Guide if you don't know what I'm talking about) and then renders the form.

Block Party

First of all, it took me ages to type out the following diagram, so i'm hopeing one of you kind folks can help me out. :)

The diagram below shows the general layout structure of my page.tpl file. I have the Latest Forum Topics and Latest Comments currently displayed on the page in section A. However, I would like the Latest Forum Topics to display in section D and the Latest Comments to display in section E.

A                 B              C
+--------------+  +----------+  +----------+
|              |  |          |  |           |
|              |  |          |  |           |
|              |  |          |  |           |
|               |  |          |  |          |
|              |  |          |  |           |
|              |  |          |  |           |
|              |  |          |  |           |
+--------------+  +----------+  +----------+

D                        E                  F
+--------------+  +----------+  +----------+
|                    |  |                |  |              |
|                    |  |                |  |               |
|                    |  |                |  |              |
|                    |  |                |  |              |
+--------------+  +----------+  +----------+

I was wondering if someone could tell me how I can move the aforementioned Topic and Comments blocks to position them where I want them? In the admin screen I have the placement currently set for both blocks as 'content.' I was sure that there used to be a module to allow you to add extra placement areas into the admin screen, but alas I cannot find this anymore.

Merging flatforum, admin-page, user_profile code snippets into template.php

I am not a coder. I want to use the flatforum theme/module package to style Drupal forums. I also want to style seperately the administration pages and the user profile. I am having difficulty figuring out how to merge code snippets in the template.php file of a phptemplate engine based theme that will accomplish these goals. Among others, the following files are in the theme directory:

node-forum.tpl.php
page-admin.tpl.php
user_profile.tpl.php

I'm thinking the code for the template.php file from the flatforum theme/module package should probably stay intact. Here is the template.php file that comes with flatforum theme:

Changing the text in the footer (not in the "settings" section of admin)

I kind of feel stupid to ask this, but I am at a loss and can't find what I am looking for. I am using the Kubrick theme and down at the bottom, there is the footer. Hardcoded in to this theme is a bit about being powered by Drupal and valid this and that and a link to email the guy who did it.

You can go in to administer and settings and add some information to the footer, but it only adds it. Where can I go to get that valid info and contact information off the footer? I feel stupid asking this as I can't find it and I know it's something simple...any help from anyone?

Blue Marine, Header format problem

Hello,

Ok, I have my Drupal site working (sorry it is an intranet, so I cannot put a link to it) but I am not really up to speed on theming, so I am hoping someone out there can assist.

I am using the Blue Marine theme as my basis and I have the nice_menu module loaded. I have turned off the Secondary Links from within the theme and replaced it by using the Nice_Menu in the header and making it a down menu referencing the secondary links. This seems to work really well except that I get a horizontal line in the header which I want to remove.

Pages

Subscribe with RSS Subscribe to RSS - Theme development