Plans for Drupal 6 version?
kemitix - August 25, 2008 - 14:12
| Project: | link node |
| Version: | 5.x-1.3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | TomChiverton |
| Status: | closed |
Description
Are their any plans/work-in-progress to convert this module to Drupal 6?
What can I do to help?
Thanks,
Paul Campbell

#1
I have no plans unless/untill I'm forced to upgrade my own Drupal 5 site to 6 (i.e. if a popular module goes off, or Drupal 5 is end of lifed).
If you are a PHP coder, it should be easy enough to find the API changes betwen v5 and v6 and adapt link_node to the changes but I've not even looked at it.
It could be quicker to start from scratch or get the feature add to attached_node (http://drupal.org/node/243695 has been open for ages with no comment at all) - the patch to attached_node could be fairly small, esp. if only for their v6 branch.
#2
Here's a "works for me under 6.4" patch.
I basically took CVS head, applied all recommendations from coder modules then fixed up a few things:
1) Changed the link generation to use
l()- fixed the link not working when drupal isn't on /2) Moved initialisation of regexps - check for
"vs."was only being made for the first[node]in a post3) For some reason the cvs version is setting
link_node_allowed_vars_*variables but checking againstattached_node_allowed_vars_*- now checkinglink_node_allowed_vars_*#3
I'll take a chance and flag it as patch needs review - its working for me - but I'd appreciate some other eyes looking at it just in case :)
#4
That's great. cheers. I will commit to the trunk shortly and make a dev release (soon as I remember how to do branches in CVS !).
Re: attached_node_... confusion cheers for tidying up, that should be fixed already in the Drupal 5 version.
#5
You can find a dev. snapshot release at http://drupal.org/node/182812/release shortly.
I had to apply the main bulk of the patch by hand due to HEAD not being anything like the 'current' 5.x branch (my own fault !) so please try it out and let me know.
Thanks for the help on this.
#6
I'll take a look tomorrow - getting late here :)
I didn't realize that HEAD and 5 branch were so different - or you could have had a patch against 5.x :)
Most of the work was done by the coder module in fact - really useful module that.
Anyhow - I'll check back in again tomorrow and grab the dev build.
#7
Hmm - spotted actually that you'd updated trunk - so I could take an up.
New patch attached.
This addresses:
link_node.module
1) Missing hook_theme() function - needed in drupal 6
2) Changes to parameters to hook_help() - changed in drupal 6.
3) One of the calls to theme_link_node_xxx was direct - instead of via a call to theme()
4) Picky - all the comments from coder module from the "drupal coding standards" and "drupal comment standards" applied - mostly whitespace changes
link_node.info
1) Make it available for 6.x :)
Again - working for me here on 6.4 with this patch applied.
#8
The patch doesn't apply cleanly here :
13 out of 26 hunks FAILED -- saving rejects to file link_node.module.rej
It might just be my rusty CVS skills, but here is the details of the latest file on the Drupal-6 branch :
$ cvs status link_node.module
===================================================================
File: link_node.module Status: Up-to-date
Working revision: 1.2.2.1
Repository revision: 1.2.2.1 /cvs/drupal-contrib/contributions/modules/link_node/link_node.module,v
Commit Identifier: 5cb748c5682c4567
Sticky Tag: DRUPAL-6--1 (branch: 1.2.2)
Sticky Date: (none)
Sticky Options: (none)
I'm guessing you patch was against something else ?
Thanks again for helping on this, we'll work it out I'm sure.
#9
Was against HEAD - didn't spot that you now had a d6 branch. Will look again tomorrow.
#10
New patch - this one against 1.2.2.1 in DRUPAL-6--1
Same as before:
1) Missing hook_theme() function - needed in drupal 6
2) Changes to parameters to hook_help() - changed in drupal 6.
3) One of the calls to theme_link_node_xxx was direct - instead of via a call to theme()
4) Picky - all the comments from coder module from the "drupal coding standards" and "drupal comment standards" applied - mostly whitespace changes
#11
This applied cleanly, and I have made the following release: link_node 6.x-1.1-beta1
Please confirm this is OK for you.
If possible, can you look into the report in http://drupal.org/node/309157 ?
#12
Can confirm that beta1 is working for me.
Ref http://drupal.org/node/309157 - that's closed - all fixed?
#13
Yup, looks like submitter fixed it by upgrading some other modules. I'll mentioned that in the release notes.
#14
Druapl 6 v1.1 released