I prefer not having links to the glossary terms for abbreviation. Since I had to make the changes which enabled me to disable the links I figured I might as well share it. Others might find it a welcome addition as well.

I tried to stick to the original code as much as possible so the patch might not be the cleanest solution but it works. It also addresses the issues discussed in #233752: (Option to) Use 'abbr' instead of 'acronym' HTML elements.

CommentFileSizeAuthor
glossary.patch7.41 KBForage

Comments

nancydru’s picture

Hmm, interesting. I'd like to have others comment on this.

nancydru’s picture

BTW, when you provide a patch, it is generally okay to assign the issue to yourself.

Forage’s picture

Assigned: Unassigned » Forage
nancydru’s picture

Hmm, now that a vocabulary is no longer required (http://drupal.org/node/233771), doesn't that pretty much take care of "do nothing?"

Forage’s picture

Not really, you still need the vocabulary to get the abbr elements with the long name, don't you? ;-) I just don't want them to be links to a glossary term page, only providing the extended words on hover.

AaronCollier’s picture

Status: Needs review » Needs work

I'd appreciate the ability to have this feature, but I think the patch needs work. I think it doesn't reflect recent changes in the module.

Forage’s picture

My apologies for the late reply.

I'm finding it a bit difficult to decide what to do. I can keep creating patches for each new version but it will only become more difficult over time since I'd have to keep track of each set of changes made in new versions. Also, should I make a patch for the latest stable or dev releases?

I'm happy to create a new patch but only if this feature will make it into the official releases. It only seems to me like a waste of time if this isn't going to be the case.

nancydru’s picture

I started to put it in and that other issue side-tracked me. Sorry. If you can re-do the patch, please do it against whichever release has the later date (usually -dev) as that will be most like the code I'm using on my development site.

nancydru’s picture

I have got this working on the 5.x version and will hopefully port the changes to 6.x tomorrow.

My implementation is a bit different from yours:

  1. I've changed the "absolute link" setting to "link style" with three choices: "absolute," "normal," and "none."
  2. The link style setting is per input format, so one input format can produce links while another does not.
  3. Disabling the related terms link is a new setting on the "General" settings page and will either produce just text, or links per the "Clicking on a link will" setting (the current method).
  4. I've provided glossary_update_5103 (and whatever the 6.x number is) to convert the current "glossary_absolute_#' variables to the new "glossary_link_#" variables (with logging of the change). So make sure you run update.php after installing the new version.
nancydru’s picture

Status: Needs work » Fixed

Fix committed to both -dev versions.

AaronCollier’s picture

Status: Fixed » Active

Thanks for your hard work on this. Unfortunately, it's not working for me right now. Whenever I choose Link Type "none" and save my settings, it automatically gets reset to Link Type "normal" (when I view the settings page again, the selection "normal is chosen). So right now I can't take advantage of this feature.

nancydru’s picture

Status: Active » Fixed

Drat, one of the 5.x->6.x upgrade things snuck past me. I committed this to the -dev version.

Line 439 should be variable_set($link_name, $form_state['values'][$link_name]);

AaronCollier’s picture

Great. It works perfectly now, thanks. May I ask why the glossary.admin.inc file is listed as a dead file in CVS? Took me a little while to figure that out.

nancydru’s picture

Good question. I have no idea. I don't even know what "dead file" means. http://drupal.org/node/255386

AaronCollier’s picture

From a site I found through Google:

Next, lets try removing a file so it no longer shows up when the package is checked out. The file "DeadFile" is intended for this.

So I'd say it's a mistake.

nancydru’s picture

Well, I am not a CVS expert by any stretch of the imagination. I have no idea why it got marked dead since it is very much an active file, as is "empty.gif". The only thing I can think of is that the 5.x branch doesn't have the admin file.

I wonder if it's because I don't use the HEAD branch.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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