Configure definition links

Configure definition links

ដោយ Mark Penny នៅ
ចំនួនតប៖ 4

I've just found that the Glossary pop-up window will display and follow links. This is handy for routing users to deeper sources such as online dictionaries. In my case, the online English-Chinese-English dictionaries I use link returned terms. I can simply copy and paste these terms to build my glossary and my students can choose whether to look at only the Chinese gloss in the pop-up window or click the gloss and go to the online dictionary for more information.

Unfortunately, the links open in the current window. Someday it would be nice to be able to configure these links as a class rather than as instances.

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Mark Penny

Re: Configure definition links

ដោយ Frank Ralf នៅ
Hi Mark,

I saw your postings in this forum regarding the configurability of the Glossary Autolinking feature. You might have a look Automate pronuciation guide using forvo or howjsay where I created a filter to twist and tweak the autolinks. You should be able to use (or modify) that filter to add a class to all your glossary links so you can style them independently with CSS.

hth
Frank
មធ្យមភាគនៃរង្វាយតម្លៃ:Useful (1)
ឆ្លើយតបទៅកាន់ Frank Ralf

Re: Configure definition links

ដោយ Mark Penny នៅ

I had a quick look at your link. It sounds like your patch (?) is designed to link to a languae service. I would want to link to my glossary and simply bypass the glossary name: text item tooltip. Are you suggesting that your patch could be styled to do that?

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Mark Penny

Re: Configure definition links

ដោយ Frank Ralf នៅ
Hi Mark,

It's not a patch but a legitimate Filter ញាក់ចិញ្ចើម - see Filters FAQ for details. And basically it only replaces one hyperlink by another so it could very well replace it by the same link to your glossary entry only with something added like target="_blank" or class="glossaryentry".

Creating a tooltip would require making use of the link's title attribute. Without hacking core code this could be achieved using JavaScript, see Enhancing Tracker Links with Greasemonkey for an example.

hth
Frank
មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Frank Ralf

Adjustments to upload

ដោយ Mark Penny នៅ

Sorry, Frank, you're right. It's a filter, not a patch. Haste makes waste. I'm not sure what kept me from getting my facts straight.

Can I make a  suggestion for the upload?

First, enclose the files in a folder called "forvo" before compressing. This way, when people extract it to their filter folder in their Moodle installation, it will be ready to go and web masters will have one less step to worry about. You can call the compression whatever you like, but the extracted folder should be named consistently. A few other developers tend to name the uncompressed folders of their plugins after the latest version and users have to rename them. It's a bit of a nuisance and can cause confusion for people who don't know what's going on.

I was going to suggest not putting a Forvo link in the Filters menu, but I see that Emoticons and Media plugins have links there, so I guess you're in good company.

I'm not quite sure how to use the filter for what I want, but it has given me the notion that if I look long enough, I can probably find something in the Glossary files to tweak to get the effect I'm after. Supposedly, understanding how your filter hijacks Glossary's code to do that will help in that quest.

មធ្យមភាគនៃរង្វាយតម្លៃ: -