Great module, many thanks for all the work.

Please may I propose a small feature addition:

If a new freelink is created and if the parent page belongs to an Organic Group, please can the freelink module pass the Group ID on to the node creation form?

So instead of creating a link like /node/add/wiki?edit[title]=Test the freelink module would add the Group ID to the URL: /node/add/wiki?edit[title]=Test&gids[]=83

Many thanks,
Jack

Comments

dan_aka_jack’s picture

Title: Set Organic Group membership if parent node belongs to a group » Set default Group settings if parent belongs to a group
StatusFileSize
new3.3 KB

I've developed a patch which makes Freelinking aware of Organic Groups. If the node in which the freelink appears is in an organic group and if the freelink doesn't exist yet then the node creation form is made aware of which group the original page was in. The patch seems to work for me. I haven't noticed any problems yet.

If the original node isn't a member of an organic group then freelinking behaves exactly as it would without my patch.

The patch was made against freelinking.module version 6.x-1.7 (which I believe is the same as 6.x-1.x-dev at the moment).

EDIT: PLEASE IGNORE THIS PATCH AND USE THE ONE I POSTED IN COMMENT #3...

Many thanks,
Jack

dan_aka_jack’s picture

Title: Set default Group settings if parent belongs to a group » Set Organic Group membership if parent node belongs to a group
Status: Active » Needs review
dan_aka_jack’s picture

StatusFileSize
new4.35 KB

Here's a new patch. This patch is made against freelinking.module version 6.x-1.7 (i.e. only apply this new patch; ignore the first patch I submitted).

The difference between my first patch and this new patch is that this new patch creates an admin settings option to allow the administrator to enable the feature. If Organic Groups isn't installed then the option is automatically disabled.

I'm using this patch on a website I'm developing and so far I haven't noticed any adverse side effects although I haven't done a rigorous test yet.

eafarris’s picture

Title: Set default Group settings if parent belongs to a group » Set Organic Group membership if parent node belongs to a group

I don't use OG myself -- can anyone test this?

dugh’s picture

subscribe

nlambson’s picture

I tried this patch on Drupal 6.13 and received the following error:

Assertion failed: hunk, file patch.c, line 321

This application has requested the Run time to terminate it in an unusual way. Please contact the application's support team for more information.

eafarris’s picture

Status: Needs review » Needs work

User reports patch does not apply.

markwk’s picture

Any developments on a patch for OG incorporation with Freelinking? I'm having a serious problem currently of one group's links being linked to entirely different group.

soulfroys’s picture

subscribe

juampynr’s picture

Status: Needs work » Fixed

I can confirm this feature is implemented in freelinking 6.x-3.1.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

zach.bimson’s picture

Has anyone done this for 7.x yet? its exactly what i need...