I have created a views block to show the random images from the gallery using views in the right sidebar of the site. My problem is that when i put my pointer over the image and very crappy code is showing up instead it should show the image description which i wanted. Any one knows what is the problem.

Comments

mikebell_’s picture

Can you post the code it's outputting it might be relevant. Also a link to the site might be helpful.

graphicmist’s picture

here is the exported code. i cant give the link to site since it is not live. i can show the screenshot.
click the link to see the screenshot : http://picasaweb.google.co.in/graphicmist/Photoshop#5359374235311658962

$view = new view;
$view->name = 'Random_Image';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'field_images_fid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 1,
'label_type' => 'none',
'format' => 'thumbnail_default',
'multiple' => array(
'group' => 0,
'multiple_number' => '3',
'multiple_from' => '1',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_images_fid',
'table' => 'node_data_field_images',
'field' => 'field_images_fid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'random' => array(
'order' => 'ASC',
'id' => 'random',
'table' => 'views',
'field' => 'random',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'gallery' => 'gallery',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('title', 'Photo Gallery');
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 3);
$handler->override_option('use_pager', 'mini');
$handler->override_option('pager_element', 3);
$handler = $view->new_display('block', 'Photo Gallery', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);

mikebell_’s picture

Hi,

sorry for the late reply. The code that is displayed when you hover over is what looks to be filtered html if you take a look you can see that instead of < it's display < which is the html equivalent check your setting for filtered html options and disable.

hope it helps.

vitis’s picture

I think that your issue is related to what I'm experiencing:

Good Hover Text in IE:

When hovering over an image using Internet Explorer, the hover text shows what I prefer - the alt text or the caption.

Missing or Ugly Hover Text in Firefox:

When hovering over an image using Firefox, the hover text for an image that IS NOT linked to its node is absent (in my case, these non-linked images are in the node display). Right-clicking to get the Properties of the image does show the correct text for "Alternate Text."

The hover text for an image that IS linked to its node displays unwanted link text such as (in my case, linked images are within a view of recent posts - and I have chosen to link the image field to its node from views) :

&lt;img src=&quot;https://example.org/sites/default/files/pictures/default_calendar_3_1.jpg&quot; alt=&quot;default text or caption here&quot; width=&quot;125&quot; height=&quot;124&quot; id=&quot;imceimage-field_event_image-0&quot; /&gt;

Right-clicking to get the Properties (FF) of the image does show the correct text for "Alternate Text." Also in Properties, the "Title" of the image is the above link information.

"Setting for filtered html options and disable":

Could you advise on where to find the html options settings that you are talking about?
Do you mean Content Type>My Content Label>Edit>Input Format Settings>Allowed Formats>Full HTML>(Node Defaults>Full HTML)? FYI - My settings are all Full Html for the content type in question.

This alt text problem may be related to:

Visible HTML code in alt text, when using captions in title
Allow caption to use alt field instead of title
Alt-text

I have not found the exact solution in the above links - some of them are old and state that the problem has been fixed in the latest dev. Still, could be worth pursuing.

The root of my particular problem is that there is no title declared

(or passed on to the browser) for my imce image fields (also no title for imce images embedded in fck text areas).

Specific Solutions?

Thanks ahead of time,
Vitis

FYI - I have:
Drupal 6.13
IMCE 6.x-1.2
Imce CCK Image 6.x-1.x-dev (2009-Jun-18)
Views 6.x-2.x-dev (2009-Jul-01)
Content Construction Kit (CCK) 6.x-2.x-dev (2009-Jul-04)
FCKeditor - WYSIWYG HTML editor 6.x-2.0-beta1

vitis’s picture

I solved my problem with a patch on http://drupal.org/node/507884#comment-1855360">
Remove matching title attribute on node links . I applied 507884-views-alt.patch to Views 6.x-2.x-dev (2009-Jul-01). Hopefully this patch will solve your problem too.

Good luck,
Vitis