Hi,
thanks for your post, and sorry for the trouble.
You don’t actually have to upload the images to your WP Media Library, you can simply insert the image from its URL there, as well.
That should be the easiest soluton here.
Modifying the Automatic URL conversion Extension for this use case is not really possible, as this would require a sophistcated logic that can make a difference between a URL to a regular page and the URL to an image.
Regards,
Tobias
Tobias, what about a unique image for multiple links?
Example:
Line 1: http://www.google.com
Line 2: http://www.bing.com
Instead of showing the link it shows an image (icon) that links to this URLs?
I’ve tried to do this but it only changes the link to image in the first row..
Take a look, please.
What I’m doing wrong?
http://i.imgur.com/WrnOgXy.jpg
http://i.imgur.com/Ny4urZ8.jpg
Hi,
instead of relying on the existing code in that Extension (especially the make_clickable() function), I suggest to simply create the full HTML from scratch inside that function that you extended.
You could add a check for the correct table ID, row number, column number, and maybe URL and then add the wrapping HTML for a link plus image.
Regards,
Tobias
Thank you for the quick reply Tobias. I did a simple solution, just typing one line of code:
$output = str_replace( 'follow">', 'follow" class="tablelink">', $output );
and inserting one line at my .css file:
a.tablelink { margin:0 0 0 17px; background-image:url(img/icon.gif); display:block; height:20px; text-indent:-9999px; width:20px;}
Thank you 🙂
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped in finding a solution!
Best wishes,
Tobias
P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!