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

agentrickard’s picture

Category: feature » support

I 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?

agentrickard’s picture

Also.

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.

.-_-.’s picture

Brilliant
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

agentrickard’s picture

Title: Owner blocks » Owner blocks for buddylist
Status: Active » Closed (works as designed)

Personally, 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.

agentrickard’s picture

Another thought:

It would be cool if we had a way to share Droplets (assuming you write one). Any ideas about how to distribute those?

jacauc’s picture

If 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)

agentrickard’s picture

I was thinking something on d.o. or maybe on groups.drupal.org -- that second might be best.

.-_-.’s picture

Hi
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.

.-_-.’s picture

sorted, should have actually read the documentation provided, very bad of me.
if you use the filter argument below

 if (arg(0) == 'mysite' && is_numeric(arg(1))) {
return array(arg(1));
}

you can return all nodes authored by the mysite owner, cool,

WISEOZ’s picture

Hi. 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?

agentrickard’s picture

What 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.

agentrickard’s picture

Updating documentation.