Log in

View Full Version : End-User Options - Abbreviations/Acronyms (MathJax Compatible)


MarkFL
10-26-2015, 10:00 PM
Overview

This product allows you to define a set of abbreviations/acronyms that will have a tooltip explanation defined for your users who may not be familiar with these abbreviations and will find an explanation useful. You can define which areas of your site this product is active and your users can also decide if they wish for the product to be active for them in their settings. If you use MathJax on your site for mathematical expressions, you will find this product is completely compatible with it, and will not break such expressions.

Upon installation, a custom user profile field is auto-created to allow your users control over use of this product, and this field is deleted if you uninstall the product.

https://vborg.vbsupport.ru/attachment.php?attachmentid=153574&stc=1&d=1445971845

The product settings are divided into two primary groups: the first pertaining to the abbreviations/acronyms and the second to your implementation of MathJax. If you are not using MathJax, then you can simply ignore that section.

https://vborg.vbsupport.ru/attachment.php?attachmentid=155556&stc=1&d=1481779564

Abbreviations/Acronyms Details

Here you will find a textarea for defining your list of abbreviations and acronyms. Each one should be place on a separate line, with the abbreviation/acronym first, then a pipe symbol ("|"), followed by the explanation you want to appear in the tooltip. If you wish for your tooltip to contain line breaks, then use "\n" (without the quotes) for these breaks. When you save your settings, the list is alphabetically sorted to make locating these definitions easier in the future.

Next, you can set the areas of your site in which this product will be active, including Posts, Signatures, Private Messages, Visitor Messages and Group Messages.

You can then set whether you wish for this product to be active for guests.

https://vborg.vbsupport.ru/attachment.php?attachmentid=153572&stc=1&d=1445971845

MathJax Details

If you do not use MathJax, then you need not make any changes here.

If you do use MathJax, then first you need to define whether you have their script(s) manually defined in your templates or if you are using my product for its dynamic implementation. I recommend using my product for the most reliable and efficient compatibility.

If you use MathJax's default delimiters, then you need not change them, as the defaults are already defined by this product. However, if you have defined your own delimiters, then all delimiters you have defined need to be given in the delimiter settings.

Updates:

Version 1.1:


I discovered a MySQL function I was using was deprecated as of 5.5, so I replaced it with a query.
Fixed bug whereby the preview of a post in a new thread now shows the acronyms.


Version 1.2:


Fixed bug where "/" character in an abbreviation caused a PHP error.
Fixed bug where acronym at the beginning of a text string will now work.


Version 1.3:


Profile filed number of auto-created field cached so a db query is no longer required each time text is parsed.


Version 1.3.1:


HTML special characters may now be used in abbreviations/acronyms.


Version 1.4:


Admin options processing more efficient.
Added setting for "Active Forums."
Fixed issue where hex colors within COLOR BBCode containing abbreviations broke posts.


Version 1.4.1:


Dotted underline is now the same color as the text.


Version 1.4.2:


Fixed issue with non-Latin characters.


Compatibility:

Tested and working on VB 4.2.x and should work on all 4.x versions of vBulletin.

Backup/Warning:

This product alters your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new mod.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.

To Install:

1.) Download and extract the attached .zip file.
2.) Upload the contents of the "upload" folder to your forum's root directory.
3.) Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
4.) Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
5.) Click "Import."
6.) You MUST enable the product in the settings before it will function.
7.) Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.

Support for this product can be found here:


MHB - Abbreviations/Acronyms (MathJax Compatible) (http://mathhelpboards.com/vbulletin-products-61/abbreviations-acronyms-mathjax-compatible-21859.html)
TAZ - Abbreviations/Acronyms (MathJax Compatible) (https://theadminzone.com/threads/abbreviations-acronyms-mathjax-compatible.145146/)

Alan_SP
10-27-2015, 07:36 PM
Very nice idea, and can be used for other things as well. :up:

Possible idea, if we could use it for adding some links in certain scenarios with additional parameter after second | e.g. "Amazon|Online Bookstore|http://www.amazon.com"

I know that there is similar product from BOP5 (if I'm not mistaken), but sometimes we could make it a link. And, if you think it's good idea and doable, can that link be made with different CSS than "normal" links, so it graphically looks different from normal links?

With this new links we could use it for different purposes, for additional explanation, for autolinking certain keywords, just explaining some things additionally...

Speaking about this, what if some acronym has more than one meaning? I see we could make something like this: "ALA|1. Alpha Lipoic Acid\n2. Alpha Linoleic Acid" (link for ALA: https://en.wikipedia.org/wiki/Ala) This probably would work?

MarkFL
10-29-2015, 05:24 AM
Update: version 1.1


I discovered a MySQL function I was using was deprecated as of 5.5, so I replaced it with a query.
Fixed bug whereby the preview of a post in a new thread now shows the acronyms.

MarkFL
11-14-2015, 03:05 AM
Update: version 1.2


Fixed bug where "/" character in an abbreviation caused a PHP error.
Fixed bug where acronym at the beginning of a text string will now work.

VCCN
02-20-2016, 01:56 PM
Hi, great plugin - excactly what we need - but it doesn't seems to work with 4.2.2 - i have installed according to the instructions as well as set the product as "Active" - but my acronyms does not get underline or tool tip when mouseover.
Any tip to get it working?

MarkFL
02-20-2016, 02:48 PM
Hi, great plugin - excactly what we need - but it doesn't seems to work with 4.2.2 - i have installed according to the instructions as well as set the product as "Active" - but my acronyms does not get underline or tool tip when mouseover.
Any tip to get it working?

I use it on a vB 4.2.2 PL 4 site with no issues. There is most likely a conflict with another product.

Do they not work anywhere on your site?

VCCN
02-21-2016, 04:48 PM
Correct, does not work at all.

I have tried two other mods that do the same thing, they worked fine, but had a few issues. i removed them before i installed this.

MarkFL
02-21-2016, 05:04 PM
Okay, I will have to come to your site to troubleshoot. Please PM me the login credentials for a temporary admin account. :)

VCCN
02-22-2016, 09:56 AM
Okay, I will have to come to your site to troubleshoot. Please PM me the login credentials for a temporary admin account. :)

PM sent !:D

eh69
02-28-2016, 06:50 PM
I cant uninstall this

please help
Database error in vBulletin 4.2.3:

Invalid SQL:

DELETE FROM vb_profilefield
WHERE profilefieldid =;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2
Error Number : 1064
Request Date : Sunday, February 28th 2016 @ 08:49:58 PM

MarkFL
02-28-2016, 06:58 PM
Did you remove the external .PHP file before attempting to uninstall? If so, that would cause an issue, because that file is needed.

MarkFL
05-23-2016, 01:56 AM
Update - Version 1.3:


Profile filed number of auto-created field cached so a db query is no longer required each time text is parsed.

scottkoz20
06-05-2016, 01:24 PM
hey Mark - what happens if you have the same acronym listed twice? I can use the Acronym portion of this, but with multiple sports on my site, if I use BUF, this could be for Buffalo Bills OR Buffalo Sabres.

I know this is probably an edge case and on a priority scale of 1-10, it's probably a 0. :D

MarkFL
06-05-2016, 01:34 PM
Yes, I have made no provisions in this product for multiple uses of the same acronym/abbreviation. I have made the reasonable assumption that all will be unique and have a global meaning on a site. If you enter the same abbreviation twice in your list, the first one (after being auto-sorted) will be used only. :)

scottkoz20
07-02-2016, 02:10 AM
testing this out over the weekend. I still have a use for this.

bryanb
08-17-2016, 04:56 AM
Great mod! Are there any plans to get this to function properly with the mobile template?

bryanb
08-17-2016, 06:18 AM
By the way - it doesn't seem to work with what might be considered special characters: for example - T&Cs| Terms and Conditions.

Any way to fix this?

MarkFL
08-17-2016, 10:04 AM
By the way - it doesn't seem to work with what might be considered special characters: for example - T&Cs| Terms and Conditions.

Any way to fix this?

Update - Version 1.3.1:


HTML special characters may now be used in abbreviations/acronyms.

bryanb
08-18-2016, 05:27 AM
Update - Version 1.3.1:


HTML special characters may now be used in abbreviations/acronyms.


:up: Many thanks! Works fine! :D

Any ideas to have it work in a mobile template? The underscore is there - but how do you mouse over?

MarkFL
08-18-2016, 11:15 AM
:up: Many thanks! Works fine! :D

Any ideas to have it work in a mobile template? The underscore is there - but how do you mouse over?

This product is designed to give mouseover tooltips...mobile gadgets that can't emulate a mouse I suppose just don't support tooltips. :)

KevinL
12-15-2016, 02:19 AM
Great work once again!

Any future plans (or could it be added) that this is only allowed in certain forums? Some of the forums the abbreviations aren't really needed or mean different things.

Thanks again!

MarkFL
12-15-2016, 02:26 AM
Great work once again!

Any future plans (or could it be added) that this is only allowed in certain forums? Some of the forums the abbreviations aren't really needed or mean different things.

Thanks again!

I hadn't planned on it, but I can add a setting for active forums. However, having forum-specific lists of acronyms I don't plan on doing as that would be overly convoluted and simply not worth the effort to code. :)

KevinL
12-15-2016, 02:30 AM
I hadn't planned on it, but I can add a setting for active forums. However, having forum-specific lists of acronyms I don't plan on doing as that would be overly convoluted and simply not worth the effort to code. :)

Excellent! No. One set is perfect as long as it can be shut off - or not included in chosen forums.

Also I just noticed it trying to rewrite a color code. In the post the color was changed to [ COLOR=#0000CD ] And there was an abbreviation for CD so it broke the code and distorted the whole post. Not sure if there is a way to combat that. But I thought I would bring it to your attention.

Thanks Mark!

MarkFL
12-15-2016, 02:41 AM
Excellent! No. One set is perfect as long as it can be shut off - or not included in chosen forums.

Also I just noticed it trying to rewrite a color code. In the post the color was changed to [ COLOR=#0000CD ] And there was an abbreviation for CD so it broke the code and distorted the whole post. Not sure if there is a way to combat that. But I thought I would bring it to your attention.

Thanks Mark!

Thanks for letting me know...I will include a fix for this along with the active forums setting.

MarkFL
12-15-2016, 03:30 AM
Update - Version 1.4:


Admin options processing more efficient.
Added setting for "Active Forums."
Fixed issue where hex colors within COLOR BBCode containing abbreviations broke posts.

KevinL
12-15-2016, 10:13 AM
Thanks for the update.

Another thing that was noticed if browsing the site on mobile or tablet the underlined words are now tiny compared to the normal words. It can get a little distracting if there are enough abbreviations.

Thanks again Mark

MarkFL
12-15-2016, 10:26 AM
I don't use any mobile devices, so I wouldn't be able to test that. That likely has to do with a HTML shortcoming in the browsers those devices use.

KevinL
12-15-2016, 01:21 PM
The only way I could fix it if I added the following to the headinclude template. If I didn't include the If statement it distorted the rest of the forum. This issue only seems to come up on Chrome for mobile. Firefox mobile seems to work without issue

<vb:if condition="THIS_SCRIPT == 'showthread'">
<meta name="viewport" content="width=auto, initial-scale=1">
</vb:if>

I was looking to use something like this https://osvaldas.info/elegant-css-and-jquery-tooltip-responsive-mobile-friendly within your mod but I didn't know where to start right now haha It seems to be working OK except for mobile devices but you already stated it wouldn't work so we're good.

Thanks for the great work Mark!

hugoroger
02-07-2017, 11:43 AM
Nice @MarkFL! I installed this one to use it combined with the blurbs plugin. Question. Do you know if we can configure the abbreviation to be a hyperlink? As in, instead of just appearing the help text, can we add a link to it ? I tried using bbcode to add it but it didn't work. Is this something possible?

hugoroger
02-07-2017, 12:01 PM
Hey again Mark! Just wanted to add a quick folloe up. :)

Okay.. so I went ahead and installed this plug in (FUZZY SEO Auto Linker (https://vborg.vbsupport.ru/showthread.php?t=237479)) to try to create links in the blurbs but apparently it didn't work. :/

I have an example here (https://www.iforumelite.com/showthread.php/293-Qual-e-a-melhor-traducao-para-a-palavra-Label-Como-devu-traduzir). Where I used the blurb plug in to add the word : "joyXwriter" to the bottom of all posts. Now, you can see I configured the hyperlink correctly because in the OP, I added the same sample word by text and the auto linked picked up. Does the plugin(Abbreviations/Acronyms) support this option with HTML or BBcode?

MarkFL
02-07-2017, 03:20 PM
This product is supported in the "Forum/Thread Blurbs" product, however something like the auto-linker, which likely requires additional processing, won't be unless coded to do so. :)

hugoroger
02-09-2017, 04:27 AM
Thanks @MarkFl! How about hyperlinking the Abbreviations/Acronyms? Can this be accomplished? As in, instead of just appearing the help text, can we add a link to the text ? I tried using bbcode to add it but it didn't work, unless I am doing something wrong in creating the hyperlink manually. Is this something possible?

MarkFL
02-09-2017, 05:49 AM
Thanks @MarkFl! How about hyperlinking the Abbreviations/Acronyms? Can this be accomplished? As in, instead of just appearing the help text, can we add a link to the text ? I tried using bbcode to add it but it didn't work, unless I am doing something wrong in creating the hyperlink manually. Is this something possible?

That's not the purpose of this product...:)

hugoroger
02-09-2017, 06:21 AM
Cool! just wanted to ask :)

stained
02-17-2017, 09:53 AM
Excellent mod. I installed this on a site that uses acronyms with the german letters ?, ? etc. The mod doesn't like them at all :) Works perfectly otherwise though. Cheers!

MarkFL
02-17-2017, 11:50 AM
Excellent mod. I installed this on a site that uses acronyms with the german letters ?, ? etc. The mod doesn't like them at all :) Works perfectly otherwise though. Cheers!

I have added this to my to-do list to investigate. I can't give you any kind of time frame in which I can get to it though. My list is extensive. :)

stained
02-17-2017, 12:32 PM
Thanks Mark :up:

Just a quick one: I have a dark skin on my forum and would like to change the dotted underline below each acronym to a lighter colour. The mod creates a div for each acronym and applies style info which I can play with in Firebug. I know the colour that I would like to use but can't find the template that is controlling the styling. Just wondered whether you could help me find it.

MarkFL
02-17-2017, 03:56 PM
Update - Version 1.4.1:


Dotted underline is now the same color as the text.

stained
02-18-2017, 09:17 AM
Excellent. Many thanks!

Edit: Just tried the new xml file Mark. It doesn't seem to make that change on my forum. My text colour isn't being picked up by the underline. Noticed that the product xml file date and time are the same for the 1.4 and 1.41 versions?

PS would it be possible to have this mod mark only the first instance of an acronym on a page?

MarkFL
02-18-2017, 01:11 PM
Excellent. Many thanks!

Edit: Just tried the new xml file Mark. It doesn't seem to make that change on my forum. My text colour isn't being picked up by the underline. Noticed that the product xml file date and time are the same for the 1.4 and 1.41 versions?

PS would it be possible to have this mod mark only the first instance of an acronym on a page?

Did you update the external script on your server?

stained
02-18-2017, 03:45 PM
Oh dear... a schoolboy error :o I forgot the external file. Working perfectly now. Thanks!

MarkFL
02-19-2017, 03:59 PM
Update - Version 1.4.2:


Fixed issue with non-Latin characters.

stained
02-19-2017, 05:12 PM
Update - Version 1.4.2:


Fixed issue with non-Latin characters.


Great stuff. Works perfectly :up: Thanks very much!

stained
03-06-2017, 05:53 AM
I mentioned it earlier in the thread but I was wondering whether it's possible for an acronym to be shown just once per post even if it occurs more often?