On my site the preview and submit buttons appear to the right side of the trackback block. Users who expect the buttons to be at the bottom of the page have a (extremely small) hurdle to find the buttons. Sometimes the buttons are rendered into the next column due to the width of the trackback block. While I am not aware if this happens on all sites, I wanted to offer a simple patch that works well on my own site. If this fix not in the proper place I would appreciate constructive feedback on where it does belong. Thanks.

Index: node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node.module,v
retrieving revision 1.439
diff -u -F^fun -r1.439 node.module
--- node.module 11 Jan 2005 09:41:49 -0000 1.439
+++ node.module 16 Jan 2005 08:43:19 -0000
@@ -1220,6 +1220,7 @@ function node_form($edit) {
$output .= form_hidden('type', $edit->type);

// Add the buttons.
+ $output .= '
';
$output .= form_submit(t('Preview'));

if (!form_get_errors()) {

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grantbow@civicspacelabs.org’s picture

FileSize
510 bytes

It would help if I attached the correct file.

chx’s picture

FileSize
504 bytes

/ instead of \

Otherwise +1.

tangent’s picture

This is not at all a semantic solution. This should be handled by the theme, preferably with CSS.

Steven’s picture

Sounds like your theme is missing a clear attribute somewhere, but your description isn't exactly clear.

grantbow@civicspacelabs.org’s picture

First, I aplogize for the wrong file. I realize this does not help add clarity. Talking about HTML tags in these forums can be awkward as they don't come through correctly when comparing the web forum, email and when pasting patches. I will try using pre tags in the future.

I am guessing some additional information is required. If you asked questions that would help. First I am using the PushButton theme. I see the buttons being pushed to the right because of the lack of a directive, either HTML or CSS, to move them down. For a specific example, I see this when I do a blog entry.

Beyond this I can only guess and am hoping for guidance from those more knowledgable than me about the particulars. I can not imagine all the code paths and possible ways to narrow down this issue. I have provided one specific, functional solution that does EXACTLY what I need. All I know right now is that this solution fits the needs for my site as I stated in the opening. I am hoping that by offering it a general solution can be agreed to and comitted so other users like me will not have to go through this same process. One guess is that my site has the Trackback plugin loaded, so maybe the problem only shows itself when non-core modules are used. Trackback seems to place new content just before the buttons but in reading the code I don't understand at exactly which line it does so, perhaps one of the node_invoke_api() calls.

If a semantic solution would be better, can you give a specific example of how this would be implemented to provide exactly the same behavior? I don't know CSS well. This may be a barrier to a constructive conversation. This particular solution works very well on my site, so if this is wrong I would appreciate specific help in understand what alternative I could use. If you are confused about reproducing it, can you please ask for information (hopefully information that I know how to provide) so we can have a conversation about this? If it means changing all the contributed themes for Drupal, is not putting in a simple fix as I proposed here more or less helpful to the project as a whole? If it requires patching all the themes to do it the right way I hope that someone with the skill necessary to do it correctly can help.

If my description is not clear in any way, what questions do you have that would help you understand this issue? Hopefully I can answer them.

Steven’s picture

Re: semantic: a BR is a layout tag. To me it sounds like your theme is lacking a "clear" CSS style somewhere.

Re: more information: trackback is not a core module. It would be handy if you could set up an example page.

By the way, for posting HTML, just use <code> tags. Pre will mess up the layout. I updated project.module to properly apply filters before converting to plain-text, but it won't affect Drupal.org until its next update.

grantbow@civicspacelabs.org’s picture

It's clear this is the wrong solution. Sorry.