This forum is for assistance with theme development.

Multiple Avatars (i.e. Photo and Company Logo)

Hi,

Bit of a newbie to Drupal here with moderate experience in PHP. I'm trying to figure out the best way to implement multiple Avatars for each user. The site I'm setting up is for an association of lawyers around the world. Each lawyer/law firm has a photo of the contact lawyer, and a logo image for the firm that will appear on their profile page and with any articles they submit. My goal is to allow these member users to upload their logo and their photo when editing their profiles.

I'd like to do it with a minimum amount of fuss, or potential conflicts with the core modules and future updates...

I've come up with some possible ways to proceed:

1. Add a 'logo' field to the user table, and then anywhere in the user.module I see a reference to the 'picture' field, I copy and paste the code and edit to refer to the 'logo' field. (so 'picture' and 'logo' would be identical code snippets)

2. I try and implement an 'image' field in the profile.module & user.module, which would allow me to create any number of avatar upload fields by making add field>image field an available option in administer>profiles

3. I ignore the profile/user modules for this particular 'feature' and create some type of CCK node type that acts as a substitute profile node, and is referred/related to through the user id. So a posted Article would be a CCK node type with 2 calculated fields that would reference the images in the "Profile" CCK node type via the user id (if that's even possible)..

IE6 bug when using property "max-width"

In IE6 don't work property max-width when I use xhtml1-strict doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">.

If I remove this doctype - in IE6 property max-width work.

How to fix this bug without changes doctype?

Source code:

Customizing taxonomy-block layout

Hi,
How can I customize the taxonomy-block layout using .tpl.php file, like the way I customize a page.tpl.php file? Thanks for any help.

embedding drupal into html template

After a successful installation of drupal (angels singing *Hallelujah!*), I want to embed the blog (stories) into an existing template.

My homepage (http://www.rollingout.com/OFFLINE/test_homepage.php) would lead to articles which would be embedded into this page http://www.rollingout.com/OFFLINE/test_regularpage.php

How can drupal tackle something like this? Any examples how to?

really need help urgent !!!!

Hi, i have to create a new template for my work, so i pick one already done and start modify it until it look fine, then when i upload it to the hosting, the template looks awfull!!! How can be posible that it looks good on my machine and so bad in the hosting, (i use div instead of tables and it is all mess up).

Any sugesstions well be welcome.

Different Styles depending on sidebars' existance (Holy Grail)

I have a basic theme I use to make all the Drupal themes for clients based on theHoly Grail (http://alistapart.com/articles/holygrail) layout.

Yesterday, I noticed that my theme no longer works on Drupal 5 installations. I read the Converting 4.7.x themes to 5.x (http://drupal.org/node/64292) page to find that drupal_add_css() (http://api.drupal.org/api/HEAD/function/drupal_add_css) is now the new way to add CSS.

Now, the idea is that I load one of four style sheets containing the structural styles for the Holy Grail:

Both sidebars, left sidebar, right sidebar and no sidebars.

I used to do this in page.tpl.php, but drupal_add_css() does not work there. I then tried moving the logic to template.php, but in there, in function _phptemplate_variables($hook, $vars) {, it is only possible to check if sidebars are existant after it is no longer possible to use drupal_add_css().

I asked in #drupal-support, last night and this morning but no one knew or were available to help with this.

The solution I found then, after reading the Converting 4.7.x themes to 5.x (http://drupal.org/node/64292) page again, regarding the availability of the $css variable on the theme level, was to add this to the page.tpl.php file:

<?php
if (!$sidebar_left && !$sidebar_right) {
$css['theme'][path_to_theme() . '/hg_one_center.css'] =
array('path' => path_to_theme() . '/hg_one_center.css', 'media' => 'all'); }

Pages

Subscribe with RSS Subscribe to RSS - Theme development