Form input selected

2012-02-24 Thread heohni
Hi, I am using the ajax pagination and my url looks like this: /search/cat:12/city:67/sleeps:1/price:2 I have for each a dropdown input select: $this-Form-input('cat', array('options' = $getCategories, 'selected' = $this-request-params['named']['cat'])); But what I want to know, what is best

Re: Having strange problem with debug()

2012-02-23 Thread heohni
print_r() is return all array data... why not debug() ?? -- 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,

Re: Initialize Session within a component

2012-02-23 Thread heohni
class P28nComponent extends Component { var $components = array('Session'); On 23 Feb., 02:39, lowpass zijn.digi...@gmail.com wrote: class P28nComponent extends Object { Are you using Cake 2.x? If so, update the component to extend the Component class instead of Object. -- Our newest

Re: Yn: Error: Index.phpController could not be found

2012-02-23 Thread heohni
the error is in here: class Index.phpController extends AppController { I guess put into your address bar localhost/index.php just try http://localhost On 23 Feb., 10:30, Ersin Demirtas ersi...@gmail.com wrote: This is a really big problem people don't read the documentation. Please read the

Re: simple auth in 2.0

2012-02-23 Thread heohni
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html Simple Authentication and Authorization Application Tutorial On 22 Feb., 21:23, pablosky pablo00...@hotmail.com wrote: Hello, I used CakePHP 1.3 and now I come to CakePHP 2.0. Do not know how to do a simple

App::uses Question

2012-02-23 Thread heohni
HI, I want to use a component function within my model, now in V2.1. how can I do that? Is it right that I need t use this: App::uses('Functions', 'Component'); But what else do I need to use $this-Functions-needfullthing()? -- Our newest site for the community: CakePHP Video Tutorials

Re: App::uses Question

2012-02-23 Thread heohni
/en/controllers.html#components-helpers-an... -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2012/2/23 heohni heidi.anselstet...@consultingteam.de HI, I want to use a component function within my model, now in V2.1. how can I do that? Is it right that I need t use this: App

Re: App::uses Question

2012-02-23 Thread heohni
?? Now I am totally lost. On 23 Feb., 14:37, Tilen Majerle tilen.maje...@gmail.com wrote: yes, because components can be used ONLY in controllers, if you need this somewhere else, use Library :) -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2012/2/23 heohni heidi.anselstet

How to work with find syntax

2012-02-22 Thread heohni
Hi, I have a find statement which look like this: $results = $this-GObject-find('all', array( 'conditions' = array( 'anotherfield = 1' ), 'fields' = array(''), 'order' = 'myfield ASC', 'limit'

Having strange problem with debug()

2012-02-22 Thread heohni
Hi, I am using the new V2.1 and having a strange problem on a new project. I am doing a find() and the sql log returns me that data is found. $results = $this-GObject-find('all', array( 'conditions' = $this-SearchConditions['conditions'], 'fields' =

Re: How to work with find syntax

2012-02-22 Thread heohni
On 22 February 2012 11:20, heohni heidi.anselstet...@consultingteam.dewrote: Hi, I have a find statement which look like this: $results = $this-GObject-find('all', array(                'conditions' = array(                    'anotherfield = 1

Re: Having strange problem with debug()

2012-02-22 Thread heohni
No, I just at the very first function and the very first action... On 22 Feb., 22:27, jeremyharris funeralm...@gmail.com wrote: You probably get the warning because you are including the sql log element somewhere else (like in your layout). Remove it and it will show up in debug kit. As for

Re: Having strange problem with debug()

2012-02-22 Thread heohni
Funny enough, the debug behavoir is online offline on my windows machine, on my webserver it works like always and I can see all my debug messages How can that be?? On 22 Feb., 22:27, jeremyharris funeralm...@gmail.com wrote: You probably get the warning because you are including the sql log

Initialize Session within a component

2012-02-21 Thread heohni
Hi! I am using this component: class P28nComponent extends Object { var $components = array('Session', 'Cookie'); function startup() { // The 'startup method' is called after the controller's beforeFilter method but before the controller executes the current action handler. if

Initialize Session within a component

2012-02-21 Thread heohni
Hi! I am using this component: class P28nComponent extends Object { var $components = array('Session'); function startup() { if (!$this-Session-check('Config.language')) { $this-change(DEFAULT_LANGUAGE); } } function change($lang = null) { if

Re: 2.1 Console: Class 'AppShell' not found

2012-02-05 Thread heohni
:59, heohni heidi.anselstet...@consultingteam.dewrote: sorry: error was:  D:\SVN-Homes\PHP\trunk\cake2.1\lib\Cake\Console\Command \BakeShell.php on line 36 and I copied the AppShell.php from D:\SVN-Homes\PHP\trunk\cake2.1\app\Console\Command\AppShell.php to D:\SVN-Homes\PHP

2.1 Console: Class 'AppShell' not found

2012-02-04 Thread heohni
Hi, after downloading the V2.1 and calling first time the 'cake bake' in the console I get this error: PHP Fatal error: Class 'AppShell' not found in D:\SVN-Homes\PHP\trunk \cake2.1\l ib\Cake\Console\Command\BakeShell.php on line 36 If I do the same with the V2.04 all works fine from folder

Re: 2.1 Console: Class 'AppShell' not found

2012-02-04 Thread heohni
/AppShell.php) and doesnt fall back to the core one anymore On 4 Feb., 20:38, heohni heidi.anselstet...@consultingteam.de wrote: Hi, after downloading the V2.1 and calling first time the 'cake bake' in the console I get this error: PHP Fatal error:  Class 'AppShell' not found in D:\SVN

Re: 2.1 Console: Class 'AppShell' not found

2012-02-04 Thread heohni
dereurom...@googlemail.com wrote: AppShell as well as AppController, AppModel etc is required to be placed in your app now. so it must exist there (/APP/Console/Command/AppShell.php) and doesnt fall back to the core one anymore On 4 Feb., 20:38, heohni heidi.anselstet

Re: 2.1 Console: Class 'AppShell' not found

2012-02-04 Thread heohni
error... On 4 Feb., 21:45, heohni heidi.anselstet...@consultingteam.de wrote: Even with this: // app/Console/Command/AppShell.php //App::uses('Shell', 'Console'); App::uses('Shell', 'Console/Command'); I get still the same error on 'cake bake' On 4 Feb., 20:45, euromark dereurom

Ajax Pagination

2012-01-25 Thread heohni
Hi, is there anybody out there who has a ajax pagination working and willing to talk about it? I am looking for an solution to have a page with search results and some filter options (checkboxes). Whenever a checkbox is checked I would like to update the search results via ajax. Thanks!! --

Re: Question about routing

2012-01-20 Thread heohni
Believe me I did, but in this case I didn't find a solution which worked for my need. On 19 Jan., 15:44, Thiago Belem cont...@thiagobelem.net wrote: Check the Router class on the documentation. -- Thiago Belem, Desenvolvedor WEB Enviado do meu Android Em 19/01/2012 11:28, heohni

Question about routing

2012-01-19 Thread heohni
Hi, from a relaunch I have many old links in google which all land on a 404 page and I would like to redirect them to the new homepage. What do I have to do when I want to catch all of these links with this file name: /search.php?anylongquerystring to redirect it to the homepage? I tried this:

Basic question about Auth and blog tutorial

2012-01-04 Thread heohni
Hi, I asked this just some days ago, but I am still stuck with this: I have a web project where I want to give the admin a admin area where he can login and add/edit/delete news. The basic code for this I took from the cake book given with the blog tutorial. I having now a problem with the AUTH

Re: google webmastertools

2012-01-04 Thread heohni
Sorry, but this is not changing anything. I still see the login form without any chance to login... On 4 Jan., 11:55, AD7six andydawso...@gmail.com wrote: On Jan 4, 7:19 am, baretong bareto...@gmail.com wrote: last week some one said that, that couse of my debug 0 so errorcode populate

Re: Basic question about Auth and blog tutorial

2012-01-04 Thread heohni
Sorry, this is not changing anything :-( I am still at the same point. I really wonder why, haveing AUTH and a controller with no allowed functions can't be anything special? On 4 Jan., 12:45, Clint ctf...@student.monash.edu wrote: Hi, i believe because you have the authorize variable set to

Re: Basic question about Auth and blog tutorial

2012-01-04 Thread heohni
OK I found it: I had to remove the beforeFilter from my post controller and needed to change my isAuthorized function within the post controllere to this: public function isAuthorized($user) { if (parent::isAuthorized($user)) { return true; } if

Function isOwnedBy

2012-01-04 Thread heohni
HI, I found this function within the 2.0 book and thought that this is quite nice so I implemented it. I my Post Controller I have public function isAuthorized($user) { if (parent::isAuthorized($user)) { return true; } if (in_array($this-action, array('edit',

Question about logic

2012-01-02 Thread heohni
Hi, I have a page, where I want to display my blog posts by calling a requestAction to a function called frontindex() function. public function frontindex() { $all = $this-Post-find('all', array('order' = 'created DESC')); $this-set('posts', $all); return $all; } I am

Question about posts index and auth issue

2012-01-02 Thread heohni
Hi, I have a page, where I want to display my blog posts by calling a requestAction to a function called frontindex() function. public function frontindex() { $all = $this-Post-find('all', array('order' = 'created DESC')); $this-set('posts', $all); return $all; } I am

Re: Question about posts index and auth issue

2012-01-02 Thread heohni
But now I not a step further? Does anyone has a hint for me? -- 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

Error when sending emails

2011-12-22 Thread heohni
Hi, when I send an email I get this errors: Warning (2): array_map() [http://php.net/function.array-map]: Argument #2 should be an array [COREcake/libs/controller/components/email.php, line 583] Warning (2): implode() [http://php.net/function.implode]: Invalid arguments passed

cake2: question about caching

2011-12-16 Thread heohni
Hi, I have an element like this: ?php echo $this-element('tabelle', array('cache'=array('time'='+1 day','key'='tab'))); ? and inside this element I call ?php $results = $this-requestAction('soap/tabelle'); ;? For some reason the page is always doing the soap request and I thought I can avoid

Re: cake2: question about caching

2011-12-16 Thread heohni
Hi,, so you mean like this: ?php echo $this-element('tabelle', array(), array('cache' = array('config' = '+1 day', 'key' = 'tab'))); ? Funny, but this is hiding the complete output, my page is empty? On 16 Dez., 16:35, Tilen Majerle tilen.maje...@gmail.com wrote: 3rd parameter in element

Re: CakepHP 2.0 plugins no longer cache in elements

2011-12-16 Thread heohni
If I put this into bootstrap: Cache::config('short', array( 'engine' = 'File', 'duration' = '+10 hours', 'path' = CACHE, 'prefix' = 'long' )); and in my view: ?php echo $this-element('tabelle', array(), array('cache' = array('key' = 'tab', 'config' = 'long'))); ? I don't get any

Re: cake2: question about caching

2011-12-16 Thread heohni
2011/12/16 heohni heidi.anselstet...@consultingteam.de Hi,, so you mean like this: ?php echo $this-element('tabelle', array(), array('cache' = array('config' = '+1 day', 'key' = 'tab'))); ? Funny, but this is hiding the complete output, my page is empty? On 16 Dez., 16:35, Tilen

Re: cake2: question about caching

2011-12-16 Thread heohni
'long' in your view for me, in cake 2.0.4 cache works fine ! -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2011/12/16 heohni heidi.anselstet...@consultingteam.de if I put this into bootstrap:  Cache::config('short', array(     'engine' = 'File',     'duration' = '+10 hours

photo gallery

2011-12-15 Thread heohni
Hi, has anyone ever used/build a photo gallery management for cake? Does anyone knows a good source or a script that works well with cake? -- 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

Cake v2 how to parse a xml file?

2011-12-13 Thread heohni
Hi, I came from this article: http://bakery.cakephp.org/articles/fahad19/2008/08/26/parsing-xml-files-with-cakephp But under v2 everything is so new to me. And I never workd with cake and xml before, so I am a bloddy beginner in this: App::import('Xml'); should be now App::uses('Xml', 'Lib');

How to use AUTH on posts, but not on any other controllers/actions?

2011-12-12 Thread heohni
Hi, I started my first cake v2 project and started with the blog tutorial. It works fine so far, but now I want to setup my home page for this project. What do I have to do, when I want that everybody can see the homepage (layout/default.ctp) but the login only shows up, when someone enters /

Router::connect wildcard?

2011-12-12 Thread heohni
Hi, I often get an 404 error as the google bot try to reach a irl like this: search.phploc=0cat=0price=0keyword=pageID=70limit=obj_id=1376bookmark_done=1LID=5 I don't know how google does this url, as this way a) it doesn't exit on my page and b) it makes no sense and c) its wrong syntax... Can

Re: v2.0.4 Console error message on mkdir?

2011-12-09 Thread heohni
oh my god!! How blind i am?! Thanks!!! On 8 Dez., 17:32, AD7six andydawso...@gmail.com wrote: On Dec 8, 5:05 pm, heohni heidi.anselstet...@consultingteam.de wrote: Hi, Welcome to CakePHP v2.0.4 Console --- App : MyName

v2.0.4 Console error message on mkdir?

2011-12-08 Thread heohni
Hi, Welcome to CakePHP v2.0.4 Console --- App : MyName Path: C:\Users\MyName\ --- What is the path to the project you want to bake? [C:\Users\MyName\myapp] cd /D

Re: Validation rules - what a nightmare...

2011-12-06 Thread heohni
Hi! I do not work with confirm password fields. Just on a simple save routine, when I want to register a user, I need to check the password fields that's a) not empty and b) within a between range I can't belive that other programmers work different? How do they validate a user register form?

Validation rules - what a nightmare...

2011-12-03 Thread heohni
Hi folks! Whats wrong here? var $validate = array( 'ben_name' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyName') ), 'username' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyEmail', 'required' = true,

Re: Validation rules - what a nightmare...

2011-12-03 Thread heohni
So it should be this way? 'password' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyPassword', 'required' = true, 'allowEmpty' = false, 'last' = true), 'between' = array('rule' = array('between', 6,15), 'message' = 'ToShortPassword', 'last' = true)

How can I debug an ajax login call?

2011-12-02 Thread heohni
Hi, I cannot login into my users area and I am using a ajax form: function login() { Configure::write('debug', 2); $this-layout = 'ajax'; $this-RequestHandler-isAjax()) { if($this-Auth-user()){ This is always wrong and I don't see a way

Set auto login data

2011-12-01 Thread heohni
Hi, when I want to add a new user, I want to add an auto login value for username and password. The user is entering some data into a form which I can validate and before I do the if ($this-User-save($this-data)) { I need to set the fields for username and password, right? I tried:

How to track the referer when error 404 happens?

2011-11-22 Thread heohni
Hi, I using this app_error handler: ?php class AppError extends ErrorHandler{ function __construct($method, $messages) { Configure::write('debug', 2); parent::__construct($method, $messages); } function _outputMessage($template) {

Re: How to track the referer when error 404 happens?

2011-11-22 Thread heohni
;         } On 22 Nov., 11:54, AD7six andydawso...@gmail.com wrote: On Tuesday, 22 November 2011 11:45:42 UTC+1, heohni wrote: Hi, I using this app_error handler: ?php class AppError extends ErrorHandler{     function __construct($method, $messages) {         Configure

routing and seo = changing language

2011-11-21 Thread heohni
Hi, I am using this router rule to change languages: Router::connect('/lng/:lang', array('controller' = 'p28n', 'action' = 'shuntRequest', array( 'lang' = '[a-z]{3}' ))); What do I have to do, if I want to add a rule like this: Router::connect('/this-is-a-special-link.html',

Re: routing and seo = changing language

2011-11-21 Thread heohni
And another question: I would like to route this path: domain.com/search-in/categoryname/ categoryId to this domain domain.com/items/search/cat:8 means controller=items, action=search ... but how can I pass the cat: 8 where the number 8 is a variable number? -- Our newest site for the

How to recognize 404 Errors and send an email when this error happend?

2011-11-21 Thread heohni
Hi, when I am in live mode I would like to keep controll over the 404 errors, as we replacing an existing website and I don't know 404 errors may happen because Google has links indexed which are not valid anymore. Therefore I would like to send an email to me with the current referer link when

redirect with # does not work in Opera and IE but in FF and Chrome?

2011-11-18 Thread heohni
Hi, I am using this redirect: $this-redirect(array('controller' = 'pages', 'action' = 'display', '', '#'=$this-params['pass']['0'])); But it seams that IE and Opera can not handle this? in FF and Chrome I get redirected to www.domain.com/#12345 But in IE and Opera I only have www.domain.com in

Internal Error with routing?

2011-11-17 Thread heohni
Hi, I am using these routes locally without any problems: Router::connect('/c/:who', array('controller' = 'newsletter', 'action' = 'cancel')); Router::connect('/n/survey', array('controller' = 'newsletter', 'action' = 'survey')); Router::connect('/n/surveyfinal', array('controller' =

Re: Internal Error with routing?

2011-11-17 Thread heohni
Hi, just to add this: CakeRoute Object ( [keys] = Array ( [0] = who ) [options] = Array ( ) [defaults] = Array ( [controller] = newsletter [action] = index [plugin] = ) [template] =

Help! Validation does not work, strange thing!

2011-11-16 Thread heohni
Hi, I have a working contact form on my project and I am about just to use another form within another controller. So I copied all from my contact model into my newsletter model: ?php class Newsletter extends AppModel { var $name = 'Newsletter'; var $useTable = 'newsletter';

Re: Having layout breaking because of a whitespace?

2011-11-13 Thread heohni
considered bad practice to use tables for layout. You should easily be able to make a 3 column layout supported across browser without any tables. -- Mike Karthauser Brightstorm limited Tel: 07939252144 On 12 Nov 2011, at 13:40, heohni heidi.anselstet...@consultingteam.de wrote: Hi

Re: How to cache certain data from being loaded everytime a request is made

2011-11-12 Thread heohni
?= $this-element('navigation',array('cache'=array('time'='+1 year','key'='nav')));? -- 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

Having layout breaking because of a whitespace?

2011-11-12 Thread heohni
Hi, in default.ctp: table width=100% cellpadding=0 cellspacing=0 tr td class=left_content?= $this- element('navigation',array('cache'=array('time'='+1 year','key'='nav')));?/td td class=container The element start in line 1 with: ?php $listCats = ''; $cats =

Re: Validation rules question

2011-11-12 Thread heohni
What do you mean? 'ben_email' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyEmail','required'= true), 'email' = array('rule' = array('email', true), 'message' = 'SyntaxEmail'), 'unique' = array('rule' = 'isUnique', 'message' =

Re: Paginator Links, need urgent help

2011-11-11 Thread heohni
Great Thanks!! On 10 Nov., 18:06, Andras Kende and...@kende.com wrote: You might want to add $options['direction'] as: ?php echo $this-Paginator-sort($text, 'OBJ_PREIS', array('direction' = 'desc'));? Andras Kende http//www.kende.com On Nov 10, 2011, at 9:23 AM, heohni wrote: Hi

Email template doesn't work

2011-11-11 Thread heohni
Hi, this way my email template looks like: ?php __('New Nesletter'); ?br / ?=$this-data['News']['email']?br / ?php __('Date:'); ? ?=date('d.m.Y H:i');? This email arrives in 3 lines = perfect! But this template puts all into one line: ?php __('Following data was sent:');? ?php

Validation rules question

2011-11-11 Thread heohni
Hi, var $validate = array( 'ben_name' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyName') ), 'ben_email' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyEmail'), 'email' = array('rule' =

Paginator Links, need urgent help

2011-11-10 Thread heohni
Hi, I really don't get it sorted out... my degault sort direction is ASC in my view I have this: ?php $sortDir = $paginator-sortDir(); $text = ($sortDir == 'asc')?__('getting higher', true):__('getting lower', true); ? ?php echo

Multilingual Projects and Jquery

2011-11-09 Thread heohni
Hi, I have a multilingual project and I am using the P28n and ?php __('text'); ? methods. But I am also doing a lot of Ajax stuff and from time to time I have the need to output text via my javascript files. Is there anyhow a way / a trick ( how to use the cakephp translation () in my js

Ho to register a newsletter link and redirect to a popup?

2011-11-08 Thread heohni
Hi, I would like to send a newsletter with a link like domain.com/n/ 12345 I added a route like Router::connect('/n/*', array('controller' = 'newsletter', 'action' = 'index')); where I count the click. Now I want to redirect the user to the homepage together with a new parameter passed, as I

Is there a kind of $this-validationErrors for auth errors?

2011-10-17 Thread heohni
I am trying to do a ajax login and would need to catch up the errors. Is there something like $this-validationErrors for the Auth method? Does anybody know a good tutorial for doing a jquery login? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out

Re: Translate model validation question

2011-10-14 Thread heohni
, line 88Query: _validationRules On 14 Okt., 05:00, Dr. Loboto drlob...@gmail.com wrote: http://book.cakephp.org/view/1230/Localization-in-CakePHP Reload invalidate() method. On 13 ÏËÔ, 18:38, heohni heidi.anselstet...@consultingteam.de wrote: Hi, I have this in my app_model.php public

Email - Controller - line break?

2011-10-14 Thread heohni
Hi, $msg .= __('New subscription:', true); $msg .= $this-data['News']['email']; $msg .= date('d.m.Y'); ... $this-Email-sendAs = 'both'; ... if($this-Email-send($msg)){} How can I get a line break behind each $msg line? Is there the only way in using a template? -- Our newest site for

how can I validate this field?

2011-10-14 Thread heohni
Hi, my email field has this rules: 'ben_email' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyEmail'), 'email' = array('rule' = array('email', true), 'message' = 'SyntaxEmail'), 'unique' = array('rule' = 'isUnique', 'message' =

Re: how can I validate this field?

2011-10-14 Thread heohni
I found another strange thing: this is the complete model validation: var $validate = array( 'ben_name' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyName') ), 'ben_email' = array( 'required' = array('rule' = 'notEmpty',

Translate model validation question

2011-10-13 Thread heohni
Hi, I have this in my app_model.php public $validate = array(); public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); $this-_validationRules(); } And this way I have my model unction _validationRules() {

Re: General question about default.ctp and its controller

2011-10-12 Thread heohni
Hi, this brings me in big trouble. When I have to reload the form because of a form validation error, the captcha shows the same question, but the answer within the session is already renewed. I use a math captcha like 2+3=? When I open my form I see for example 2+3 on submit I have for

Re: General question about default.ctp and its controller

2011-10-11 Thread heohni
Thanks!!! It works perfect!! -- 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

Re: Pagination sorting question

2011-10-11 Thread heohni
Great!! 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

General question about default.ctp and its controller

2011-10-10 Thread heohni
Hi, I am working on my default.ctp, where I included an element with an contact form which is using a captcha code. On every page, regardless where I am on my project, I can click on the header contact link and open a popup with my contact form. This contact link is located in my default.ctp But

Got a problem with delete()

2011-10-06 Thread heohni
Hi, my users are able to save items to cart, and when I want to delete them, I do a find to find the items id first: $prid = $this-Bookmark-find('first', array('conditions' = array('mez_fkid_ben_id = '. $this-Auth-user('ben_id'), 'mez_fkid_obj_id = '. $id))); the passed $id is the item id. And

Best practice? Building a search string with multiple options

2011-10-06 Thread heohni
Hi, I have a search where you can select various filters. I wonder how I should build the params to pass them to the search function. I currently use this way: /search/cat:x/ = category:id /search/city/ber:x or /cityreg/x = city/suburb:id /search/price:x/ = price:from value /search/ref:x/ =

Re: Ajax Link - How to exchange/toogle a link?

2011-10-04 Thread heohni
Hi, yes I thought about this poss. But I thought I could find a solution based on cake and not using jquery for it. But thanks for sharing!! -- 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

Re: truncate works wrong?

2011-10-04 Thread heohni
view: div class=info_col ?=$this-Text-truncate($data['Gesamtobjekt'] ['OBJ_UET_WERBETEXT'], 150, array('ending' = ' ...', 'exact' = true, 'html' = true))? /div source: div class=info_col This apartment is situated in one of the most beautiful residential complexes of Santa Ponsa and has a

Fat Model Skinny Controlller? Is this really correct?

2011-09-29 Thread heohni
Hi, the more I work with Cake, the more I use google and read a lot about cake. And again and again I read about the fat model logic. I tried this for one model in my current project and it works well for me. But is this really best practice? How do YOU work in big projects? Please let me know

Ajax Link - How to exchange/toogle a link?

2011-09-29 Thread heohni
Hi, I have this part of code in my view div class=add_details id=dynbookmark ?php if($this-Bookmark-checkBookmarkStatus($objects[0] ['Gesamtobjekt']['OBJ_ID']) == 'bookmark'){ $image = 'bookmark.png'; $text = __('Immobilie merken', true);

Pagination and delete an item in a paginated list with jquery

2011-09-29 Thread heohni
Hi, I have a paginated list and want to remove single items out of it with jquery. Is there any way I can update the pagination info for the paginator as the pagination needs to count one item less and needs to change the counting and paging accordingly? Thanks! -- Our newest site for the

Problem with linking a pdf at a outside webroot folder

2011-09-28 Thread heohni
Hi, I have this structure: controller model pdf webroot In this pdf folder are my files and I am not able to change this folder location as it gets filled by and external CMS Service. I need now to link to these pdfs and my link outputs me something like that:

Project logic question about AUTH

2011-09-28 Thread heohni
Hi, I am working an a project where you can see products. Products can be saved in a kind of bookmark list. This bookmark list is either valid per session, or if the user wants, he can setup an account and save the bookmark list for longer time. I need the auth functions only on a certain point.

How to pagine a custom sql statement?

2011-09-28 Thread heohni
Hi, I have to use a own sql statement: $results = $this-Bookmark-query(' SELECT DISTINCT OBJ_NUMMER FROM Gesamtobjekt WHERE obj_id IN ($variableIDs) AND eia_id IN (SELECT les_fkid_eia_id FROM Link_eia_static) '); Is

question about fat model skinny controller

2011-09-28 Thread heohni
Hi, I was reading about it and in my case I like the idea. I am just changing my logic to work this way. But I just come across this question: How about the pagination, how do I do this? function performSearch($id = null){ // creating all conditions return $this-paginate(); } But this

Can't get the required class in form

2011-09-26 Thread heohni
Hi, I have this in my model, var $validate = array( 'name' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyName', 'required' = true) ), but I don't get the class 'required' added: only: div class=row label for=SmscallbackNameName/label input

Pagination sorting question

2011-09-23 Thread heohni
Hi, I have these in my table header ?php echo $this-Paginator-link($html- image('dpdown.jpg'),array('sort' = 'OBJ_PREIS', 'direction' = 'DESC'), $options = array('escape' = false)); ? ?php echo $this-Paginator-link($html- image('dpdownup.jpg'),array('sort' = 'OBJ_PREIS', 'direction' =

truncate works wrong?

2011-09-23 Thread heohni
Hi, I am using this ?=$this-Text-truncate($data['object']['TEXT'], 150, array('ending' = '...', 'exact' = false))? to return text passages and I want to cut them after a word. Somethings it works fine, somethimes not: Example endings: The common courtyard leads to the main entrance of th... The

Re: truncate works wrong?

2011-09-23 Thread heohni
No there is no html and the add of the html=true is not changing anything On 23 Sep., 10:09, O.J. Tibi ojt...@gmail.com wrote: I'm not sure if this works, but has your text been marked up with HTML? You might want to add 'html' = true to your list of options. -- Our newest site for the

Local path problem

2011-09-23 Thread heohni
Hi, I want to work with this resizer helper: http://harake.wordpress.com/2010/02/02/the-resize-helper-to-resize-images-on-the-fly/ And I have now problem to get the path right for my windows wamp localhost I thought it should be: Configure::write('versions_store',

Call paginator without limit option (special case)

2011-09-23 Thread heohni
Hi, I have to query my DB and need to use the paginator function. I setup all conditions via $this-paginate() All fine so far! Now I have the problem, that I need to repeat the query within the same function, with the same options BUT with no limit. Is that possible? I could do a find, but

Re: Call paginator without limit option (special case)

2011-09-23 Thread heohni
Oh, ok... I will try... On 23 Sep., 13:17, Xoubaman xouba...@gmail.com wrote: Put your conditions in an array, then use the array for both pagination and find. $condtions = array(...); $this-paginate['conditions] = $conditions; $this-paginate(); $this-Model-find('all',

How to display files from a folder outside webroot?

2011-09-22 Thread heohni
Hi, if(is_file('../CMS_images/'. this way I can check if a file is there. But how can I display this image in a view? /CMS_images /controller /models etc... /webroot PS: I do not need to upload images, just display them... Any ideas? -- Our newest site for the community: CakePHP Video

Fatal error: Cannot use string offset as an array

2011-09-21 Thread heohni
Hi, strange, I do a find and I can debug my results perfectly. Then I do a $this-set('results', $results); and I can debug() it again in the view. Then I need to do a foreach like foreach($results as $key = $object): debug($object); The array looks like Array ( [Gesamtobjekt] = Array

Re: Undefined property Component::$Session

2011-09-20 Thread heohni
hours to find an example where the same problem happend, but never found something helpful... Is there anybody out there who can see what I am doing wrong? Thanks heohni -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new

Re: Undefined property Component::$Session

2011-09-20 Thread heohni
as well. Kind regards Thomas Am Montag, den 19.09.2011, 10:11 -0700 schrieb Miles J: Which Cake version are you using? Also on a side note, stop using PHP4 syntax. On Sep 19, 8:33 am, heohni heidi.anselstet...@consultingteam.de wrote: Oh that's cool! I didn't know this bin

Question about db table structure and its model

2011-09-20 Thread heohni
Hi, I have a table where I have certain content items per row. Together with this content items I have a translation ID per content item. That means I have a table row like this: item_area1 | item_area1_translationId | item_area2 | item_area2_translationId | When I create now my model for this

<    1   2   3   >