rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - stit

Pages: 1 2
1
RAWR-Designs / Re: Picture Preview without TPGen
« on: July 18, 2009, 06:44:38 PM »
I created a better code for ensuring that the images which are recorded vertical are not displayed with a height > 600.

It makes the images to fit to max height 600px and max width 600px by keeping the ratio

Code: [Select]
function setIMGBox(target,file,status) {
if(img.width!=0) {
if(status == 'none') {
if(img.width>'600') {
ratio = img.width/img.height;
img.newheight = 600/ratio;
if(img.newheight>'600') {
img.newheight = 600;
img.newwidth = ratio*img.newheight;
spawnBox(target,img.newwidth,img.newheight);
} else {
spawnBox(target,600,img.newheight);
}
} else {
spawnBox(target,img.width,img.height);
}
status = 'boxLoaded';
}

2
RAWR-Designs / Re: Bug on playing Video Files (url cut off)
« on: July 15, 2009, 08:53:10 PM »
Gosh, I hate to tell you people this.  The error is not from the script!!!  The error is in the file name!!!  RULE #1.  THERE SHOULD NEVER BE "SPACE" USED IN THE URL OR THE FILE NAME THAT RESIDES ON THE WEB SERVER.

Ofcourse it seems to work with IE because IE translate your dam file that contains space to "%20"

So if you have a file that contains space, in your static URL, try to replace the space with "%20" and you'll see everything kicks in.  Many browsers does not encode "spaces" in the file name to "%20" as it would break the rule.

For Crying Out Loud, you are venturing into an unknown territory!  Get back to your basic routine!

i tried your way but it doesnt work too. and other files with blank in it work FINE.
so please dont say i would have no idea of the territory.

..
lets TSG make a new preview box. thanks for that.

greetz.

3
RAWR-Designs / Picture Preview without TPGen
« on: July 14, 2009, 07:12:34 PM »
Hi all,

for everyone who doesn't want to use TPGen to create a preview for pictures, here the edited script for preview from original files:

Edit in .tpl file
Code: [Select]
[file]
<tr>
<td class="iconCol">
<a href="%item-url%"><div style="background:url('/~img_file') center center no-repeat"></div> </a>
</td>
<td class="fileCol{.if not|{.get|can access.}|protected.}">
<div class="fileInfo">
<a href="%item-url%" {.$target.}>%item-name%{.if|{.get|is new.}|&nbsp;-&nbsp;<b class="new">{.!lv_new.}</b>.}</a><br/>
%comment%
<div class="info"><b>{.!lv_size.}:</b> %item-size%</div><div class="info"><b>{.!lv_hits.}:</b> %item-dl-count%</div><div class="age"><b>{.!lv_age.}:</b> %item-modified%</div>
</div>
</td>
<td class="quickCol">{.switch|%item-ext%|,|jpg,jpeg,png,gif,bmp,tif,tiff,mp3,flv,mp4,m4a,mov,3gp,aac,avi,divx,wmv,wma,swf|{.$preview-btn.}|<div class="quickBtn disabled hide"></div>.}
<noscript><div class="quickBtn disabled"></div></noscript>
<div class="quickBtn1 {.if not|{.get|can access.}|disabled.}"><a href="%item-url%" {.$target.}><img src="/template/{.!theme.}/images/download.gif" alt="DL" title="{.!lv_downloadTitle.}"/></a></div>
</td>
</tr>

Edit in rawr_preview.js
Code: [Select]
// Insert Image
function spawnIMGBox(target,file) {
img = new Image();
img.src = file;
if(img.complete) {
spawnBox(target,img.width,img.height);
setIMGBox(target,file,'none');
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","none");',10);
}
}
function setIMGBox(target,file,status) {
if(img.width!=0) {
if(status == 'none') {
if(img.width>'700') {
spawnBox(target,700,img.newheight);
} else {
spawnBox(target,img.width,img.height);
}
status = 'boxLoaded';
}
if(status == 'boxLoaded') {
setTimeout('setIMGBox("'+target+'","'+file+'","setImage");',325);
} else if(status == "setImage") {
if(img.complete) {
gEBI(target+'Content').innerHTML = '<img src="'+img.src+'" width="100%" id='+target+'ImageBox style="filter:alpha(opacity=0);opacity:0"/>';
boxFade(target,'img');
setName(file);
img = null;
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","setImage");',200);
}
} else if(status == 'setImmediatly') {
gEBI(target+"Content").innerHTML = '<img src="'+img.src+'"/>';
setName(file);
img = null;
}
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","none");',50);
}
}

Have fun.

stit

4
RAWR-Designs / Re: Enable preview function for other files (.jpg)
« on: July 14, 2009, 12:35:35 PM »
I have another Problem, but this seems to be a deeper html/js problem.

i have changed the code to the following:
Code: [Select]
// Insert Image
function spawnIMGBox(target,file) {
img = new Image();
img.src = file;
if(img.complete) {
if(img.width>'700') {
spawnBox(target,img.width*0.5,img.height*0.5);
} else {
spawnBox(target,img.width,img.height);
}
setIMGBox(target,file,'setImage');
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","none");',10);
}
}
function setIMGBox(target,file,status) {
if(img.width!=0) {
if(status == 'none') {
spawnBox(target,img.width,img.height);
status = 'boxLoaded';
}
if(status == 'boxLoaded') {
setTimeout('setIMGBox("'+target+'","'+file+'","setImage");',325);
} else if(status == "setImage") {

if(img.complete) {
gEBI(target+'Content').innerHTML = '<img src="'+img.src+'" width="100%" id='+target+'ImageBox style="filter:alpha(opacity=0);opacity:0"/>';
boxFade(target,'img');
setName(file);
img = null;
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","setImage");',200);
}
} else if(status == 'setImmediatly') {
gEBI(target+"Content").innerHTML = '<img src="'+img.src+'"/>';
setName(file);
img = null;
}
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","none");',50);
}
}

so i resize the images if they are bigger that 700px to the 50% of its width.
but now my problem is, that the image is only displayed in its new size if i click twice on the preview button.
this seems to be because the code didn't analyse the picture completely.

i thought the img.complete condition is for that !?
how can i make sure that the picture is resized correctly by the first try ?

hopefully s.o. can help me.

greetz
stit

EDIT:
i got it. status has to be set as none and not setImmediately.
then the box is set first and then the image is loaded. that solves the problem.

here my code with which it works well:

Code: [Select]
// Insert Image
function spawnIMGBox(target,file) {
img = new Image();
img.src = file;
if(img.complete) {
spawnBox(target,img.width,img.height);
setIMGBox(target,file,'none');
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","none");',10);
}
}
function setIMGBox(target,file,status) {
if(img.width!=0) {
if(status == 'none') {
if(img.width>'700') {
spawnBox(target,img.width*0.5,img.height*0.5);
} else {
spawnBox(target,img.width,img.height);
}
status = 'boxLoaded';
}
if(status == 'boxLoaded') {
setTimeout('setIMGBox("'+target+'","'+file+'","setImage");',325);
} else if(status == "setImage") {
if(img.complete) {
gEBI(target+'Content').innerHTML = '<img src="'+img.src+'" width="100%" id='+target+'ImageBox style="filter:alpha(opacity=0);opacity:0"/>';
boxFade(target,'img');
setName(file);
img = null;
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","setImage");',200);
}
} else if(status == 'setImmediatly') {
gEBI(target+"Content").innerHTML = '<img src="'+img.src+'"/>';
setName(file);
img = null;
}
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","none");',50);
}
}

EDIT2:

better solution with max-width:700px

Code: [Select]
// Insert Image
function spawnIMGBox(target,file) {
img = new Image();
img.src = file;
if(img.complete) {
spawnBox(target,img.width,img.height);
setIMGBox(target,file,'none');
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","none");',10);
}
}
function setIMGBox(target,file,status) {
if(img.width!=0) {
if(status == 'none') {
if(img.width>'700') {
spawnBox(target,700,img.newheight);
} else {
spawnBox(target,img.width,img.height);
}
status = 'boxLoaded';
}
if(status == 'boxLoaded') {
setTimeout('setIMGBox("'+target+'","'+file+'","setImage");',325);
} else if(status == "setImage") {
if(img.complete) {
gEBI(target+'Content').innerHTML = '<img src="'+img.src+'" width="100%" id='+target+'ImageBox style="filter:alpha(opacity=0);opacity:0"/>';
boxFade(target,'img');
setName(file);
img = null;
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","setImage");',200);
}
} else if(status == 'setImmediatly') {
gEBI(target+"Content").innerHTML = '<img src="'+img.src+'"/>';
setName(file);
img = null;
}
} else {
setTimeout('setIMGBox("'+target+'","'+file+'","none");',50);
}
}

5
RAWR-Designs / Re: Enable preview function for other files (.jpg)
« on: July 14, 2009, 11:45:35 AM »
Great it works !

in rawr_preview.js you just have to edit:

// Insert Image
function spawnIMGBox(target,file) {
   img = new Image();
   img.src = file;

And now the images are displayed as preview.
Perfekt that how i wanted it.

Big THX for support
stit

6
RAWR-Designs / Re: Bug on playing Video Files (url cut off)
« on: July 14, 2009, 11:38:45 AM »
this is the preview for an .mp3 file

if u edit:
   file = file.replace('+','%2B').replace('&','&#38;');

it will be correctly displayed but the file still isn't playing.
i wonder why i could play the folder before changing the files.

EDIT:
the player shows an corrupted path instead of the ID3 tag when playing a file. maybe this help solving the problem.
it shows ".net/GUITOUD - I&I/" instead of the name of the file

7
RAWR-Designs / Re: Enable preview function for other files (.jpg)
« on: July 14, 2009, 10:50:44 AM »
the only change u made here is to remove the red marked, am i right ?

Code: [Select]
Change this in the .tpl file.

[file]
<tr>
<td class="iconCol">
<a href="%item-url%">
<div style="background:url('/~img_file') center center no-repeat">{.switch|%item-ext%|,|jpg,jpeg,png,bmp,tif,tiff|
<div style="background:url('previews_and_thumbnails/thumb-%item-name%.jpg') center center no-repeat"></div>|.}
</div>
</a>
</td>
<td class="fileCol{.if not|{.get|can access.}|protected.}">
<div class="fileInfo">
<a href="%item-url%" {.$target.}>%item-name%{.if|{.get|is new.}|&nbsp;-&nbsp;<b class="new">{.!lv_new.}</b>.}</a><br/>
%comment%
<div class="info"><b>{.!lv_size.}:</b> %item-size%</div><div class="info"><b>{.!lv_hits.}:</b> %item-dl-count%</div><div class="age"><b>{.!lv_age.}:</b> %item-modified%</div>
</div>
</td>
<td class="quickCol">{.switch|%item-ext%|,|
jpg,jpeg,png,bmp,tif,tiff|
[color=red]  {.if|{.filesize|%folder-resource%\previews_and_thumbnails\prev-%item-name%.jpg.}
    |{.$preview-btn.}[/color]
    |<div class="quickBtn disabled hide"><img src="/template/{!theme}/images/preview.gif" alt="" align="middle"/></div>
[color=red]  .}[/color]
|mp3,flv,mp4,m4a,mov,3gp,aac,avi,divx,wmv,wma,swf|{.$preview-btn.}|<div class="quickBtn disabled hide"></div>.}
<noscript><div class="quickBtn disabled"></div></noscript>
<div class="quickBtn1 {.if not|{.get|can access.}|disabled.}"><a href="%item-url%" {.$target.}><img src="/template/{.!theme.}/images/download.gif" alt="DL" title="{.!lv_downloadTitle.}"/></a></div>
</td>
</tr>

edit: i see in code no colors are allowed so here:
 {.if|{.filesize|%folder-resource%\previews_and_thumbnails\prev-%item-name%.jpg.}
    |{.$preview-btn.}

    |<div class="quickBtn disabled hide"><img src="/template/{!theme}/images/preview.gif" alt="" align="middle"/></div>
 .}
|mp3,flv,mp4,m4a,mov,3gp,aac,avi,divx,wmv,wma,swf,jpg,jpeg|{.$preview-btn.}|

i made these changes but the preview button is not shown. i first want the preview button to be displayed and therefore i only need to edit the template file, because there is the condition when the button should be displayed.

am i right so far?

i changed the switch for extension too:
Code: [Select]
[preview-btn]
<div id="s%sequential%" class="quickBtn hide" {.switch|%item-ext%|,|mp3,flv,mp3,flv,mp4,m4a,mov,3gp,aac,jpg,jpeg|name="mediaFile"|.}><a href="javascript:void(0);" onclick="initBox('Box-'+(%sequential%+1),this.name);" name="%item-full-url%"><img src="/template/{.!theme.}/images/preview.gif" alt="P" title="{.!lv_previewTitle.}" align="middle"/></a></div><span id="Box-%sequential%"></span>
[target]
{.switch|%item-ext%|,|gif,pdf,htm,html,css,js,txt,png,xml|target="_blank"|.}
but doesn't show up.


EDIT2:
I FOUND THE BUG:
Code: [Select]
<div class="quickBtn disabled hide"><img src="/template/{!theme}/images/preview.gif"<div class="quickBtn disabled hide"><img src="/template/{.!theme.}/images/preview.gif"
there are the points missing !!!
this is also in the current .tpl file.
now the button is more grey than the other i think this is the way is should be and not to be completely not displayed.
am i right ?


8
RAWR-Designs / Re: Bug on playing Video Files (url cut off)
« on: July 14, 2009, 10:15:07 AM »
No I changed some more things, renamed the initPreviewBox to initBox. Sometimes its not as simple as it seems, when I update a template archive.

ok i copied all files and it works now, but only when i give anonymous access to the folder too.
i can live with that, but it would be cool if this would be fixed sometimes. (with .wmv files the preview works without giving anonymous access (WMP Plugin). maybe this is a "bug" with the divx player ?)

EDIT: i found a new bug. when i have a folder named with "x & y" the preview doesn't work too. the  url will be corrupted as:
Code: [Select]
http://xx.homeftp.net/GUITOUD - I%26I/02 - Redemption & Blessing.mp3HFS doesn't start the download when clicking the preview. i could play the folder before updating because of the other bug (this maybe helps).
& should be one of these http://de.selfhtml.org/html/referenz/zeichen.htm#benannte_html, like
Code: [Select]
&amp; or
Code: [Select]
&#38;when you want to test ist with the same folder: http://www.fresh-poulp.net/releases/FPR036.html


thanks so far for fixing the bug so fast !
great job !

greetz

9
RAWR-Designs / Re: Enable preview function for other files (.jpg)
« on: July 13, 2009, 06:24:19 PM »
so, you want the pictures list, and by clicking "preview" you want it to be loaded in a corner of the screen without moving away from the list?

right ;)

He wants the preview box to display the original image, so he doesn't have to have previews and thumbnails. But to set this up is quite complicated, this is the easiest way probably, untested.

big thx i will try it...

10
RAWR-Designs / Re: Bug on playing Video Files (url cut off)
« on: July 13, 2009, 06:19:29 PM »
yes i use firebug.

good to know i could help.

but: i downloaded the template again and replaced the old rawr_previewbox.js with the new one. and now the preview isn't popping up any more. it simply happens nothing. maybe another bug ? oder which files have to be copied too ?

thanks so far..

11
RAWR-Designs / Re: Bug on playing Video Files (url cut off)
« on: July 13, 2009, 07:09:02 AM »
Quote
rawr_previewbox.js is in rawr_default folder.

i only have the *.tpl and a template folder and in the template folder there is no rawr_preview.js.

Quote
The error you are getting probably because of not setting anonymous access.

i gave anonymous access but the problem is still there.
Code: [Select]
<param value="http://xxxx.homeftp.net/Videos/Volleyball Drumbo Cup.avi" name="src"/>
<embed width="640" height="380" autoplay="true/" cup.avi="" drumbo="" src="http://xxxx.homeftp.net/Videos/Volleyball" type="video/divx"/>


this is the code which is generated. and you see this embed is fully corrupted.

why are drumbo and cup a new element ?
so this must be a bug in the preview.js but i don't find it.

am i just blind ?
thx so far.

12
RAWR-Designs / Re: Enable preview function for other files (.jpg)
« on: July 12, 2009, 09:08:33 PM »
hmm i don't want to make new files.
i know that it's possible to make an image fit to a fixed width and height in a new <div>.

why is this not possible here ?
maybe you could add a flashplayer who can display these pictures correctly !?

or how can i make the preview button be displayed without the extra files !?

thanks so far.

13
RAWR-Designs / Re: Bug on playing Video Files (url cut off)
« on: July 12, 2009, 08:56:47 PM »
Quote
# Which template are you using? Do you actually get any error?

I use the RAWR Design black.
I get an error from my divx player, because the link isnt working.

Quote
# make sure you set your video folder to allow anonymous access if you have a password set other wise it won't play.

i have set a password for the root and if i give anonymous to the folder it wont be displayed to my normal account. i dont want the videos to be accesses for anonymous too.

Quote
# in previewbox.js

where is this file ?
i only find the .css file
and in the template file at [file] i dont find any txt like <embed>


thx so far.

stit

14
RAWR-Designs / Bug on playing Video Files (url cut off)
« on: July 12, 2009, 06:18:12 PM »
Hi all,

i detected a bug concerning the streaming of videos.
if i want to preview an .avi video the url is not completely going to the video.

e.g. the folder is called "the house" and the video is called "video1.avi"

the link in the preview windows is going only to "/the", so the bug seems to be a missing "" in the embed code.

maybe s.o. knows where to find the specific term in the template.


hopefully i could help solving a bug!?


greetz
stit

15
RAWR-Designs / Enable preview function for other files (.jpg)
« on: July 12, 2009, 05:02:21 PM »
Hi all,

is it possible to display the pictures in the same windows, with a preview funktion like for videos.
i don't want to install the extra Thumbnail & Preview Generator because i don't want images to be thumbnailed.
simply show the pictures in the same window in a new <div> by klicking the preview button.

i tried to delete the all  "disabled" marks in here but it didn't work.

Code: [Select]
<td class="quickCol">{.switch|%item-ext%|,|
jpg,jpeg,png,bmp,tif,tiff|
  {.if|{.filesize|%folder-resource%\previews_and_thumbnails\prev-%item-name%.jpg.}
    |{.$preview-btn.}
    |<div class="quickBtn disabled hide"><img src="/template/{!theme}/images/preview.gif" alt="" align="middle"/></div>
  .}
|mp3,flv,mp4,m4a,mov,3gp,aac,avi,divx,wmv,wma|{.$preview-btn.}|<div class="quickBtn disabled hide"></div>.}
<noscript><div class="quickBtn disabled"></div></noscript>
<div class="quickBtn1 {.if not|{.get|can access.}|disabled.}"><a href="%item-url%" {.$target.}><img src="/template/{.!theme.}/images/download.gif" alt="DL" title="{.!lv_downloadTitle.}"/></a></div>
</td>

hope s.o. can give me a hint how to realize it.

big thx so far.

greetz
stit

Pages: 1 2