Closed (won't fix)
Project:
Panels
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
21 Sep 2007 at 11:19 UTC
Updated:
6 Aug 2009 at 21:14 UTC
Jump to comment: Most recent file
Talked with merlin at drupalcon about starting work on this. No idea how far I'll get, but if people are interested, or are willing to help, ping this thread. I'll post an initial bit of code soon.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | panels_profile.txt | 30 KB | Tresler |
Comments
Comment #1
michelleWhat is it? Building user profiles with panels? Or installation profiles? Or making profiles for panels?
Michelle
Comment #2
Tresler commentedwell, the idea is creating user profiles with panels. i.e. users can use the drag and drop interface to tailor their own profile, and webmasters could make content available to them in the same fashion as other panels.
I'm still very much in the mapping and 'looking at Earl's code' phase of this. So any input on 'cool ideas' and such is completely welcome.
Comment #3
michelleAwesome! This sounds a lot like the mysite module. On my CRO site, my plan is to have profiles, which are all about the user and mysite pages which are user aggragated content. It sounds like yours is a combination of those.
I actually use the panels css for http://shellmultimedia.com/tutorials/user-profiles and would love to be able to use panels itself. I can't help much with the code but can do testing and UI feedback.
Michelle
Comment #4
amitaibusubscribe
Comment #5
brunodboGreat. I'm willing to help with testing and UI stuff.
Comment #6
wim leersIf I manage to find the time, I'm willing to help. (I wrote Mini Panels.)
Comment #7
catchalso subscribing, been holding off a shift from core profile module until something like this shows up.
Comment #8
Tresler commentedSo, I've finally started on this and am hammering out _how_ it should work. Right now I am envisioning three scenarios:
A) Admin wants to design a profile page, but doesn't want users to do anything but fill out their profile.
B) Admin wants to create various templates - then let the user populate them through the panels interface, but users can't control templates.
C) Admin lets users go wild - making their own templates and adding their own content.
I'm using panels-nodes as a start. I'm still figuring out how this all fits together, but thats the update. Should have an alpha version this weekend, I hope.
Comment #9
Tresler commentedworking with 11 now
Comment #10
merlinofchaos commentedSome points:
Panels profiles should define the URLs available administratively and not let the user define that.
Panels profiles will need a 'user' context. Note that the user context doesn't exist, but it'll be a context that contains the user object.
Since the user context doesn't exist, there aren't any content types that use it; the only thing I can think of offhand that should use it are the author information block (which we have to rig up because the block uses the URL and we want something like that block, but uses our passed-in context) and the actual profile pages.
Comment #11
michelleCan we get an overview of your plans? I'm planning on updating my tutorial to use panels Real Soon Now and am interested in this project but there isn't a lot of information. Will it be using the core profile module, nodeprofile, bio, something new? Is this going to be a new sub module of panels? I don't want to waste my time doing my own thing if I can jump on your bandwagon but first I need to figure out what music you're playing. :)
Thanks,
Michelle
Comment #12
Tresler commentedRight now, I'm just concentrating on getting the panels display mechanism to work in the /user/uid area. Admins can reveal any content that panels can reveal. Step 2 would be to route the current user/uid to default so there would be no immediate difference between the current core user page and the user page after enabling panels. Step 3 will be integrating the core profile module, I think. Thats as far ahead as I've thought. This is probably easier than I'm making it, but truth be told, I've talked more about coding than I've done coding, so this is also an exercise to get me up to speed.
I don't see a need for node-profile as with the panels integration you'll already be able to put any node on your profile page - so you could create a 'profile' content type and enable it in an area in your panels profile. However, there is no reason you couldn't use node-profile with this.
Yes, it is a sub module. I need to talk to merlinofchaos if he wants me to create a new project, or just have him cvs the code in.
I do want to have a setting that allows for multiple profile tabs and a way for admins to limit these. An 'add a page' functionality. So if a user wants to have an info page and a contact page they could - worling something like google's interface.
Comment #13
Tresler commented@10
I'm not gonna lie merlin, I'm afraid I didn't understand a lot of that. Let me go point by point though:
1) "Panels profiles should define the URLs available administratively and not let the user define that."
What do you mena by URL available - I was planning on routing it through the same 'content available' interface on panels pages and panels nodes. The url of the profiles is already set.
My thought is that an admin can expose blocks, content types, and such through that, then the user can select them to put on their portfolio. I guess this would make heavier use of routing things through blocks, but I Think I'm ok with that.
2) "Panels profiles will need a 'user' context. Note that the user context doesn't exist, but it'll be a context that contains the user object."
If you mean that each 'profile' needs to be aware if it belongs to the viewer or not, I follow you and am planning on it. i.e. we can't always count on the content displayed by a panel to know that the user whose page it's on is the user that created it, without a panels content <->owner translater yeah, the panel needs to know who it is. Wow, I think I probably just made that more confusing - if thats even what you meant.
3) "Since the user context doesn't exist, there aren't any content types that use it; the only thing I can think of offhand that should use it are the author information block (which we have to rig up because the block uses the URL and we want something like that block, but uses our passed-in context) and the actual profile pages."
Nope, sorry, that lost me. We should connect in IRC.
Comment #14
Tresler commentedFrom the aforementioned IRC conversation:
[11:44] samtresler: I should start with the concept of 'context' that is becoming more and more important to Panels.
[11:44] There is an object in Panels that's called panels_context -- and it is really a wrapper for some other object.
[11:44] yeah, that was the word that was throwing me I think.
[11:44] i.e, a node, user, term or vocabulary.
[11:45] Contexts currently have 3 ways they can come into a panel, and I'm going to add a 4th this week. Also, I'm doing some low level changes to make that object a little more defined. Right now it's *just* a wrapper around that object, and it needs more information.
[11:45] Arguments take a string from the URL and produce a context.
[11:46] Relationships take 1 context and produce another context.
[11:46] Content can require 1 or more contexts.
[11:46] For example, the 'node content' content pane requires the node context.
[11:47] Panel pages figure out all the contexts from the UI
[11:47] But something else -- panel-profiles -- will get its context from the module that controls it.
[11:48] What I'm envisioning is a module where the administrator says "This here URL is now a panel page." And a couple of thi
ngs happen:
[11:49] 1) Some argument identifies the user, and loads a context. 2) The argument can optionally association a different disp
lay to the user. 3) The module will allow, with administrative permission, a user to modify his or her display for that page.
[11:50] 3) is the reason you can't just use panel-pages. If you don't need 3, then right now all you need is the argument and
a content_type that displays whatever content about the user we want to display.
[11:50] And panel-pages can already override user/% probably
[11:50] We might also want to be able to override user/%/edit but the user edit form is so freakin' weird that I'm not sure th
at'd work nearly as well as node/%/edit works.
[11:52] arguments/user.inc can likely be modeled fairly easily off of arguments/node.inc or arguments/term.inc
[11:53] I have more work to do.
[11:54] I was misunderstanding a few things that would have become fairly obvious as I worked - but this saves me that work.
[11:55] I need to modify panels_node.module to automatically include itself as a context.
[11:56] samtresler: Oh one other nice bit. If I have two contexts of the same type (say, node) in a panel, and a pane has 'nod
e' as a required context, the pane UI can select which one it uses.
[11:57] forgive me, 'uses' for what?
[11:57] which one it uses to...
[11:57] samtresler: Well, the 'node content' uses a node context to determine what content to display.
[11:58] right
[11:58] So, is this presuming that both node contexts will be identical?
[11:58] or that one is better than the other?
[11:59] No, that both node contexts are different.
[11:59] Sony for example: I ahve a url that looks like video/video-name/artist-name
[11:59] yup
[11:59] (Though actually with a proper relationship it's no longer needed in the URL)
[12:00] So I have an artist node and a video node. I can tell the node content pane which context to use.
[12:00] The selector just shows up in the UI.
[12:01] oh
[12:01] I see
[12:01] I think
[12:01] I'll have to look at it some more.
Comment #15
robloachThe hack-saw solution would be to use the Bio module, and then say that a Panel Node is your Biography type. Then when users register, they're given the option to create a Panel Node to associate with their profile.
Comment #16
merlinofchaos commentedThat's a bad hack =)
Comment #17
Tresler commentedThat, actually, was the precise hack I was using to build a site - actually I was using usernode, node-profile, and panels-nodes. When I cleverly pointed it out to merlin at drupalcon.
I got the same response you did. :(
Hence I am figuring out what a panels context is. :)
Comment #18
merlinofchaos commentedA panels context is a wrapper around an object. The object can be anything Drupal knows -- a user, a node, or whatever.
A context can be created from an argument.
A context can be passed into the system externally.
A context can be created from an existing context (relationship).
A context can just be in the system (future functionality).
Content can require a context to function.
For example, if I put the 'node content' pane into a panel, it won't do much good without knowing what node it's talking about.
Likewise, I can't have a user profile without knowing what user.
Context is how Panels is able to tie this stuff together.
Comment #19
michelleI was planning on doing the same bad/clever hack with nodeprofile. Good thing we have Sam to figure this stuff out. :)
Michelle
Comment #20
Tresler commentedSnapshot. Not much here yet, but its a start
To do:
- Create a default panel-display/layout containing current user info for new users and either pipe the current user info to it, or generate it anew...
- Work in a context as discussed above.
- Add more permissions and implement a custon access function as hook_access works for nodes, but not user data.
-much more but am brain dead ATM. The attahed is a .tar file, just change the extension. Patch soon.
Comment #21
chadchandler commentedThis would be an amazing addition to the Drupal community. Any updates on how this is progressing?
Comment #22
summit commentedSubscribing. Willing to test with the latest panels version.
Greetings,
Martijn
Comment #23
thomasmuirhead commentedsubscribing
Comment #24
Caleb G2 commentedsubscribe
Comment #25
Glowingtree commentedposted elsewhere
Comment #26
Glowingtree commentedSORRY! Im new here, didnt realize that the main title would be changed
based on my comments title!!! (im not used to forums doing that...)
feel free to get rid of that extra bit on the title
Comment #27
michelleThis isn't part of the forum. This is part of project where people can change the title and other meta data with each comment. Fixed it.
Michelle
Comment #28
merlinofchaos commentedGlowingtree -- please open a new issue. You have some interesting questions which I think can be answered here, but not at the cost of unfocusing a good, if somewhat stalled issue.
Comment #29
Tresler commentedworking on this today, updated to alpha14 for obvious reasons.
Comment #30
Tresler commentedUpdating, got some time to put into this tonight. Updated to beta1. Finally grokked some important things. Got admin pages running through API (p.s Am writing API.txt patch as I go along learning it, merlin).
Have node_hooks replaced by hook_user... somewhat. thats the last hurdle. Anyone wanting to help should ping me in IRC for code.
Comment #31
greg.harveysubscribing
would love to test this when it's ready! =)
Comment #32
gracearoha commentedThis sounds great! I am hopeless at coding, but will be happy to take it for a test drive when it's ready :)
Comment #33
catchThos of you tracking this should probably take a look at Michelle's Advanced Profile module - which is already doing a lot: http://drupal.org/project/advanced_profile
Comment #34
michelleWhat Sam is doing is a bit different. We've talked about it, trying to work them together, but I'm not sure how at this point. Whereas advprofile uses one panel page and takes an argument for the UID, Sam's (if I'm understanding correctly) allows users to actually create panel pages that show up as tabs on the user page.
What I need for advprofile is a way for the admin to define the master panel page that's used for profiles but allow per user custom layouts/content. I had hoped this would help with that, but it doesn't look like it will. At this point, I think these two projects are going down too different of paths, unfortunately.
Michelle
Comment #35
catchAhh, I see!
Comment #36
merlinofchaos commentedThese two projects *should*, at the end of the day, be mergable. The difference is that advprofile relies on a panel page, whereas the panels_profiles module will not rely on a panel page. However, it should hopefully end up supporting all of the gadgets of a panel page, (except with fixed 'arguments' and built-in context) as well as be exportable. So hopefully once all of that stuff is in place, advprofile will be able to take advantage of this.
I think Sam needs some help, though =)
Comment #37
michelleIt would be nice if they could come together. Maybe I'm just missing something.
What I would like to have at some point is this:
* The user clicks the edit profile link
* They are presented with the "content" tab of a panel.
* The panel starts out with a standard set of content.
* The user can add/remove content but is limited to what the site admin has allowed access to
* The user can change themes for the profile from a limited selection
* The user can change layouts from a limited selection.
* The changed panel is saved as a user setting, not added to the panels pages list because that would be a huge mess.
So will Sam's module help with any of that? Maybe I just misunderstood it...
Thanks,
Michelle
Comment #38
greg.harveyThanks. Advanced_profile is also very interesting. Will definitely try this out. =)
Comment #39
GreenJelly commentedThis is what advanced profiles was suppose to be about... I understand Michelle, and the projects shouldnt be merged... THEY ARE THE SAME PROJECT!
I feel the best solutions are to use the pre-existing building blocks, and then build something that hooks them all together into one solution. I support Michelles approach rather then a program that is separate from everything else, thus eliminating the ability of us to do things that were not planed for in the original scope. change views, cck's, etc...
Anyways, check out what I did with advanced profiles http://www.allourquilts.com/user/1
The application needs allot of work, I had to essentially build everything myself, and still am... What you need to do is build style panes, pane that can be controlled by the user...
Comment #40
wim leersPlease don't change the title of the issue! :)
Comment #41
michelleSam is working with panels as well so I'm not sure where you're getting that it's separate from everything else. It's unfortunate that we haven't been able to combine our efforts, yet, and I hope we can at some point. But I just really needed to get going on this and Sam's wasn't ready when I started and we ended up going down separate paths. Merlin seems to think they can be merged and he knows far more about panels than I do, so we'll see. :)
Michelle
Comment #42
GreenJelly commentedI am working on various panels. Most Panels use uid, where in the user account page we needs to use arg(1). I am more then willing to share the code that I am working on. Some of it was from UserProfiles2 (good job Michelle), others I am working on as additional custom blocks. I am working on one right now for user points. It will probably be a modification of the block for User Points, however it will have to be a separate block. There are other things like user views of the default advanced profile information that is included. I don't know what you guys want to do with this. Use BIO or usernode. I prefer usernode and was going to change over to user node as to avoid another separate user info tab. I am very busy with my own site, working around 8-12 hours a day on it, but I see allot of the work I am doing as being very compatible with this.
Comment #43
greg.harveyJust some quick feedback. I don't know how this module is coming along, and I'll still definitely be interested to see the result, but Michelle's Advanced Profile module just does it for me. It's perfect. As Michelle pointed out, it's just "glue" but it saved me hours, if not days of head scratching! Highly recommended.
One note - it puts the Latest Comments (I think?) mini panel (again, I think? apologies of terminology is wrong!) in the user profile panel page automatically. This is cool, unless you do not have Comments installed. Panels 2 currently assumes you do and you get a nasty PHP warning. Just delete it, no more warnings. Michelle already added this as an issue against Panels 2, so no need to re-post it. =)
Comment #44
Tresler commentedSorry, had a stint out of town, a promotion, and an apartment move. Anyway, tomorrow will be another big push on this.
I will however download and look at Michell'e module before I dive back in. Thanks
Comment #45
gustav commentedThis is a long discussion by now. Perhaps it would be convenient if Sam would start a wiki page for this, similar to what Michelle did at http://groups.drupal.org/node/7982.
Comment #46
agentrickardSam-
Are you coming to Boston? We really should discuss the role of MySite in the Panels world for Drupal 6.
http://groups.drupal.org/node/8780
http://drupal.org/project/mysite
Comment #47
merlinofchaos commentedHere is my basic design.
2 tables:
Administrative UI:
User UI:
Menu 'path' handler (eg 'profile'):
There are likely more subtleties to be thought about:
Does this help people understand what at least I am looking for here?
Comment #48
michelleWow, that sounds perfect! Now all we need is someone with the skills and time to code it. LOL! Unfortunately, that's way beyond my level so I couldn't take a lead in the development but I'm up for testing and bug fixing.
Michelle
Comment #49
GreenJelly commentedI like the idea of a glue module for this. Michelle advanced profiles makes perfect logistical sense. What should be done is to encourage developers and to set out a standard to include their modules in this glue. You are right, the Panels application would be nice. Change the params on the panel from $user->uid to ARG(1) or what ever you want. Honestly, that and more support for panels seems to be the two major stumbling blocks that I have encountered.
Also, Bio is rough... Im afraid my users wont see the extra tab, and wont fill out the information. Would be nice to include the data within the usernode itself. If only the User Node itself was put into panels:-p
Ohh I second the notion of having an Advanced Profiles type OG.
Comment #50
Tresler commentedWith all due respect, PLEASE don't comment here unless it is about the development of this module. I'm finding it difficult to find the code details in all this. I'm happy to respond to discussions about mysite, Advanced profile, wikis, Boston, etc, just use my contact form or email a link to a groups page, etc. Please also understand that I'm cramped for time and it may take me a while to respond. You can also catch me in IRC daily.
merlinofchaos - thanks - I was developing this as a single table that just correlated user - panel, then storing everything else in the existing tables for panels_pane, and panels_display.
Responses inline:
Administrative UI:
* Allow administrators to create one or more profile paths.
I wasn't sure how I was going to do this yet, but it was part of my feature set. Chances are I was going to allow Admins to save a panel in the database and then override everyone's profile with some logic correlating role -> default panel. Later versions would be able to correlate on more discerning factors: profile fields, role, # of published nodes, etc.
* Allow administrators to create one or more identifiers for that path; there should always be at least one 'default' identifier.
This is where I Was talking to you about switching the panels secondary menu tasks to being children of secondary menu tasks. i.e. every panel that is created for a profile shows up on the user/uid page with its own menu system entry - and a 'special' entry called 'add a tab' that lets a user add tabs to their profile, with admin permission of course.
* Allow administrators to edit the default display for each identifier. This UI will only include layout, layout settings and content -- users will not be able to add contexts.
Hadn't gone here yet...
* Allow administrators to restrict what content is available for this application.
Isn't this available through the panels-api? I copied panels pages for this.
User UI:
* Allow users with privilege to edit their version of any given profile identifier.
Yes.
* Allow users with privilege to add new identifiers just for themselves
Add a tab above.
* This UI will allow adding contexts via arguments and relationships. All user displays will inherit these.
Over my head...
Menu 'path' handler (eg 'profile'):
* Will assume/require a 'user' argument. This could just be in the UI, but obviously a user argument will be required so we can match up displays.
Of course. /user/uid/did - as a menu entry.
* Will see if this identifier for this user exists; if not, load identifier for default user. If not exist, 404.
I was going to just increment did's in the panels_display table - if I understand what you are talking about, you are looking to set up a different table that stores a unique identifier per user.
i.e.
User A, display 1
User A, display 2
User B, display 1
User B, display 2
As opposed to:
User A, did 1029
User A, did 3498
User B, did 2307
User B, did 3098
What is your thinking behind this?
* Load all contexts into the display; set options. Show display.
Sure.
There are likely more subtleties to be thought about:
1. Permissions.
Already have:
Edit Own Panels.
Add Own Panels
Administer Panels profiles
2. Menu links to profile pages.
Not sure what you mean by this - At this point, I was just adding tabs on the "My Account" page - if we override the 'view' tab as default this is still the My Account page?
3. Some existing content is not suitable in its current form for users to use, so simplified variants (similar to panel views) may be necessary to make a good end user UI. This will be especially true for profile pieces.
Doesn't this come in the form of access control to said content by the adminstrator?
Thanks all for sticking with me through this.
Comment #51
merlinofchaos commentedThe former doesn't work; display IDs must be unique and are assigned to you, you can't assign them. So you have to go with the second variant regardless.
Just do a panel_save_display() and the did will be returned to you. The API for panels_edit on the content tab will also return a DID to you as well.
It is, but it's very simplistic; it's either on or off. For this application we might need to do role based. I dunno, though; the UI for doing that could be terrifyingly complex.
This isn't entirely about permissions and about complexity in the UI. I wouldn't worry about this part, though; this can come Later. It's a polish thing.
Comment #52
Tresler commentedI must have misunderstood your intent. I was planning on the latter not the former and using a panels_save_display. You had written:
I was using:
It seems like you are creating an item called a 'profile', while I was planning on just mapping a panel with some specific access settings and permissions to a user account.
The 'path' is saved by the menu system already. I haven't even thought of exporting yet, but adding a unique string seems fine.
We have the uid, the did. If the did _is_ unique, why do we need a " identifier -- So we can have multiple profiles per path: i.e, profile/%user/%identifier" - as a display is a secondary menu tab already - so multiple displays per page are fine.
What am I missing here? Thanks.
Comment #53
merlinofchaos commentedThis setup allows only 1 display per UID, because UID is unique. You need some other identifier in order to have multiple displays per uid, and then uid most no longer be unique in the table.
If you don't store the path somewhere then I guess you're hardcoding it to user/%uid/something which seems limiting to me. 'mysite', for example, exists on a totally separate path.
Comment #54
Tresler commentedOK, yes, definitely UID shouldn't be uniwue in the table. This table should probably key off of did - IF I do it this way. I'd love to hear the advantages behind what you wrote.
I guess I was assuming this to be limited to the user/ page - and subsets of that. Will make this adjustment.
Comment #55
Tresler commentedAt Drupalcon code-fest working on this. Got a good chance to talk with Ken regarding how best to handle a MySite integration. I *think* we want to make MySite use panles for the Engine, then use the Mysite module to reveal content and functionality as kind of a bonus module.
First steps I'm taking right now is to set up Advanced Profiles and MySite to see what they do, precisely.
Comment #56
webchickSubscribing and offering developer hands. I want to write up a case study about doing per-user customized profiles in the social networking chapter of the Lullabook, which is for D6, and http://groups.drupal.org/node/8780 implies that MySite won't be updated to D6.
Sam, where are you at, and how can I jump in?
Comment #57
michelleWebchick - My understanding is that MySite will have a migration path, whether MySite is upgraded to 6.x as is or it merges with Panels 2.
Michelle
Comment #58
agentrickard@webchick
Right, I'm torn about how to proceed. At the moment, I'm tempted to port MySite to 6 -- that may be faster than Panels integration.
But then I'd drop MySite development in favor of Panels integration.
Comments http://groups.drupal.org/node/8780 are appreciated.
Comment #59
sunsubscribing
Comment #60
sdboyer commentedJust an FYI for interested parties: we'll be picking up the original direction of this work and (I hope) taking it a step beyond as well. I've posted a transcript of Michelle's and my big-think on this issue at http://groups.drupal.org/node/11388. I'd love comments.
Comment #61
panchosubscribing
Comment #62
toma commentedSubscribing
Comment #63
sdboyer commentedComment #64
jthomasbailey commentedHi Panel People,
I'm debating Michelle about her Advanced Profile Kit, you might be interested. She is in favor of the Content Profile module, I am against it. Please discuss.
Comment #65
michelleI don't know what there is to discuss. I already said I'm not going to write the module you're asking for. I will be cleaning up and porting APK without any radical changes so people have something to use until sdboyer and I are able to do the panels user module. If you would like to write a different module, feel free.
Michelle
Comment #66
jthomasbailey commentedHa ha, I tried
Comment #67
merlinofchaos commentedhobgobber: That was an inappropriate hijacking of the thread, IMO.
Comment #68
jthomasbailey commentedsorry
Comment #69
wim leersThis is a dead end.