All Glossary Terms need to be EXACTLY the same in the article as they are in the glossary.
If i have "Toner" in the glossary, it doesnt pick up "toner" in the articles. Is it possible to make it so that capitalisation doesnt get recognised?
All Glossary Terms need to be EXACTLY the same in the article as they are in the glossary.
If i have "Toner" in the glossary, it doesnt pick up "toner" in the articles. Is it possible to make it so that capitalisation doesnt get recognised?
Open the file "includes\application\models\article_model.php" and at line 506 replace
$content = preg_replace('/[\b|\s]('.$row->g_term.')[\b|^\s]/', $replacement, $content, 1);
with
$content = preg_replace('/[\b|\s]('.$row->g_term.')[\b|^\s]/i', $replacement, $content, 1);
Basically just add the i modifier to the end of the regular expression to make it case insensitive. Not tested, but I believe that should do it.
Are my eyes deceiving me, or are those two lines identical?
They are different. :) Have to look VERY closely.
[\b|^\s]/i
Now I feel like a dolt. I was going by what was visible in my browser and didn't realize there was more.
Looking at the file now, it looks like this has been changed in the current version. I did a search for the original line and found nothing.(?)
Is the glossary still case sensitive?
It appears it is not set to lowercase in the latest release.
Look in that same file and find the function glossary($content)
In that function you should see $content = preg_replace......
That is the line to replace.
I noticed that if the Glossary term is the first word in the content section of an Article, it is not identified as a Glossary term. In addtion, if the glossary term is next to puctuation such as a comma, it is not picked up as a glossary term either. I assume the term must be surrounded by white space?
Yes it has to be a single word. Here is an example. Let's say your term is "cat" then in the article you have cataract it would find the cat in that term.
I realize "cateract" is not a match for "cat" but would think that "cat," would be. For example, "I have several pets: a cat, a dog, and a goldfish." I would think that in this example, "cat" should be highlighted or identified as a glossary term. In addition, if my term is "XYZ" and my Article starts with "XYZ is a new widget.", I would think that this, too should be highlighted as a glossary term. In both cases, it is not. There should be a distiction between alpha characters and puctuation characters with regards to identifying a glossary term. Starting an article content with a glossary term should also not be a limiting 'feature'.
I confirm the word has to be separated with spaces to get picked-up as a glossary term.
In addition, when it is at the end of a line I have to add a </div><div> after it, otherwise the ending space get suppressed.
But I didn't understand a thing regarding the way to make it non-case sensitive.
Could someone sumarize?
Thanks
Basically just follow the steps "systemAdmin" posted above. This is also committed to the trunk and will be included in the next release.
You must log in to post.
| Forums | Posts |
|---|---|
| Installation – Help getting up and running | 231 |
| Troubleshooting – Fixing it when it's broke | 233 |
| Suggestions – Tell us what you want | 106 |
| Extend – Change the way it works | 79 |
| General – Talk with other users. | 57 |
404 admin articles bug category ckeditor comments contact crash database date demo email error Firefox français french glossary iis install installation issue language login module modules permission rating search suggestion tags template tinymce title translation update upgrade upload User Guide wysiwyg