Shell to run as a cron... errors

2012-11-07 Thread elogic
Hi All, I have created my first shell that I need to run as a cron, I have the shell setup as follows: App::uses('CakeEmail', 'Network/Email'); class TaskEmailerShell extends AppShell { public $uses = array('Task'); public function main() { // DO NOTHING} public function send() {

Existing named params included into link with additional named params?

2012-08-30 Thread elogic
Hi All, I have a table of records that have multiple columns that you can click on a set record which will pass the named param for that selection and update the records found. e.g. after a click the URL is: /cards/index/P/*prospect_type_id:4* I need to do this on multiple levels, at the momen

Re: CakePdf - How To Start?

2012-08-22 Thread elogic
I since have setup the routes.php line of Router::parseExtensions( 'pdf'); The error I am getting now is: *Notice* (8): Undefined variable: res [*APP/Plugin/CakePdf/Vendor/dompdf/lib/class.pdf.php*, line *1413*] I assume this is a config setting? -- You received this message because you ar

Re: CakePdf - How To Start?

2012-08-22 Thread elogic
I changed CakePlugin::load('CakePdf', array('bootstrap' => true, 'routes' => true)); to CakePlugin::load('CakePdf', array('bootstrap' => true)); and the error is gone however I still am not getting a PDF. I forgot to mention I have created the layout in /app/View/Layout/pdf/default.ctp and am

Re: CakePdf - How To Start?

2012-08-22 Thread elogic
On a brand new app I have uploaded the plugin and I set the bootstrap config line to: CakePlugin::load('CakePdf', array('bootstrap' => true, 'routes' => true)); Reloading the page and I get this error: *Fatal error*: Call to undefined method Router::setExtensions() in * /home/village/public_h

Re: CakePdf - How To Start?

2012-08-15 Thread elogic
Sorry I meant /pdf/forms/view/1/ or /pdf/forms/view/1.pdf as paths. The same error applies as above. Bootstrap looks like this now: (I've tried DomPdf and Tcpdf, same error on both) CakePlugin::load('CakePdf', array('bootstrap' => true, 'routes' => true)); Configure::write('Pdf', array( '

Re: CakePdf - How To Start?

2012-08-15 Thread elogic
Thanks for your help so far, I have updated the config as you showed me and now I go to: */admin/forms/pdf_view/1.pdf *and I get the following error:* Fatal error*: Allowed memory size of 134217728 bytes exhausted (tried to allocate 76 bytes) in */home/beanclai/public_html/lib/Cake/View/View.php

Re: CakePdf - How To Start?

2012-08-13 Thread elogic
Thanks however Ideally I really want to get CakePdf going rather then using another process. -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email t

Re: CakePdf - How To Start?

2012-08-02 Thread elogic
This is what I have done so far: 1. CakePdf is in my Plugin folder. 2. bootstrap.php has at the bottom: /* LOAD CakePdf PLUGIN */ CakePlugin::load('CakePdf', array('bootstrap' => true, 'routes' => true)); Configure::write('Pdf', array( 'prefix' => 'pdf', 'engine' => 'tcpdf' )); 3. F

CakePdf - How To Start?

2012-08-02 Thread elogic
I have just downloaded and installed CakePdf - https://github.com/ceeram/CakePdf I don't understand how to get a sample PDF running. Anything will do, i.e. hello world, once I get this going then I can look into generating things further. Thanks. -- Our newest site for the community: CakePHP

Re: Auth Function Issues

2012-07-26 Thread elogic
I found the solution My UserController.php has 2 white spaces before the 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...@googlegro

Re: Auth Function Issues

2012-07-26 Thread elogic
I have also realised that none of the redirects are working either. I get a blank page. Could these be some kind of cached information files, sessions or similar that I have uploaded from the local to the live server that I can clear? -- Our newest site for the community: CakePHP Video Tutoria

Auth Function Issues

2012-07-26 Thread elogic
Hi All, I am using some basic Auth code that I have used many times in the past but for some reason this time it is failing. I cannot work it out, there isn't much to the actual code so I cannot see why it would fail. Can anyone see where I am going wrong? I am not getting any errors to the pa

Re: Web-App works local but not on my Server

2012-07-26 Thread elogic
I am getting this sample issue, works on local but as soon as I put it on live server I get this issue. The blackhole error comes back with 'auth' nothing else. I'm stuck. Thanks On Saturday, 24 December 2011 03:20:03 UTC+10, Gerrit wrote: > > Hello everybody, > > I've the following question:

Re: router help

2012-07-20 Thread elogic
After some more searching around I came up with the following: *Router::connect('/', array('controller' => 'contents', 'action' => 'view')); Router::connect('/:slug', array('controller' => 'contents', 'action' => 'view', array('routeClass' => 'SlugRoute')));* It seems to be working for my req

Re: WHMCS Api - Component

2012-07-20 Thread elogic
Thanks, this did the trick. It's working now. -- 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

router help

2012-07-20 Thread elogic
Hello, I am having some issues with my routes, I have put in the below route so I can have my front end pages all go to my contents controller view page. e.g. /home shows /contents/view/home or /about-us shows /contents/view/about-us (I'm using a slug) Router::connect('/*', array('controller' =

Re: WHMCS Api - Component

2012-07-18 Thread elogic
I have then updated the first line to: App::uses('HttpSocket', 'Network/Http'); and that error is by passed, now I get this: *Warning* (2): call_user_func_array() expects parameter 1 to be a valid callback, class 'WhmcsComponent' does not have a method 'initialize' [*CORE\Cake\Utility\ObjectCol

WHMCS Api - Component

2012-07-18 Thread elogic
I am building a new system in cake and I want to heavily use the WHMCS api but I am not sure where to start, I haven't written a component before (still new to cakephp) I found this online but it is quite old and errors out a fair bit, I assume it's built for cake 1.x, I am using the latest ver

Re: re-skinned or plugin version or my site.. like an API but templated

2012-07-03 Thread elogic
Thanks, I think it might need to be via an API seeing it needs to be apart of their actual website. Does anyone know of any tutorials online covering creating an API with cakephp so I can look into this further? It's all very new to me, I have used API's but never created one with or without cak

Re: url=controller/function appears now in my url address bar

2012-07-02 Thread elogic
hanged in 2.x so make sure you update the > .htaccess (and the other files in webroot / Config) > > On Wednesday, 20 June 2012 06:19:26 UTC+1, elogic wrote: >> >> Hi All, >> >> I moved a site from one server and upgraded it from 1.3.x to 2.x and now >>

re-skinned or plugin version or my site.. like an API but templated

2012-07-02 Thread elogic
Hi All, I am about to being a projest with cakePHP as the framework, my client has now asked me how we can go about setting up the site so other firms in the same industry could somehow use the same system (running on our database) from a front end point of view on their website as an addon pro

url=controller/function appears now in my url address bar

2012-06-19 Thread elogic
Hi All, I moved a site from one server and upgraded it from 1.3.x to 2.x and now in the url I am getting something like this: /units/staffindex?url=units%2Fstaffindex The url=units%2Fstaffindex part is new to me. Any idea why it is now there and how do I get rid of it? Everything works as nor

how to generate this sql

2012-06-18 Thread elogic
Hi All, How do I go about generating the following SQL line using cakePHP from the timesheets controller? SELECT user_id, date, count(id) as count_name FROM `timesheets`GROUP BY user_id, date HAVING count_name > 1 ORDER BY count_name; Basically it is just checking for double up records mathchi

Re: count from different model in find by id

2012-03-28 Thread elogic
I ended up doing the following which works but I do wonder is there a better cakePHP way. Thanks REPORTS CONTROLLER // LOAD REQUIRED MODELS // ---> $this->loadModel('User'); $this->loadModel('Task');

count from different model in find by id

2012-03-28 Thread elogic
I have a find (below) that selects all users so I can loop through them in a foreach on the view page. I need to add in some count fields that are separate from another table (one of the count finds is below). How would you suggest I can do this easily? $staffmembers = $this->User->find('all',

Re: cakePHP Data into Google Charts

2012-03-27 Thread elogic
For example, the first column would use something as follows to get the names out: $staffmembers = $this->User->find('all', array( 'fields' => array('User.id', 'User.first_name', 'User.last_name'), 'conditions' => array('User.group_id' => 3),

cakePHP Data into Google Charts

2012-03-27 Thread elogic
I need to build some reports for a cakePHP system I have been building and google charts seems to be the easiest way to get some charts happening. How do I go about getting the cakePHP data into the chart records? I have only just started by using the sample code on google charts info pages. e.

Re: cakeDC utils csvImport - fixed fields

2012-02-20 Thread elogic
This is driving me crazy, I'm sure it has to be something I am doing incorrectly but I cannot imagine what. I wonder if their is a limit to the fixed fields or something? Thanks On Feb 14, 4:03 pm, elogic wrote: > Thanks but that isn't the issue as I even tried putting it in m

Re: create duplicate record

2012-02-15 Thread elogic
Ignore this, user error. I had the field in the database setup incorrectly so it would accept the value I was changing. Thanks On Feb 16, 7:38 am, elogic wrote: > Thanks, Where do I put it though? > > I tried this: > > $existing_id = $this->request->data['Ladder'

Re: create duplicate record

2012-02-15 Thread elogic
etails as the original. print_r($new_record); - this is showing the data has been updated but it isn't being used in the create / save of the new record. Thanks On Feb 15, 5:38 pm, Andras Kende wrote: > try to add: > > $this->Ladder->create(); > > Andras Kende >

Re: create duplicate record

2012-02-14 Thread elogic
;id' key from the resulting array, change the value of > the field/key you want and then save it again. The lack of an id key will > force a save rather than an update. > > Jeremy Burns > Class Outfit > > http://www.classoutfit.com > > On 15 Feb 2012, at 06:04:20,

create duplicate record

2012-02-14 Thread elogic
Is there an easy way to create a duplicate record using cakePHP and maybe change one field in the duplication while still keeping the original? Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp

Re: cakeDC utils csvImport - fixed fields

2012-02-13 Thread elogic
eers, > Graham Weldonhttp://grahamweldon.com > e. gra...@grahamweldon.com > p. (+61) 0407 017 293 > Skype: grahamweldon > > > > > > > > On Tuesday, 14 February 2012 at 3:26 PM, elogic wrote: > > Hi All, > > > I am using cakeDC utils csvImport to impor

cakeDC utils csvImport - fixed fields

2012-02-13 Thread elogic
Hi All, I am using cakeDC utils csvImport to import an uploaded CSV into a table. Everything is working besides one of the fixed fields. I have 3 fixed fields, 2 work as required but the other is skipped everytime. I cannot work out what is happening or why this is the case. It's not making sense

Nick Baker's FileUpload Plugin + phpThumb Generator for existing files

2012-01-30 Thread elogic
Hi All, I have Nick Baker's FileUpload working for an image gallery aloong with a phpThumb generator and all works well except if there is an existing file in the folder. The FileUpload plugin is renaming the files correctly e.g. filename-1.jpg but I have something wrong in my controller where I a

_cake_model_ cache was unable to write - Apc cache

2012-01-24 Thread elogic
I have copied a cakephp setup from one server to another and now I am getting the following errrors, any idea what it might be? I have set the permissisons on the app/tmp folders so that wasn't it. It's cakephp 2.0.5. Thanks Warning (512): _cake_model_ cache was unable to write 'default_workli

Re: cakeDC utils csvImport - extra record

2012-01-18 Thread elogic
This is what I originally thought but I tested it with a csv file that I first opened in notepad to make sure there wasn't the extra line in there. It still generates the extra record. Any ideas? Thanks On Jan 19, 12:35 pm, José Lorenzo wrote: > probably an extra line in your CSV file -- Our

cakeDC utils csvImport - extra record

2012-01-11 Thread elogic
I am using the plugin cakeDC Utils (CSVImport - Link Below) with cakephp 2.0.4 and everything works however when the csv is imported it is adding in an additional blank record at the end, does anyone else have this issue and know how I can fix it? Thanks LINK: https://github.com/CakeDC/utils --

Re: Remove Pagination Controls if 1 page only

2012-01-09 Thread elogic
Thanks, Just what I was after. On Jan 10, 10:36 am, majna wrote: > if ($this->Paginator->hasPage(2)) { > // display prev, next, numers... > > > > > > > > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cak

Remove Pagination Controls if 1 page only

2012-01-09 Thread elogic
Is there an easy way to simply remove the previous / next controls if there is only one page of data found? 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 Cak

Re: editing user data when password doesn't change

2011-12-22 Thread elogic
rlock wrote: > > > > > > > > > Intercept the password in beforeFilter > > > - S > > On 22 Dec 2011 02:08, "elogic" wrote: > > > > Hi All, > > > > I am using Auth and I have an edit user details page, the password is > > > coming

editing user data when password doesn't change

2011-12-21 Thread elogic
Hi All, I am using Auth and I have an edit user details page, the password is coming though hashed into the password field, if the user doesn't change the password, the hashed password get re-hashed and therefore it will be unknown to the user. How do I get around this issue? Thanks -- Our newe

validation rule help

2011-12-12 Thread elogic
Hi All, I have a database listing of properties down the page. Each property row has a date selector and a time selector. I need to somehow validate that if one of the dates is selected the time must be selected before the bulk save can happen, if neither are selected it cane be left blank and add

Re: history log table

2011-10-04 Thread elogic
When I put the $actAs within my user model for example I get the following error: Undefined property: UsersController::$activeUser [APP/ app_controller.php, line 20] Thanks On Oct 5, 8:20 am, elogic wrote: > Thanks, so where do I add the $activeUser part? > > On Oct 5, 2:06 

Re: history log table

2011-10-04 Thread elogic
Thanks, so where do I add the $activeUser part? On Oct 5, 2:06 am, majna wrote: > Add $actsAs to AppModel -- 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 r

Re: history log table

2011-10-03 Thread elogic
} 4. Add the following into the AppController var $actsAs = array('Logable' => array('userModel' => 'User', 'userKey' => 'user_id')); Is this right so far and also where does the active user info go? Thankyou On Oct 4, 1

Re: history log table

2011-10-03 Thread elogic
oups.com [mailto:cake-php@googlegroups.com] On Behalf > > Of elogic > Sent: Monday, October 03, 2011 5:07 PM > To: CakePHP > Subject: Re: history log table > > Thanks for the reply. > > Are you able to explain further or direct me to something online that > could help m

Re: history log table

2011-10-03 Thread elogic
o > that for you > in the beforeSave() callback it can be triggered globally > > On 3 Okt., 06:38, elogic wrote: > > > > > > > > > My client wants a listing of all actions that happen within the system > > so they can check back and search the records at

history log table

2011-10-02 Thread elogic
My client wants a listing of all actions that happen within the system so they can check back and search the records at a later date. I thought the best way to handle this would be to have a histories table which would be similar to below: CREATE TABLE `histories` ( `id` INT(11) NULL AUTO

Re: using auth-login - displaying logged in username?

2011-09-23 Thread elogic
This is how I do it: Session- >read('Auth.User.username'); ?> Not sure about all logged in users. I'm only a few weeks into cakePHP. On Sep 23, 5:30 pm, mivogtGermanyLU wrote: > hi there, > > i am using the auth component for a very simple login/logoff located > in users-controller. > > On the

Re: Using Auth To Limit Results

2011-09-22 Thread elogic
t;http://jmcneese.wordpress.com/2009/04/19/rmac-ftw-part-1/http://jmcne... > > > This is implementing UNIX-style permissions for Model access, which is > > basically what you want. > > > Kind regards > > Thomas > > > Am 21.09.2011 11:28, schrieb elogic: > > > >

cakedc search plugin - PHP notice on like-field with encode=true

2011-09-21 Thread elogic
Hi All, I am having the exact problem as mentioned in the below post. It says the ticket has been resolved however I have the latest copy and the same issue is happening. Anyone know the fit for this? Thanks ISSUE: === I have a like-field with encoding turned on:

Using Auth To Limit Results

2011-09-21 Thread elogic
Is there any quick / better way to use Auth to limit the results based on the users login details or is it just a matter of using if/else statments to get what you want. For example, I have a list of products which all have a group id assigned to them. Each user also has a group id. When the user

dc search plugin - searching with backslash

2011-09-12 Thread elogic
Hi All, I have the dc search plugin running well on my site, one field however is an address field and has a lot of 3/123 sample st etc in them. When the backslash is put in the search won't work. It ignores everything after the backslash. Any ideas how to get around this? Thanks SOURCE: http:/

Re: Convert native PHP class into cakePHP component

2011-09-06 Thread elogic
sn't very confusing  :) > > Anyway, here's a link from the CakePHP book that might help you get started > with vendors:http://book.cakephp.org/view/943/Loading-Vendor-Files > > Teddy > > > > > > > > On Tue, Sep 6, 2011 at 9:03 AM, elogic wrote: >

Convert native PHP class into cakePHP component

2011-09-05 Thread elogic
Hi All, I am only new to cakePHP and am learning slowly (but loving it). I have been given a pre-built class and some basic instructions on how to use it from our SMS provider (it works very well and easily with native PHP). I need to convert the class into something that I can easily use within

database design help - menu, menu items and controllers within

2011-07-19 Thread elogic
Hello, I am having some issues setting up the database for my base CMS to use for all clients. My thoughts were to have the following: blocks table - this is simply the html, title, description etc for each page (i.e. home, about us) menus table - simply contains the menu name (i.e. top navigatio

Re: editing multiple records with beforesave. beforesave working but data not updating

2011-07-08 Thread elogic
, elogic wrote: > Hi All, > > I am having some issues with the following: I have 2 tables that I > have saving data to, accounts and users. I need to save the password > field within users as MD5 and so I am usingbeforesavefunction in my > model. It seems to be ignoring it though. A

data from models onto pages.. e.g. /pages/home etc

2011-07-07 Thread elogic
Hi All, How do I go about calling data from models within my system onto the standard pages? I have built an intranet with models such as accounts, users, groups, properties and now I want to create a dashboard / homepage (it is /pages/dashboard). I have the blank page but I want to call stuff fro

Re: need help with my $hasMany, $belongTo etc

2011-07-07 Thread elogic
I discovered my error here: NOTE ABOVE: 'conditions' => 'Staff.id = Property.staff_id', 'conditions' => '', I removed the second conditions and it now works. On Jul 8, 4:04 pm, elogic wrote: > Hi All, >

need help with my $hasMany, $belongTo etc

2011-07-07 Thread elogic
Hi All, I am having some issues trying to get the data I need in my view pages. My basic structure is as follows (simplified): ACCOUNTS id name etc PROPERTIES id estate_id (This is linked to a record in ACCOUNTS) staff_id (This is linked to a record in ACCOUNTS) etc in my property model I ha

Re: upload and import csv to mysql

2011-07-07 Thread elogic
wrote: > Hi elogic, > > where exactly is your error or aren't you able to find a concept for > your import? > > The way I did this once: Build a Behavior that is able to build an > Object from the imported Csv Data (File Class is your friend). Then > Import the data, call

editing multiple records with beforesave. beforesave working but data not updating

2011-07-06 Thread elogic
Hi All, I am having some issues with the following: I have 2 tables that I have saving data to, accounts and users. I need to save the password field within users as MD5 and so I am using beforesave function in my model. It seems to be ignoring it though. Any ideas how I can go about this? ACCOUN

Re: find data in index view foreach loop

2011-07-06 Thread elogic
t; array('Account.id' => $accountId), 'fields' => array('Account.first_name', 'Account.last_name'))); } Thanks On Jul 6, 5:06 pm, Vulinux wrote: > Hi elogic, > > since your methods for getting estate- and staff names are supposed t

find data in index view foreach loop

2011-07-05 Thread elogic
Hi All, I have on my view page of properties in the controller which is working as I want it to. // GET THE ESTATE AND STAFF NAMES $estate_name = $this->Property->User->find('first', array('conditions' => array('Account.id' => $this->Property->field('estate_id')), 'fields' => array('Account.firs

upload and import csv to mysql

2011-07-05 Thread elogic
Hi All, I have setup a file upload feature for my application using the below plugin. Now that I have the csv uploading using an upload controller and model I now need to insert the csv into a mysql table. I haven't had much luck with the samples I have found online. Does anyone know how I can do

Re: retrieving data from multiple tables for dropdown

2011-07-05 Thread elogic
display and the id as the value. Thanks On Jul 5, 5:30 am, Vulinux wrote: > Hi elogic. > > Since both, Account and Property, belong to User, it should be as easy > as follows: > > In your UsersController (app/controllers/users_controller.php), just > do > >  $this->

retrieving data from multiple tables for dropdown

2011-07-04 Thread elogic
Hi All, I have 3 tables, accounts, users, properties. Within the properties add / edit pages I need to populate two select dropdowns with data from the accounts table however I am not sure how to go about this. TABLE INFO (basics) ACCOUNTS id first_name last_name USERS id username password acco

cakePHP - Base Web App Distribution With Role Based Levels

2011-06-29 Thread elogic
Hi All, I have just started with cakePHP, I have been able to get my head around creating my own modules however I am having trouble with ACL or role based user account levels. I was wondering if there was somewhere online a downloaded base install for a web application with cakePHP and user level