Hi, thanks for the plugin!
I noticed that you log some request params with error_log which completely fills up my server logs with debug info. Can you please move the logging statements in “class.wp-wiki-tooltip-admin.php” inside a check for WP_DEBUG? Check https://www.smashingmagazine.com/2011/03/ten-things-every-wordpress-plugin-developer-should-know/#how-to-log-your-own-debug-statements for example.
Thanks!
]]>When linking to a page such as the one mentioned above, Wikipedia inline css cruft shows in the popup – eg below. Can you amend to filter this out ?
In atmospheric chemistry, .mw-parser-output .template-chem2-su{display:inline-block;font-size:80%;line-height:1;vertical-align:-0.35em}.mw-parser-output .template-chem2-su>span{display:block;text-align:left}.mw-parser-output sub.template-chem2-sub{font-size:80%;vertical-align:-0.35em}.mw-parser-output sup.template-chem2-sup{font-size:80%;vertical-align:0.65em}NOx is shorthand for nitric oxide (NO) and nitrogen dioxide (NO2), the nitrogen oxides that are most relevant for air pollution.[1][2] These gases contribute to the formation of smog and acid rain, as well as affecting tropospheric ozone.
]]>Hello. As far as I see, this plugins shows tooltips when used shortcode. Is it possible to show tooltips for each URL to target wikis?
So, let’s say I’ve hundreds of links to my wikis on my blog, I want them all to show tooltips without manually converting them all to shortcodes. Is this possible?
]]>I try to use this plugin with a Mediawiki installation that I have on the same website, but I get the error:
“Sorry, but the test of this URL failed!”
This is the address
https://wiki.etereoarte.com/api.php
I don’t know what else to do.
Help, please
There will always be a user who will break the system…
The “permalink options” item disappears from the admin menu when these plugins are activated:
Enhanced Media Library
Ultimate Addons for Gutenberg
WP Revision Master
WP Wiki Tooltip
YaMaps for WordPress
https://prnt.sc/1w0xhdu
https://prnt.sc/1w0xiud
Deactivating any of them returns the menu item to its place.
Obviously, each of these plugins has its own part of the blame.
But deactivating one of those plugins doesn’t answer my question: What error does your plugin add?
I can disable other plugins, but that won’t fix the flaw in your plugin code, does it?
Hello, I need some help on limiting the tooltip function to show only once for any given word.
I got a custom script working for your plugin to automatically assign a tooltip to selected words in an array. I used the great code snippet idea given here:
https://www.ads-software.com/support/topic/automate-tooltips-via-functions-php/
It works, but shows the tooltip for each instance of the given word, in this case “ice cream”. So, all the words “ice cream” in the post now have a tooltip from Wikipedia.
How can I limit the tooltip script to show only once per any word specified in my custom tooltip automation script?
The script I use is this:
function add_wikitips($content) {
if( is_single() && is_main_query() ) {
$arr = array('ice cream');
for ($i = 0; $i < count($arr); $i++) {
$content = str_replace($arr[$i], '[wiki]'.$arr[$i].'[/wiki]', $content);
}
}
return $content;
}
add_filter('the_content', 'add_wikitips');
Thanks a lot in advance.
]]>Hi.
I am using your plugin. But I am facing a serious issue. Wiki Tooltip is working fine on Single Blog page but it’s not working properly on blog page. I tried my best to fix it but still now I didn’t find any Shore.
]]>Hi!
Thanks for the great plugin!
I guess, this is a feature request: I would like to determine the content of the tooltip more flexibly. Is there a way to put more paragraphs or the entire Wiki page content into the tooltip? And to disable the link to the Wiki page?
wp-config.php: When I set define( 'WP_DEBUG', true );
I received messages on all pages:
Notice: Undefined index: own-error-title in /home/…/wp-content/plugins/wp-wiki-tooltip/class.wp-wiki-tooltip.php on line 60
Notice: Undefined index: own-error-title in /home/…/wp-content/plugins/wp-wiki-tooltip/class.wp-wiki-tooltip.php on line 61
]]>Hi,
Get the impression that not only the [wiki] shortcodes are stripped from the_excerpt, but also the text in between.
I’m using WP 5.3.2 with WP WT 1.9.1 on PHP 7.4. Happens with themes like Blocksy, Astra and Weaver Xtreme.
Can create an example.
Hello, is it possible to add a gutenberg menu in the editor?
]]>Hello,
First I want to thank you for this awesome plugin. By any chance, is there a way to show more than one paragraph in the tooltip? For example, in this section
https://en.wikipedia.org/wiki/Solar_telescope#Other_types_of_observation
we have one paragraph and a list with five entries. I wonder if it is possible to show them altogether.
Thank you.
]]>I would like to automatically generate tooltip shortcode for an array of words, using a function to wrap word-matches* in [wiki]-shortcode tags. I suspect the best method is to use add_filter() on the_content, and parse using RegEx in preg_replace_callback_array(), but that’s beyond me.
Here’s what I have so far.
A sample of post content (the text visible in the admin-side post editor):
This [wiki base=”WI”]Gymnopus dryophilus[/wiki], itself saprotrophic rather than mycorrhizal, is infected with <i>Syzygospora mycetophila</i>. mycorrhizal, [wiki base=”WO”]mycorrhiza[/wiki],’mycorrhizae’,’mycorrhizas’, Mycorrhizal, Mycorrhiza,Mycorrhizae, Mycorrhizas,
[wiki base=”WO”]-trophic[/wiki]
Here’s a sample array of terms to be matched:
$arr = array('mycorrhizal','mycorrhiza','mycorrhizae','mycorrhizas','Mycorrhizal','Mycorrhiza','Mycorrhizae','Mycorrhizas','Gymnopus dryophilus');
Here’s the code I have for trying to do it:
function add_wikitips($content) {
if( is_single() && in_the_loop() && is_main_query() ) {
$arr = array('mycorrhizal','mycorrhiza','mycorrhizae','mycorrhizas','Mycorrhizal','Mycorrhiza','Mycorrhizae','Mycorrhizas','Gymnopus dryophilus');
for ($i = 0; $i < count($arr); $i++) {
$content = str_replace($arr[$i], '[wiki]'.$arr[$i].'[/wiki]', $content);
}
}
return $content;
}
add_filter('the_content', 'add_wikitips');
But the output’s garbled, perhaps due to an unwanted (recursive) double-application of the filters to the_content?:
https://pasteboard.co/Iqp0oHY.png
* I need RegEx matching to exclude match-instances where there are already manually added shortcodes, e.g., [wiki title=”Mycorrhiza”]Mycorrhizality[/wiki]. If that counted as a match, the filtered content would come out as
[wiki title=”Mycorrhiza”][wiki]Mycorrhiza[/wiki]lity[/wiki]
– which would be rendered in an undesirable, garbled way by the WP Wiki Tooltip plugin. (I think something like that might be happening to generate the garbled output above.)
Thanks for any help!
I’ve added (and successfully tested) https://en.wiktionary.org/w/api.php on the Settings page, and specified which Wiki using the ID=”” parameter in your shortcode. On the rendered page, although I get a tooltip on hover, it just contains a link to Wiktionary (there is no Wiktionary content displayed in the tooltip box).
Am I doing it incorrectly?
]]>I have some problems with the Plugin, there are some articles where strange font information is shown when used.
One example:
Gerstentee (jap. 麦茶 .mw-parser-output .Latn{font-family:”Akzidenz Grotesk”,”Arial”,”Avant Garde Gothic”,”Calibri”,”Futura”,”Geneva”,”Gill Sans”,”Helvetica”,”Lucida Grande”,”Lucida Sans Unicode”,”Lucida Grande”,”Stone Sans”,”Tahoma”,”Trebuchet”,”Univers”,”Verdana”}mugicha, veraltet 麦湯 mugiyu) ist ein in Ostasien beliebtes Getr?nk, das aus ger?steten Gerstenk?rnern zubereitet wird. Diese werden mit hei?em Wasser aufgebrüht oder kalt für 1–2 Stunden angesetzt.
But there are also other pages were the same happens.
I think your plugin is really awesome so thanks for the good work.
Would be nice if you could have a look in that.
For me plugin won’t work, it creates only a normal link to wikipedia, I tried all options and deleted all caches and tried with more browsers.
]]>Hello!
Firstly thank you for developing this very useful plugin ??
I’m having some trouble getting all this setup and would appreciate any help. I’d like to have this article display as a tooltip: https://en.wikipedia.org/wiki/Apocalypto
Do I need to add the link as a URL in the settings? When I do it goes red.
Cheers,
Ofir
Dear Nico,
The plugin seems just to be what I was looking for.
However, up to now tooltips always show “Error! Sorry, but we were not able to find this page :(“.
Settings for Wiki-Tooltips seem OK: when I check the URLs of Wikis, they appear in green.
I am running WordPress 5.0.2.
Thanks,
]]>When the tooltip box first appears, it wiggles. Is there a way to turn that off?
]]>Gutenberg steht vor der Tür, was mich veranlasst hat, heute einige Blogtposts damit zu verfassen. Dabei fiel mir auf, dass das Tooltip-Icon nicht bei den Optionen im Gutenberg-Editor angezeigt wird. Ist da schon etwas in Planung?
]]>Howdy there,
So I setup a new mediawiki installation, fresh wordpress install about 2 days ago. I installed your plugin today and attempted to set it up, but it keeps saying my wiki URL failed. What is it checking for exactly? I am able to interact with the wiki via the same URL i entered into the plugin form, so I know the mediawiki install is correct.
[Solution] I didn’t realize that I needed to add the /api.php to the end of the url. Is all good now, thank you!
]]>Hi, in first thank you a lot for your plugin, it will good help for me.
I just want to know if it s possible integrate the fonction to creating a link with an anchor of a wikipage. Exemple like [wiki ID=EN like title=”page#section”]Section[/wiki]
If it s not do you think you can add this fonction in a next update ?
Great Job
]]>Hi,
as the topic tells, for me Tooltips are not shown anymore in released articles. Everything seems fine. The word that triggers the tooltip is highlighted corrctly. If I hoover the mouse over it, the link shown down left is the right one, pointing to the correct wikipedia page.
This does not only go for articles released after the latest update but also for older ones. An example is
https://linuxnews.de/2018/02/22/purism-notebooks-mit-tpm/
which in the first paragraph shows 2 normal links and one tooltip link, which does not work anymore. I usualy work with Chrome, but it does not work in Firefox either. Also, switching from hoover to click does not fix it either.
Hello,
Thank you for updating the plugin! ??
When I tap the link on my iPhone, the tooltip was triggered on the previous Version 1.7.4.
With Version 1.8.0, I need to tap and hold the link to trigger the tooltip, and it will also trigger the browser menu window.
– Settings –
Tooltips are triggered on -> hover
What happens by clicking the link, too? ->
Nothing! The link has no further function.
https://www.dropbox.com/s/1oirolp8c62cgdt/wp-wiki-tooltip.jpg?dl=0
https://www.dropbox.com/s/tm6p10xfg8kycr6/wp-wiki-tooltip2.jpg?dl=0
Do you think you could replicate the issue on your side?
Regards,
]]>I notice these errors in header and footer after updating to latest version of plugin:
Notice: Undefined index: trigger-hover-action in /home/username/public_html/blog/wp-content/plugins/wp-wiki-tooltip/class.wp-wiki-tooltip.php on line 53
Notice: Undefined index: error-handling in /home/username/public_html/blog/wp-content/plugins/wp-wiki-tooltip/class.wp-wiki-tooltip.php on line 56
Notice: Undefined index: own-error-title in /home/username/public_html/blog/wp-content/plugins/wp-wiki-tooltip/class.wp-wiki-tooltip.php on line 59
Notice: Undefined index: own-error-message in /home/username/public_html/blog/wp-content/plugins/wp-wiki-tooltip/class.wp-wiki-tooltip.php on line 60
Please kindly help me to modify them.
]]>At first I loved this plugin, and I still like much of it … EXCEPT … the short codes generated aren’t in any way “hidden” … they become a permanent part of the viewable page: Where words or phrases are wrapped with the code, Google indexes those words/phrases with <wiki> and </wiki> wrapping the words. Worse is that when I disable the plugin my website is littered with <wiki> </wiki> tags that I would then have to manually find and remove.
Is there a way to fix that?
Moinsen, ??
vielen Dank für dieses tolle Plugin, wirklich eine tolle Idee. Hab gleich ein wenig ausprobiert und wollte die Api von
https://en.wikivoyage.org/wiki/
anzapfen, aber irgendwie bekomme ich das nicht gebacken. Eine Api ist da.
Magst Du mir ein wenig auf die sprünge helfen?
Vielen Dank.
Gru?
Reinhard
I use your plugin for my own wiki.suenee.cz on my web https://www.suenee.cz. It is really good idea. I like it.
I found a small bug:
===
Lorem Ipsum [wiki]unknown wiki term[/wiki] apis samet at dolor…
===
When I publish it, I get wiki link with bubble where I see error message about that the term “unknown wiki term” was not found. It is not user friendly. I made small hard code update of your code:
// class.wp-wiki-tooltip.php :: do_wiki_shortcode
if ($trans_wiki_data[ 'wiki-url' ] == '')
{
$output = $content;
}
else
{
$output = '<script>$wwtj( document ).ready( function() { add_wiki_box( ' . $cnt . ', "';
$output .= $trans_wiki_data[ 'wiki-id' ] . '", "' . $trans_wiki_data[ 'wiki-title' ] . '", "';
$output .= $trans_wiki_data[ 'wiki-base-url' ] . '", "' . $params[ 'thumbnail' ] . '" ); } );</script>';
$output .= '<a id="wiki-tooltip-' . $cnt . '" class="wiki-tooltip" href="' . $trans_wiki_data[ 'wiki-url' ] . '" target="' . $this->options[ 'a-target' ] . '">';
$output .= $content;
$output .= '</a>';
}
I added just IF-condition. When WIKI API return empty URL do not do WIKI link in a post. When I add a term to wiki later it will work nicely.
]]>I love WP Wiki Tooltip but the “Click here to open Wiki page” link doesn’t work on version 1.7.1 – 1.7.3.
https://www.dropbox.com/s/r3a8vs22q0rliid/Wiki-Tooltip-1.7.3.PNG?dl=0
https://www.dropbox.com/s/ryto67ahnlvt8lm/Wiki-Tooltip-1.7.0.PNG?dl=0
I am using version 1.7.0 to make the link available.
Thank you for making this plugin!
]]>Wikipedia sometimes gives incorrect information on the requested person.
question – Is it possible to add other information to the tooltips?