Re: Conditional CSS Includes

2009-12-21 Thread Piotr Kilczuk
Hello, How can i include a CSS file with browser specific conditions, below is the output i wish to achieve with $html-css method: But why?! ;)  !--[if lt IE 8]link rel=stylesheet href=css/ie.css type=text/ css media=screen, projection![endif]-- !--[if lt IE 8]?php echo $html-css(...)

Re: Image on database - How can I display it?

2009-12-19 Thread Piotr Kilczuk
Hello, I have this problem. I had follow this guide ( http://my.opera.com/Cakephp/blog/file-upload-with-cakephp ) for Upload file and store it on database. I need to store photo and file, so I thinked that is good for me! But now I want display this photo on the screen like a gallery, and

Re: CakePHP and subdirectories

2009-12-19 Thread Piotr Kilczuk
Hello, Apologies if this is a naive question, I'm not too familiar with using mod_rewrite. Thanks in advance for any advice! I think you can simply use config/routes.php for this task, then dirname would be passed as named parameter. see http://book.cakephp.org/view/46/Routes-Configuration

Re: Open action in popup

2009-12-17 Thread Piotr Kilczuk
Hello, @Piotr I have tried using target=_blank as an attribute of the form tag. It does what you would expect - it opens the result in a new window. I then tried target=javascript:popup() where popup is a javascript function that open a popup, but this seems to be ignored by the browser.

Re: Open action in popup

2009-12-16 Thread Piotr Kilczuk
Hello, C http://www.w3schools.com/tags/tag_form.asp / target attribute. Regards, Piotr Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To

Re: How to overload app controller functions in child controller

2009-12-16 Thread Piotr Kilczuk
Hi, Your able to use beforeFilter() in child classes, as long as you call the parent. function beforeFilter() { parent::beforeFilter(); } From the OOP point of view, engine could even use __construct() in Cake controller as well, but beforeFilter() is of course better for that... Regards,

Re: Model Uses Question

2009-12-16 Thread Piotr Kilczuk
Hello, I have my User Model/Controller and a Setting Model/Controller Settings model has var $useTable = 'User'; since its using the User db and does not have its own spot in the db If the model does not use db table, set $useTable to false. Settings Controller has var $uses =

Re: How to run CRON job with the setup on a virtual server?

2009-12-15 Thread Piotr Kilczuk
Cześć Ania, I would like to set a CRON job for my application. In my server administrative panel I want to define the path for the CRON job. The problem is, that I cannot give path as URL (like /mysite.com/users/ some_cron_function), but I have to specify physical file that is on a server

Re: visibility/change varijable within controller

2009-12-15 Thread Piotr Kilczuk
Hello, class ActivitiesController extends AppController {        var $name = 'Activities';        function index(){                $year = 2009;                $month = 12;                $day = 15;        }        function add(){        } }        how can I see variables $year,

Re: Cache Help

2009-12-15 Thread Piotr Kilczuk
Hello, How do i make sure that the browser does not cache elements, pages. I have the cache no cache blocks in view, cache helper in app_controller, var cacheAction = false. tried everything but nothing seems to work. How about

Re: Excessive resource usage

2009-12-15 Thread Piotr Kilczuk
Hello, I'm getting lots of Excessive resource usage messages from my server, like the one you can see below: What PHP version is it, guess 5.3? Did you try to set recursive to -1 wherever possible? Regards, Piotr Check out the new CakePHP Questions site http://cakeqs.org and help others

Re: cakephp case insensitive controller name

2009-12-13 Thread Piotr Kilczuk
Hello, Do you use closing ? tag in your classes? yes I do use it. My suggestion is to stop doing that :) There is no profit, but it can break your code. I read on one post that you can't have whitespace before it (but newlines are OK). Still, that doesn't seem to be the problem. _AFTER_

Re: cakephp case insensitive controller name

2009-12-12 Thread Piotr Kilczuk
Hello, I recently moved my site from a windows server to a linux server. I have an admin section to my site (under plugins). It works fine if I browse to: So what you describe is possibly related to the fact, that filenames are case sensitive under Linux. I don't know however why does this

Re: shared host setup

2009-12-11 Thread Piotr Kilczuk
Hello, No such luck! Any ideas ? As for me, no... What I'd do is track which exact case causes that empty var. It might be some buggy component for instance. But no idea why that component works on you test environment... If you have totally no idea what is going on, feel free to drop me an

Re: shared host setup

2009-12-09 Thread Piotr Kilczuk
Hi, worked it out. heres the code i added Debugger::dump($component); Debugger::dump($object); Debugger::dump($parent); So is your project working now? Regards, Piotr Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You

Re: shared host setup

2009-12-08 Thread Piotr Kilczuk
Hello, Thanks for your reply, i have cleared the cache and tired setting debug to 0 but the error is still there but not showed because debug is set too zero. I haven't seen such a bug yet :) What I'd do, is dig into the Cake core a little.

Re: CakePHP config issue

2009-12-06 Thread Piotr Kilczuk
Hello, Error: Database table cakephps for model Cakephp was not found. I am not sure to know why I should have a cakephps table... How many column, etc Any help around ? Don't create CakephpsController. This is an url issue. What are you trying to access, http://localhost/cakephp/ ?

Re: CakephpController could not be found

2009-12-05 Thread Piotr Kilczuk
Hello, I have decided to create my new website with CakePHP. This experience is already stopped. when I open the page http://localhost/cakephp/ I have put the cakephp files in C:\xampp\htdocs\CakePHP Seems like you have put it in htdocs... What's the exact (absolute) path to app/webroot?

Re: shared host setup

2009-12-05 Thread Piotr Kilczuk
Hello, I am trying to put a site on a shared host. after copying the code on the server and editing the htaccess files the default cake page says everything is ok. but as soon as i try to access my controllers i get Fatal error: Cannot access empty property in public_html/cake/libs/

Re: http://localhost/ shows nothing cakephp related

2009-12-05 Thread Piotr Kilczuk
Hello, What should I do? If you really want to have your CakePHP app at http://localhost/, adjust the Apache DocumentRoot to c:/wamp/www/cake_1.2.5/app/webroot/ (restart Apache afterwards). The better way, however, is to create a virtualhost for each of your cakeapp, for example

Re: Using different database connections for different database actions

2009-12-05 Thread Piotr Kilczuk
Hello, Since nobody answered you yet, l'll try to answer your question... I'd like to find out if anyone can point me either to an online article or describe whether it is possible to setup CakePHP to use different database connections for different MySQL actions. eg one connection for all

Re: Converting SQL query into CakePHP using self join

2009-12-05 Thread Piotr Kilczuk
Hello, I need to convert the following: SELECT * FROM `laps` WHERE `id` = ( SELECT `id` FROM `laps` AS `alt` WHERE `alt`.`user_id` = `laps`.`user_id` ORDER BY `lap_time` ASC LIMIT 1 ) ORDER BY `lap_time` ASC LIMIT 10 Really? :) OK, sth like that: $this-Lap-find('all', array(

Re: Self Join Problem

2009-12-05 Thread Piotr Kilczuk
Hello, You can see, that the self join relation could not be dissolved. So, I could not display the name of the precursor as I want. Where is my mistake. How about setting $this-Project-recursive to a higher value? Regards, Piotr Check out the new CakePHP Questions site http://cakeqs.org

Re: Complex query issue, grouping and ordering

2009-12-05 Thread Piotr Kilczuk
Hello, Which 'seems' to be working, altho the 'laptime' value is in a [0] key outside of the [Lap] array. Is this to be expected or am I doing something wrong? Unfortunatelly this is how it works, aggregate fields will have a numeric key. Maybe this can be changed with some SQL alias hack,

Re: cakephp htaccess make other application is not reachable

2009-12-05 Thread Piotr Kilczuk
Hello, i would like to have solution that fully independent. so i think modify rewriterules is the best. so far i did not find any rewrite rule that work for this situation. What kind of server is that? Or maybe you already figured it out yourself? Regards, Piotr Check out the new CakePHP

Re: Accessing models

2009-12-05 Thread Piotr Kilczuk
Hello, I have another model that keeps giving me this error. Fatal error: Class 'StatisticsUser' not found in ... the problem that I think I'm having is that this is the join table for users and statistics. how do I write to this table properly thru cake? So do you have that class

Re: cakephp htaccess make other application is not reachable

2009-12-01 Thread Piotr Kilczuk
Hello, now i want to install phpBB on http://www.mydomain.com/phpBB, but when i access that url, it always handle by cakephp application. There are many solutions to this, among others: * modify rewriterules * put phpbb installation in app/webroot/phpBB * make symlink to phpbb installation in

Re: How use AUTH for two sections (admin eshop, client admin)

2009-11-30 Thread Piotr Kilczuk
Hi Petr, is any idea. How use AUTH for two admin sections? First: Admin section, when user log. can add new products, and other informations. Second: Client admin: user log. can shopping, do order, check order I must use ACL or role in user and how i can do, when client login can view

Re: Translate behavior and ordering/searching

2009-08-16 Thread Piotr Kilczuk
Hi, I had the same problem couple weeks ago. The paginationCount function doesn't work well with i18n tabel. It gets confused on table name. Luckily we can overwrite this function to return us a proper number of records. It's a bit tricky I think but it works well for me. Tremendous! You

Re: Translate behavior and ordering/searching

2009-08-14 Thread Piotr Kilczuk
Any idea how can I make for example pagination use the current locale in a model that $actsAs Translate? OK, got through a part of it, but sadly paginator count doesn't work... What I have in find conditions is: $conditions['I18n__title.content LIKE'] = '%' . $this-data['Article']['title'] .

Re: Unknown top margin in layout

2009-08-13 Thread Piotr Kilczuk
Hello, WHERE this margin can be? I suggest you installed Firebug, great for such problems. Regards, Piotr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: index.php of cakephp's core

2009-08-01 Thread Piotr Kilczuk
Hello, i'm using apache2.2 + php5.2 and cake_1.2.3.8166. When i try to acess localhost/cake_1.2.3.8166, folders and archives which are inside of the cake appear, and index,php is not shown. However, If a click on index.php, this page is shown correctly. Why isn't index.php called

Re: Display months in datetime fields in german

2009-07-28 Thread Piotr Kilczuk
Hello, with ger it didn't work but when I changed the folder name to deu (and also the value in Config.language of course) it worked like a charme. For some reason it seems that it has(!) to be named deu anyway, thanks a lot! That's good. German has two ISO-639-2 codes, I thought you

Re: using simple HTML form with cakePHP !

2009-07-28 Thread Piotr Kilczuk
Hello, How does the POST request look like then? Regards, Piotr --~--~-~--~~~---~--~~ 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

Re: Remove Strip Welcome to CakePHP Console from shell output

2009-07-28 Thread Piotr Kilczuk
Hi, Hi Piotr, Try to look into: cake/console/libs/shell.php and change the function _welcome , or just simply comment out the $this-_welcome() method call in the function startup() Thanks, that was easy. :-) I extended _welcome in my shell with no out/hr statements. Regards, Piotr

Re: Bypassing Security Salt

2009-07-27 Thread Piotr Kilczuk
Hello, I was wondering if anybody knows a way to bypass the salting that the Security component automatically gives to a password? The problem is that i have a database of old passwords and im converting the site into a CakePHP site, however when im trying to log in to the new site the

Re: Problem with HBTM tables. (included image)

2009-07-27 Thread Piotr Kilczuk
Hello, Excuse me, but, nobody has answer me. It's anyone here can help me?. tnx a lot. In this case I'm pretty sure that you have to define additional HABTM keys in TipoUsuario and Modulo - I mean: joinTable, foreignKey, associationForeignKey. Just get one model association working 1st, and

Re: Deleting items and their children if they belongTo

2009-07-27 Thread Piotr Kilczuk
Hi, I have baked a few controllers, models and views, but if I delete an item using threads/delete/3 is there an easy way of deleting all the posts (with an thread_id of 3) that belongTo the thread with an id of 3, which I have defined as hasMany posts, or do I need to do it manually? Yes:

Re: Display months in datetime fields in german

2009-07-27 Thread Piotr Kilczuk
Hello, is it somehow possible to display the months of a datetime field in a view in german? Sure. Set Config.language to ger and in app/locale/ger/LC_MESSAGES/default.po: msgid July msgstr Juli msgid June msgstr Juni etc. If you don't want to do it like this, just copy core form

Re: $_POST and Auth encryption

2009-07-21 Thread Piotr Kilczuk
Hello, I need your help for another one time :) I'm creating an Application with CakePHP and ExtJS. The problem that I have is that the ExtJS send the Data to CakePHP with the $_POST http methos and when I save new users to my database the password is not hashed with the default Auth hash

Re: Get current database host?

2009-07-21 Thread Piotr Kilczuk
Hello,  Is is possible to read the current database host programmatically (i.e. the value of $default['host'] from database.php)? Why not just use DATABASE_CONFIG::$default ? :) However, each Model instance will have the following method:

Re: Multiples lists of different tables :S

2009-07-21 Thread Piotr Kilczuk
Hello, How can I generate A valid JSON Format with JQUERY (AGAIn I tried alost all the tutorials on the web ,but still without solution :S ) But how do you want your JSON/XML to look like? I guess you don't like having 'Category' as a key, but pls supply us some examples of the desired

Re: Session between controllers. Works only in FF.

2009-07-21 Thread Piotr Kilczuk
Hello, I have spent more then a day on this issue and still no solution :( I am working on my first cake based project and i have a session problem. Currently using php session, security level low, session name is CAKEPHP. Check agent = false. In FF everithing works fine, but in other

Re: 404 Header

2009-07-21 Thread Piotr Kilczuk
Hello, i have a problem with my CakePHP app where the client needs me to return a valid 404 page together with a valid 404 http header incase of page not found, i have handled the 404 page through app_error but the problem is when i execute ( curl -I http://www.example.com/sdfsdfas ) on my

Re: CakePHP - updating models.

2009-07-21 Thread Piotr Kilczuk
Hello,                $this-News-id = $previousRecord['id'];                $this-News-position = $currentRecord['position'];                $this-News-save();                $this-News-id = $currentRecord['id'];                $this-News-position = $this-temp['position'];                

Re: Multiples lists of different tables :S

2009-07-21 Thread Piotr Kilczuk
Hello, Wot makes things harder in CakePHp is how to select records from a table depending on another one !! ill explain further. I got4 example 2 tables ::   1-Categories   2-Posts  I want to get all the posts records whom r in a specific category .  let's say that i want all the posts

Re: Distinguishing a new user from a returning user with an expired session?

2009-07-21 Thread Piotr Kilczuk
Hello, How can one distinguish between: 1. a new user coming to the site for the first time, and 2. a returning user whose session has expired? The returning user needs to be informed his session has expired. The new user should be allowed to continue on his merry way. Good question, I'll

Re: including snippets/code library in (all) controllers and components

2009-07-20 Thread Piotr Kilczuk
Hello, I find myself repeating myself with some simple code snippets i have functions for simple tasks that i tend to repeat often (like finding a unique filename from a directory and grabbing a files extension etc etc), I put these functions inside components that i have written as well as

Re: Model naming convention not working as documented in form input?

2009-07-20 Thread Piotr Kilczuk
Hello, echo $form-input('ChartsKpis.' . $kpi['Kpi']['id'] . 'kpi_colour_id'); However the resulting input has the format: input id=ChartsKpis2kpiColourId type=text value= name=data [ChartsKpis][2kpi_colour_id]/ It seems to have got the id correct; but the name attribute hasn't been

Re: 1 Account with Multiple Users?

2009-07-18 Thread Piotr Kilczuk
Hello, Is the built in auth mechanisms in CakePHP able to handle a single account that has multiple logins? I.E. Login Primary logs in on his dashboard clicks add user adds user Secondary. User secondary logs in with his user name and password but it is simply an alternative login for the

Re: how to integrate wordpress blog in cakephp

2009-07-17 Thread Piotr Kilczuk
Hello, hello friends i have ask this question already but no one reply i need urgent response for that i want to integrate wordpress blog in cakephp but i want to place outside the app folder so can anybody tell me how to do that.I try to place that in webroot folder but when i access this

Re: Help in search

2009-07-17 Thread Piotr Kilczuk
Hello, Can i get a tutorial for making the a search functionality. I have 3 types of users, each type have different table. I need to search the users with first name , lastnmae , phone number, compnay. Can anybody provide me the tutorial or structure. Iam very new in cake php. You don't

Re: home.ctp cannot be found when debug = 0

2009-07-17 Thread Piotr Kilczuk
Hello, Nothing interesting in app/tmp/logs? Regards, Piotr --~--~-~--~~~---~--~~ 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

Re: ambiguous routes

2009-07-16 Thread Piotr Kilczuk
Hello, I highly dislike working with routes, but there are few points where it can break. 1. What is the difference between the two rules you supplied? Any chance that the 2nd route will be ever used? 2. I suppose you use Router::connect not $Route-connect, just a typo here... 3. As far as I

Re: Associations - naming conventions

2009-07-16 Thread Piotr Kilczuk
Hello, I have a matches table that consist of a home_team and an away_team column. I also have a teams table with the team information so home_team and away_team are foreign keys referring to the particular id of teams. Unfortunately I can't seem to configure this with cakephp (the naming

Re: belongsto relationship not working

2009-07-16 Thread Piotr Kilczuk
Hello, I have successfully set up other belongsto relationships in this program but one does not work the model code is: class IrrigationEvent extends AppModel {    var $name = 'IrrigationEvent';    var $useTable = 'irrigation_events';    var $belongsTo = array(            'Field' =

Re: Associations - naming conventions

2009-07-16 Thread Piotr Kilczuk
Hello, Now I have a problem with the hasOne association. Users have a favorite club (favclub) which is a foreign key to the Clubs (contains id and name) table. How do I code that? So every user hasOne favclub (referring to clubs.id)? Thanks for much appreciated your help. This might be

Re: cakephp with javascript

2009-07-15 Thread Piotr Kilczuk
Hello, Anybody know how do call an javascript for popup window from .ctp hyperlink As usual? Just use 'javascript: popup()' as target, onclick attribute or bind an event to the proper element using JS. Regards, Piotr --~--~-~--~~~---~--~~ You received this

Re: cakephp with javascript

2009-07-15 Thread Piotr Kilczuk
Hello, Actually i want to know form validation as well. Model is confusing me ( i am a beginner). then i go for javascript validation is it possible? Possible, but you generally can't trust client-side JavaScript validation. I think that JS validation is even harder than the CakePHP built in

Re: Stop AJAX Request

2009-07-15 Thread Piotr Kilczuk
Hello, I have tried this out to understand the structure behind it but get Query: removeFavorite So it must be the below line, but what is the issue with this code? Why is it using the method as a query? $success = $this-Product-User-removeFavorite($id); I can't see what is wrong.

Re: Correct Way to save HTML code to database

2009-07-15 Thread Piotr Kilczuk
Hello, I am having a problem saving html code to a MySQL field using the saveAll method. Basically what is happening is that only half of the html is actually saved at times depending on the content. At other times it works fine. When the body is comprised of text everything works