Closed (works as designed)
Project:
MySite
Version:
5.x-2.0-beta5
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Reporter:
Created:
7 Jun 2007 at 14:47 UTC
Updated:
21 Dec 2007 at 23:40 UTC
Hello
I would like to use this module and for the visitors to the owner's mysites page to be able to see blocks [that i have set to be displayed by default] that contain infomration pertaining to the owner.
So, as admin I would set a buddylist block / droplet to be displyed as default, but for the vistors to the owners mysite page to see the owners buddys in it, not the visitors.
If i were to make a custom block would i have to interface with the API or is there an easier way to get the mysite owners name, and therefor refer to a database?
cheers
Comments
Comment #1
agentrickardI think I understand this. If you make a droplet from the BuddyList block, it will show the buddylist for the person looking at the page, not the person who owns the page.
You would need to make a custom type include (buddylist.inc) using the API -- or a custom PHP droplet that does what you want.
PHP-based droplets work just like PHP-defined blocks, so you could likely modify the buddylist block code in your droplet. (Be sure to save the droplet with input format "PHP code."
If you go the API route, take a look at the profile.inc, which shows you how to do it.
If you make a PHP-based droplet, remember that
arg(1)will return the id of the MySite page owner.Make sense?
Comment #2
agentrickardAlso.
If you want to make it so that users cannot turn this page element off, then you would hardcode the block-load mechanism into your Layout files.
Comment #3
.-_-. commentedBrilliant
thanks for the help, thats just what i wanted to know, now i know where to start
i'll explore these methods and let you know how i get on
cheers
Comment #4
agentrickardPersonally, I would prefer a Type Plugin. Then it could be added to the tarball for others to use.
Marking this 'by design' because it is the most appropriate answer. More accurate title, too.
Comment #5
agentrickardAnother thought:
It would be cool if we had a way to share Droplets (assuming you write one). Any ideas about how to distribute those?
Comment #6
jacauc commentedIf you need bandwidth or disk space for a central repository, I have plenty that I can provide at no charge, on a domain of it's own if necessary.
(not a whole lot of CPU resources though)
Comment #7
agentrickardI was thinking something on d.o. or maybe on groups.drupal.org -- that second might be best.
Comment #8
.-_-. commentedHi
I have been using 'cck' and 'views' to make some dynamic blocks for things like galleries. These blocks can then be turned into droplets for mysite.
I was thinking it would be really good to make a views filter such as Node: Author is Current User except for the mysite owner, so... something like Node: Author is MysiteOwner.
This way you could make certain small mysite owner blocks such as galleries or other nodes lists, without programming, it would be pretty silly way of doing it but would be good for a few things.
I personally don't know how to make a views filter but will post the question somewhere else as well and have a look around.
Comment #9
.-_-. commentedsorted, should have actually read the documentation provided, very bad of me.
if you use the filter argument below
you can return all nodes authored by the mysite owner, cool,
Comment #10
WISEOZ commentedHi. I'm probably jumping into this conversation a bit late to get a response but figured I'd give it a try.
A
In #9, are you using that filter argument in the Views arguments set up? I see in the MySite README that "...Views that require arguments cannot be handled by the current Droplet system". So, am I missing something? How are you creating Droplets using Views with arguments?
Comment #11
agentrickardWhat that documentation should be updated to say, I think is:
"The only argument that a View on a MySite page can accept is the UID of the MySite page owner."
You just don not have the ability to append additional arguments to the URL.
Comment #12
agentrickardUpdating documentation.