Extension talk:Semantic Glossary

Jump to navigation Jump to search

About this board

Magic word "__NOGLOSSARY__" not working on Lingo 3.1.1

2
165.156.40.27 (talkcontribs)

__NOGLOSSARY__ tag doesn't work if we use Lingo : 3.1.1 with Semantic Glossary: 3.0.0. Could anyone let me know how can the __NOGLOSSARY__ tag start working with Lingo 3.1.1

Kghbln (talkcontribs)

I know this works with MW 1.31.x and does not work with 1.35.x I have only few experience with non LTS versions of MW.

Reply to "Magic word "__NOGLOSSARY__" not working on Lingo 3.1.1"

Is there a way to turn off the glossary pop-up for a specific term on a page?

2
Rwjorgen (talkcontribs)

I have a button on a page that uses a term from the glossary, but the glossary pop-up is a bit of a nuisance. Is there some magic word/controls that I can place around that word to suppress the popup from appearing?

F.trott (talkcontribs)
Reply to "Is there a way to turn off the glossary pop-up for a specific term on a page?"

handling synonymous terms in Semantic Glossary

4
128.183.170.184 (talkcontribs)

How do I handle synonyms in Semantic Glossary? In Lingo you can specify synonyms in the following way:

TERM ACRONYM
term
Term definition

Thanks!

Anna

F.trott (talkcontribs)

Hi Anna, good question. I thought it would be as easy as specifying a second Glossary-Terms for one definition. But I just tried it and it does not work. So right now the only way to do this is to actually define the two synonyms separately. I will fix the extension so this should be easier in future versions.

Cheers

195.226.179.252 (talkcontribs)

Hi all,

it is possible, but elaborate to create synonyms for a page. I succeded to do so by creating a Semantic Internal Object for every synonym on the page. This can e.g. be simplified by using functions like {{lc:term}} and {{uc:term}} in templates to simulate case-insensitivity. Just don't look on the complexity...

thx

187.4.43.18 (talkcontribs)

Have some solution to use synonymous in Semantic Glossary?

Reply to "handling synonymous terms in Semantic Glossary"
Alex Mashin (talkcontribs)

Please mention SMW is a req on Extension page

2
138.232.9.101 (talkcontribs)

It would be nice if you mention that SMW is a requirement on the extension page.

Further, it would be ideal if the extension.json also specifically mentions SWW is a requirement.

Kghbln (talkcontribs)

> It would be nice ...

Done

> Further, it would be ideal ...

Once the extension to manifest 2 this will be indeed a thing to. Currently the added requirement for MediaWiki is nothing but dead code.

Reply to "Please mention SMW is a req on Extension page"

Creating Form inputs for glossary terms

9
Nprobinson (talkcontribs)

On the Semantic_Glossary overview it mentions that "You can easily build a user interface to edit the glossary, e.g. using Semantic Forms.".

Does anyone have any more information than this regarding how to set the required objects up? I have tried different combinations of creating templates, forms and categories but can't find anyway of populating the 'Glossary-Term', 'Glossary-Definition' etc values via an input form?

Thanks in advance for any suggestions and apologies if I am missing a glaringly obvious solution somewhere.

Cavila (talkcontribs)

Just a quick answer with an example, presuming you have installed SMW, SF and SG properly:

Say you have something like the following in a template called "Template:Glossary term" (subobjects are used here as recommended by the docs):

=={{{Term|}}}==
{{{Definition|}}} (link: {{{Link|}}})
{{#subobject:
|Glossary-Term={{{Term|}}}
|Glossary-Definition={{{Definition|}}}
|Glossary-Link={{{Link|}}}
}}

Then in the form you may want to use multiple-instance templates:

{{{for template|Glossary term|multiple}}}
===Term===
{{{field|Term|input type=text}}}

===Definition===
{{{field|Definition|input type=textarea}}}

===Link===
{{{field|Link|input type=textarea}}}

{{{end template}}}

Does that help you in any way?

F.trott (talkcontribs)

Create a page Category:Glossary Term:

[[Has default form::Glossary Term]]

Create a page Template:Glossary Term:

{{#set:
|Glossary-Term={{{Glossary Term|}}}
|Glossary-Definition={{{Glossary Definition|}}}
}}

Create a page Form:Glossary Term:

<noinclude>

{{#formlink:form=Glossary Term|link text=New Glossary Term}}

</noinclude><includeonly>
{{{info|create title=Create new Glossary Term|edit title=Edit Glossary Term|page name=<Glossary Term[Glossary Term]>}}}
{{{for template|Glossary Term}}}
{| class="formtable"
! Term:
| {{{field|Glossary Term|input type=text}}}
|-
! Definition:
| {{{field|Glossary Definition|input type=textarea}}}
|}
{{{end template}}}

{{{standard input|save}}} {{{standard input|cancel}}}
</includeonly>

Follow the link on the Form page and create some terms.

It may be necessary to purge the pages containing text with terms.

F.trott (talkcontribs)

Heh, mid-air collision. :)

Both should work. Cavila's for one page containing several terms (up to the whole glossary), mine for one page per term.

Nprobinson (talkcontribs)

Thanks for the responses.

I ended up implementing the one page per term as it fitted my requirements better but thank you both for the guidance.

Solution worked perfectly.

Kmlancaster (talkcontribs)

When I follow your example, I get the following as the only visible content on my Form:Glossary Term page. Any help?

{{#formlink:form=Glossary Term|link text=New Glossary Term}}

F.trott (talkcontribs)

Usually when a function call appears verbatim on the page it means, that the respective function is unknown. Make sure that PageForms is installed properly.

Dan Bolser (talkcontribs)

Do both examples above use PageForms? One mentions SF. BTW, could this all be configured in the extension itself?


Many thanks,

F.trott (talkcontribs)

They should work with PageForms. This is a question from 5y ago, SF was probably not yet renamed back then.

The whole idea of Semantic Glossary (over e.g. Lingo) is to leverage SMW's capabilities. So while there may be a reduction in setup effort for wiki admins, I am not sure if it would make sense to hard-code a special page or something instead of utilizing the available capabilities in the SMW ecosystem. Maybe it would be useful to have the above solutions as a cookbook recipe somewhere in the documentation.

Or maybe I am just not getting the point. :)

Reply to "Creating Form inputs for glossary terms"

MediaWiki 1.32.2 and Composer

2
Terrawide (talkcontribs)

First of all, thank you for all the hard work on the extension

Second, without going into any technical detail, I could not get the extension to work and had issues with the instructions for installing the extension, both manually and with Composer. I also don't want to burden you in any fashion by asking for help on solving the issue. I'll get it eventually. Instead I'd like to contribute some updates to the instructions for the manual installation of the extension, not Composer*. But it would be easier if you could help a bit.

Here's the short version of what I did: Semantic Glossary Extension downloaded, loaded in the LocalSettings.php file, permissions, ownership of everything set (no specific instructions given on that).  In the instructions for a manual installation I noticed that Lingo was the only dependency listed, along with the instructions to not load it in the LocalSettings.php file.  Downloaded, installed, not configured in LocalSettings.php, done.  Result: "Fatal exception of type "Error" displayed in the browser afterwards.  I haven't looked into the PHP error log yet, but this error doesn't seem to be at that lower level.  I then tried Composer* per your instructions.  It downloaded and installed 83 dependencys.  That seemed a bit much.  The result was more or less the same as it hosed our entire MediaWiki site.  Thankfully I don't test new extensions or Composer updates on a live site, so no big deal.

Anyway, and again, I don't want to waste your time or have you fix my install, but here are my questions:  Are there issues with MediaWiki 1.32.2?  What are all the dependencies for your Extension?  And do they need to be loaded or not loaded in the LocalSettings.php file?

Thanks...

* I've not had much luck with Composer helping more than it damages.  Maybe someone else can help with expanding the instructions for that for various Composer configurations and other OS installs.

F.trott (talkcontribs)

There seems to be an issue with some versions of MediaWiki 1.31 and 1.32 when using Composer. See https://phabricator.wikimedia.org/T226766 .

You could try to use the --no-dev switch with composer or wait for the release of 1.32.3

Reply to "MediaWiki 1.32.2 and Composer"

Glossary is generating a fatal error in MediaWiki 1.31.0

4
Legaulph (talkcontribs)
MediaWiki	1.31.0
PHP	7.1.8 (apache2handler)
MySQL	5.6.34-log

Fatal error: Uncaught Error: Call to undefined function SG\wfProfileIn() in /app/mediawiki/extensions/SemanticGlossary/src/LingoBackendAdapter.php:58 Stack trace: #0 /app/mediawiki/extensions/Lingo/src/LingoParser.php(191): SG\LingoBackendAdapter->next() #1 /app/mediawiki/extensions/Lingo/src/LingoParser.php(163): Lingo\LingoParser->buildLingo() #2 /app/mediawiki/extensions/Lingo/src/LingoParser.php(223): Lingo\LingoParser->getLingoTree() #3 /app/mediawiki/extensions/Lingo/src/LingoParser.php(80): Lingo\LingoParser->realParse(Object(Parser), '

parse(Object(Parser), '
parse('
F.trott (talkcontribs)
Legaulph (talkcontribs)
Why Thank you, that seems to work fine. 
Will I be able to use composer for this version?
F.trott (talkcontribs)

Composer should work. You just have to force it to use the master version.

Reply to "Glossary is generating a fatal error in MediaWiki 1.31.0"
Raulcpop (talkcontribs)

A database query error has occurred. This may indicate a bug in the software.

[a833f4b26fe85a741b68abc6] 2018-03-21 12:30:08: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

F.trott (talkcontribs)
Reply to "Its someone alive here?!"
Mri ice (talkcontribs)

I'm really sorry about yet another question. I've tried to troubleshoot to no avail and am now hoping I'm missing something really obvious.

So I've started building up a glossary and have added ca. 150 definitions so far. Everything has been working well up until now. I've added a new glossary term definition using the same template as I've used for everything else:

[[Glossary-Term::MOSAIQ]]

This is a term that occurs fairly frequently.

What I don't understand is that it does not seem to find all occurrences of the term, but some. I have uploaded a screenshot: https://www.dropbox.com/s/vrlmldqmi65gu0e/mosaiq_semantic_glossary.jpg?dl=0

Its correctly identified 3 instances, but it hasn't identified 4 others.

Is there a limit on how many it will find per page? How can I troubleshoot this?

As before, very grateful for any help.

Thanks

Martin

F.trott (talkcontribs)

For the moment I have no idea at all. Looks like a bug. I'll get back to you.

Mri ice (talkcontribs)

Thank you and I must apologize, I have caused this all by myself :(

It appears that I had two Glossary-Terms defined. The first one:

[[Glossary-Term::MOSAIQ]]

and the second one:

[[Glossary-Term::MOSAIQ Server]]

All instances of MOSAIQ Server got tagged appropriately. Some instances of MOSAIQ on its own did and others didn't. Having removed the second term, all instances of MOSAIQ are now tagged.

I guess that what I tried to do was simply not possible.

Sorry to have wasted your time.

Thank you - Martin

F.trott (talkcontribs)

Ah yes, that might be problematic, although I still think it'd be nice if it worked. Thanks for the clarification.

Reply to "Not all instances found"