Remove from hook_footer

burgs - October 29, 2008 - 21:11
Project:Feedback 2.0
Version:6.x-2.0
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

Can we remove the feedback form from printing in the page footer please? If we can add it as a block to our own footer, isn't that enough. I'm currently getting validation issues because of multiple items with the same id.
I propose just delete the feedback_footer function altogether? Or should there be a flag on a config page?

#1

sun - October 30, 2008 - 08:59
Category:bug report» task

hook_footer() has the benefit of being region-independent. So Feedback may also be displayed on pages that do not output the region the block was placed in.

However, the current implementation does not allow to use the block at all.

To make this work, we have to move the invocation of drupal_get_form() into a separate function, f.e. feedback_output(), and set a static flag that indicates whether the feedback form has already been output. Both in hook_block() and in hook_footer(), we call this function instead, and if does not return something, nothing is output in the corresponding hook implementation.

#2

Rosamunda - January 28, 2009 - 20:06

subscribing

#3

mdupont - March 31, 2009 - 11:16

At least the id should be converted to a class, since as soon as one adds a block for the feedback form, one gets 2 elements with the same id.

#4

kabadayi - September 4, 2009 - 07:12

I m trying to replace feedback as block somewhere on the right side by removing it printing from the page footer, since i m not expertised with these codes can anyone please explain it step by step and clearly and tell me where do i apply this changes.

thanks in advance

#5

adamo - September 9, 2009 - 02:53

@kabadayi:

Just to into Site Building -> Blocks, and place the Feedback block in whatever region you want. Then, edit your theme's CSS, and do something like this:

  /* Feedback module */
  div#block-feedback-form
  {
    position: relative;
    top: 0px;
    right: 0px;
  }

That should get it in your block. You will probably need to style it further to get the widths of everything in the feedback form to fit within sidebar or wherever you're putting it.

#6

kabadayi - September 12, 2009 - 16:45

Thanks for the reply but i already tried editing theme's CSS and well it worked but the feedback is still showing up in different places when i use different browser or other resolution. So i reckon i should do some other changes which prevent this module printing on the footer and allows me use it as a block.

#7

muddum - November 30, 2009 - 23:12

I am also having the issues mentioned above; if I add a block/move feedback block to another region I get a duplicate block in the footer as well - with the same ids and classes so I cannot hide the "bad" one. If I try just moving the footer via css e.g.

div#block-feedback-form {
position: relative; /* was fixed*/
width: 220px; /* added this 220 wide*/
bottom: 203px;
/*left: 800px; /changed to left and 800*/
overflow: hidden;
z-index: 10;
}

Then I get horrific xbrowser issues so things are unworkable. It would be great to have a mechanism that allowed more flexibility - if I get something going I will submit. Otherwise seems to work nicely...

 
 

Drupal is a registered trademark of Dries Buytaert.