greyhares
Forum Replies Created
-
Forum: Plugins
In reply to: [Tooltipy (tooltips for WP)] Workaround for error with formatted text?My fix above for non-appearing tooltips on bolded or italicised keywords needs a little refinement. Although it fixed the non-appearance problem for bold and italic keywords it broke the default behaviour (of only tool-tipping the first instance of a keyword) for ‘plain text’ keywords – i.e. it tool-tipped every instance.
So if you don’t want tooltips on all instances, modify the if statement at around 520 of index.php (latest Github download) as shown:
if(portion.text.length < 2 || kttg_tab[i][6] > 1 ){ return portion.text; }
Explanation? It looks like kttg_tab[i][6] contains the instance of a specific keyword found on the page – 0 for first, 1 for second and so on. I originally set it to drop through after tool-tipping only the first instance (>0) but I noticed that it was counting instances in headings, etc that I’d set to exclude, so it set it to drop through after the second instance (>1) just to be safe.
There must be a MUCH better way of doing this – but it works for my requirements anyway!
Forum: Plugins
In reply to: [Tooltipy (tooltips for WP)] Workaround for error with formatted text?…and King Henry VII only had one wife (Elizabeth of York)!! It was Henry VIII.
Forum: Plugins
In reply to: [Tooltipy (tooltips for WP)] Workaround for error with formatted text?This problem (of bold or italicised keywords, etc) not being picked up by the plugin has been driving me mad ever since I started using (the otherwise excellent!) Tooltipy several years ago. The work-around, as has been pointed out, is to insert a leading space in front of the bold or italic keyword so that the markup looks like “King<b> Henry VII</b> had six wives”, which works, where “King <b>Henry VII</b> had six wives” does not.
This is OK… except when you want to add a new keyword that might have hundreds of instances on your site, as I did last week. So, I’ve spent DAYS trying to debug the plugin and have found a fix that works for me (but I don’t know yet if it breaks something else!):
On or around line 515 of index.php (latest Github download) modify the IF statement as shown. This prevents a drop out at this point when an actual matching keyword has been found (portion.text contains the text of the matched keyword or ” ” if no match)
?> if(portion.text.length < 2 && kttg_tab[i][6]==1){ return portion.text; } <?php } ?>
Hi Tim – my purpopse in asking my original question here was to find out whether the Wordfence community knew anything about a vulnerability in WordPress (or elsewhere) that somebody might be attempting to exploit by browsing to -/-/-/-/-/-/-/-/….
I haven’t been able to replicate motorskillz explanation, though as I too use the Rename WP-login plugin, and the ‘hacking’ has apparently stopped since I disabled it, it does sound plausible!
@motorskillz – thanks for the suggestion but I can’t replicate this and anyway it seems an odd way of handling a page not found ?!?
Actually, I use the “rename wp-plugin” too AND I’ve noticed, just in the last two days after several months of peace, that the hackers seem to have hacked that too (or at least they’ve found a way of hitting wp-login.php directly) and I’m now getting the same old steady steam of attempted logins to the ‘admin’ user.
I’ve set up Wordfence to block their IP for a while (hardly a deterrent) and of course, deleted the admin user, but I guess I’ll just revert to renaming wp-login.php to some random string and hope that it puts them off for a while. Some hope!