Override default forms

JoeCotellese - September 29, 2003 - 20:01

I'm trying to do a new theme for my site and would like to change the look of the user and search forms. Can someone point me to the documentation for doing this?

Regards,
Joe Cotellese.
www.clearstatic.org
Digital Media News

Clarification

JoeCotellese - September 30, 2003 - 20:32

Ok, my post was a little vague. Here is my problem. I'm redoing my website using CSS boxes instead of tables. It's your typical 3 column layout (banner, left-content, right-content). Everything seems ok except for comment fields. My left-content box has a fixed width, and the default cols=70 for the comment text field make the comment box hang over into the right column.

I've fixed this by changing the cols in comment.module but that doesn't seem to be the best way to go. Any ideas?

same problem - fixed some

shane@s2studio.org - February 20, 2004 - 19:42

I too am having similiar problems with a tabless theme, theme looks great till the dialog box comes up and kicks everything over to the right. I have found that you can edit the default cols=70 of some by editing the lines in the modules
ie:comment.module : function comment_user
****************************original*********************************

function comment_user($type, $edit, &$user) {
switch ($type) {
case "view_public":
if ($user->signature) {
return form_item(t("Signature"), check_output($user->signature));
}
break;
case "view_private":
if ($user->signature) {
return form_item(t("Signature"), check_output($user->signature));
}
break;
case "edit_form":
// when user tries to edit his own data
return form_textarea(t("Signature"), "signature", $user->signature, 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."
". form_allowed_tags_text());
case "edit_validate":
// validate user data editing
return array("signature" => $edit["signature"]);
}
}

***********************modify lines***************************

return form_textarea(t("Signature"), "signature", $user->signature, 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."
". form_allowed_tags_text());

to read

return form_textarea(t("Signature"), "signature", $user->signature, a, 3, t("Your signature will be publicly displayed at the end of your comments.") ."
". form_allowed_tags_text());

... where the variable a is the new integer to specify the col length

still haven't found footer dialog or mission in configuration menu optitions

best,
s

Shane M. Smith
http://weblog.s2studio.org

found

shane@s2studio.org - February 20, 2004 - 20:17

Sorry for the mess i left up there, i am an architect not an information architect, however I found that you can modify most of these boxes within the system.module and you can edit the common.inc file to default a universal overriding col value.

Best,
Shane

Shane M. Smith
http://weblog.s2studio.org

One line fix for global comment-box width

Ton - June 22, 2004 - 23:19

Thanks for the tips, it helped me zero in on this problem when I ran into it.

Depending on what someone wants, there's a 1-line fix that could be useful. My problem was with all the 70-column boxes which were too wide for our site in many cases. So I just added the following line as the first line in the form_textarea function, in common.inc:

if ($cols == 70) { $cols = 55; }

Voila, all 70-column boxes are now 55 columns. It's evil, but it works.
Of course, there are variations on this, like:

$cols = min($cols, 55);

 
 

Drupal is a registered trademark of Dries Buytaert.