This is a discussion on large image w/ surrounding thumbnails in viewlisting page within the v3.1 Questions & Support forums, part of the v3.1 Legacy Help & Support category; Anyone know where I might find a thread explaining the code to create one large listing image on the viewlisting ...
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Anyone know where I might find a thread explaining the code to create one large listing image on the viewlisting page with smaller thumbnails to the side or underneath the large image?
|
|
#2
|
||||
|
||||
|
Do you mean something like this?
http://www.oceanlakesclassifieds.com...-Highrise.html
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#3
|
|||
|
|||
|
I like that better than the pop-up photo viewer! is the code around somewhere?
Thanks, HotAir
__________________
V3.1.10 Developer - live V4.1.0 Beta 2 - sandbox |
|
#4
|
||||
|
||||
|
Sure since that is our site I will share the code.
viewlisting.tpl.php file Add: Code:
{* This the image display portion *}
<script type="text/javascript" language="javascript">
{literal}
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}
}
{/literal}
</script>
{if $viewphotos=="Y"}
{if $data<>""}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80%">
{section name=image loop=$data max=1}
<p align="center"><img id="placeholder" src="photos/{$data[image].image}" alt="" class="imageborder" /></p>
<strong><p align="center" id="desc">{$data[image].title}</p></strong>
{/section}</td>
<td>
<DIV STYLE="height:320px; width:170px;overflow:auto">
<div align="center">
{foreach from=$data item="entry"} <a onclick="return showPic(this)" href="photos/{$entry.image}" title="{$entry.title}"><img src="thumbs/small_{$entry.image}" hspace="5" vspace="5" border="0" class="imageborder" /></a>
{/foreach}
</div>
</div>
</td>
</tr>
</table>
{/if}
{/if}
{* This ends the image display portion *}
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#5
|
||||
|
||||
|
Nice... I think I'll add this to my site also... Man just when I thought I was almost done I keep finding more things to change... thanks for the code! -Josh
__________________
V3.1.5b Hosted vanwertads*.com "Do unto others as you would expect others to do unto you" |
|
#6
|
|||
|
|||
|
Thank you Eric, that's great!
I was testing it in a clean install, nd found one minor bug. If there are no captions for the photos it generates a javascript error. So I added a non breaking space to the end of each photo caption (the image title) and it fixed the problem. Here is the adjusted code: Code:
{* This the image display portion *}
<script type="text/javascript" language="javascript">
{literal}
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}
}
{/literal}
</script>
{if $viewphotos=="Y"}
{if $data<>""}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80%">
{section name=image loop=$data max=1}
<p align="center"><img id="placeholder" src="photos/{$data[image].image}" alt="" class="imageborder" /></p>
<strong><p align="center" id="desc">{$data[image].title} </p></strong>
{/section}</td>
<td>
<DIV STYLE="height:320px; width:170px;overflow:auto">
<div align="center">
{foreach from=$data item="entry"} <a onclick="return showPic(this)" href="photos/{$entry.image}" title="{$entry.title} "><img src="thumbs/small_{$entry.image}" hspace="5" vspace="5" border="0" class="imageborder" /></a>
{/foreach}
</div>
</div>
</td>
</tr>
</table>
{/if}
{/if}
{* This ends the image display portion *}
__________________
V3.1.10 Developer - live V4.1.0 Beta 2 - sandbox |
|
#7
|
||||
|
||||
|
Just added to my site and looks great!... Thanks again for the code. -Josh
__________________
V3.1.5b Hosted vanwertads*.com "Do unto others as you would expect others to do unto you" |
|
#8
|
|||
|
|||
|
looks great!
the only bug is how to not show the thumbnail if they only upload one image any ideas on how to do this? |
|
#9
|
|||
|
|||
|
This looks really nice, where do I go to place this code?
|
|
#10
|
|||
|
|||
|
I'm sorry, but where exactly do I plug this code in? do I add it or replace something with it? waiting anxiously...
(this is re: the code which will allow one large image w/caption and clickable thumbnails on the side) |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Replacing the categories on home page with an image map.. | margaretm | HTML, CSS, and Design Help | 1 | 08-07-2007 09:00 PM |
| Disable image on Table Page | barrysmith | v3.1 Questions & Support | 16 | 09-30-2006 12:46 PM |
| Show image #1 large on viewlisting page | macagent | v3.1 Modules & Modifications | 4 | 07-12-2006 05:56 PM |
| more large image errors | frosty | v3.1 Questions & Support | 2 | 05-17-2006 12:28 PM |
| view large image error | frosty | v3.1 Questions & Support | 8 | 05-16-2006 10:39 PM |