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 files into your module directories (remove the .txt that uploading requires) or take the functions out of them and put it in your module files. 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 |
|---|---|---|---|
| #23 | privatemsg.author-pane.inc_.txt | 1.09 KB | michelle |
| privatemsg.author-pane.inc6_.txt | 844 bytes | michelle | |
| privatemsg.author-pane.inc5_.txt | 1.13 KB | michelle |
Comments
Comment #1
litwol commentedHow urgent is this ? I would like to release beta/rc with upgrade path before opening up other module integrations. mind you that beta/rc is pretty close.
Comment #2
michelleWell, it's been removed from AF in the dev so as of the next alpha, which should be within a week, people will have to manually add this file to privatemsg. It's up to you when you add it. It's just a simple file drop in so it's not horrible for users to have to do. I just wanted to get the ball rolling because I'd like the transition to be complete by the time I release 1.0, hopefully in November some time.
Thanks,
Michelle
Comment #3
litwol commentedWe should have a sub-module that offers integrations between various projects. or maybe a folder such as /extras/.
I am not really sure what is the best course of action. Original plan was to keep privatemsg as minimal as possible and have separate modules that offer specific functionality, such as that integration with AF/APK.
for now i imagine 2 options
1) have /extras/ folder inside privatemsg folder where we would drop various files.
2) have pm_integrations module as part of the privatemsg project. that module will life specifically for offering integrations between privatemsg and other projects.
lets brainstorm.
Comment #4
michelleI guess it depends. Do you expect privatemsg is going to want to integrate with many other modules? If it's only AF/APK that you're going to integrate with, then it seems like a lot of fuss over a very small function. In fact, the function could be made a lot smaller if you made an API function something like:
Then it just becomes:
Just off the top of my head... No checking for typos.
At any rate, like I said on IRC, you can stick the function wherever you want. If you don't stick it anywhere at all, then your users will have to add it to your module themselves if they want to have privatemsg functionality added to their forums and user profiles.
Michelle
Comment #5
berdirAs there was already a request to add a privatemsg send link to nodes and comments (#327925: Send new message link on comments and nodes), I think it would make sense to add such a function to the (currently being in planing) privatemsg API.
Comment #6
litwol commentedIndeed. there are a lot of places where we can offer pmsg integrations. i think we should move it into a sub module pm_integrations or something.
Comment #7
naheemsays commentedAre there many places/modules that would integrate into privatemsg?
To me it seems like too much work for little gain to have a whole other integration module.
Comment #8
litwol commentedWe already have integration with user profile, i would happily move that into an integrations dedicated module. today we need to integrate with APK/AF. tomorrow we'll need to integrate with something else ?
we will need to add at least node + comments integrations at some point.
If its still not enough, we could place these files somewhere in /extras/ folder.
Comment #9
naheemsays commentedLets cross that bridge when we get there.
We seems to be refactoring our code a lot anyway.
Comment #10
michelleAF/APK doesn't care where the hook lives as long as it's accessable. It just needs to go somewhere because, as of the alpha I released last night, privatemsg no longer works with AF without users having to hack the privatemsg module to add the hook themselves.
Michelle
Comment #11
litwol commentedalright then. lets focus on apk/af only for now. are the files ready to be commited _as is_ ?
Comment #12
michelleYes, I pulled those files out of alpha 13 where they were working fine. You should be able to just drop the file into your project directory or pull the hook out of the file and put it whereever you want. For D6, it's just the normal template preprocess function handled by core. For D5, AF emulates the D6 theme system to grab the preprocesses.
Michelle
Comment #13
litwol commentedd5 version has been commited to DRUPAL-5 branch. d6 is yet to be done.
Comment #14
arcane commentedHi Litwol,
This code is not in the 5.x-3.0 version of the code correct? Is this in head, I downloaded it but didn't see the code. Can you clarify?
Thanks
Comment #15
litwol commentedits in the 5.3-dev, thats where i committed it.
Comment #16
arcane commentedThanks, I will give it a try.
Comment #17
naheemsays commentedWIll the file also be dropped in for Drupal 6?
Comment #18
michellenbz - Yes, but people on this thread are reporting that the user titles function I'm using doesn't work in D6. If that function has changed, I'll need to make a new file for D6.
Michelle
Comment #19
michelleErm... #18 was supposed to go on the user titles issue. Not sure if it's me that got confused or Drupal. LOL! Probably had more than one open in tabs.
Edit: Actually, maybe it was supposed to be in answer to #17 but I was just mixing issues up. So, um, to answer #17, yes, unless litwol changes the function it uses.
Michelle
Comment #20
litwol commentedI've committed this to 6-dev. thanks.
Comment #21
samuelet commentedThis patch does not seem to be committed in 5-3-dev, but in 5-dev, and any archive of it is avaiable.
Please, could you commit in 5-3 too?
Comment #23
michelleRe-opening this since I've just been made aware the 5.x branch never got the file. I am attaching the version that is in use on my 5.x site with privatemsg 5.x-3.0.
Michelle
Comment #24
michellePulling this back to my queue since litwol decided not to add it after all so it needs to go in AP.
Michelle
Comment #25
naheemsays commentedI assume that this is only for 5.x as it was added for privatemsg 6.x-dev
Comment #26
michelleOops, yes, good catch, nbz.
Michelle
Comment #27
michelleOk, committed to Author Pane.
Michelle