Would be nice to have the ability to choose which information ends up being displayed in the Author Pane.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Michelle’s picture

There is some code in there for it that needs a UI to go along with it and also likely a good once over as it was never really tested very well and also written in D6. I'm assuming you are talking about preventing unneeded code from ever running as you can choose what gets displayed simply by editing the template. :)

Michelle

RobLoach’s picture

Status: Active » Needs review
FileSize
2.53 KB

Maybe something like this?

sw3b’s picture

Status: Needs review » Reviewed & tested by the community

Wow this look nice and it work great !
Thanks !

RobLoach’s picture

Status: Reviewed & tested by the community » Needs review
+++ b/author_pane.moduleundefined
@@ -225,8 +256,14 @@ function template_preprocess_author_pane(&$variables) {
+  // Remove some of the Author Pane components if desired.
+  foreach (variable_get('author_pane_disable', array()) as $component => $disable) {
+    if ($disable) {
+      $variables[$component] = '';
+    }

Still not sure this is the best way to hide an element, as we are completely ignoring the "Caller" option. What happens if we want to hide in the Block, but not on Advanced Forum? What are your thought?

sw3b’s picture

I don't think the block should be different... nice to have but not necessarly... On my side, i like to have a block looking the same thing everywhere.

Michelle’s picture

The main reason I had it by caller is that you would want more info displayed on the profile page provided by Advanced Profile Kit than on forum posts. APK isn't being ported to D7 so I don't really know what uses people have for AP outside of AF anymore. It may not be as important as it was back then.

One thing to keep in mind is the stub code I put in was intended to stop the integrated code from running at all rather than just not displaying it. For some integrations that may not matter but it becomes important if the integration code is "heavy" and you are repeating it X N posts on a thread only to hide the results from display.

Michelle

RobLoach’s picture

Status: Needs review » Needs work

Agreed. We should check whether to actually construct the data rather then to check whether to remove it.

For displaying data depending on which caller it is, what if we used vertical tabs for it, separating which $variables['caller'] is in use? I can only see only two currently? Disable components based on "author_pane_block", and "advanced_forum"? Know if there are any other callers around?

Michelle’s picture

Nothing in contrib that I'm aware of. Site builders can add their own callers, of course, but I don't know how often people make use of that.

Michelle

RobLoach’s picture

Status: Needs work » Needs review
FileSize
8.14 KB
26.3 KB

Attached is a patch which allows contextual disabling of author pane information.

Michelle’s picture

Nice! The main reason that stub code sat there unused forever is that I could not wrap my head around a good UI for it. I like it!

(haven't actually looked at the code, just the pretty picture, but I trust you :)

Michelle

Scyther’s picture

Looks promising! Will take a deeper look at it as soon as I have the time.

kmajzlik’s picture

Issue summary: View changes

Patch not working for me. I am not able to apply it fully. Tried both 7.x-2.0 and 7.x-2.x-dev (7.x-2.0+1-dev , from 2014-02-25, timestamp = 1393335806).
It applies only change to tpl file. Nothing to .module etc.

I tried Netbeans and diff from terminal.