Re: CakePHP

2011-11-22 Thread Kane The Pirate
It can be done in MVC application, but it is recommended in case of having
issue to render the view with the controllers' data. Also the main logic of
the code is in the controller, so taking just the model data you are
limiting the capacity of the data processing

Em 22 de novembro de 2011 10:46, rchavik  escreveu:

>
> On Tuesday, November 22, 2011 6:00:24 PM UTC+7, Mike Karthauser wrote:
>>
>>
>> why would you want to load model in the view?
>>
>
> I have come across this requirement/need.  And this is something that I've
> been wondering myself, i.e: are we allowed to instantiate a model in views
> by the rules of MVC?
>
> From http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller,
> "Overview" section, number 4 on the list.
>
> A view queries the model in order to generate an appropriate user interface
>>
>
> That sounds like that views are actually allowed to interact with models.
> So, to answer my own question above, occasionally I do use models + custom
> finds in views. :)
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: mp3 player in flash

2011-05-08 Thread Kane The Pirate
I finished! Just needed add "$this->webroot" at the begin of my
basepath =)
thanks for all

On 6 maio, 01:35, Sam Sherlock  wrote:
> having the mp3 in a dir named music is fine within the webroot dir is fine.
>
> is your app installed in a folder named cake and artist a controller
>
> or is the app within artist?
>
> it looks to me the latter (although other parts of your email make me think
> that artist is a controller)
> and the fix may be as simple as make the flash instance recieve
> /cake/artist/webroot/music/myfile.mp3
> that should be the same as
> /cake/artist/music/myfile.mp3
>
> I think your passing a relative url to the flash instance
> since it finds the mp3 from the index but not the detailView action
>
> I have an app that plays mp3s from a flash header
> my mp3s are in a dir named mp3 - I load playlists of mp3s from a dir xml
> (which has absolute paths)
>
> irrespective of the url in the browser the mp3 is played - below is a
> simplified version of the setup I used (in addition to loading the header I
> have various other swfobjects for videos, photos etc that all use the same
> principal - my header also has a signup feature using ajax to pass
> send/repond data between flash & cake)
>
> var flObj = {
>   flashvars: {
>     logoObject:'flash/logo.swf',
>     xmlFile:'xml/blank.xml',
>     file:"xml/playlist.xml",mp3swf:"flash/mp3player.swf"
>     },
>     params:{
>       base:siteCfg.path
>     }
>
> };
>
> swfobject.embedSWF(
>   siteCfg.path+"/flash/myheader.swf",
>   "targetDiv",977,220,"8.0.0",false,
>   flObj.flashvars,
>   flObj.params
> );
>
> since the flash params.base is set I can pass additional files to my flash
> to load the additional files are passed relative to location in webroot
> and the flash instance concats the url of loaded file from the siteCfg.path
>
> so my app installed in /cakemp3playingapp/ on example.com - the following
> will all work
>
> example.com/cakemp3playingapp/
> example.com/cakemp3playingapp/artists/
> example.com/cakemp3playingapp/artists/details/1/
> example.com/cakemp3playingapp/contact/
>
> my example uses an xml playlist - but thats optional
>
> hth  - S
>
> On 6 May 2011 05:24, Kane The Pirate  wrote:
>
>
>
> > On 3 maio, 23:24, Sam Sherlock  wrote:
> > > perhaps its due to cakes use of mod rewrite
>
> > > if so I suggest using firebug's net tab to see the urls of the mp3's
> > being
> > > loaded
> > > then firgure out a way to ensure the your app has correct urls
> > consistently
>
> > > are you using absolute paths to the mp3s within your xml file or as
> > params
> > > passed to swfobject?
>
> > > I pass a basePath to swfobjects in cake apps and use this within
> > > actionscript to get easy abs paths
> > > then it does not matter is the app is in subdir or not the actionscript
> > does
> > > not need to be recoded
>
> > >  - S
>
> > > On 4 May 2011 02:47, Kane The Pirate  wrote:
>
> > > > Its workin now! but just in my index page, and only if I access my url
> > > > without any slashes after the index.
> > > > ex: localhost/cake/artist - this works
> > > > ex: localhost/cake/artist/ - this doesn't work
> > > > ex: localhost/cake/artist/detailView/12 - doesn't work.
>
> > > > I'm trying to understand. I used the router to see if there are
> > > > differences, but there is none difference between the index and other
> > > > pages.
>
> > > > I'm just using swfobject for cakephp.
>
> > > > Thanks.
>
> > > > --
> > > > Our newest site for the community: CakePHP Video Tutorials
> > > >http://tv.cakephp.org
> > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > > others with their CakePHP related questions.
>
> > > > To unsubscribe from this group, send email to
> > > > cake-php+unsubscr...@googlegroups.com For more options, visit this
> > group
> > > > athttp://groups.google.com/group/cake-php
>
> > I'm passing by params.
> > something like webroot/music/myfile.mp3.
>
> > in index show me the following url:
> > localhost/cake/artist/webroot/music/myfile.mp3
>
> > in other shows this:
> > localhost/cake/artist/detailview/1/webroot/music/myfile.mp3
>
> > However in my index it run, in my detailview not.
>
> > I tought if is better to change the route, or 

Re: mp3 player in flash

2011-05-05 Thread Kane The Pirate


On 3 maio, 23:24, Sam Sherlock  wrote:
> perhaps its due to cakes use of mod rewrite
>
> if so I suggest using firebug's net tab to see the urls of the mp3's being
> loaded
> then firgure out a way to ensure the your app has correct urls consistently
>
> are you using absolute paths to the mp3s within your xml file or as params
> passed to swfobject?
>
> I pass a basePath to swfobjects in cake apps and use this within
> actionscript to get easy abs paths
> then it does not matter is the app is in subdir or not the actionscript does
> not need to be recoded
>
>  - S
>
> On 4 May 2011 02:47, Kane The Pirate  wrote:
>
> > Its workin now! but just in my index page, and only if I access my url
> > without any slashes after the index.
> > ex: localhost/cake/artist - this works
> > ex: localhost/cake/artist/ - this doesn't work
> > ex: localhost/cake/artist/detailView/12 - doesn't work.
>
> > I'm trying to understand. I used the router to see if there are
> > differences, but there is none difference between the index and other
> > pages.
>
> > I'm just using swfobject for cakephp.
>
> > Thanks.
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

I'm passing by params.
something like webroot/music/myfile.mp3.


in index show me the following url:
localhost/cake/artist/webroot/music/myfile.mp3

in other shows this:
localhost/cake/artist/detailview/1/webroot/music/myfile.mp3

However in my index it run, in my detailview not.

I tought if is better to change the route, or put my files outside
webroot.

Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: mp3 player in flash

2011-05-05 Thread Kane The Pirate


On 3 maio, 23:24, Sam Sherlock  wrote:
> perhaps its due to cakes use of mod rewrite
>
> if so I suggest using firebug's net tab to see the urls of the mp3's being
> loaded
> then firgure out a way to ensure the your app has correct urls consistently
>
> are you using absolute paths to the mp3s within your xml file or as params
> passed to swfobject?
>
> I pass a basePath to swfobjects in cake apps and use this within
> actionscript to get easy abs paths
> then it does not matter is the app is in subdir or not the actionscript does
> not need to be recoded
>
>  - S
>
> On 4 May 2011 02:47, Kane The Pirate  wrote:
>
> > Its workin now! but just in my index page, and only if I access my url
> > without any slashes after the index.
> > ex: localhost/cake/artist - this works
> > ex: localhost/cake/artist/ - this doesn't work
> > ex: localhost/cake/artist/detailView/12 - doesn't work.
>
> > I'm trying to understand. I used the router to see if there are
> > differences, but there is none difference between the index and other
> > pages.
>
> > I'm just using swfobject for cakephp.
>
> > Thanks.
>
> > --
> > Our newest site for the community: CakePHP Video Tutorials
> >http://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
> > others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > athttp://groups.google.com/group/cake-php

I'm passing by params.
something like webroot/music/myfile.mp3.


in index show me the following url:
localhost/cake/artist/webroot/music/myfile.mp3

in other shows this:
localhost/cake/artist/detailview/1/webroot/music/myfile.mp3

However in my index it run, in my detailview not.

I tought if is better to change the route, or put my files outside
webroot.

Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: mp3 player in flash

2011-05-03 Thread Kane The Pirate
Its workin now! but just in my index page, and only if I access my url
without any slashes after the index.
ex: localhost/cake/artist - this works
ex: localhost/cake/artist/ - this doesn't work
ex: localhost/cake/artist/detailView/12 - doesn't work.

I'm trying to understand. I used the router to see if there are
differences, but there is none difference between the index and other
pages.

I'm just using swfobject for cakephp.

Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: mp3 player in flash

2011-04-08 Thread Kane The Pirate


On 2 abr, 09:18, Miloš Vučinić  wrote:
> What do you use for media streaming ? There are different media
> servers, if you use any.. If not, then you cannot stream these media
> and you have to wait to load whole song to play it.. So there could be
> the problem, slow connection or smth like that.
> Also , did you program that flash or did you use some already done
> solution...
>
> Do you read data from MySql DB, or do you just play fixed playlist
> from hd..
>
> All the best , Milos
>
> On Apr 1, 6:14 pm, Kane The Pirate  wrote:
>
> > Hi, I'm trying to do my cake application play some musics. All the
> > paths are right. It tell the name of the file and it's size, but don't
> > give the music name, or file name, and don't play my music. Some Idea
> > how to do that?


Hi, I'm not using a media server for a while. I did the flash AS, and
it runs well in other tests application, but don't run in cakephp. The
player appears ok, it tells me name of file, and the size, but is just
it.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


mp3 player in flash

2011-04-01 Thread Kane The Pirate
Hi, I'm trying to do my cake application play some musics. All the
paths are right. It tell the name of the file and it's size, but don't
give the music name, or file name, and don't play my music. Some Idea
how to do that?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php