AF (and soon APK) allows other modules to add variables to the "author pane" via hook. I initially took the easy route by simply writing the integration myself and included the code in AF/APK. As I get more and more requests to integrate module X, I realized this was a bad approach and am starting the process to get the hooks into the individual contrib modules.
All I need from you is to either drop the attached file into your module directory (remove the .txt that uploading requires) or take the function out of it and put it in your module file. Both methods work, just choose the one that works best from you. If you aren't willing to do either, please let me know.
For more information, see Adding variables to the author pane
Thanks,
Michelle
| Comment | File | Size | Author |
|---|---|---|---|
| user_titles.author-pane.inc_.txt | 418 bytes | michelle |
Comments
Comment #1
Lucretia9 commentedThe filename is incorrect, it should be "user_titles.forum.inc" for it to display the user titles in the forum.
Luke.
Comment #2
michelleThe file name is correct. I did write this, after all... ;) This issue is for the dev version of AF. The last alpha already has this file.
Michelle
Comment #3
michelleAny thoughts on this? User titles are an important part of forums...
Michelle
Comment #4
michelleJust had a look at the D6 code in CVS and it looks like user_titles_get_user_title($account_id) still works. So this same file should work for the D6 version as well.
Michelle
Comment #5
CompShack commentedI'm on D6 and AF alpha16 and can't get this to work. I don't think the user_titles maintainer has made the modification yet, BUT i tired adding your code to the user_titles.module file (didn't work) and I also tried adding your code as file user_titles.author-pane.inc and also no user titles shown. Has anyone got this to work yet?
Comment #6
websites-development.com commentedIn D5, I've found out that you have to clear the cache. user_titles.author-pane.inc is used after this operation, you can leave it in advanced_forum/modules folder (and you can test this by adding
die('test');in this file.)However, that does not solve the entire problems. it seems user_titles_get_posts($uid) in user_titles.module not working properly. It does not return any value...
I'm trying to debug this...
Comment #7
michelleMoving version to D6 since it works fine in D5. I'd really like it committed to D5 as well, though. I'll test it in D6 when I have some time. My site is on D5 so AF doesn't get tested quite as well on D6.
Michelle
Comment #8
michelleRequest withdrawn. I have taken the unfortunate step of creating a new project to service my modules since I was unable to get any cooperation from most of the maintainers who's modules I'm trying to make work with mine.
Michelle
Comment #9
snsace commentedI don't know if my problem with user titles is related to Advanced Forum or not...
I am using AF alpha 16 and I installed user titles beta 1. I followed the readme file for UT and put this
in both my comments & node .tpl files:
When I go to the UT admin and select a content type, I get 2 warning messages referring to the
module lines 202 and I think 214. I can post the actual warning here if it will help. I do have user stats and AF installed
and everything seems to be working fine but this UT module is acting up. Not sure if I should be using the .dev versions.
Also, do I need to put the above file in my AF modules folder for AF to work with user titles?
Thanks for any suggestions.
Comment #10
michelleDoesn't sound like it's related to AF. The variable is the same but the worst that will happen with that is AF overwriting it with the same value. I suggest filing a new issue for user titles with the errors you are getting.
Michelle
Comment #11
snsace commentedOk, I posted my problem in user titles project.
As for the "user titles author pane" file above...will I need that in my AF modules folder in order for UT to work w/AF?...
or should I use the new author pane module here: http://drupal.org/project/author_pane
Comment #12
michelleYou need to put that file in user titles for now since it was never added to the module. Don't use author pane until the new release of AF. It only works with the dev at this point.
Michelle
Comment #13
radyaweb commentedYou need to clear the cache first, so the new variable could come out.
Use devel module to makes you easier to clear cache, or just use update.php script by running it.
Comment #14
snsace commentedThanks for tips...drupal 6 comes w/cache cleaner in performance admin. I'll try this once I can figure out why I'm getting warnings
in user titles admin.
Comment #15
lareinefroide commentedHello. I am new to Drupal and am setting up my first website, www.TheTalkBox.net. I have installed Advanced Forum. When I try to open the one and only forum entry so far I get the following error message.
* warning: include(./modules/advanced_forum/author-pane.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/bankhead/public_html/thetalkbox/includes/theme.inc on line 1011.
* warning: include() [function.include]: Failed opening './modules/advanced_forum/author-pane.tpl.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bankhead/public_html/thetalkbox/includes/theme.inc on line 1011.
I downloaded your text file and moved it over to the module folder and it did not make any difference.
Help please! Also.. I do not know how to PHP code.
Comment #16
michelleThat has nothing to do with user titles. What version of AF are you using?
Michelle
Comment #17
agileware commentedHi Michelle,
Sorry your code was not in the last release of user titles, it was missed by accident.
Do you still want the function user_titles_preprocess_author_pane(&$variables) added to user titles or will it not be of any use with your new direction?
Comment #18
michelleIt's up to you. Because of the lack of response (not just you; there were many), I went and created a third module to house all the code. But the code is still a user_titles implementation of the hook, just put in my module, so it can be moved to your module if you would like it. At this point, it's probably just as easy to keep it in author pane since I have so many other modules there anyway. As long as you don't change from using user_titles_get_user_title(), it's easy enough to care for. Ideally, all these hook implementations should have been in their respective modules but, since that didn't work out, it probably makes more sense to keep them in mine rather than having some there and some in the right place.
Michelle
Comment #19
agileware commentedOK then, we'll leave it out of UT.
Thanks.
Comment #20
snsace commentedWell, I've added the attached file to user_titles module folder. Only problem now is user title images
don't show up in author pane. The text title that I assigned to the image when I uploaded it shows up
in author pane, but not the title image. Running D6.8, AF alpha 15, & user titles beta2.
Comment #21
Saudor commentedI'm using Drupal 5.6 but user title is not showing up. (currently using the latest version avaliable for advanced forum, author pane) Is there an extra step that I'm missing?
P.S. I already added the required code to template.php
Thanks for your time
Comment #22
michelle@Saudor: You don't need to add anything to template.php. Please file an issue in the AF queue and I will try to help you rather than hijacking this one.
Michelle
Comment #23
bryancasler commentedI am having this same problem with 6.x, I get the title text but no image.