Tagged: hotspots
-
AuthorPosts
-
December 15, 2014 at 10:35 am #368218
Hi,
I have insert an image link on a hotspot.
When I click on the hotspot, the photo appears, but I haven’t title at the bottom of the image (The photo have a title on the WordPress photo library).There is a possibility to include a fonction to insert the photo’s title on the hotspot module ?
I try this :
$output .= "<div class='av-image-hotspot' data-avia-tooltip-position='{$data_pos}' data-avia-tooltip-alignment='{$align}' data-avia-tooltip-class='{$tooltip_width} {$tooltip_pos} {$extraClass} {$tooltip_style} av-tt-hotspot' data-avia-tooltip='".esc_attr(ShortcodeHelper::avia_apply_autop($content))."' style='{$pos_string}'>"; /* AJOUT */$output .= "<".$tags[0]." title='{$alt}' class='av-image-hotspot_inner' style='{$custom_bg} {$custom_font}'>{$counter}</".$tags[1].">";
and that :
function add_hotspot($hotspot, $counter, $extraClass = "") { extract(shortcode_atts(array('tooltip_width' => 'av-tt-default-width', 'tooltip_pos'=>'av-tt-pos-above av-tt-align-left', 'hotspot_pos'=>'50,50', 'output'=>'', 'hotspot_color'=>'', 'custom_bg'=>'', 'custom_font'=>'', 'custom_pulse'=>'', 'tooltip_style'=>'main_color', 'link' => '', 'attachment'=>'', 'attachment_size'=>''), $hotspot['attr'])); $content = $hotspot['content']; /* AJOUT */ if(!empty($attachment)) { $attachment_entry = get_post( $attachment ); if(!empty($attachment_entry)) { $alt = get_post_meta($attachment_entry->ID, '_wp_attachment_image_alt', true); $alt = !empty($alt) ? esc_attr($alt) : ''; $title = trim($attachment_entry->post_title) ? esc_attr($attachment_entry->post_title) : ""; if(!empty($attachment_size)) { $src = wp_get_attachment_image_src($attachment_entry->ID, $attachment_size); $src = !empty($src[0]) ? $src[0] : ""; } } } else { $attachment = false; } /* FIN AJOUT */
Thanks for your help.
December 15, 2014 at 7:18 pm #368479Hi _fizz!
Thanks for using Enfold.
I’m sorry but I’m not sure I understand what your trying to do. Are you trying to add an image inside the tooltip that displays with the hotspots?
Go ahead and send us a link to your page so we can get a better idea of what’s going on. You can set your reply as private if you wish.
Cheers!
ElliottDecember 15, 2014 at 7:25 pm #368491An image will be more explicit (my new website is not online) :
December 15, 2014 at 11:44 pm #368671Hey!
If you set a title for the image in your media library then it should be displayed there. If your still having trouble then send us a link so we can get a better idea of what’s going on.
Best regards,
ElliottDecember 16, 2014 at 11:50 am #368851This reply has been marked as private.December 16, 2014 at 6:08 pm #369051Hey!
Switch to the text editor instead of the Visual editor and add a title to the link.
<a title="here is a title" href="your URL goes here">
Regards,
ElliottDecember 17, 2014 at 10:27 am #369376Hello,
The problem is in the interface of admin hotspot … and if I add your link like the image below, it’s impossible to click on the link.
The result :
Thanks for your help.
December 17, 2014 at 7:00 pm #369661Hi!
Your trying to add images inside the tooltips of your hotspots correct? Send us a WordPress login so we can get a better idea of what’s going on.
Best regards,
ElliottDecember 22, 2014 at 1:29 pm #371526Sorry, but I can’t give access to the website.
We don’t want to add images inside the tooltips of our hotspots but we want to add a zoom image with a link on a hotspot.
That’s work but the display of the title zoom image is not display.The problem is simple and it’s the same on all installation of Enfold.
The “title='{$alt}'” or “title='{$title}'” in the function add_hotspot doesn’t work :
/* AJOUT */$output .= "<".$tags[0]." title='{$alt}' class='av-image-hotspot_inner' style='{$custom_bg} {$custom_font}'>{$counter}</".$tags[1].">";
Thanks for your help
December 22, 2014 at 10:00 pm #371837Hey!
If your adding a link inside the tooltip then the link needs a title set like so.
<a href = "URL to your image" title = "Here is the caption">Click on me</a>
Cheers!
ElliottJanuary 7, 2015 at 4:00 pm #376211Hi,
It’s not possible to add a link on the hotspot. If I add this code, the hotspot doesn’t work.
(if I add the code on the text editor it’s not possible to click on the link, it appears only during the hover on the bubble description)Here is how I create a hotspot :
I click on the hotspot to edit :
I add a description for the “bubble” (for the hover on the hotspot)
And I add the link of the picture for the zoom.
No field to add a title exists and if I add a html code, the hotspot doesn’t work (1st screenshot)
It’s not possible to edit the page with a default editor too (the content is empty)
No possibility to have the picture title ?
Thanks for your help
- This reply was modified 9 years, 10 months ago by _fizz.
January 7, 2015 at 10:21 pm #376498Hey!
I think I see what your trying to do now. Unfortunately I don’t see an easy way of going about that. If there was a way to grab an attachment from a URL then we could grab the title or alt from the attachment but how this works is your just setting a URL to use.
If you’d like you can add a custom title on the line.
$output .= "<".$tags[0]." title = 'Here is a caption' class='av-image-hotspot_inner' style='{$custom_bg} {$custom_font}'>{$counter}</".$tags[1].">";
Cheers!
ElliottJanuary 8, 2015 at 4:16 pm #376810Hi,
Thank you for your help.
Do you plan an update with this option ?January 8, 2015 at 7:08 pm #377014Hey!
I do not think we have plans for this. You can add a feature request here, https://kriesi.at/support/enfold-feature-requests/, but it seems kind of specific so I’m not sure if it will get added or not.
Best regards,
Elliott -
AuthorPosts
- You must be logged in to reply to this topic.