Closed (fixed)
Project:
Author Pane
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2011 at 21:03 UTC
Updated:
3 Oct 2011 at 09:31 UTC
Jump to comment: Most recent file
I've installed author pane and advanced forum.
Then enabled core contact modul, but the link to contact didnot appear. I try to install Private message and that one function normal.
I've not made any chance to templates file.
What can I check or uncheck to get it working?
Thank you for answer.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | author-pane-modules-contact.author-pane.inc_.diff | 741 bytes | jbova |
Comments
Comment #1
petr illekBump.
Comment #2
jbova commentedUser Contact in Author Pane
The Drupal 7 Contact module no longer sets
$account->contact. Instead, the array key$account->data['contact']should be checked. This will be set to either 0 (disabled) or 1 (enabled). Here is the code to change to get this working. I will post a diff in the next message.Private Messages in Author Pane
You said you were going to try this. I have this module installed and it works perfectly with the Author Pane module.
User Location in Author Pane
Check out the file:
author_pane/modules/location.author-pane.inc
Currently, it sets the variable as follows:
The new location module does not return a '#value' key from the location_display function. You can change this to '#markup' to get the full markup of the location, as follows:
Otherwise, this can be customized like so, to only display the first locations city and province/state.
I would recommend doing this with a THEME_preprocess_HOOK function in your theme's template.php file. First, copy the funtion location_preprocess_author_pane from the file author_pane/modules/location.author-pane.inc to your theme's template.php file. Then rename the funtion to MYTHEME_preprocess_author_pane.
Here is my example:
File: sites/all/themes/MYTHEME/template.php
Note, that I don't load
$account->locations, since I only want one, and$account->locationwill return this. I also removed the following checks from the if statements:isset($account->locations) && count($account->locations)Instead, I only check for
isset($account->location).Lastly, you should probably have copied the file author_pane/author-pane.tpl.php to your theme's templates folder. So, copy sites/all/modules/author_pane/author-pane.tpl.php to sites/all/themes/MYTHEME/templates/author-pane.tpl.php. This is the file you should be modifying to customize the author pane display. So, I chose to change mine to show a label "Location" for the location. Here is the diff from mine to the original:
Note, per issue #1111962: can not overwrite advanced-forum.naked.author-pane.tpl.php in theme, if you are using the Advanced Forum module, then you will need to name your template file advanced-forum-author-pane.tpl.php. I keep both an author-pane.tpl.php and advanced-forum-author-pane.tpl.php, which are identical in my case.
If you want, you can use the Advanced Forum chosen style's Author Pane template file as your starting point. For example, if you use the Naked style of Advanced Forum, then you can copy the file from modules/advanced_forum/styles/naked/advanced-forum.naked.author-pane.tpl.php to sites/all/themes/MYTHEME/templates/advanced-forum-author-pane.tpl.php and edit the resulting file.
Good luck!
Comment #3
jbova commentedHere is the diff for the file author_pane/modules/contact.author-pane.inc to work with D7.
Comment #4
michelleThanks for this. I'll get the Contact module stuff fixed. Location won't be fixed but I can't discuss why at this point, sorry.
Michelle
Comment #5
michelleComment #6
Scyther commentedContact integration is fixed and has been commited a few days ago. Please report if there is any problem with that. I had not read this issue until now, so I did not mention any of you guys in that commit. Sorry for that. But thanks a lot for the work and I will add you in the changelog and in the release notes.
Location integration is removed because it is unsupported for now. It maybe will be back later on, but after a more stable release for Drupal 7 then.
Comment #7
jbova commentedThanks for the fix. You refer to a more stable release for Drupal 7 for Location integration. Which module are you referring to, Author Pane or Location? Given the current state of the Location module, I'm guessing you are referring to Location.
Comment #8
Scyther commentedUntil at least a beta is out for AP and Location, I will not work on getting Location integration back, if I decides to support Location in the D7 version. So I actually was referring to both modules.