hi
this will probably be put on the back burner but the mysite.module has an api to let other modules hook into so that the other module's block show up on the user's mysite page.
that would be an amazing additional feature to both and the beginning of a truly customisable drupal experience from the user side.

thanks

Comments

toddy’s picture

Assigned: Unassigned » toddy

Hi,

I don't know the mysite module, but I'll take a look and see what I can do. Thanks for your suggestion.

Regards,
Tobias

spooky69’s picture

Version: 4.7.x-3.0 » 6.x-5.x-dev

Just putting a vote in for this feature if possible please! Nice module by the way :-)

toddy’s picture

Title: my site integration » Integration with mysite module
Status: Active » Postponed

I've looked at the mysite API, and it seems to me that it only supports adding node types to customized pages. Since the weather module does not add new node types, but only a block, I don't think that the usage of the mysite module will be possible.

Am I missing something here?

agentrickard’s picture

@toddy

The MySite API supports non-node content. At the moment, it would only work with 'teaser' views -- something that needs fixing.

The key function is mysite_type_{name}_data() -- see section 2.4.8 of the MySite README. While nodes are common, it is not assumed that data returned by this function would be from a node. Look at the feed.inc example (since aggregator items are not nodes either).

Here's the relevant explanation [with Weather notes in brackets]:

  D) A positional array is created for each content item.  The following data is added (and security checked).      
  
          $item[$i]['type'] => The type of content, either $node->type or a static variable.  We include this so that Formats can treat different content types uniquely, if desired.
          $item[$i]['link'] => The Drupal link to the original item in its normal context.
          $item[$i]['title'] => The title of the item. [Might be city name and current temp]
          $item[$i]['subtitle'] =>  An optional subtitle for the item.        
          $item[$i]['date'] => The updated timestamp for this item.
          $item[$i]['uid'] => The user id of the item's author, if available.
          $item[$i]['author'] => The user name of the item author, if available.
          $item[$i]['teaser'] => The teaser text of the item, if available.      [Weather output would go here]   
          $item[$i]['nid'] => The node id of the item, if available. We include this so that Formats can treat different content types uniquely, if desired.

The MySite module explicitly does not use node_view() in order to account for non-node content.

The other big question is how the Weather module would implement 2.4.9 mysite_type_{name}_search -- which enables users to search for content.

I may take a look at writing this plugin, since this type of functionality is needed to take MySite a step further.

agentrickard’s picture

We might also put some data in the 'subtitle' element. It would work.

agentrickard’s picture

Sorry, I can't edit my original.

Technically, the MySite module does not pull blocks from other modules. It lets other modules present data according to a unified specification.

In the weather.inc plugin, though, you could simply call the weather block contents into the 'teaser' element of the mysite_type_weather_data() $data array.

agentrickard’s picture

I downloaded and tested the Weather module, and I have a basic question.

Should this be supported in the MySite module?

Here's my reasoning: as a general rule, MySite does not replicate Block content -- particularly when those blocks are user-configurable. The logic is that we already have a mechanism for user-control of what data to view on the page, so why would MySite duplicate that functionality?

On the other hand, here's how MySite / Weather integration might work.

a) The administrator enables the weather locations that are accessible via the Weather Module settings.
b) The Weather block is _not_enabled.
c) Users are allowed to select from a predefined list of Weather sources to place on their MySite page.

But, if the default "custom user weather" block is enabled, I see no reason to duplicate that in MySite.

Arguments pro and con?

marafa’s picture

hello
i thank you for your interest and your feedback.

@agentrickard
i will be short and remind you of the objective of mysite

MySite pages are designed to let users create a personalized summary of the site. As such, the MySite module duplicates the functionality of tools like MyYahoo! and Google's personalized homepage.

one of the things that a user can summarise for a personal experience is the weather module. this is one of the main reason i want mysite to support weather .. to expand the user experience

thanks for letting me say my 2 bits

agentrickard’s picture

@marafa
I will be polite and say that I am the developer and maintainer of the MySite module; I wrote that quote.

Adding blocks to MySite was actually the first feature request I ever received, and I rejected it. See http://drupal.org/node/90558.

The module exists to give you a quick overview of new content -- and weather certainly qualifies -- but not to duplicate functionality that already exists. Looking at the user-configurable block design of this module, I don't quite see how duplicating that function is a good thing. (Though see my use case above.)

Think of a good use-case (perhaps you only want to see a one-line weather summary for 5 cities?), and we can consider writing it. It really isn't that difficult, using the API.

It may also serve to move this discussion to http://drupal.org/project/issues/mysite, since it may not be toddy's problem to solve.

[Personally, I'd love to add weather to MySite -- I think it shows the flexibility of the MySite API. But I don't think that doing so acutally benefits the end user, since the Weather module is already user-configurable.]

toddy’s picture

Status: Postponed » Closed (won't fix)

@agentrickard:

Thanks for your evaluation of this feature request. I think I agree with you that the weather module is already configurable enough for individual users. Therefore, I'm closing this issue. If there's a specific use case where this feature might make sense, I'll be happy to support any efforts writing the plug-in for weather.

Regards,
Tobias

agentrickard’s picture

@toddy

Sure. As I said, I'd love to have this feature, but I think the configurable block already provides it.

Now maybe if we just grabbed a small data set (City | Temp | Condition), that would make sense to me.

agentrickard’s picture

Moving discussion to http://drupal.org/node/125977