Hi,
I thought I would try here before diving too far into the code. I made a lot of changes to the default theme. I didn't have any videos at the time and didn't think to test with them. My bad! Now I have a bunch and on the image page get 4 'Get Flash to see this player.' error messages on the page. Once where the video should be and 3 where I have the thumbnails. The video comes up but to the right.
You can see the page
here.
Needless to say, I have flash installed.
Any ideas on what I need to do or undo?
I can post my code if that will help.
Thanks, as always!
Comments
I use a thumbnail script to create the small thumbnails beside the mail image. It seems as though the video is coming up as one of those thumbnails rather than the main image. This explains why nothing I do will work to center the video.
So, any idea on how to get the video to display as the main image rather than a thumbnail? I'd love to get this working as I want to start adding videos to the gallery!
Thanks!
Pierrot
I can't seem to figure this out. I might try a different approach. Is there a way to have a page load for the video that is different from image.php?
I use the small thumbnail code for the image page - image on the left, thumbnails on right. Is it possible to have a different layout for the video - perhaps just the video, centered?
<?php if (!defined('WEBPATH')) die(); $themeResult = getTheme($zenCSS, $themeColor, 'light'); $firstPageImages = normalizeColumns('2', '6');?>
<?php require($_SERVER['DOCUMENT_ROOT'].'/phauxshow/wp-blog-header.php'); ?>
<?php get_header(); ?>
<?php db_connect(); // reconnect to zenphoto db ?>
<div id="main">
<div id="gallerytitle">
<h2><span><?php printHomeLink('', ' | '); ?>" title="<?php gettext('Albums Index'); ?>"><?php echo getGalleryTitle();?>
<?php printParentBreadcrumb("", " | ", " | "); printAlbumBreadcrumb("", " | "); ?>
</span> <?php printImageTitle(true); ?>
</h2>
</div>
<!-- The Image -->
<div id="smallthumb">
<?php
$remember=$_zp_current_image;
if (!is_null($_zp_current_search)) {
$images = $_zp_current_search->getSearchImages();
$x=0;foreach( $images as $image ){
$current=$_zp_current_search->getImage($x);$x=$x+1;
$_zp_current_image=$current;
?>
" ><?php printCustomSizedImage('', null,
50, 45); ?>
<?php }}
if (is_null($_zp_current_search)) {
$images=$_zp_current_album->getImages();
while (next_image(true)): ?>
" ><?php printCustomSizedImage('', null,
50, 45); ?>
<?php endwhile;
$_zp_current_image=$remember;
}?>
</div>
<?php if (!checkForPassword()) { ?>
<div id="image">
" title="<?php echo getImageTitle();?>"><?php printDefaultSizedImage(getImageTitle()); ?>
</div>
<div id="albumdesc">
<?php printAlbumDesc(true); ?>
</div>
<div id="narrow">
<hr />
<?php printTags('links', gettext('Tags: '), 'taglist', ''); ?>
<?php if (getOption('Allow_comments')) { ?>
<div id="comments">
<?php comments_popup_script(width, height); ?>
<?php $num = getCommentCount(); echo ($num == 0) ? "" : ("<h3>".gettext("Comments")." ($num)</h3><hr />"); ?>
<?php while (next_comment()){ ?>
<div class="comment">
<div class="commentmeta">
<span class="commentauthor"><?php printCommentAuthorLink(); ?></span> says:
</div>
<div class="commentbody">
<?php echo getCommentBody();?>
</div>
<div class="commentdate">
<?php echo getCommentDate();?>
,
<?php echo getCommentTime();?>
<?php printEditCommentLink(gettext('Edit'), ' | ', ''); ?>
</div>
</div>
<?php }; ?>
<?php if (OpenedForComments()) { ?>
<div class="imgcommentform">
<!-- If comments are on for this image AND album... -->
<h3><?php echo gettext("Have your say!"); ?></h3>
<form id="commentform" action="#" method="post">
<div><input type="hidden" name="comment" value="1" />
<input type="hidden" name="remember" value="1" />
<?php printCommentErrors(); ?>
<table border="0">
<tr>
<td><input type="text" id="name" name="name" size="20" value="<?php echo $stored[0];?>" class="inputbox" />
</td>
<td><label for="name"><?php echo gettext("Name"); ?></label></td>
</tr>
<tr>
<td><input type="text" id="email" name="email" size="20" value="<?php echo $stored[1];?>" class="inputbox" />
</td>
<td><label for="email"><?php echo gettext("Email"); ?></label></td>
</tr>
<tr>
<td><input type="text" id="website" name="website" size="40" value="<?php echo $stored[2];?>" class="inputbox" /></td>
<td><label for="website"><?php echo gettext("Site"); ?></label></td>
</tr>
<?php if (getOption('Use_Captcha')) {
$captchaCode=generateCaptcha($img); ?>
<tr>
<td><label for="code"><?php echo gettext("Enter Captcha:"); ?><img src=<?php echo "\"$img\"";?> alt="Code" align="absbottom"/></label></td>
<td><input type="text" id="code" name="code" size="20" class="inputbox" /><input type="hidden" name="code_h" value="<?php echo $captchaCode;?>"/></td>
</tr>
<?php } ?>
</table>
<textarea name="comment" rows="6" cols="40"></textarea>
<input type="submit" value="<?php echo gettext('Add Comment'); ?>" class="pushbutton" /></div>
</form>
</div>
</div>
<?php } else { echo gettext('Comments are closed.'); } ?>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<?php $wpdb->select(DB_NAME); // reconnect wordpress db ?>
<?php get_comments(); ?>
<div id="footerad">
<script type="text/javascript"><!--
google_ad_client = "pub-2132326656330468";
/* 468x60, created 4/26/08 */
google_ad_slot = "9379116265";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</body>
</html>
Why don't you use the `printImageThumb()`function for the thumbs?
I must say I don't understand parts of the code. Why don't you use the normal image.php setup? (Again, I didn't dig really into the code.)
><?php printCustomSizedImage('', null,
50, 45); ?>
with
><?php printImageThumb(), null,
50, 45); ?>
But got a blank page.
I just changed that to
><?php printImageThumb, null,
50, 45); ?>
and it seems to work! I just have to changed the thumb size a try it out live.
Thanks so much!!!
Also, is there a way to make the jpg (or video image) come up for the video. At the image level it just shows a blank screen until you hit play.
I know I'm asking for a lot here!
Thanks,
P
Well, there is no convienient way, but you could do this to call the image sizing function directly:
`WEBPATH.'/'.ZENFOLDER.'/i.php?a=&i=.'&s=` Take a look at the doc at the top of `zp-core/i.php`, there are more options.
Video:
Well, I see the black screen with the start button, nice and clean..:-). Seriously, the flv player has an option for showing a preview image, but we have not implemented that right now. You could open a feature request ticket, then I'll see to add that to the plugin.
You can see the page here for anyone who has been following this thread and wants to see the end result.
Regarding the video image - I tried to play around with the flvplayer to get the jpg to show but think I'll give up now and open a feature request. Some things are best let to the pros!
Thanks again for all of your help!
Pierrot
Regarding the jpeg in the flv player, this has been just done (for an older zp version though): http://www.zenphoto.org/support/topic.php?id=3049&replies=6
Anyway I will implement that in the next version anyway.
I just updated and noticed the changes you made to the flv player - thanks!!!
P