Joomla Bible Study

...components for the glory of God
Welcome, Guest
Please Login or Register.    Lost Password?

When is the "large" teacher image used?
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: When is the "large" teacher image used?
#1701
When is the "large" teacher image used? 6 Months, 1 Week ago  
On my test server I have added large and thumbnail teacher images - as far as I can see only the thumbnail is ever used. Is this correct? Can I make the thumbnail click theough to the large image (e.g. in a slimbox)?

I have found though that if the large image is empty the thumbnail does not display on the teacher list page! So if you have a thumbnail but no large image, no image displays on the teacher page. If you have both images, only the thumbnail displays. Suspect there is a bug somewhere here.
Jonathan West
Senior Boarder
Posts: 66
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/01/23 12:07 By jwest.
The administrator has disabled public write access.
 
#1705
Re:When is the "large" teacher image used? 6 Months ago  
Hi Jonathan,

This is the code for the teacher list image display:

<?php if ($item->thumb || $item->teacher_thumbnail){?>
<img src="<?php echo $image->path;?>" border="1" title="<?php echo $item->teachername;?>" alt="<?php echo $item->teachername;?>" width="<?php echo $image->width;?>" height="<?php echo $image->height;?>" /><?php } ?>

The $image array is the result of a small helper file that gives us the dimensions of the image, if it is not specified. In prior version, the images were referenced by full urls + height and width. With version 6.1 we allow users to pick from a drop down box in a folder they have chosen in the Administration settings tab. This presents some problems in that we must find the right folder, see which method the user has chosen to use (dropdown vs full url).

The teacher_thumbnail is a result from the teacher record in the db. $item->thumb is if they put in the full url.

Then on the display page here is the code:

if ($teacher->image || $teacher->teacher_image)
{ ?>
<img src="<?php echo $image->path;?>" width="<?php echo $image->width;?>" height="<?php echo $image->height;?>" border="1" alt="<?php echo $teacher->teachername.' - '.$teacher->title;?>" />
<?php
}?>

So here $teacher->image is the full url of the large image, and $teacher->teacher_image is the drop down.

In my tests I see both images used where they should be - but if we've got a bug I'd love to find and fix it!

Tom
Tom
Administrator
Posts: 855
graph
User Offline Click here to see the profile of this user
Last Edit: 2010/01/25 10:24 By tmfuller.Reason: removed [code]
"You shall know the truth and the truth shall set you free." JC
The administrator has disabled public write access.
 
#1709
Re:When is the "large" teacher image used? 6 Months ago  
So the large image should be displayed on the teacher details view? And the thumbnail on the teacher list page?

I have set up a teacher (Spencer Shaw) with nehemiah.jpg as thumbnail and spencer-shaw.jpg as the full image. But nehemiah.jpg appears on both pages ...

www.emmanuelecc.org/index.php/resources/...amp;templatemenuid=1
www.emmanuelecc.org/index.php/resources/...amp;templatemenuid=1

Data from the teacher table:

Full Texts id teacher_image teacher_thumbnail teachername title phone email website information image imageh imagew thumb thumbw thumbh short ordering catid list_show published
Edit Delete 2 spencer-shaw.jpg nehemiah.jpg Spencer Shaw Pastor <p>Spencer has been the pastor of Emmanuel Chippen... Spencer has been the pastor of Emmanuel Chippenham... 2 1 1 1

And I have set the folder to be com-biblestudy (under images).

If I blank the large image, nothing appears on teacher details page and the thumbnail appears on list page.

[Using 6.1.0]]
Jonathan West
Senior Boarder
Posts: 66
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1710
Re:When is the "large" teacher image used? 6 Months ago  
OK so I have found one bug. In the file /components/com_biblestudy/views/teacherdisplay/tmpl/default.php at line 32

if (!$teacher->teacher_image) { $image->path = $teacher->image; $image->height = $teacher->imageh; $image->width = $teacher->imagew; }
else
{
if ($teacher->teacher_image && !$admin_params->get('teachers_imagefolder')) { $i_path = 'images/stories/'.$teacher->teacher_image; }
if ($teacher->teacher_image && $admin_params->get('teachers_imagefolder')) { $i_path = 'images/'.$admin_params->get('teachers_imagefolder/').$teacher->teacher_thumbnail;}
$image = getImage($i_path);
}

Change the last second to last line to:

if (!$teacher->teacher_image) { $image->path = $teacher->image; $image->height = $teacher->imageh; $image->width = $teacher->imagew; }
else
{
if ($teacher->teacher_image && !$admin_params->get('teachers_imagefolder')) { $i_path = 'images/stories/'.$teacher->teacher_image; }
if ($teacher->teacher_image && $admin_params->get('teachers_imagefolder')) { $i_path = 'images/'.$admin_params->get('teachers_imagefolder/').$teacher->teacher_image;}
$image = getImage($i_path);
}

This affects versions 6.1.0 through 6.1.2
Tom
Administrator
Posts: 855
graph
User Offline Click here to see the profile of this user
Last Edit: 2010/01/25 14:09 By tmfuller.
"You shall know the truth and the truth shall set you free." JC
The administrator has disabled public write access.
 
#1712
Re:When is the "large" teacher image used? 6 Months ago  
Thanks Tom - that's fixed!
Jonathan West
Senior Boarder
Posts: 66
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1