Closed (duplicate)
Project:
Feedback
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Oct 2008 at 21:11 UTC
Updated:
11 Mar 2011 at 20:54 UTC
Jump to comment: Most recent file
Comments
Comment #1
sunhook_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.
Comment #2
Rosamunda commentedsubscribing
Comment #3
mdupontAt 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.
Comment #4
kabadayi commentedI 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
Comment #5
adamo commented@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:
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.
Comment #6
kabadayi commentedThanks 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.
Comment #7
muddum commentedI 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...
Comment #8
muddum commentedIt would be great if you could elaborate in more detail (a code example) on how to implement your suggestions:
"move the invocation of drupal_get_form() into a separate function, e.g. feedback_output(), and set a static flag that indicates whether the feedback form has already been output. Then, in hook_block() and in hook_footer(), call feedback_output() instead, if does not return something, don't output in the corresponding hook function."
Thanks in advance.
Comment #9
sleeping_at-work- commented+1
Comment #10
daniels____ commentedSun, I made the changes you said in #1.
Here I roll the patch for 6.x-2.x-dev version.
Can you commit it? Have I change anything?
Thanks in advance.
Comment #11
daniels____ commentedSun, I made the changes you said in #1.
Here I roll the patch for 6.x-2.x-dev version.
Can you commit it? Have I change anything?
Thanks in advance.
Comment #12
daniels____ commentedSorry, I submited the form two times.
Comment #13
daniels____ commentedOops I attach the patch again.
Comment #14
daniels____ commentedSome changes in Category and Version field of this issue.
Comment #15
daniels____ commented.
Comment #16
sleeping_at-work- commentedtested and... works great!
thanks for the patch
Comment #17
daniels____ commentedI want to attach the same patch but with more clear code and having used CVS for make it.
Comment #18
daniels____ commentedAnd for our project we have the follow need:
- We don't want feedback in the footer always it is not rendered in a block.
This is caused because we are rendering feedback inside of a Panel using a custom plugin.
So we added an checkbox in a admin settings form that says:
"Show Feedback in footer when block is not used."
I'm not sure this is smart but if you want consider it or if can suggest another solution I will be grateful.
Thanks again.
Comment #19
jody lynnIt seems like there are two main options:
- Add a setting to disable the output of the feedback form in the footer region.
- Use a static to force the form to only be displayed once per page.
The first option seems more straight-forward (not doing any magic behind the scenes on people), but requires adding a settings form for only this one setting. May be related to #693880: Alternative UIs/themes as alternate displays also means alternate placements of the form.
Comment #20
jody lynnThe best solution should be #1027786: Remove soft-dependency on Block module
Comment #21
jody lynn