Member
Member
nabberuk   23-12-2006, 13:35
#1

I was having problems displaying videos at a normal size in both IE and Firefox, so i have hacked together some code,
Have no idea if it does it's job well or not. You can see it in action at www.myphotoplace.co.uk/random it's the last pic. This method also gets around IE's activeX thing where you have to click to activate.

Firstly you will need to download the flv flash player,

http://www.jeroenwijering.com/upload/flash_flv_player.zip

Upload the following files into your zen/ folder

flvplayer.swf
ufo.js

Now open up template-functions.php and add the following line at the beginning of the zenjavascript function;
`

echo "";

Now move down to the printDefaultSizedImage function, replace the whole function as below;

function printDefaultSizedImage($alt, $class=NULL, $id=NULL) {

// [BEGIN] added by cvogt: check for non image data

$file_full = $_SERVER['DOCUMENT_ROOT'].getFullImageURL();

$file_wo_ext = substr($file_full,0,strrpos($file_full,"."));

if( file_exists( $file_wo_ext.".flv" )){

?>

Get the Flash Player to see this player.

var FO = {  movie:"/zen/flvplayer.swf",width:"640",height:"480",majorversion:"7",build:"0",bgcolor:"#FFFFFF",

            flashvars:"file=.flv&showdigits=true&autostart=true&showfsbutton=false" };

UFO.create( FO, "player1");
Member
Member
nabberuk   23-12-2006, 13:37
#2

guessing i should of not used the code tag's as some of the code has been executed

function printDefaultSizedImage($alt, $class=NULL, $id=NULL) {
// [BEGIN] added by cvogt: check for non image data
$file_full = $_SERVER['DOCUMENT_ROOT'].getFullImageURL();
$file_wo_ext = substr($file_full,0,strrpos($file_full,"."));
if( file_exists( $file_wo_ext.".flv" )){
?>
Get the Flash Player to see this player.

var FO = {  movie:"/zen/flvplayer.swf",width:"640",height:"480",majorversion:"7",build:"0",bgcolor:"#FFFFFF",
            flashvars:"file=.flv&showdigits=true&autostart=true&showfsbutton=false" };
UFO.create( FO, "player1");
Member
Member
Daxeno   26-12-2006, 22:18
#3

Tried this one. but did not work.

an error that i also found when i tried this hack:

Warning: Division by zero in /home/dakseno/public_html/zenphoto_test106/zen/template-functions.php on line 817

Warning: Division by zero in /home/dakseno/public_html/zenphoto_test106/zen/template-functions.php on line 818

Member
Member
nabberuk   27-12-2006, 13:43
#4

You sure zen was working before you edited it?

I've uploaded my template-functions.php at the following location > http://www.myphotoplace.co.uk/template-functions.php.file

Can you not try it in a single directory, like www.host.com/zen/ instead of www.host.com/zenphoto_test106/zen/ as i'm not to sure if the paths with be ok.

I say the above because i dont think the lines numbers have much to do with anything i edited, i may be wrong though.

Member
Member
Daxeno   29-12-2006, 13:45
#5

did it but still did not work.

Member
Member
freediver   01-01-2007, 02:07
#6

I as well cannot get this to work - I have tried for the past 2 hours and no go. All I get is a blank page - and yes, the default install was working just fine. I'm testing on a local development server so nothing to see out on the net - am looking at this for some web design work I do for photographers and videographers.

The link to your template-functions.php file is invalid. Would like to get a copy and see where I missed getting it right.

Member
Member
lordcoffee   17-01-2007, 20:38
#7

This works great. I had a bit of trouble but reason was that I wasn't reading what you've written ;-) Thanks for this!

See it in action: http://www.taeglichanders.de/blog/index.php?/wpages/portfolio.html

Just go to the Video section

Member
Member
nabberuk   18-01-2007, 20:49
#8

Sorry for not being very active. Had problems with my host. Anyways, glad someone got it to work!

Download the template-functions.php just here > www.myphotoplace.co.uk/template-functions.file

i know this is far from perfect, but it displays at the correct size in all browsers and you dont need to activate the control in IE

Member
Member
Daxeno   18-01-2007, 23:01
#9

Still Not working.

Member
Member
nabberuk   19-01-2007, 16:38
#10

the code hasnt changed and lord says he/she has it working. So not sure whats up.
What error message are you getting?

Member
Member
Daxeno   19-01-2007, 18:14
#11

i think it's with the theme itself. it wont work when you're using the Stopdesign theme.

Member
Member
nabberuk   19-01-2007, 20:12
#12

Right, i've only tested it on the Sterile theme. Haven't a clue if it works on any others. But i did what was above about 10 minutes ago and it works ok as seen here

http://www.steelfoot.com/zen/

I rared all the files up and there at http://steelfoot.com/zenphoto.rar

You will need to install it like any other version. If someone wants to make it work with other themes, go for it!

EDIT: looks like the only theme it doesnt show up on is the stopdesign and stoppeddesign. It displays fine on the rest, just need to alter the size.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.