|
#1
|
||||
|
||||
|
Adding thumbs to Martius template
I love the Martius template, but, I want to add thumbs to it. I really like the thumbs from Delicious template, so I'm trying to combine those two (placing the thumbs of Delicious in Martius).
I tried to copy the code from Delicious Code:
<div id="thumbnails" style="left:<IMAGE_WIDTH>px;"> <IMAGE_THUMBNAIL_ROW_REV> </div> <!-- thumbnails --> I also copied the needed thumbnail-CSS code. But: the Martius template excistst of tables. And Delicious not. So wherever I try to copy the code above, it displays beneath my photo, in case of on the right side of it. Can someone help me with a hint for placing this code? Do I have to make a new table for it (because it seems all things in Martius template are in tables)? To illustrate I will display the code from Martius image_template.html here also: Code:
<head>
<title><SITE_TITLE></title>
<!-- FAVORITE ICON -->
<link REL="SHORTCUT ICON" HREF="http://www.martius.nl/images/martius.ico">
<!-- META -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-type" name="keywords" content="PhotoBlog,<SITE_TITLE>,<IMAGE_TITLE>,Pixelpost" />
<meta http-equiv="content-type" name="description" content="<SITE_TITLE>-PhotoBlog: <IMAGE_TITLE>, <IMAGE_NOTES_CLEAN>" />
<meta name="PBO.auth" content="ff4a14726b8b33a522dab51830dd2451" />
<title><SITE_TITLE></title>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="templates/martius/css/martius.css" title="martius" />
<!-- Scripts -->
<script type="text/javascript" src="overlib.js"><!-- overLIB (c) Erik Bosrup --></script>
<script type="text/javascript" src="overlib_fade.js"><!-- overLIB (c) Erik Bosrup --></script>
<script type='text/javascript'>
function flip(rid)
{
current=(document.getElementById(rid).style.display == 'none') ? 'block' : 'none';
document.getElementById(rid).style.display = current;
}
</script>
</head>
<body>
<div id="overDiv" align="left" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<table width="814" border="0" align="center" cellpadding="0" cellspacing="0"> <!-- 814 -->
<tr>
<td colspan="2" class="celltop"> </td>
</tr>
<tr class="celltop">
<td width="462" rowspan="2" bclass="celltop"><div align="left"><img class="title-image" src="templates/martius/images/blauwgestreept_header.jpg" width="194" height="23" alt="" /></div></td>
<td width="338" height="3" class="celltop"></td>
</tr>
<tr>
<td class="celltop"><div align="right"><span class="img-pre-next"><IMAGE_PREVIOUS_LINK></span><a href="index.php" onMouseOver="return overlib(' return to most recent image in this photoblog', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', OPACITY, '50', FADEIN);" onMouseOut="return nd();">Home</a><span class="img-pre-next"><IMAGE_NEXT_LINK></span> | <a href="index.php?x=browse" onMouseOver="return overlib(' overview of all images in this photoblog', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', OPACITY, '50', FADEIN);" onMouseOut="return nd();">Browse foto's</a> </div></td>
</tr>
<tr>
<td height="4" colspan="2" class="celltop"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#090944">
<tr>
<td><table border="0" cellspacing="5" cellpadding="0" bgcolor="#ECECF0">
<tr>
<td><a href="index.php?showimage=<IMAGE_PREVIOUS_ID>" onMouseOver="return overlib('<b><IMAGE_TITLE></b><br><br>ISO <EXIF_ISO> |<EXIF_EXPOSURE_TIME> |<EXIF_APERTURE> |<EXIF_FOCAL_LENGTH>', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', OPACITY, '50', FADEIN);" onMouseOut="return nd();">
<img src="images/<IMAGE_NAME>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" id="photo" alt="" />
</a>
</td>
</tr>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="814" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"> </td>
</tr>
<tr class="cellbot">
<td height="4" colspan="2"></td>
</tr>
<tr class="cellbot">
<td width="657"><div align="left"> <span class="curview"><IMAGE_NOTES_CLEAN></span></div></td>
<td width="157"><div align="right"><IMAGE_COUNTER_VIEWS> views, <a href="#" onclick="flip('show_comments'); flip('add_comment'); return false;" onMouseOver="return overlib('bekijk alle reacties op deze foto<br>en laat jouw reactie achter', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', OPACITY, '50', FADEIN);" onMouseOut="return nd();"><IMAGE_COMMENTS_NUMBER> reacties</a> </div></td>
<!-- <td width="157"><div align="right"><SITE_RSS_LINK> | ©06 | <a href="http://www.pixelpost.org" target="_blank" onMouseOver="return overlib(' powered by pixelpost', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', OPACITY, '50', FADEIN);" onMouseOut="return nd();">pp</a> | <a href="index.php?x=about" onMouseOver="return overlib(' information about the publisher of the images and some other stuff', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', OPACITY, '50', FADEIN);" onMouseOut="return nd();">about</a> </div></td> -->
</tr>
<tr class="cellbot">
<td colspan="2">
<div id="page_comment">
<div style="clear:both;">
</div>
</div>
<!-- comments -->
<div class="comments">
<div class="comments"><div id="show_comments"><script language='javascript' type='text/javascript'>flip('show_comments');</script>
<div class="commentbody"><GRAVATAR_COMMENTS></div>
</div>
</div>
</div>
<!-- add comment -->
<div align="left" id="add_comment" class="commentbody">
<script language='javascript' type='text/javascript'>flip('add_comment');</script>
<form method='post' action='index.php?x=save_comment' name='commentform' accept-charset='UTF-8'>
Reactie:<br>
<textarea name='message' rows='5' cols='57'></textarea>
<br>
<br>
Naam:<br>
<input type='text' name='name' class='input' value='<VINFO_NAME>' size="35"/>
<br>
<br>
Website:<br>
<input type='text' name='url' class='input' value='<VINFO_URL>' size="35"/>
<br>
<br>
Email (blijft tussen ons):<br>
<input class='input' type='text' name='email' value='<VINFO_EMAIL>' size="35"/>
<br>
<br>
<input type='hidden' name='parent_name' value='<IMAGE_NAME>' />
<input type='checkbox' value='set' name='vcookie' />
Onthoud mij<br>
<br>
<input type='submit' value='add' />
<input type='hidden' name='parent_id' value='<IMAGE_ID>' />
</form>
<br>
</div></td>
</tr>
</table>
</body>
</html>
|
|
#2
|
||||
|
||||
|
change this code part:
Code:
<table border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#090944">
<tr>
<td><table border="0" cellspacing="5" cellpadding="0" bgcolor="#ECECF0">
<tr>
<td><a href="index.php?showimage=<IMAGE_PREVIOUS_ID>" onMouseOver="return overlib('<b><IMAGE_TITLE></b><br><br>ISO <EXIF_ISO> |<EXIF_EXPOSURE_TIME> |<EXIF_APERTURE> |<EXIF_FOCAL_LENGTH>', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', OPACITY, '50', FADEIN);" onMouseOut="return nd();">
<img src="images/<IMAGE_NAME>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" id="photo" alt="" />
</a>
</td>
</tr>
</td>
</tr>
</table>
</td>
</tr>
</table>
Code:
<table border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#090944">
<tr>
<td>
<table border="0" cellspacing="5" cellpadding="0" bgcolor="#ECECF0">
<tr>
<td>
<a href="index.php?showimage=<IMAGE_PREVIOUS_ID>" onMouseOver="return overlib('<b><IMAGE_TITLE></b><br><br>ISO <EXIF_ISO> |<EXIF_EXPOSURE_TIME> |<EXIF_APERTURE> |<EXIF_FOCAL_LENGTH>', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', OPACITY, '50', FADEIN);" onMouseOut="return nd();">
<img src="images/<IMAGE_NAME>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" id="photo" alt="" /></a>
</td>
</tr>
</table>
</td>
<td align="left" valign="top">
<div id="thumbnails">
<IMAGE_THUMBNAIL_ROW_REV>
</div> <!-- thumbnails -->
</td>
</tr>
</table>
|
|
#3
|
||||
|
||||
|
Thx Austiaka+, that really helped me a lot!!
You can find my photoblog here. In Safari+FF the thumbs and border are ok now, but in IE I can't get rid of that annoying blue stripe underneath the picture!! (for non-IE'ers check )My image_template-part looks like: Code:
<table border="0" align="center" cellpadding="0" cellspacing="1"> <!-- 0 0 1 bgcolor="#090944" -->
<tr>
<td>
<table border="0" cellspacing="3" cellpadding="0" bgcolor="#ECECF0"> <!-- 0 5 0 -->
<tr>
<td valign="top" bgcolor="#090944">
<a href="index.php?showimage=<IMAGE_PREVIOUS_ID>" onMouseOver="return overlib('<b><IMAGE_TITLE></b><br><br>ISO <EXIF_ISO> |<EXIF_EXPOSURE_TIME> |<EXIF_APERTURE> |<EXIF_FOCAL_LENGTH>', BGCOLOR, '#333366', FGCOLOR, '#FFFFFF', OPACITY, '50', FADEIN);" onMouseOut="return nd();">
<img src="images/<IMAGE_NAME>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" id="photo" alt="" /></a>
</td> <!-- "index.php?showimage=<IMAGE_PREVIOUS_ID>"-->
</tr>
</table>
</td>
<td width="80" align="left" valign="top">
<div id="thumbnails">
<IMAGE_THUMBNAIL_ROW_REV>
</div> <!-- thumbnails -->
</td>
</tr>
</table>
Code:
#photo {
background:#ECECF0;
border:2px solid #ECECF0; /*515151 1px*/
}
Last question: Is it a normal issue that the hover effect (opacity=0.75) doesn't work in IE? CSS: Code:
#thumbnails{
/*text-align: center;*/
margin: 2px 10px 0px 3px; /*6:van bovenaf 0 10 4:tussen foto en thumbs*/
/*width:56px; was 56*/
float:left;
/*position:absolute;*/
top:38px; /*60, 45 right*/
margin-left:3px; /*-10, center inc. thumbs: -31*/
}
.thumbnails {
border:1px solid white;
margin:0px 10px 3px 1px; /*0 1 2 1*/
filter:alpha(opacity=50);
-moz-opacity:.50;
opacity:.50;
}
.current-thumbnail{
border:1px solid white;
margin:0 10px 3px 1px; /*0 1 2 1*/
filter:alpha(opacity=100);
-moz-opacity:1;
opacity:1;
}
.thumbnails:hover {
border:1px solid white;
margin:0 10px 3px 1px;
filter:alpha(opacity=75);
-moz-opacity:.75;
opacity:.75;
}
Last edited by Tiestoo; 11-26-2007 at 07:34 PM. Reason: added opacity-question |
|
#4
|
||||
|
||||
|
try putting border="0" into the <img ... > tag of the html page.
Try using the rgb colour for your background and border in style sheet: rgb(236,236,240) instead of #ECECF0 (shoud not hurt IE7, I know) the hover effect should work in IE if you define the :hover for the link (#thumbnails a and #thumbnails a:hover). Then it should work even with IE6. But google for :hover and IE, there are some tricks and issues... |
|
#5
|
||||
|
||||
|
Thanks austriaka+, I really appreciate your help.
Unfortunately, both tips didn't work. Blue-stripe problem: adding the border tag didn't change anything in IE. BUT, I accidently discovered which line is responsible for the blue stripe, it is the 6th line in the code of my previous post: Code:
<td valign="top" bgcolor="#090944"> Hover problem: I tried several things, like adding a behavior for IE or changing the code like this (changing the CSS with a:hover) but non of this showed the hover-effect in IE. Maybe someone has some fresh tips for me I can try now? I'd love to solve these two problems :-) |
| Post Reply |
| Thread Tools | |
|
|