Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Acronyms for vB Details »
Acronyms for vB
Mod Version: 1.00, by RolandvonGilead (Member) RolandvonGilead is offline
Developer Last Online: Dec 2006 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.5.4 Rating: (3 votes - 4.67 average) Installs: 50
Released: 23 Apr 2006 Last Update: 25 Apr 2006 Downloads: 291
Not Supported DB Changes Uses Plugins Additional Files Is in Beta Stage  


//EDIT: UPDATED 25.04 22:34

Please only use this new version! Replace old ones! THX


Its an normal Acronym-Explanation-Mod.

In the AdminCP you can enter Acronyms and Descriptions.

Then in the Posts This word is underlined and green, and when the Users passes over with the mouse he sees the Description.

Roland

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #31  
Old 09 Jun 2007, 11:38
Feechen Feechen is offline
 
Join Date: Jul 2003
Solution for conflicting acronyms ("prefix problem")

In order to solve the problem of abbreviations (or acronyms) being a prefix of one another, such as in "DHEA" (= Dehydroepiandrosterone) and "DHEA-S" (= Dehydroepiandrosterone-sulfate), I have made a further modification to the Acronyms add-on.

Up to now such abbreviations were only recognized correctly if by chance the longer definition was entered first (and thus had a lower primary key index in the database).

The new version therefore first sorts all acronyms according to their length, and tries to find the longest match in the page to be displayed first. Only if that fails a shorter match is tried which then may be successful.

An additional term in the regular expression of the search pattern was introduced in order to avoid multiple replacements at the same location, very similar to the one to avoid replacements inside of HTML tags.

This means that if there were two abbreviations, for instance "DHEA" and "DHEA-S", then the text "DHEA-S" would match twice, once for "DHEA-S" and once for "DHEA". The result of such double replacements looks somewhat odd, therefore it has been prevented.

Moreover, it has been found that omitting the call to "preg_quote()" (see the previous two postings) in order to prevent the introduction of regular expressions into the definition of acronyms has its advantages:

This allows to define closely related variants of acronyms in a single definition (instead of a separate definition for each variant), such as for example "DHEA-?S". The question mark means that the preceding character is optional, i.e., this pattern would match "DHEAS" as well as "DHEA-S".

The advantage is conciseness, less acronym definitions to administrate, and improved speed (the more acronyms are defined, the longer it takes to display any given page).

The downside is that one needs at least a basic knowledge of (Perl) regular expressions in order to administrate the acronym definitions and that making a single error (e.g. a syntax error) will prevent the whole vBulletin board from working; all pages will display error messages instead of their contents, until the error is corrected.

It goes without saying that this implies that in this case, only knowledgeable and especially trustworthy people should have access to the Acronyms menu, which is not always possible or desirable to ensure.

Therefore two distributions have been prepared; the one with number "5" in its name is the "unsafe" one WITHOUT the call to "preg_quote()", and the one with number "6" in its name is the "safe" one (mnemonic: think of "safer sex", "6" = "sex") which prevents the introduction of Perl code into the definition of acronyms by escaping any characters with special meaning being found.

I hope you'll find these additions useful.

Best regards,
ibeji
in the name of Feechen

See also: [vB 3.5.x]Akronyme für vB Seite 2
preg_replace() preg_quote() Arrays foreach strlen() uksort() create_function()
Attached Files
File Type: zip Acronym_Mod_fixed_5.zip (8.1 KB, 6 views)
File Type: txt Acronym_Mod_patch_5.txt (10.1 KB, 9 views)
File Type: zip Acronym_Mod_fixed_6.zip (8.1 KB, 20 views)
File Type: txt Acronym_Mod_patch_6.txt (10.1 KB, 15 views)

Last edited by Feechen; 11 Jun 2007 at 10:23.
Reply With Quote
  #32  
Old 18 Aug 2007, 09:09
Feechen Feechen is offline
 
Join Date: Jul 2003
Added right apostrophe ´ as possible separating character

I just added the right apostrophe ("accent aigu") ´ as a possible separating character to the last two versions of the acronyms mod, because I had simply forgotten to include it in previous versions.

The left apostrophe ("accent grave") ` already was included since the beginning.

Best regards,
ibeji
in the name of Feechen
Attached Files
File Type: zip Acronym_Mod_fixed_5a.zip (8.1 KB, 11 views)
File Type: zip Acronym_Mod_fixed_6a.zip (8.1 KB, 40 views)
Reply With Quote
  #33  
Old 12 Sep 2007, 04:22
VIPER-MAN VIPER-MAN is offline
 
Join Date: Jul 2007
Does this work on 3.6.8? And if so, which ZIP file is appropriate to download? There are like 10 of them posted throughout this thread.

Thx
Reply With Quote
  #34  
Old 08 Oct 2007, 12:22
ragtek's Avatar
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
wouldn't it be better to replace the post when it is edited/safed instead of loaded?
the performance would be much better i think
__________________
my addons: http://ragtek.github.com
Reply With Quote
  #35  
Old 06 Nov 2007, 14:47
Feechen Feechen is offline
 
Join Date: Jul 2003
Originally Posted by VIPER-MAN View Post
(1) Does this work on 3.6.8?
(2) And if so, which ZIP file is appropriate to download? There are like 10 of them posted throughout this thread. Thx
(1) Yes, we use it under Version 3.6.8 Patch Level 1
(2) Of course the last two posted (5a, 6a), 5a if you want the power of Perl regular expressions in your acronyms, and 6a if you want the safer version without Perl code.
Best regards

Last edited by Feechen; 06 Nov 2007 at 15:09.
Reply With Quote
  #36  
Old 06 Nov 2007, 14:49
Feechen Feechen is offline
 
Join Date: Jul 2003
Originally Posted by ragtek View Post
wouldn't it be better to replace the post when it is edited/safed instead of loaded? the performance would be much better i think
You are absolutely right on that, but firstly, we have some 205 acronyms defined in our forum and this doesn't slow down response times perceptively, and secondly, substituting at page load time has the advantage that the page will always be up to date, regardless of when (before or after the page was created or edited) changes to the acronym definitions have been made.
Cheers

Last edited by Feechen; 13 Nov 2007 at 09:16.
Reply With Quote
  #37  
Old 22 Apr 2008, 20:28
stephansvl stephansvl is offline
 
Join Date: May 2007
I have problems with capital/small letters. Is it possible to exclude small letters? We use the acronyms for airport codes and therefore we just need capital letters.

IST for example is the shortcut for Istanbul, but the german ist is a verb and is used everywhere.
Reply With Quote
  #38  
Old 20 Sep 2008, 15:19
Puntoboy Puntoboy is offline
 
Join Date: Sep 2005
Real name: Chris
Any chance of this working with 3.7.3 or am I going to have to buy GAL?
__________________
www.puntosports.co.uk
Reply With Quote
  #39  
Old 05 Mar 2009, 23:33
Texas-Hunter's Avatar
Texas-Hunter Texas-Hunter is offline
 
Join Date: Jan 2009
Any idea if this will work with 3.8.1 ?
Reply With Quote
  #40  
Old 04 May 2009, 01:51
TinhNhi TinhNhi is offline
 
Join Date: Sep 2008
can we replace the acronym instead of make it pop up their meaning on windows, I am just curious
Reply With Quote
  #41  
Old 01 Jan 2010, 23:49
EWGF EWGF is offline
 
Join Date: May 2007
Works great on 3.8.4, lol
Reply With Quote
  #42  
Old 13 Jan 2010, 15:31
eridine eridine is offline
 
Join Date: May 2009
looks like it works under vB4.0.0PL1
Reply With Quote
  #43  
Old 05 Apr 2010, 18:44
Mike_K Mike_K is offline
 
Join Date: Jun 2005
I can confirm it: Works also with VB 4.02
Reply With Quote
  #44  
Old 01 Aug 2010, 17:42
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Does it work with 3.8.5, 3.8.6, 4.0.4, 4.05 and 4.06 Please?

Has anyone got any screenshot of it actually in use and a screenshot of the adminCP, please?


Many Thanks.
Reply With Quote
  #45  
Old 21 Nov 2012, 17:01
Mr_Running Mr_Running is offline
 
Join Date: May 2010
Works on 4.2.0 p3
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 17:49.

Layout Options | Width: Wide Color: