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

Re: Cakephp3 Events and Listeners

2015-11-13 Thread Phan Tuan Kiet
} 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 to work. I am missing a piece of comprehension. > &g

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 ($entity-isNew

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 unsubscribe from

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

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?

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.

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:

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()) {

Re: Cakephp3 Events and Listeners

2014-08-22 Thread Rob Cowie
/core-libraries/events.html#registering-listeners T On Thu, Aug 21, 2014 at 9:26 PM, Rob Cowie asbesto...@gmail.com javascript: 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. I have

Re: Cakephp3 Events and Listeners

2014-08-22 Thread Rob Cowie
-eventManager()-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 asbesto...@gmail.com wrote: Hi all. I have read the cakephp book on events in version 3, and I cannot seem to get it to work. I

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); and I have

Re: Cakephp3 Events and Listeners

2014-08-21 Thread Dr. Tarique Sani
://book.cakephp.org/3.0/en/core-libraries/events.html#registering-listeners T On Thu, Aug 21, 2014 at 9:26 PM, Rob Cowie asbestospip...@gmail.com 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. I have

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

Re: CakePHP Events

2013-06-29 Thread Vanja Dizdarević
: 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, John Sposato wrote

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, John Sposato wrote

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, privileged

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

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

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 will fire in the model

Events System Example?

2013-01-12 Thread Passivhaus Experte
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 sample statistics class is indicated. Where can I create

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

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 message

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 rcha...@gmail.com 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. The concept is that plugins

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 callbacks

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. Is there a way that I can access

Re: Events, multiple listeners, and return data

2012-05-15 Thread Jamie
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. I hope my answer helps understand the resonance we had

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

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

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.

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 take

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 main request cycle, i.e

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 phpMagpie
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 just carry on coding all my events into my

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,

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

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 p

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? Many thanks

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 park@gmail.com wrote: Hi all, I'm developing a calendar app where some events

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' (rows in the interval table are: days, months, years, etc.) 'User' hasMany

Trouble with Ajax Autocomplete callbacks and events

2009-03-08 Thread Josh Prowse
/auto_complete_item', array( 'updateElement' = 'function() { return true; }', 'afterUpdateElement' = 'updateData' ) ); and here is the javascript to process the events

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 email to cake

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 PROTECTED] wrote: How to execute events like onmouseover. onchange

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, Rocky [EMAIL PROTECTED] wrote: How to execute events like

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

2008-04-28 Thread Rocky
PROTECTED] wrote: 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

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 scaffolding but only

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 same page. I would like an example

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

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 group. To post

Re: cakephp events reminder

2007-08-01 Thread Pablo Viojo
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 group. To post to this group, send email

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

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

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

Re: News Archive/Events Archive

2006-08-27 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

Re: News Archive/Events Archive

2006-08-27 Thread Jay Tillery
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 to be used

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