Did some permissions/text work, here's the patch.

NikLP - May 16, 2007 - 17:31
Project:Alinks
Version:5.x-1.3-1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

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.

AttachmentSize
alinks.module_1.patch4.13 KB

#1

tic2000 - May 16, 2007 - 20:17

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

#2

NikLP - May 16, 2007 - 20:28

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[] = '

#3

NikLP - May 16, 2007 - 20:33

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.

#4

tic2000 - May 17, 2007 - 04:30
Status:active» closed

Patch committed

#5

NikLP - May 17, 2007 - 11:24
Status:closed» 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...

#6

tic2000 - May 18, 2007 - 11:22

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

 
 

Drupal is a registered trademark of Dries Buytaert.