Ok, I've attached a patch to alinks.module. It doesn't fix any of my other small gripes, but I have done the following in the patch. Whether or not anyone agrees, it's here now, for me to find that out...

  • I have tidied up the English in the included text for legibility and usability (fixed typos & now with "more help")
  • I've added a permission "edit alinks" so that roles do not have to have the "administer site configuration" permission

I added the permission because I have a site with a very simple interface on the back-end, and I didn't want to complicate the administration for the site manager by having to enable config admin. Having to give the site manager "administer site configuration" allows him to disable modules and all sorts of things he shouldn't have access to. This gets round that problem - the "alinks" edit menu will simply appear in the Navigation block of any user in the role with the new permission granted to them.

CommentFileSizeAuthor
alinks.module_1.patch4.13 KBniklp

Comments

tic2000’s picture

Thanks for this patch. I will apply this patch and will be in the next release.

niklp’s picture

There's a caveat here - just spotted it.

If you use internal links in the format I have suggested in the patch, it will break.

It is necessary to update line 125 to start: $alink_url[] = '

The base_path will stop internal links breaking. This will stop external links working, however.

I suggest the addition of a checkbox for each alink to say "External link?" and then not add the base_path in this case.

Sorry for the confusion.

niklp’s picture

GAH! Sorry.

$alink_url[] = '<a href="' . base_path() . check_url($word['alink_url'])

This will make internal links work, but break external links - I'm not using external links right now, so I don't care! :p I suggest, however, the addition of a checkbox (per alink) to select if it is an external link. This is the only way I can think of that the internal links will be saved.

tic2000’s picture

Status: Active » Closed (fixed)

Patch committed

niklp’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

Sorry to re-open - can you just clarify whether or not you added the "checkbox per alink" setting in the module?

If not, this patch will still break all external links AFAIK...

tic2000’s picture

I've only added the permission for editors and the tidied English changes.

imacache’s picture

Assigned: Unassigned » imacache
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Fixed
greg boggs’s picture

Status: Fixed » Closed (fixed)