Do you have any idea of when this excellent module will be released for Drupal 6?

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dolittle’s picture

I will also apprciate a rough estimate.

Thanks

TBarregren’s picture

Since RelatedContent depends on Views, it cannot be upgraded to D6 before either Views 1 has been upgraded to D6, or Views 2 for D6 has stabilized and has an upgrade path from Views 1.

NikLP’s picture

Views 2 in RC now :)

greggles’s picture

Title: Timeframe for Drupal 6? » Port RelatedContent to Drupal 6

subscribe (and better title...)

momper’s picture

subscribe

yurtboy’s picture

Same here this is a great module.
Does the developer need help?

TUc’s picture

Why not use CCK and nodereference field instead? Sure it's a great module. But with some creativity nodereference could do the trick...

aries’s picture

+1

yurtboy’s picture

I have used cck node reference and it is a replacement but I do think it is missing some of the features like a tabbed view of all the nodes to choose from etc.

reinholdlange’s picture

subscribe

pauline_perren’s picture

subscribing

reinholdlange’s picture

subscribing

manuprevention’s picture

subscribe

Manuel Garcia’s picture

I also would like to see this ported to drupal 6. So I went ahead and ran the coder module on d6 on this.

Users: please note that you can easily do this yourselves to help out in the process, remember drupal is collaborative ;)

Here are the only two files that returned results (I reformatted it for easy reading)

relatedcontent.module

  • CRITICAL Line 3: New syntax for .info files, use dependencies[] (Drupal Docs)dependencies = views
  • CRITICAL Line 9: New syntax for .info files files requires core=6.x (Drupal Docs)
  • CRITICAL Line 188: new hook_theme() function is required to register theme_ functions (Drupal Docs)function theme_relatedcontent($output, $grouped = null, $node_type = null, $teaser = null, $page = null) {
  • CRITICAL Line 344: hook_form_alter() parameters have changed (Drupal Docs)function relatedcontent_form_alter($form_id, &$form) {
  • CRITICAL Line 365: The arguments to hook_help() have changed (Drupal Docs)function relatedcontent_help($section='admin/help#relatedcontent') {
    Explanation: Change the first two lines to
    function yourmodule_help($path, $arg) {
     switch ($path) { ...
  • CRITICAL Line 699: The parameters for form validation and submission functions have changed to $form, &$form_state. (Drupal Docs)function _relatedcontent_form_alter_node_type_submit($form_id, $form_values) {
  • CRITICAL Line 702: use $form_state['values'] instead, which is where the values are stored after a submit if (!$form_values['views']) return;
  • CRITICAL Line 705: use $form_state['values'] instead, which is where the values are stored after a submit $type = $form_values['type'];
  • CRITICAL Line 706: use $form_state['values'] instead, which is where the values are stored after a submit foreach ($form_values['views']['enabled'] as $vid => $enabled) {
  • CRITICAL Line 707: use $form_state['values'] instead, which is where the values are stored after a submit $weight = $form_values['views']['weight'][$vid];
  • CRITICAL Line 708: use $form_state['values'] instead, which is where the values are stored after a submit $title = $form_values['views']['title'][$vid];
  • CRITICAL Line 794: The parameters for form validation and submission functions have changed to $form, &$form_state. (Drupal Docs)function _relatedcontent_form_submit($form_id, &$form_values) {
  • CRITICAL Line 797: use $form_state['values'] instead, which is where the values are stored after a submit if (!$form_values['nodes']) return;
  • CRITICAL Line 803: use $form_state['values'] instead, which is where the values are stored after a submit foreach ($form_values['nodes'] as $vid => $nodes) {
  • CRITICAL Line 836: replace $form['op'] with $form_state['values']['op'] $page_number = _relatedcontent_form_get_next_page_number($form, $form_values['page_number'], $form_values['op']);
  • CRITICAL Line 1010: #multistep is gone, use $form_state instead $form['#multistep'] = true;
  • CRITICAL Line 1018: The parameters for form validation and submission functions have changed to $form, &$form_state. (Drupal Docs)function _relatedcontent_form_view_submit($form_id, &$form_values) {
  • CRITICAL Line 1022: use $form_state['values'] instead, which is where the values are stored after a submit $vid = $form_values['view_id'];
  • CRITICAL Line 1025: use $form_state['values'] instead, which is where the values are stored after a submit $offset = $form_values['page_number'] * $form_values['page_length'];
  • CRITICAL Line 1026: use $form_state['values'] instead, which is where the values are stored after a submit _relatedcontent_track_update_selected_nodes($nid, $form_values['nodes'][$vid], $offset, $form_values['page_number']);
  • CRITICAL Line 1029: replace $form['op'] with $form_state['values']['op'] if ($form_values['op'] != t('Update')) return false;
  • CRITICAL Line 1029: use $form_state['values'] instead, which is where the values are stored after a submit if ($form_values['op'] != t('Update')) return false;
  • CRITICAL Line 1029: Submit handlers use $form_state rather than returning urls (Drupal Docs) if ($form_values['op'] != t('Update')) return false;
  • CRITICAL Line 1032: use $form_state['values'] instead, which is where the values are stored after a submit $nodes = _relatedcontent_track_finalize($nid, $vid, $form_values['page_length'], $form_values['max_page_number']);
  • CRITICAL Line 1037: Submit handlers use $form_state rather than returning urls (Drupal Docs) return "node/$nid/relatedcontent";
  • relatedcontent.install

    • CRITICAL Line 69: Use the new Schema API to create and drop tables rather than db_query() (Drupal Docs) _relatedcontent_install_db_query('DROP TABLE {relatedcontent}');
    • CRITICAL Line 70: Use the new Schema API to create and drop tables rather than db_query() (Drupal Docs) _relatedcontent_install_db_query('DROP TABLE {relatedcontent_view}');

    Hope this helps!

peter-boeren’s picture

Hi all,

I am also fan of this module in Drupal 5. I noticed that Thomas hasn't replied on the issues queue for the last 11 weeks. Does anyone know if he's busy, on holiday, or having babies? I'm also looking forward to the port for the last few weeks. I've started working on a port of the module last week.

I was a bit impressed by the nice structure of the module. While porting this module I use the follow working order:
1. Make it work
2. Make it right
3. Make it fast

Currently I'm at stage 1. The basic flow now works with views 2 and Drupal 6. I'll post a early version on this forum this week so others can test it. After the feedback we can go on to stage 2.

see you later

Manuel Garcia’s picture

Thanks for taking the initiative peter-boeren!

Will keep an eye on it for testing in the future :)

greggles’s picture

@peter-boeren: in general, it is best if work to "port" a module stick strictly to item 1. Post a patch once it works.

Any bug fixes or performance changes in 2 and 3 should be made as separate issues in the queue so they can be evaluated on their own merits and perhaps backported to the 5.x version.

HS’s picture

subscribing

peter-boeren’s picture

Everyone,

I'm now at a point that the basis functionality has been ported. Still a lot of work needs to be done... but hell yeah it's almost christmas so time is on our side. The following notes describe the status of porting related content module to Drupal 6.x

Changelog 21-12-2008

/**
* Port from D5 to D6. D6.x alpha
*/
- Basic functionality has been ported meaning a relation can be created between nodes by using the result of a view.

- Installer has been enriched with hook_schema so a full uninstall is possible. Thomas already achieved much of the functionality in D5 that is now covered by hook_schema.

- API function in relatedcontent.module haven't been ported yet. So modules depending on this module probably won't work in this stage.

- Hook menu needed a lot of love because of the changes between D5 and D6. With the help of wild-card loaders is determined if a view has to be shown as a local task.

- Also in favor of hook_menu I introduced a permission in hook_perm because real live checking if a user has update access on a node is only possible with a wild-card loader of hook_menu. I thought this was more transparent.

- implementation of hook_theme was of course needed.

- .help file needs a review. I have not checked if the information is still accurate.

- After changing a node-type now the menu is being rebuild in order to a update the local tasks defined in hook_menu

- added drupal pager functionality instead of "Next" button in D5
- ordinal number and weights functionality are not yet ported

-This version works with Views 2. Only views with a 'node' as base table are shown in the list of a node-type. Even if it is 'node' a base table than related content might not show result. The archive or glossary view is a good example. This view gives as a result a page: November, 2008 (121)
- relatedcontent.tpl.php template is not yet supported

- Code needs some love and care. It contains lines of code that are no longer in use.

- code that has been added needs documentation

- module needs some nice tests (simpletest)

I hope you all can provide me with feedback, issues and bugs to improve this version of the module. If anyone want to write some automated test then please let us know what you're testing so others can focus on other parts of the module.

gr. Peter

HS’s picture

Status: Active » Needs review

Thanks will give it a twirl. Changing the status to 'code needs review' so others will also give it a look?

peter-boeren’s picture

Indeed. forgot to change the status. Thanks Hilalsuhaib

fletchgqc’s picture

I tried the version in #19 and it's working pretty well for me. I've never used this module before, but I like it. For some reason I get the word "Page" appearing in an h3 above my related content listing though, that's really weird. Maybe it was something I did?

jjalocha’s picture

Peter, are you still working on this code? Are there any users interested in this?

I downloaded and installed under Drupal 6.12, and got a huge warning that messed up the whole page layout. Here's the first part of it:

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/jjalocha/www.mysite.com/sites/default/modules/relatedcontent/relatedcontent.module on line 189
# [tabs] => List
# Uninstall
[title] => Modules [closure] => [body_classes] => not-front logged-in page-admin one-sidebar sidebar-left [tabs2] => ) [template_files] => Array ( [0] => page-admin [1] => page-admin-build [2] => page-admin-build-modules ) [content] => 

This module looks very interesting, and might be what I need right now. It's a pity we dont see much feedback on the D6 port.

Thank you, Peter,
Regards,
Jerzy

sunmara’s picture

hmm, thanks, i test it now..

peter-boeren’s picture

Hi jjalocha,

at the moment it is under a thick pile of dust due to my normal daily work. When I started porting Drupal was still at Drupal 6.2 or 6.3 I'm not sure if Thomas Barregen still wants to work on this module because when you look strictly at the functionality than it is nothing more than relating to nodes through views. This is also possible by using CCK with node reference. So maybe this module is getting deprecated

what are your thoughts?

regards,

Peter

jjalocha’s picture

Peter, as I am very new to Drupal, I still miss a lot of knowledge about many essential topics.

From its description, RelatedContent looks the most promising module to me, but I found a few modules that might provide the functionality I am looking for. (Attach one node to another, eg. Student/Teacher types, by a user who is not the author.) Due to the lack of a D6 port of RelatedContent, I was experimenting right now with the Relativity module. But I am not sure yet, if I am using it too far from it's intended use-case, and if it isn't overkill for my page.

I have only used Views to create simple "indexes" of nodes. I don't know, if it can be used to create links/relationships between nodes. I do know, that Node reference is not viable in my case, because other users that are not the author must be able to attach one node to another, and I would like the relationship to be two-ways. But I will take a very close look to Views, because I know, that I am using only a small fraction of its functionality.

Thank you very much for your interest, Peter,
regards,

Jerzy

enkara’s picture

I use this module to send news through the newsletter (simplenews). When I found the problem the only solution I found was to use related content in the newsletter issue. It works really well.

I don't know if now there's a better solution (if someone knows one please tell me!) but I think this module is not deprecated at all and it has different capabilities than node reference.

Would make me happy to see a D6 version.

Thank you!

jjalocha’s picture

I've been doing a review of the available modules for doing relationships between nodes. In my case, i need users without editing permissions to be able to create the link.

CCK Node reference, Node relativity, Node hierarchy, and Node2Node should all be able to do links with Drupal 6. For link creation by users without editing rights, i am trying to get the patch for Node relativity fixed by someone. Else, I would probably have to go back to CCK Node reference with one of the extra modules.

I hope, this helps you find a solution.

Summit’s picture

Subscribing, interesting in D6 also, greetings, Martijn

greggles’s picture

@jjalocha - Awesome work! Can you merge that into this comparison of Content recommendation modules?

jjalocha’s picture

No problem, Greg, it's done. I might have added too much information, so you can easily wipe out unneeded parts.

One comment, though: I think this has drifted quite far away from the original "content recommendation modules", and is now probably closer to something like "related content modules". Just my 2c.

Cheers,
Jerzy

eff_shaped’s picture

subscribing

peter-boeren’s picture

so guys you suprised me with the need for this module. I'll look into my schedule to see if i can make it the current port at least working with the latest D6.

foxtrotcharlie’s picture

I'd also be really keen on seeing this ported to D6 :-)

peter-boeren’s picture

FileSize
160.25 KB

guys,

this weekend I did some work. I tested the module againt the latest versie of Drupal (6.12) and found some minor bugs. One of the things I often do with this module is implementing hook_block to show te related links in a block so I added that to this version as you can see on the screenshot. It shows a item list per view and it honors the names that you can give a view in the contenttype settings. So 'glos' is normally the view called 'glossary'. I think in time the block should get the same options as a contenttype (group by view, author, etc).

I saw that I made a misstake with creating a revision in CVS and therefore the packaging-script put the HEAD version of Thomas to my nightly-build-revision. So when the script runs again a tar.gz will be available for download on the main page of this module. please be patient.

some particular stuff:

#22 can you show my a screenshot?
#23 call-by-reference is very common in Drupal, a node is loaded that way. Don't you get warnings then?
#27 I never tested my D6 port in combination with simplenews. Have you already tried it. I suppose it doesn't work.

kind regards, Peter

jjalocha’s picture

FileSize
93.94 KB

Peter, thank you very much for spending your time on this module again!

Regarding post #23, this is what I did today: A clean Drupal 6 install with the relatedcontent-6.x-1.x-dev CVS version downloaded today 2009-06-09.

Sadly, the warning still messes up my layout, as seen in the attached screenshot.

I can't find anything related to 'allow_call_time_pass_reference' on line 189 of the 'relatedcontent.module' file. But this has to be modified anyway, why isn't it set "from factory"?

Sorry, that I am really quite lost here, but I am very new to Drupal and PHP.

Cheers,
Jerzy

BTW: Anyone knows how to embed an image in the post?

z.stolar’s picture

subscribing

peter-boeren’s picture

Version: 5.x-1.6 » 6.x-1.x-dev

After some trouble with cvs, packaging script and so on, the D6 version is finally availalbe for the public. In the last few weeks the following happened

- added a simple block for related content. It does not have yet the same options as for the body, but that is near future.
- fixed post #36 of jjalocha. http://drupal.org/node/223196#comment-1681870
- fiex issue http://drupal.org/node/258281

peter-boeren’s picture

Status: Needs review » Closed (fixed)