rejetto forum

Software => HTML & templates => HFS ~ HTTP File Server => RAWR-Designs => Topic started by: ajpaterson on April 05, 2009, 09:05:11 PM

Title: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 05, 2009, 09:05:11 PM
Hi Guys,

I just came across HFS and the excellent interface template RAWR-Template with it's built-in Rawr-player.  This combination is something I've been seeking for a long time.  I've been banging my head around setting up a full-fledged Digital Asset Management Database like Razuna, wasting several days and several windows installs to try to get it working.  Ultimately Razuna had too many features and was too complicated (for me at least,) for the task I was trying to achieve which is a privately-hosted web-based simple gui for sharing videos and photos with my friends and clients that are not technically adept enough to deal with ftp.   Additionally Razuna would mean running two systems with parallel directory structures that would be managed separately.

Instead after downloading HFS and RAWR-Template (black mod) this morning, I was up and running, sharing my already ftp-shared materials on the same server with the same directories, user and password accounts that I was already using for ftp in about 20 minutes.  For that ease of use, I quickly donated a few euros to both rejetto and rawr-designs today.  It's not much (my Canadian dollar is not what it was last year), but is a token of my appreciation for making life easier.

That said, nothing is perfect and I've run across a couple of small already documented or about to be corrected issues:

1. RAWR-Player preview compatibility with H.264 MOV formats not recognized.  I have been able to get around this by renaming my mov files to flv, but this will cause confusion amongst my users that they are watching lower-quality flash.  I understand a new version of the templates and player are about to be released which addresses this.  Any ETA on this?

2. How do I change the size of the preview window?  I found a comment about a wide function in the rawr_previewbox.js , but I'm clueless how to implement it.

3. It would be nice if the thumbnail generator created thumbnails for video format files in addition to still images.  I tried creating a thumbnail myself by creating a hidden 'previews_and_thumbnails' folder in my videos folder which contained an appropriately sized thumb-videofilename.jpg, but that didn't work.

4. On my Server 2003 machine, I cannot launch HFS from explorer.  It comes back with a permissions/path not found error.  I can, however launch it from a CMD shell and it then seems to work fine.

5.  For some reason, the icons it presents for different file types (quicktime for example) look different and cruder on my 2003 server than my vista home computer that I originally tested hfs on.  Is there any way to change the default icons?  Do I need to install quicktime/acrobat/windows media player 11 on the server to get the correct icons to show?

The above issues are small, and I can probably wait patiently for a solution. However, the only real feature lacking for me is a way for users to send their comments directly to me or other users directly by email.  Shoutbox is nice but kind of limited because it's small and viewable by everyone.  A nice little module like the shoutbox, which lets a user select one or more preset customizable recipients and then email them a comment would be perfect.   It should also have a field to enter the sender's name or email.

While I'm perfectly capable of graphics design in photoshop to customize the look of the template, coding in html is beyond me.  Searching through the templates, I couldn't even figure out how to change the names on the buttons!  The best I could do was insert some code found here to have a contact us button at the top left corner of the page which uses mailto to use their email application to send mail, but it's ugly and not in keeping with the fine work of Rawr-design.  I can probably stumble around wasting days on this, but time is a precious commodity, so I often find it's better to leave this stuff to the pros.  Therefore I'd like to offer a bounty of 100 Euros to someone who can write this module for me and help me get it implemented in rawr-template.  I know it's not a lot, but again, the canadian dollar is not what it used to be!  Please respond here if you are interested.

-AJPaterson
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 05, 2009, 09:44:43 PM
I forgot to mention, this email form could take the place of the transfers pop-up if it is easier to code.  This was my original intention, but I couldn't find where to begin!
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 06, 2009, 12:07:01 AM
welcome ajp, and thanks a lot for your donation, highly appreciated.
3. i'm not a master with rawr things, but from a quick view i can tell you i see some commands just before the thumbnails usage
{.switch|%item-ext%|,|jpg,jpeg,png,bmp,tif,tiff|

i guess you should try to add the mov (or flv?) extension there

4. please try reporting the full and exact message (or a screenshot if you like)

5. HFS normally uses the icon provided by the system.
the system (windows) normally doesn't show up any "nice" icon if the related software is not installed.
nonetheless, it's overkilling to install big softwares just to get a good icon, and you may prefer to get just the icon itself.
you have at least 2 ways for this latter option
a) install that icon for the filetype at system level. HFS will conform automatically. (restart may be needed)
b) get the icon you like as a .ico file, then you can install it in HFS through menu > other options > add icons
having this done, you can menu > virtual file system > icon masks
and bind *.mov to your new icon

(Continues)
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 06, 2009, 02:36:23 AM
for your form, i have built a basic solution that can be enhanced to suit your needs.
you should first see if this is what you want.

it took me 2 hours. i'd never imagine.  :-X
 
You should add the following code to the template.
(please, configure second and third line, server and email)

Code: [Select]
[contactus]
{.set|SMTP server| smtp.maybeyourisp.com.}
{.set|my email| your@email.com.}

{.if|{.postvar|email.}|{:
{.set|tf|email.temp.txt.}
{.save|{.^tf.}|{.postvar|body.}.}
{.if|{.length|{.exec|bmail.exe|-s {.^SMTP server.} -t {.^my email.} -f {.postvar|email.} -h -a "messaging from HFS" -m {.^tf.}.}.}
|Message sent! (perhaps)|You have to install bmail
.}

{.delete|{.^tf.}.}
:}
|
<form method='post' enctype="multipart/form-data" >
E-mail
<br><input name='email'>
<br>Message
<br><textarea name='body' cols='40' rows='6'></textarea>
<br><input type='submit' value='send'>
</form>
/if.}

Optional advice: if you are already customizing the template, and are no longer using the original one, then paste this stuff inside the template file itself.
If you are still bound to the original (the pro is that you can update the template easily by replacing the old version with the new one), then you can put the code i'm giving you inside a "diff template".
this feature lets you make changes without touching the original template.


the link to access this page is ADDRESS/~contactus
you can easily customize the "contactus" part of course.

since HFS has no email sending function, you will have to unzip this file (http://www.beyondlogic.org/solutions/cmdlinemail/bmailv107.zip) in the same folder of "hfs.exe"


From next build (#232), you should use this other version because it's more reliable

Code: [Select]
[contactus]
{.set|SMTP server| smtp.maybeyourisp.com.}
{.set|my email| your@email.com.}

{.if|{.postvar|email.}|{:
{.set|tf|email.temp.txt.}
{.save|{.^tf.}|{.postvar|body.}.}
{.exec|bmail.exe|-s {.^SMTP server.} -t {.^my email.} -f {.postvar|email.} -h -a "messaging from HFS" -m {.^tf.}|out=output.}
{.if|{.not|{.^output.}.}|You have to install bmail
| {.if|{.pos|250 |{.^output.}.}|Message sent!|
{.if|{.pos|220 |{.^output.}.}|Refused|Could not connect.}
.}
.}
{.delete|{.^tf.}.}
:}
|
<form method='post' enctype="multipart/form-data" >
E-mail
<br><input name='email'>
<br>Message
<br><textarea name='body' cols='40' rows='6'></textarea>
<br><input type='submit' value='send'>
</form>
/if.}


if it works for you (it did for me) we can make it nicer ;)
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 06, 2009, 03:17:58 AM
Hi Rejetto,  Still having fun tonight playing with your software instead of going to bed.

1. Thanks to your notes, I figured out how to include .mov in the list of files that turn on and off the preview button, and by editing the video formats in rawr_previewbox.js I've managed to get some h.264 quicktimes to play, but not reliably. Some h.264 quicktimes that will play fine with a .flv extension only bring up an audio bar when they have a .mov extension.  Others encoded with the same software play fine with either extension.  I can't explain why, but perhaps this is part of the coming soon update and I will live with the .flv naming for now as this seems reliable.  It also seems to eliminate the problem of non h.264 quicktimes turning on the preview button, but not being able to play.

2. I've also figured out how to change the size of the preview window through adding var aspect="wide" in the var section and playing with the pixel sizes in the section below, however it seems to be an all 4:3 or all 16:9 solution.  In Wide 4:3 videos get stretched and in normal 16:9 videos get squashed.  I can probably deal with this as all my new videos are 16:9.  Some old ones may be letterboxed 4:3 which I'll have to crop or pad with black bars as the case may be.

function spawnRAWRBox(target,file) {
   height = ext==".flv"?368:50;
   width = ext==".flv"&&aspect=="wide"?640:320;
   spawnBox(target,width,height);
   setTimeout("setRAWRBox(\""+target+"\",\""+file+"\");",300);
}

4.  I'm playing with my test vista home machine tonight. I'll report back on the 2003 error message from the office tomorrow.

5.  The icons I'm missing are flash and quicktime, so I'll probably just install the apps on the 2003 machine and use the system icons.  I tried to find some freeware .ico packages, but none were appealing.

I see you've offered an email solution already!   I'll test it out when I'm in the office tomorrow and let you know how it goes.  I'd probably like to use a diff template as I'm about to return to the originals and start over with my experimenting as I broke something and mov files are no longer playing, but for now I'll probably just try to cut and paste to try it out.

Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 06, 2009, 03:39:22 AM
Hi Rejetto,

OK, I decided to play with this some more. I'm not sure exactly where to paste your code into the rawr-template which betrays how inept I am at this.  I tried inserting it into the head section at the end, but that resulted in a hang.  I also added it to the end of the file, but that was not a solution either.  Sorry if I'm missing something obvious.

-Anthony
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 06, 2009, 02:45:50 PM
4.  Ok,  I've attached an image of the error launching from explorer on the 2003 server.  Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.  I am logged in as administrator, and when I launch from CMD shell, it runs fine.

-Anthony
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: crazyboris on April 06, 2009, 03:05:49 PM
dissable DEP
Code: [Select]
http://en.wikipedia.org/wiki/Data_Execution_Prevention
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 07, 2009, 02:06:19 AM
dissable DEP
Code: [Select]
http://en.wikipedia.org/wiki/Data_Execution_Prevention

Nice try but it wasn't DEP.  At the bottom of the General Properties page there was some text that reads "Security: This file came from another computer and might be blocked to help protect this computer.  Beside it there was a button that said "Unblock".  Once clicked, Server 2003 allowed explorer execution of the file.   This must be something new as I've never encountered it before.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 07, 2009, 01:28:21 PM
Hi Rejetto,  Still having fun tonight playing with your software instead of going to bed.

i hope i won't be sued for lost nights ;)

Quote
Some h.264 quicktimes that will play fine with a .flv extension only bring up an audio bar when they have a .mov extension.  

just in case you need to publish those files as renamed, but you want them on your hard disk to stay with their original name, i think there's a way to get this done.
but i won't waste time explaining unless you need it.

Quote
2. I've also figured out how to change the size of the preview window through adding var aspect="wide" in the var section and playing with the pixel sizes in the section below, however it seems to be an all 4:3 or all 16:9 solution.  In Wide 4:3 videos get stretched and in normal 16:9 videos get squashed.  I can probably deal with this as all my new videos are 16:9.  Some old ones may be letterboxed 4:3 which I'll have to crop or pad with black bars as the case may be.

if you find a way to tell which file is 4:3, you may make that "wide" attribute to be not applied to them.
a simple way may be to rename those files, adding a "4_3" (or any other marking text).
than a simple "IF" javascript command will do the rest.

Quote
5.  The icons I'm missing are flash and quicktime, so I'll probably just install the apps on the 2003 machine and use the system icons.  I tried to find some freeware .ico packages, but none were appealing.

there are quicker ways to get those .ico files
go to http://icons-search.com/ and search "quicktime" and then "flash".
they provide png but also ico format.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 07, 2009, 01:30:26 PM
OK, I decided to play with this some more. I'm not sure exactly where to paste your code into the rawr-template which betrays how inept I am at this. 

right click on the home/root > properties > diff template

paste it there
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: crazyboris on April 07, 2009, 05:26:46 PM
dissable DEP
Code: [Select]
http://en.wikipedia.org/wiki/Data_Execution_Prevention

Nice try but it wasn't DEP.  At the bottom of the General Properties page there was some text that reads "Security: This file came from another computer and might be blocked to help protect this computer.  Beside it there was a button that said "Unblock".  Once clicked, Server 2003 allowed explorer execution of the file.   This must be something new as I've never encountered it before.

thats nothing new xp has that to.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: TSG on April 07, 2009, 05:57:18 PM
I would wait. Before worrying about your 16:9 and 4:3 videos. Once our new site launches, whenever our domain transfers to the new host :o, so will the latest RAWR-Player and the minor template updates. It will be default to 16:9 but will pad the videos :) however, it rely's on the files having a nice clean metadata, not so much a problem for the other filetypes, but stolen youtube FLV's require the metadata to be completed. So you have to run them through a program to fix it. I posted instructions and some previews here:

http://www.rejetto.com/forum/index.php?topic=6598.0

We did consider one day making thumbnails and previews for videos, but at the moment we have no idea how haha, and no time, knee deep in PHP, HTML and CSS lately.

I can relate to your situation, just over 2 years ago I had little idea what I was doing, I am now a graduate multimedia student with a major in design :D however I still haven't got a job in the field cause of some family problems.

Also thanks for the donation. Every bit goes a long way. Without the donations we would not be able to move to more reliable hosting!
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 08, 2009, 12:44:24 AM
Hi Rejetto,  Still having fun tonight playing with your software instead of going to bed.

i hope i won't be sued for lost nights ;)

On the contrary, HFS helps me sleep soundly.

Quote
5.  The icons I'm missing are flash and quicktime, so I'll probably just install the apps on the 2003 machine and use the system icons.  I tried to find some freeware .ico packages, but none were appealing.

there are quicker ways to get those .ico files
go to http://icons-search.com/ and search "quicktime" and then "flash".
they provide png but also ico format.
[/quote]

I learn something new every day!

Quote
right click on the home/root > properties > diff template

paste it there

Ok, I did this, but I get a weird hfs window repeated within the shoutbox when this is added as a diff template to the home/root.  I even tried going back to the original unmodified rawr-template
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 08, 2009, 03:12:30 AM
mmm, i think it is a bug.
i will work on it tomorrow.
now time for bed.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 08, 2009, 11:08:42 AM
ok, i fixed this bug for next build.
now i'm going to work on another problem: by testing i saw that this way of accessing [sections] by using the /~tilde in the URL, doesn't apply to diff templates. it's limited to the main template.
i hope to get over this problem without affecting performances.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 08, 2009, 11:40:56 AM
ok, i think i solved.
let's see if next build runs smoothly.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 08, 2009, 05:56:36 PM
Hi Rejetto,

I tried the new build (232) with both the original code and new code you provided as home/root diff template and diff template doesn't appear to be working for me at all now.  The shoutbox remains original.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 08, 2009, 11:09:12 PM
it's normal.
that code was not meant to automatically replace the shoutbox.
it is generic and will work with any template.

i made some adjustments to fit your needs: replace file
template\rawr_default\shoutbox\display_posts\hfs.diff.tpl
with the attached one

this should be enough.
and you can also remove the text you pasted in the diff template.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 08, 2009, 11:37:44 PM
i made some adjustments to fit your needs: replace file
template\rawr_default\shoutbox\display_posts\hfs.diff.tpl
with the attached one

this should be enough.
and you can also remove the text you pasted in the diff template.

I replaced the hfs.diff.tpl file and reloaded the page and bam, there was the new form in the place of the shoutbox!  I've just received my first email from the system entitled, messaging from hfs.  Unfortunately the contents of the message was missing.  I'm going to take a look at the diff file to see if I can figure that part out myself.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 08, 2009, 11:52:23 PM
i updated the attached file above, to make the output message nicer.

anyway, i just tested and got the content as well.
if it doesn't work on your side, maybe it's because there's a problem saving the temporary file that stores the content.

it's this line
{.set|tf|email.temp.txt.}
where tf stands for temporary file, the rest is the name ;)
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 09, 2009, 01:06:24 PM
i updated the attached file above, to make the output message nicer.

anyway, i just tested and got the content as well.
if it doesn't work on your side, maybe it's because there's a problem saving the temporary file that stores the content.

it's this line
{.set|tf|email.temp.txt.}
where tf stands for temporary file, the rest is the name ;)

I tried this at home and you are correct, it is including the body.  It must be a temporary file or permissions issue on my server. I'll try it out and report back.

-Anthony
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: ajpaterson on April 10, 2009, 02:51:40 AM
Well it appears that bmail and my isp's mail server don't get along.  >:(

Mail sent to my personal account is fine, but mail sent to my work account has the body stripped.

In any case, I will probably change direction with this a little as this form is too small to send a useful message, and I may simply set up mail to: buttons to cover several potential recipients.  Thanks Rejetto for putting so much time into this, fixing a bug, and showing me the way.  I'll be sending the additional donation tonight.

Regards,
-Anthony
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: TSG on April 10, 2009, 06:22:24 AM
mailto: links will be a problem with spam if its a public server. Better to use a form with a captcha or login, OR you could only show the mailto: to logged in users, that should stop the spam.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 10, 2009, 08:46:27 AM
thanks Anthony for keeping faith.
these years i've spent more time giving support than developing HFS, and being rewarded sometimes is nice. :)

having a simple link to a bigger form was my first idea, and it's the original version of the code.
you just need to link /~contactus and put the code in the diff template.

Quote
Mail sent to my personal account is fine, but mail sent to my work account has the body stripped.

if this is very important, i know a way that may possibly workaround it.
let me know and i'll tell you more.
Title: Re: HFS, RAWR-Template, RAWR-Player, and an Email form Bounty
Post by: rejetto on April 10, 2009, 08:50:32 AM
mailto: links will be a problem with spam if its a public server. Better to use a form with a captcha or login, OR you could only show the mailto: to logged in users, that should stop the spam.

he doesn't want links.
about the captcha, i came to an idea. javascript idea.
when the user click "send", i can just change the button in "press another time".
and just then you'll be truly sending.
we'll probably may get a better "text" for the buttons, or we may like to create a second button just after the first is pressed.
but the point is that this may stop the bots.

the bots, actually, can force the submit without pressing the button. but i may wait for a certain value that is created only when you click the second button. without this special value the submitting can be simply ignored. ;)