Due to enormous amounts of spam, the forum has been set to read-only mode.



Reply to topic  [ 119 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 12  Next
How to: Use CATweb on the Internet 
Author Message
User avatar

Joined: Fri Nov 14, 2003 6:15 pm
Posts: 1425
Post Re: How to: Use CATweb on the Internet

hamsen wrote:
Just wondered, if it would be a good idea for each user to configure the the CATserver properties.
I don't know if the changes you made will affect other users.
Sorry, I don't understand your question. Can you elaborate?

Quote:
Where are your temp files located? Tempfolder=?
CATweb uses catweb/htdocs/tmp as its temporary directory (or catweb/www/tmp if using the UniformServer).

_________________
Cheers,
Dave


Sun Dec 04, 2011 10:01 pm
Profile WWW
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post Re: How to: Use CATweb on the Internet

LotsOCds wrote:
Sorry, I don't understand your question. Can you elaborate?


Yes, but first I need to figure out exactly why your change (restoring the properties) helped.
Meaning: Which property made things go wrong.

Have done my homework now:
ExtractImages is the problem.
Apparently, you access images using GetImage, I don't.
And since I only set the properties once when the program starts and not before every call, you can easily see why it goes wrong.
The resetting of properties is a good way to solve the problem.
I understand now, that it would not affect other users.

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Mon Dec 05, 2011 8:34 am
Profile WWW
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post Re: How to: Use CATweb on the Internet

Hi Dave

I now have CATweb running successfully on my PC's and IPAD.
I can also play a track on the IPAD although it starts on a blank webpage with a thin play bar.

What would be nice is this:
Attachment:
IMG_0009[1].PNG


I made a copy of track.xsl, called it PlayMusic.xsl and included this code:
Code:
<audio src="http://192.168.0.100/m:/musikcder/0001 - my kindred spirit/01 come into my garden -  Hanne boel.mp3"
            controls="controls"
            autoplay="autoplay"
/> 


Obviously, the src should have been PLAY:{../@id}, but unfortunately CATweb ignores this command inside the audio tag.

This works in Safari + IE + FireFox

There are a couple of ways this could work:
1) Just insert the above code in the template, where you want to play.
2) Convert all playlinks to a call to a specific track template (PlayMusic.xsl) to open up on a new page.
This way you can build your own layout around the player plugin.

What do you think? Worth trying?

Edit:
It seems that FireFox does not support mp3 using the audio tag due to licensing issues.
Therefore if you use Firefox, the embed tag should be used instead.

Having played around a bit more, I think the best solution would be:
1) Convert all CMD:Play instructions to a call to Playmusic.xsl (basically a copy of track.xsl)
2) In Playmusic.xsl convert the audiofilename in the audio/embed src tag to the correct url.

If you want to play a file while browsing, you will most likely want to play on a new webpage so you can continue browsing while playing.


You do not have the required permissions to view the files attached to this post.

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Last edited by hamsen on Sat Dec 31, 2011 8:11 am, edited 1 time in total.



Thu Dec 29, 2011 6:58 pm
Profile WWW
User avatar

Joined: Fri Nov 14, 2003 6:15 pm
Posts: 1425
Post Re: How to: Use CATweb on the Internet

Hi Thomas,

Thanks for the suggestions. They are interesting and require some thought to decide what is the best approach. I need to experiment a bit but I'll be back!

_________________
Cheers,
Dave


Sat Dec 31, 2011 7:56 am
Profile WWW
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post Re: How to: Use CATweb on the Internet

Hi Dave

It seemed that my attachment got lost in the previous post.
It should be back now.

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Sat Dec 31, 2011 8:12 am
Profile WWW
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post Re: How to: Use CATweb on the Internet

Hi Dave

I found a way around the FireFox problem.
I have now put in a JavaScript to replace the audio tag in PlayMusic.xsl.
$newurl are a temporary manual construct of the correct url at home.

Code:
<script type="text/javascript">
          if (/MSIE (\d+\.\d+);/.test(navigator.userAgent))
             {document.write('<audio autoplay="autoplay" controls="controls" src="{$newurl}"></audio>');}
          else if (/Safari[\/\s](\d+\.\d+)/.test(navigator.userAgent))
             {document.write('<BR/><audio autoplay="autoplay" controls="controls" src="{$newurl}"></audio>');}
          else if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent))
             {document.write('<embed src="{$newurl}" HEIGHT="42" WIDTH="300"></embed>');}
          else
             {document.write('<audio autoplay="autoplay" controls="controls" src="{$newurl}"></audio>');}
        </script>

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Wed Jan 04, 2012 2:41 pm
Profile WWW
User avatar

Joined: Fri Nov 14, 2003 6:15 pm
Posts: 1425
Post Re: How to: Use CATweb on the Internet

Hi Thomas,

I haven't had much time to work on this but here is something for you to try. CATweb v2.8.3alpha

There are two new conversions that are enabled by adding this line to the end of httpd.conf.
Code:
SetEnv use_playmusic 1

<a href="PLAY:nnn"> links are converted into links that will open PlayMusic.xsl in a blank page with track id=nnn.

The src="PLAY:nnn" attribute in audio and embed tags is converted into src="http://path_to_audiofile_for_id=nnn". The track id should be unformatted.

There may be some bugs so let me know if you see anything odd.

_________________
Cheers,
Dave


Thu Jan 05, 2012 3:18 pm
Profile WWW
User avatar

Joined: Sat Nov 22, 2003 7:47 pm
Posts: 2547
Location: Denmark
Post Re: How to: Use CATweb on the Internet

Hi Dave

Not a great success.
Apparently, nothing has changed.

There is only one place to put the Env line, right?
In "C:\CATweb\apache\conf\httpd.conf"

_________________
Kind regards
Thomas Hamstrup

HAP Software (http://www.hamstrup.dk)

Using Windows 8 PRO 64-bit and CATraxx 9.44


Thu Jan 05, 2012 8:17 pm
Profile WWW
User avatar

Joined: Fri Nov 14, 2003 6:15 pm
Posts: 1425
Post Re: How to: Use CATweb on the Internet

Hi Thomas,
That's all correct. It works fine on my CATraxx computer...but I'm not there now. Will double check all the parts for you tonight.

_________________
Cheers,
Dave


Thu Jan 05, 2012 9:27 pm
Profile WWW
User avatar

Joined: Fri Nov 14, 2003 6:15 pm
Posts: 1425
Post Re: How to: Use CATweb on the Internet

Hi Thomas,

Works fine here. Not sure why you see no difference. Are you sure the version of catweb\cgi-bin\catweb.cgi show as 2.8.3? You can send me or post your httpd.conf file if you want me to check it out. Also, I could look at one of your templates to confirm that CATweb is interpreting your links properly.

_________________
Cheers,
Dave


Fri Jan 06, 2012 5:53 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 119 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 12  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.