Hello drupal devs,

I need someone familiar and experienced with the mysite module to write 3 new mysite content plugins.

The first one would be a really simple OG integration plugin. The idea is that users can select which groups that they are members of they want to see in their mysite page. For example if a user is subscribed to 5 groups, he can select to get the new groups content directly in his mysite page. I think the content from all the groups should go in the same content section of mysite, but this can be discussed...

The second plugin, is a simple leech.module plugin. What I want is to allow users to add a leech source to the mysite so they can get all items from that source directly in their personnal mysite page. Each source would then be a unique content section of the mysite page.

Finally, the third plugin is a plugin so we can insert content recommended by the CRE module directly in the mysite interface. The recommended content is simply inserted in a content section of the mysite page.

I think that 100$ for each plugin is a good price, but I'm willing to talk about it... Also, please respond only if you are really familiar with mysite and drupal module developpement!

Thanks
Patchak

Comments

patchak’s picture

Would anyone here be interested in this for 350$ ??

agentrickard’s picture

For CRE, what content would be the "anchor" to generate the recommendations? Would it be other content in the user's MySite collection? A taxonomy term? A search term?

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

patchak’s picture

Hi,

Content is already recommended by CRE. The role of the plugin would be to take the same recommandations from the module and simply to display them in a mysite content zone. In the specific case of my site, the Mysite page would even have that CRE zone activated by default for all users, since my whole site turns around the concept of recommended content.

Eventually, a user could also choose different content types to be recommended separately, but that could be optionnal and up to the site admin.

thanks for the answer,
Patchak

agentrickard’s picture

OK, I looked at the underlying CRE code and API, and the module doesn't do what I hoped it did. I was hoping it would recommend similar content based on a content analysis algorithm (like Yahoo's Term Extractor -- http://developer.yahoo.com/search/content/V1/termExtraction.html). Instead, it uses the VotingAPI to find content with similar 'rankings' to the content.

But if you look at the function cre_similar($n,$nid,$target_type='node',$tag='vote',$reference_type = NULL), you'll see that it requires a baseline node id ($nid). So that loops back to my original question for MySite: What is the "anchor" node?

Or you may intend to use cre_top($uid, $calling_module, $n=10, $target_type = 'node', $tag = 'vote',$reference_type = NULL). This would read a user's voting history and find nodes with similar ratings to the user's.

From ten minutes of looking, it seems that cre_top() would be easy to implement in MySite. cre_similar() would be tied to a specific node, but could also be done.

The problem I see is that developing this plugin would require a database dump from a live site in order to have enough data to run a meaningful test.

Can you link to some example uses?

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

agentrickard’s picture

I was thinking about this a little more, and I think you can make the CRE work simply by creating a new PHP Droplet.

The Droplet code would be something like that used by the user_recommendation_block() function. Try:

  // get the user ID of the MySite page owner
  $uid = intval(arg(1));

  // create the content
  $content = theme('item_list',user_recommendation_list_recommendations($uid));

  // print the content
  print $content;

[Note: this code requires that the user_recommendation module of CRE is turned on.]

Create this as a new PHP Droplet and call it whatever you want.

See http://drupal.org/node/150081 for a similar discussion.

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

patchak’s picture

I ll try this this week, thanks for the tip!

Patchak

patchak’s picture

Hi there,

I tried to create the droplet like you recommended... And it just seems to do a blank page. I copied exactly what you posted here and it seems that that code breaks the mysite. I also tried to "convert" the recommended nodes block to a mysite droplet without any luck.. the dropet is empty.

Are you still interested in looking into this??
Thanks

agentrickard’s picture

OK, try this. Be sure to save the Droplet with "Input Format" of "PHP Code"

  $uid = arg(1);
  $content = theme('item_list', user_recommendation_list_recommendations($uid));
  print $content;

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.

patchak’s picture

Hi there,

Yes this seems to work, that's great! I looked for another function to publish the node in teaser mode as presented in the /recommandations page of the CRE module.

I found this function :

function enhanced_node_recommendation_get_top_n($uid, $n, $type = 'node') {
return cre_top($uid, 'enhanced_node_recommendation_cre_query', $n, 'node', variable_get('enhanced_node_recommendation_tag', 'vote'));//, 'node', array($type));
}

But since it's not a theme function I'w wondering if it's ok to use in a droplet.

Thanks, patchak

agentrickard’s picture

Ah, the intval() was probably incorrect.

Remember, I don't use CRE.

I looked at the CRE code (http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/cre/) and I can't tell what kind of data structure cre_top actually returns.

The documentation suggests that you should get an array of NIDs and scores. Depending on how that array is formatted, you would have to run additional functions.

For example, if the array returns what I suspect:

 Array (
  [0] => obj (
       content_id => 1,
       score => 100
    )
  [1] => obj (
       content_id => 5,
       score => 90
    )
  [2] => obj (
       content_id => 27,
       score => 82
    )
 )

Then you'd have to loop through the array and run node_view() on each element.

--
http://ken.blufftontoday.com/
http://new.savannahnow.com/user/2
Search first, ask good questions later.