Not working for me in Firefox

Sc0tt - March 24, 2008 - 01:09
Project:Image Caption
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Works great in Internet Explorer.

I'm using:
Drupal v5.8, php
MySQL database 4.1.22
PHP 5.2.4
Web server Apache/2.0.49 (Win32) PHP/5.2.4
and Firefox v2.0.0.12
I'm not sure what version of JQuery i'm using. I haven't installed the jquery module or made any attempts to upgrade beyond what comes with drupal v5.8.

This is how I'm using it by the way.

node.tpl.php file:

<div class="story_body"><img class="caption" src="/files/imagecache/640wide/files/Joe-Blow.jpg" title="Joe Blow, Director of Information Technology, Joe Blow Industries" align="right" style="padding-top:10px"></img><?php print $node->content['body']['#value'] ?></div>

Thanks in advance for any help.

#1

davidwhthomas - March 24, 2008 - 05:35

I'd recommend taking out the closing </img> tag from your template code there.

i.e:

<div class="story_body">
<img class="caption" src="/files/imagecache/640wide/files/Joe-Blow.jpg" title="Joe Blow, Director of Information Technology, Joe Blow Industries" align="right" style="padding-top:10px" />
<?php print $node->content['body']['#value'] ?>
</div>

That may help,

DT

#2

Sc0tt - April 13, 2008 - 22:01

Thanks for the reply DT.
I removed the closing </img> tag; but that didn't seem to help.
Any other suggestions?

#3

davidwhthomas - April 14, 2008 - 07:04

can you check that the javascript file image_caption.js is being included in the head section of your page? (view source)

#4

Sc0tt - April 14, 2008 - 20:01

David,
Thanks for the responce.

image_caption.js is NOT in my page.tpl.php file. Can you give an example of what this should look like? I assume its something like:

<head>
<script type="javascript" src="/sites/all/themes/mytheme/image_caption.js"></script> 
</head>

When I tried this, the captions are now being writen twice.

Thanks again DT,
Scott

#5

davidwhthomas - April 15, 2008 - 08:17

have you got print $scripts; in your page.tpl.php file?

Do you have any other javascript files being included?

The image_caption.js file should be included automatically by the image_caption module so you shouldn't need to add it manually.

You should also check that your node type is included in the types for captioning in admin/settings/image_caption

#6

Sc0tt - April 15, 2008 - 21:13

Thanks David,
Yes print $scripts is in my page.tpl.php file and no other javascripts are being loaded. The only script i have is the following to produce the current date

<SCRIPT>
var mydate=new Date()
var theYear=mydate.getFullYear()
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August", "September","October","November","December")
document.write(dayarray[day]+", "+montharray[month]+" "+daym+", "+theYear)
</SCRIPT>

And all of my node-types are included at admin/settings/image_caption.

It's all working just fine in IE; but FF is not. It's a strange one.
Thanks again Dave,
Scott

#7

Sc0tt - April 17, 2008 - 06:50

David,
Thanks for your help.
I'm up against a deadline so I'm going to not use the module for this project. I've found an alternative solution that is not a nice as your module; but will work Ok.
Thanks again,
Scott

#8

davidwhthomas - April 17, 2008 - 09:39
Status:active» closed

Ok, odd that it works fine for me in IE and Firefox.

I suspect it's something else related to your Drupal configuration but I can't quite see it from here.

Good luck with your site,

DT

 
 

Drupal is a registered trademark of Dries Buytaert.