Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Acronyms for vB Details »»
Acronyms for vB
Version: 1.00, by RolandvonGilead RolandvonGilead is offline
Developer Last Online: Dec 2006 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.5.4 Rating:
Released: 04-22-2006 Last Update: 04-24-2006 Installs: 52
DB Changes Uses Plugins
Additional Files Is in Beta Stage  
No support by the author.


//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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 06-09-2007, 09:38 AM
Feechen Feechen is offline
 
Join Date: Jul 2003
Location: Germany
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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()
Reply With Quote
  #33  
Old 08-18-2007, 07:09 AM
Feechen Feechen is offline
 
Join Date: Jul 2003
Location: Germany
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #34  
Old 09-12-2007, 02:22 AM
VIPER-MAN VIPER-MAN is offline
 
Join Date: Jul 2007
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #35  
Old 10-08-2007, 10:22 AM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #36  
Old 11-06-2007, 12:47 PM
Feechen Feechen is offline
 
Join Date: Jul 2003
Location: Germany
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Reply With Quote
  #37  
Old 11-06-2007, 12:49 PM
Feechen Feechen is offline
 
Join Date: Jul 2003
Location: Germany
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Reply With Quote
  #38  
Old 04-22-2008, 06:28 PM
stephansvl stephansvl is offline
 
Join Date: May 2007
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #39  
Old 09-20-2008, 01:19 PM
Puntoboy Puntoboy is offline
 
Join Date: Sep 2005
Location: Northampton UK
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance of this working with 3.7.3 or am I going to have to buy GAL?
Reply With Quote
  #40  
Old 03-05-2009, 09:33 PM
Texas-Hunter's Avatar
Texas-Hunter Texas-Hunter is offline
 
Join Date: Jan 2009
Location: Lone Star State
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any idea if this will work with 3.8.1 ?
Reply With Quote
  #41  
Old 05-03-2009, 11:51 PM
TinhNhi TinhNhi is offline
 
Join Date: Sep 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can we replace the acronym instead of make it pop up their meaning on windows, I am just curious
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 12:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04583 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete