Adding multiple events

2016-01-24 Thread Para K
Hi, I'm working on a project which creates entries on individual working days from the start date and the end date selected. I have done the calculation to get no. of working days between the dates selected, however, i dont have any idea how will i go about inserting into the DB, taking out sta

Re: Cakephp3 Events and Listeners

2015-11-13 Thread Phan Tuan Kiet
gt;dispatch($event); pr($event);die(); ==> null } please help me. result $event null thanks Vào 22:56:08 UTC+7 Thứ Năm, ngày 21 tháng 8 năm 2014, Rob Cowie đã viết: > > Hi all. I have read the cakephp book on events in version 3, and I cannot > seem to get it t

CakePHP 3 Events

2015-07-16 Thread Rafael Queiroz
Hi guys, I have question for Cake Events conventions: $event = new Event('Model.Order.afterPlace', $this, []); “*Order*” or “*Orders*” ? I abstract modelAlias using in AppTable: public function afterSave(\Cake\Event\Event $event, $entity, $options) { if ($ent

Dispatch ACL events in Cake 2.6

2015-03-05 Thread Lincoln Brito
Hi folks, How can I attach or dispatch events only for ACOs/AROs? Thanks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubs

Re: cake events

2014-12-28 Thread John Andersen
Thanks mark Looks interesting, will certainly see what else can be done with push. Hope anyway that our previous text helped with finding a solution. Enjoy, John On Saturday, 27 December 2014 22:06:15 UTC+2, euromark wrote: > > For a small community application I also still ajax PULL every x se

Re: cake events

2014-12-27 Thread euromark
For a small community application I also still ajax PULL every x seconds for this. As long as the users stay in a range (< ?) this might very well work as a (short term) solution. The state of the art approach would be a PUSH notification service, though, as described - here: http://socke

Re: cake events

2014-12-27 Thread John Andersen
That would not be possible as A's and B's sessions knows nothing of each other and only are running when a request is processed. What you could do is to have a small ajax script pulling the unread count every so often. Enjoy, John On Saturday, 27 December 2014 10:01:27 UTC+2, . . wrote: > > Hi.

cake events

2014-12-27 Thread . .
Hi. I am implementing a Message system (ie, user A sends a message to user B). After user A sends a message to B, I would like to show the number of unread messages. One way of implementing this is to check for any new messages on every page refresh. Could I instead use trigger a cakephp event? Can

Re: Events don't work when lazy load model class

2014-11-22 Thread José Lorenzo
Load the class in all requests or have another class acting as an intermediate that would load the required classes when the event is triggered On Friday, November 21, 2014 11:29:15 PM UTC+1, gonzela2006 wrote: > > Hi, > > I created an event 'Model.User.created' and attached the listener to my

Events don't work when lazy load model class

2014-11-21 Thread gonzela2006
Hi, I created an event 'Model.User.created' and attached the listener to my model as you can see below and it is working well App::uses('AppModel', 'Model'); App::uses('CakeEvent', 'Event'); class User extends AppModel { public function afterSave($created, $options = array()) { $eve

Re: Cakephp3 Events and Listeners

2014-08-22 Thread Rob Cowie
to the Order's event manager >> $statistics = new UserStatistic(); >> $this->Orders->eventManager()->attach($statistics); >> >> See >> http://book.cakephp.org/3.0/en/core-libraries/events.html#registering-listeners >> >> >> T >> &g

Re: Cakephp3 Events and Listeners

2014-08-22 Thread Rob Cowie
t;attach($statistics); > > See > http://book.cakephp.org/3.0/en/core-libraries/events.html#registering-listeners > > > T > > > > On Thu, Aug 21, 2014 at 9:26 PM, Rob Cowie > wrote: > >> Hi all. I have read the cakephp book on events in version 3, and I cannot >

Re: Cakephp3 Events and Listeners

2014-08-21 Thread Dr. Tarique Sani
cs); See http://book.cakephp.org/3.0/en/core-libraries/events.html#registering-listeners T On Thu, Aug 21, 2014 at 9:26 PM, Rob Cowie wrote: > Hi all. I have read the cakephp book on events in version 3, and I cannot > seem to get it to work. I am missing a piece of comprehension. > >

Cakephp3 Events and Listeners

2014-08-21 Thread Rob Cowie
Hi all. I have read the cakephp book on events in version 3, and I cannot seem to get it to work. I am missing a piece of comprehension. I have the event dispatch code in a controller: $event = new Event('Controller.User.login', $this); $this->eventManager()->dispatch($event

Events or Actions

2014-07-14 Thread Paulo Sérgio J . Matsinhe
Hi, I'm new to Cake and I have a challenge. I'm trying to select an Item from a Combobox and depending on the Selected Item I would like to disable or enable another 2 fields. Everyone talks about ajax but I would like to have an example. thanks in advance! -- Like Us on FaceBook https://www.f

Re: CakePHP Events

2013-06-29 Thread Vanja Dizdarević
wrote: > > I've read that, and it's not 100% great. I was hoping there might be a > tutorial to walk through a basic example of best practices for implementing > events. > > I'm very familiar with the book site, I reference it often. > > Thanks! > > O

Re: CakePHP Events

2013-06-28 Thread John Sposato
I've read that, and it's not 100% great. I was hoping there might be a tutorial to walk through a basic example of best practices for implementing events. I'm very familiar with the book site, I reference it often. Thanks! On Wednesday, June 26, 2013 12:32:41 PM UTC-4, Joh

Re: CakePHP Events

2013-06-27 Thread Florian Krämer
http://book.cakephp.org/2.0/en/core-libraries/events.html#events-system On Wednesday, June 26, 2013 6:32:41 PM UTC+2, John Sposato wrote: > > Anyone know of any good tutorials/examples on how to use the event system? > > > -- This email may contain material that is confidential,

CakePHP Events

2013-06-26 Thread John Sposato
Anyone know of any good tutorials/examples on how to use the event system? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from t

Re: Cake 2.1 Events:

2013-04-30 Thread Ciul
Hi again @phpMagpie, I've just found two better ways to achieve what you wish. #1 Override the Model "implementedEvents" method. If you check the CakePHP Model class code you see that it already implements CakeEventListener class). /** * Returns a list of all events that w

Re: Cake 2.1 Events:

2013-04-30 Thread Ciul
Hi @phpMagpie, from my personal point of view, you are doing it right. Since you were not too much confident about where to attach events to the EventManager, well, I propose two ways I think, might be cleaner that in the Controller according to your example. Method #1: Use CakePHP bootstrap

Events System Example?

2013-01-12 Thread Passivhaus Experte
ering how I transfer my statistics class in CakePHP I found "Events System <http://book.cakephp.org/2.0/en/core-libraries/events.html>". Below the point "Registering listeners <http://book.cakephp.org/2.0/en/core-libraries/events.html#registering-listeners>" a sa

Javascript issues in "Events" - CakePHP vers 1.2.9

2012-12-17 Thread mrfugimoto
Hello, I've posted this question on the ask cake site last week with no reply. Hopefully somebody can help. Trying to implement a code into a new event on a customer site What happened - the code broke and the widget code does not embed. What I expected to happen - the widget to embed an

Re: Accessing fields of 'Events' model to compare user_id.

2012-11-19 Thread lowpass
Instead of using isAuthorized() just ensure that Auth doesn't allow the edit action. Pass the Event.id to that action and then test for the current User.id. Also, instead of testing the role, just create an admin_edit() action and let Cake handle authorization. public function edit($id = null) {

Accessing fields of 'Events' model to compare user_id.

2012-11-18 Thread Daniel Toppin
Hi all I am fairly new to CakePHP, I am trying to only allow those users who created an event to be able to edit or delete an event, so I am comparing the current user id, with the 'user_id' field of the event the current event (saved when a user creates an event). Any help would be appreciated

Events system wildcard

2012-09-30 Thread Przemysław Pawliczuk
Is possible to bind event handlers as wildcards? For example, the docs shows "Model.Name.eventName". I want to perform it at "Model.*.eventName". Is that possible? -- Like Us on FacekBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this mess

Re: Events - how do I attach additional callbacks to the HelperCollection

2012-09-08 Thread Greg Skerman
Ahh thanks for the example.. got it all working now :) On Sat, Sep 8, 2012 at 3:09 PM, rchavik wrote: > > On Friday, September 7, 2012 10:23:06 PM UTC+7, Greg wrote: >> >> Hi, >> >> I've got a case where I want one helper to raise events on other helpers.

Re: Events - how do I attach additional callbacks to the HelperCollection

2012-09-07 Thread rchavik
On Friday, September 7, 2012 10:23:06 PM UTC+7, Greg wrote: > > Hi, > > I've got a case where I want one helper to raise events on other helpers. > The concept is that plugins can manipulate the output of a MenuHelper by > returning additional menu items at runtime. &g

Events - how do I attach additional callbacks to the HelperCollection

2012-09-07 Thread Greg Skerman
Hi, I've got a case where I want one helper to raise events on other helpers. The concept is that plugins can manipulate the output of a MenuHelper by returning additional menu items at runtime. Is there a way that I can access an instance of the helper collection and attach additional call

Re: Events, multiple listeners, and return data

2012-05-15 Thread Jamie
er and have listeners modify this object at will. > > An example of this type of callbacks is JavaScript, an events language, wich > usually don't take in account result values for events but 'false'. If you > want to alter any result you should be modifying an object. &g

Re: Events, multiple listeners, and return data

2012-05-14 Thread José Lorenzo
collecting the result is desired, an it is often the consequence of a wrong software design. If you want to collect return, pass an object as parameter and have listeners modify this object at will. An example of this type of callbacks is JavaScript, an events language, wich usually don't ta

Re: Events, multiple listeners, and return data

2012-05-14 Thread Jamie
Thanks. Just curious - why is the result data overwritten in this way? For me, at least, using the event system to get information from multiple listeners (as in my situation) was one of the first uses I thought of, especially since it can replace a bunch of custom stuff I had written previously. I

Events, multiple listeners, and return data

2012-05-14 Thread José Lorenzo
Basically you have two options, one is writing the result property directly on each listener to push new values on the array as needed, wich is the option I would recommend. The other option is to use the ObjectCollection instead of the event sustem and pass the collectReturn param -- Our new

Events, multiple listeners, and return data

2012-05-14 Thread Jamie Nay
I'm wondering if anyone else has come across this: I have a situation in which I'm dispatching an event with 2.1's event system, and have multiple listeners for that event. Each listener returns its own set of data, with the idea being that all of the returned data is compiled into one set (in

Re: Cake 2.1 Events:

2012-02-11 Thread phpMagpie
I'm not confident that I know what I am doing with the Events System so I'm stepping away from it for now till I fully understand the concept of 'decoupled' functions. I mistakenly started using it thinking the Observer Pattern was a way to run jobs separate from the mai

Re: Cake 2.1 Events:

2012-02-01 Thread phpMagpie
@Ceeram: Thanks for your help in IRC (I guess I just had to get used to IRC) I fully intend to post my working example, hopefully later today :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org

Re: Cake 2.1 Events:

2012-01-31 Thread Ceeram
@phpMagpie a follow up on this subject would be nice ;) -- 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, s

Re: Cake 2.1 Events:

2012-01-31 Thread phpMagpie
g the Configure class is intended for didactic purposes only ..." So it made sense to me to start out using 'Registering listeners' as the documentation states: "Listeners are an alternative, and often cleaner way of registering callbacks for an event" I think I am going to

Re: Cake 2.1 Events:

2012-01-30 Thread Sam Sherlock
Listeners configured somewhere else, maybe a config file a comment from code block on cake event doc page I was thinking that the events are set much like custom error handling http://book.cakephp.org/2.0/en/development/errors.html - S On 30 January 2012 20:32, phpMagpie wrote: > B

Cake 2.1 Events:

2012-01-30 Thread phpMagpie
Book: http://book.cakephp.org/2.0/en/core-libraries/events.html Trying to get to grips with one of the new features of CakePHP 2.1. Have read the above page in the book and want to implement the code shown in the 'Registering Listeners' section but no indication given as to where the followi

Re: Recurring Events Model Design in a Calendar App

2009-10-22 Thread Amit
Depends on how complex you want the system to be, but I say start by reading the iCal standard. You might be able to create a data structure from it. http://www.ietf.org/rfc/rfc2445.txt On Oct 22, 8:24 pm, park wrote: > Hi all, > > I'm developing a calendar app where some events

Recurring Events Model Design in a Calendar App

2009-10-22 Thread park
Hi all, I'm developing a calendar app where some events are recurring on a daily / weekly / monthly basis, just like what Google Calendar offers. I'm not quite sure how to design a model structure to support this. Is there any best practice for this? M

How to set a due date on events?

2009-08-05 Thread fly2279
I need help figuring out how to set up my tables or logic or both for figuring out how to set a 'due date' on events. I have: 'Company' hasMany 'Category', 'User' 'Category' hasMany 'Event' 'Category' belongsTo 'Interval&

Trouble with Ajax Autocomplete callbacks and events

2009-03-08 Thread Josh Prowse
egories_items_shoppers/auto_complete_item', array( 'updateElement' => 'function() { return true; }', 'afterUpdateElement' => 'updateData' )

Re: Repeating dates / events

2009-01-06 Thread WebbedIT
This isn't really a discussion related to CakePHP as it's more of an application concept or database scheme query. Dealing with repeat events is normally the difference between a basic calendar and an advanced calendar and I did some research into this some time back with various googl

Repeating dates / events

2009-01-06 Thread ernst.mayerhofer
Hi everybody, I got an events database, and i need to define for every event: - is it once or is it repeated? -if its repeated, are there several dates or is it in a system (e.g. every thursday, every first monday of a month, every last monday, every five years, every month on the

Re: how to execute events like onmouseover in an link tag in cakephp

2008-04-28 Thread Rocky
ibutes, onmouseover > stuff can be passed in there. > > On Apr 28, 6:55 am, Rocky <[EMAIL PROTECTED]> wrote: > > > How to execute events like onmouseover. onchange in an link tag in > > cakephp??? > > > Help Me !!! > > > Thanks > > > Ro

Re: how to execute events like onmouseover in an link tag in cakephp

2008-04-28 Thread ygneo
It would be so easy as write the events in the attributes: http://api.cakephp.org/1.2/class_html_helper.html#71ff7f331b08318bc867a4d9057b7d9f I.e. $html->link('title','url',array('onmouseover'=>'javascript:<...>'); On 28 abr, 07:55, Rock

Re: how to execute events like onmouseover in an link tag in cakephp

2008-04-28 Thread theChrisWalker
$html->link('Link Text','/link/path',array('onmouseover'=>'alert("You moused over me!");'); The third argument in Html::link() is the html attributes, onmouseover stuff can be passed in there. On Apr 28, 6:55 am, Rocky <[EMAIL

how to execute events like onmouseover in an link tag in cakephp

2008-04-28 Thread Rocky
How to execute events like onmouseover. onchange in an link tag in cakephp??? Help Me !!! Thanks Rocky --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send ema

Re: select person in a table and then display events

2008-02-11 Thread Amit Badkas
On Feb 12, 2008 12:48 PM, jvandal <[EMAIL PROTECTED]> wrote: > > HI, > I am new to cakephp and I want to select a person (by name)in a table > and link it to another table 'events' that will list all events > related to that person. > I want to do it on the sa

select person in a table and then display events

2008-02-11 Thread jvandal
HI, I am new to cakephp and I want to select a person (by name)in a table and link it to another table 'events' that will list all events related to that person. I want to do it on the same page. I would like an example of the cakephp code. I can create the tables in scaffoldin

Re: Events

2007-12-21 Thread bingomanatee
Its likely that you will have to do a lot of work to get any calendar to display your desired result. The phpCalendar code is a good place to work but no calendar will compute repetitions. You will have to create code to get the events which could possibly occur during the month being displayed

Events

2007-12-17 Thread Josoroma
I know how to create a very simple calendar app that let user to post events: title description category start_date end_date start_hour end_hour repetition(dayly-weekly-monthly-yearly) location_address email telephone fax Now i need some cool advice from you about which

Re: cakephp events reminder

2007-08-01 Thread starkey
Pablo Viojo > [EMAIL PROTECTED]://pviojo.net > > On 8/1/07, candesprojects <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > Please help me with ideas how can I make a events reminder with > > cakephp. I'm stuck on sending the emails when there is

Re: cakephp events reminder

2007-08-01 Thread Pablo Viojo
ease help me with ideas how can I make a events reminder with > cakephp. I'm stuck on sending the emails when there is also the > timezone. > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

cakephp events reminder

2007-08-01 Thread candesprojects
Hi, Please help me with ideas how can I make a events reminder with cakephp. I'm stuck on sending the emails when there is also the timezone. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP&

HdCalendar calendar->Events() - Does anyone know how to use this?

2007-04-11 Thread donuts
Hello Fellow bakers, I am trying to combine the Timesheet app from cakeforge with the hdCalendar plugin. More specifically, i am trying to pass an array of Tasks to the Events function of the calendar helper, so that I can see the tasks is in a weekly view. Has anyone been able to get this

Can we stop page loading while populating s with onload events?

2007-04-04 Thread skyblueink
Using AJAX and onLoad event, we do populating many s and it generally takes relatively long time to complete the page loading, which makes the STOP button indispensable. The following code generates 9 s and 9 onLoad events to populate them. It works great, but once the onLoad events are fired

Re: News Archive/Events Archive

2006-08-27 Thread Jay Tillery
r with the Cake basics. You should be able to start with the blog tutorial in the manual (http://manual.cakephp.org). The structure of your code for events and news should be very similar.For additional functionality like pagination (groups of 10 items) someone has developed a pagination component

Re: News Archive/Events Archive

2006-08-26 Thread John Zimmerman [gmail]
(http://manual.cakephp.org).The structure of your code for events and news should be very similar. For additional functionality like pagination (groups of 10 items) someone has developed a pagination component to be used as an add on to applications that will work well.Searching will also not be

News Archive/Events Archive

2006-08-26 Thread codigo
Hello, I am new to cake, but I am very interested in these two topics. How do I maintain an events and news list so both can be archived? For example, I would like to show ten news items at a time. In order of newest to oldest. I know I can just limit 10 ordered by id, but I would like for the