I would like to know how do I invert the position of 'shoutbox-add-form' and 'shoutbox-post' divs according to the attached image exemple.

Comments

stv’s picture

Project: Tribune » Shoutbox
stv’s picture

Invert position of 'shoutbox-add-form' and 'shoutbox-post' divs, acording to attached image.

snufkin’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Assigned: stv » snufkin
Status: Active » Needs review
StatusFileSize
new1.35 KB

This should be depending on what the admin configuration is in the variable 'shoutbox_ascending'. Its an easy change in the function that renders the content of the block, patch attached.

SpiffBB’s picture

Thank you!
The mod works great and is very useful for me.
/O

rv0’s picture

Thank you

mod posted in #3 works great and is much less nasty than the hack i was using.

works perfect

disterics’s picture

@snufkin I think this should have its own option so that users can choose to have the form be at the top or at the bottom of the page. Will wait for your patch.

disterics’s picture

Also can you please add a test for this?

aschiwi’s picture

Uhm I successfully patched a 6.x-1.x-dev version of shoutbox but the add form is still below the posts, is there something else I would have needed to do?

***update
Never mind, read the source code which says "// Put the form and forbidden message on top if the messages are ascending (newest on top)."

aschiwi’s picture

StatusFileSize
new1.6 KB

I have created my first patch ever which adds a better description to the "Post newest shouts on top" checkbox :) Please review it and see if I did everything correctly. I included your changes so people get all changes at once.

By the way, I did not run into any trouble using your patch, it works fine.

mstef’s picture

This is done in 2.0.

satyavirya’s picture

Hi Mike, I just updated to 2.1, I don't see the add shout form position to be on bottom when I unchecked "Post newest shouts on top". I think patch from snufkin http://drupal.org/node/635266#comment-2343302 will do.

satyavirya’s picture

sorry for the double post, bad internet connection

mstef’s picture

It was my understanding that Shoutbox 1.x puts the shouts above the shout form. According to the screenshots at the beginning on this issue, it seems that the shouts are desired to be below the shout form. And that's what 2.x does.

snufkin’s picture

I think the issue here (at least for me) was that it should be on the end where the newest shout is. So for shouts where newest is on top - put the shout form above, for shouts where oldest on top put it below. This is more intuitive for most of the users. The 2.x version simply puts the form above the shouts.

liliplanet’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

would most appreciate the form on top for 7.x pls ..

cimo75’s picture

+1

jberg’s picture

StatusFileSize
new640 bytes

Here's a little helper module for switching the order of the block's elements as requested in comments #15 and #16. It has no user interface, but you can set the order of the elements in shoutbox_block_order.module; smaller values will "float" higher. There's a bit of documentation in the .module file. Hope this helps.

jberg’s picture

StatusFileSize
new1.11 KB

And in case there's someone on a Windows machine wanting to use that helper module, here's a zip archive of the same thing.

jmorenobl’s picture

I just wanted to thank you for the helper module :D

Regards,
Jorge.

micahw156’s picture

This can also be changed using hook_form_alter() in a site module.

/**
 * Implements hook_form_alter().
 */
function MODULENAME_form_alter(&$form, &$form_state, $form_id) {
  switch ($form_id) {
    case 'shoutbox_add_form':
      $form['#weight'] = -20;
      break;
  }
}

I also like the idea of making this configurable on the admin screen, but this is a quick (and clean) fix in the interim.

micahw156’s picture

Marked #1826256: Put "Shout" filed above the messages as duplicate of this issue.

micahw156’s picture

Marked #1767998: Location of Add Form as duplicate of this issue.

vitalblue’s picture

Issue summary: View changes
Status: Needs review » Closed (cannot reproduce)