Topic on Extension talk:Semantic Glossary

Mri ice (talkcontribs)

Dear all,

I'm running MediaWiki 1.29.0 with Semantic Glossary 2.2.0. Everything is working as expected, apart from the popup width for the glossary terms, which seems to default to a rather small width (see here: https://www.dropbox.com/s/3mo9vhfwfm0ia8l/popup_issue.jpg?dl=0)

I've tried to find a way to change the default width of the popups. Can anybody shed some light on this please? Is this all governed by the Lingo style sheets?

Many thanks -

Martin

F.trott (talkcontribs)

It works for me. The Qtip library sets the min width to 50px and the max width to 280px for the class .qtip and for me this is exactly what's applied: The tip grows as much as allowed in width until it reaches max width and then breaks to the next line. It appears that for some reason on your page the tip tries to become as narrow as possible, but I have no idea why. Lingo does not change the dimensions of the tip.

I could have a look at the applied styles on your wiki if it is public.

Mri ice (talkcontribs)

Thank you very much for taking the time to reply and sorry it's taken me a while to come back to you. Well, it's a school day every day. I'm using the Approved Revision Extension. When there is a new revision, and you approve that, it shows the page you've approved, with "This revision of the page has been set as the approved version." at the top of the page. While on this view, the behaviour of the popups is exactly as above. Once I reload the page, everything is fine :) So, luckily, a non-problem!

I do have another question that I'm hoping someone might know the answer to:

When defining the Glossary-Terms, how do I account for different spelling / capitalization? So let's say I want a popup for MASH and different spellings are Mash, M*A*S*H and MASH.

I have found that it seems to work if I define multiple Glossary-Terms as below

[[Glossary-Term:MASH]]
[[Glossary-Term:M*A*S*H]]
[[Glossary-Term:Mash]]

That works reasonably well, but when I build the "auto-glossary" through

{{#ask:[[Glossary-Term::+]]
|?Glossary-Term
|?Glossary-Definition
|?Glossary-Link
|mainlabel=-
|format=table
}}

it will obviously list all variants for the Glossary-Term.

So my question is whether a) I'm using the right way of defining multiple Glossary-Terms or whether there is a better way of doing this? and b) if the answer to a) is yes - does #ask have an possibility to limit to the first result for multiple definitions (a bit like select top 1 * in SQL).

Hope this makes sense?

Thanks - Martin

F.trott (talkcontribs)

The answer to the first question is yes, this is exactly how it should be done.

The answer to the second question in principle is also yes, but it is not as simple as it seems at first glance. One problem is that just because you define properties in a certain order does not mean that they appear in that same order when queried. So defining MASH, then M*A*S*H, then Mash may well lead to them appearing as M*A*S*H, MASH, Mash. The next problem is that SMW does not natively support this kind of grouping, so you would have to use the template format and in the template work with string functions (or use #array_map from the PageForms extension) to create the table row by hand.

An altogether simpler approach would be to just define a new property Main Term that you set in addition to the Glossary-Term properties on each page and then query for that:

{{#ask:[[Main Term::+]]
|?Main Term
|?Glossary-Definition
|?Glossary-Link
|mainlabel=-
|format=table
}}
Mri ice (talkcontribs)

Perfect, thank you very much.

Reply to "popup width"