Search Results

Search found 772 results on 31 pages for 'cakephp appmodel'.

Page 8/31 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Is there such a thing as Cakephp "user management" plugin script

    - by Toomas Neli
    is there anywhere such script that includes a cakephp user management part, view - registration form ( for example allowing to enter: first name, surname, email, user address, user phone number, last login date etc. ) sends confirmation to email - about registration inserts users data into mysql tables (users id, etc.) and blocks duplicate entries to users tables or does other similar tasks etc. if there is no such plugin then may be someone can send the custom made scripts

    Read the article

  • Cakephp Request data from other controller

    - by Swen
    Is it possible to request data from an other controller in cakePHP? For example, i created 2 folders in pages called search and update (both with a index.ctp) and a controller and model in the correct folders. Both pages are using a different db source, and i wnat to display some data from the search controller into the view of the update page.. Is this possble? Regards, Swen

    Read the article

  • IE Kills Session After Exporting CSV [CakePHP]

    - by OneBlueMidnight
    i have a web application that export CSV and i logged in as admin but what happened during the exportation the IE opens a new tab and export the CSV but what happens next when you click any of the link on the web app you will automatically logout! This only happen on IE. here is the header i used: header("Content-type:application/vnd.ms-excel"); header("Content-disposition:attachment;filename=".$this->filename); I am using cakephp 1.3.x.x TIA :D

    Read the article

  • Fields in CakePHP could not be referred by JQuery

    - by kwokwai
    Hi all, I have got a simple HTMl form with one field as follows: <input type="text" name="data['User']['user_id']" id="data['User']['user_id']" value="1"> $(document).ready(function(){ $("#data['User']['user_id']").mouseover(function(){ alert("hello"); }); }); The code couldn't work, I think it may be the name of the Input text field that caused the problem, but I don't know how to alter it because this is the naming convention in CakePHP.

    Read the article

  • coverting existin flash with cakephp website into mobile version

    - by jpramod4u
    How to convert the existing flash site into mobile version existing site in form of the cakephp frame work. We thought that html ,css,php,javascript may work all mobiles.We dont know exactly. Please tell us how many possible way to develop existing site into mobile version and also need to detect the from which browser the request is coming whether mobile browser or pc browser. The existing site link is :This site convert into mobile version

    Read the article

  • MeioUpload and phpThumb() does not exist error

    - by Cameeob2003
    I am currently using CakePHP v2.2.1 and MeioUpload 4.0 along with phpThumb() to try and generate image uploads and thumbnails for those images. If i set my $actAs = array() without the thumbsizes property everything is uploaded well, but when I add the following: 'thumbsizes' => array( 'small' => array('width' => 165, 'height' => 115), 'medium' => array('width' => 800, 'height' => 600) ), to generate thumbnails I get an error stating the following: "E:/xampp/htdocs/site/vendors/phpthumb/img/posts/image-name.jpg" does not exist I have tried several different methods of fixing this from around the web and nothing seems to work. I am new to cakephp so this may be an easy fix and I am just not connecting the dots to find the solution. Any help would be very much appreciated.

    Read the article

  • Cakephp Function in mode not executing

    - by Rixius
    I have a function in my Comic Model as such: <?php class Comic extends AppModel { var $name = "Comic"; // Methods for retriving information. function testFunc(){ $mr = $this->find('all'); return $mr; } } ?> And I am calling it in my controller as such: <?php class ComicController extends AppController { var $name = "Comic"; var $uses = array('Comic'); function index() { } function view($q) { $this->set('array',$this->Comic->testFunc()); } } ?> When I try to load up the page; I get the following error: Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'testFunc' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 525] Query: testFunc And the SQL dump looks like this: (default) 2 queries took 1 ms Nr Query Error Affected Num. rows Took (ms) 1 DESCRIBE comics 10 10 1 2 testFunc 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'testFunc' at line 1 0 So it looks like, instead of running the testFunc() function, it is trying to run a query of "testFunc" and failing...

    Read the article

  • CakePHP belongsTo relationship with a variable 'model' field.

    - by gomezuk
    I've got a problem with a belongsTo relationship in CakePHP. I've got an "Action" model that uses the "actions" table and belongs to one of two other models, either "Transaction" or "Tag". The idea being that whenever a user completes a transaction or adds a tag, the action model is created to keep a log of it. I've got that part working, whenever a Transaction or Tag is saved, the aftersave() method also adds an Action record. The problem comes when I try to do a find('all') on the Action model, the related Transaction or Tag record is not being returned. actions: id model model_id created I thought I could use the "conditions" parameter in the belongsTo relationship like this: <?php class Action extends AppModel { var $name = 'Action'; var $actsAs = array('Containable'); var $belongsTo = array( 'Transaction' => array( 'foreignKey' => 'model_id', 'conditions' => array("Action.model"=>"Transaction") ), 'User' => array( 'fields' => array('User.username') ), 'Recommendation' => array( 'conditions' => array("Action.model"=>"Recommendation"), 'foreignKey' => 'model_id' ) ); } ?> But that doesn't work. Am I missing something here, are my relationships wrong (I suspect so)? After Googling this problem I cam across something called Polymorphic Behaviour but I'm not sure this will help me.

    Read the article

  • CakePHP adding columns to a table

    - by vette982
    I have a Profile model/controller in my cake app as well as an index.ctp view in /views/profiles. Now, when I go to add a column to my table that is already filled with data, and then add the corresponding code to the view to pick up this column's data, it just gives me an empty result. My model: <?php class Profile extends AppModel { var $name = 'Profile'; } ?> My controller: <?php class ProfilesController extends AppController { var $name = 'Profiles'; function index() { $this->set('profiles', $this->Profile->find('all')); } } ?> My views printing (stripped down): <?php foreach ($profiles as $profile): ?> <?php echo $profile['Profile']['id']; ?> <?php echo $profile['Profile']['username']; ?> <?php echo $profile['Profile']['created']; ?> <?php echo $profile['Profile']['thumbnail'];?> <?php echo $profile['Profile']['account'];?> <?php endforeach; ?> Basically, the columns id, username, column, thumbnail always have been printing fine, but when I add a column called accountit returns no information (nothing prints, but no errors). Any suggestions?

    Read the article

  • cakephp - form for belongsTo Model

    - by user1511579
    I createt the following model to link 2 relational tables: class Ficha extends AppModel { //public $useTable = 'ficha_seg'; var $primaryKey = 'id_ficha'; var $name = 'Ficha'; var $belongsTo = array( 'Perigo' => array( 'className' => 'Perigo', 'foreignKey' => false, 'conditions' => 'Perigo.id_fichas = Ficha.id_ficha' ) ); } Now, i have a form that requires data from the class Ficha, and then is redirected to another ctp page where i will input the data for the table "Perigos". However, since i'm still a newbie in cakephp i'm having difficult building that second form to insert the data on the table "Perigos". Here goes the code i built at the moment related to the second form: FichasController.php (the method where is it supposed to save the data on the table "Perigos": public function preencher_ficha(){ if ($this->request->is('ficha')) { $this->Ficha->create(); if ($this->Ficha->Perigo->save($this->request->data)) { $last_id=$this->Ficha->getLastInsertID(); $this->Session->setFlash('Your post has been updated '.$last_id.'.'); //$this->redirect(array('action' => 'preencher_ficha')); } else { $this->Session->setFlash('Unable to qualquer coisa your post.'); } } } The preencher_ficha.ctp file with the form: echo $this->Form->create('Ficha->Perigo', array('action' => 'index')); echo $this->Form->input('class_subst', array('label' => 'Classificação:')); echo $this->Form->input('simbolos_perigo', array('label' => 'Símbolos:')); echo $this->Form->input('frases_r', array('label' => 'Frases:')); echo $this->Form->end('Finalizar Ficha'); Here i guess the create part is wrong, but i think i have errors too in the controller part.

    Read the article

  • Cakephp, JQuery JCarousel Lite, Error

    - by ion
    I am using the following code to make an unordered list into a carousel with jcarousel lite and jquery: <?php echo $this->Html->script(array('jquery-1.4.2.min','jquery.easing.1.1','jcarousellite_1.0.1.pack','jquery.mousewheel.min'), array('inline' => false)); ?> <?php echo $this->Html->scriptStart(array('inline' => false)); ?> $(document).ready(function() { $(".mouseWheelButtons .jCarouselLite").jCarouselLite({ btnNext: ".mouseWheelButtons .next", btnPrev: ".mouseWheelButtons .prev", mouseWheel: true, circular: false, start: 0, visible: 5, easing: "easein" }); }); <?php echo $this->Html->scriptEnd(); ?> However I'm getting the following javascript error in firebug: a[0] is undefined Does anyone know what is causing the error. I am using the packed version of jcarousel lite. The thing is that the code worked in cakephp 1.2 but now i'm using 1.3 and I have updated the syntax using scriptstart, scriptEnd and Html-script.

    Read the article

  • Creating meaningful add URLs in Cakephp

    - by Loftx
    Hi there, For my site I have a number of Orders each of which contains a number of Quotes. A quote is always tied to an individual order, so in the quotes controller I add a quote with reference to it's order: function add($orderId) { // funtion here } And the calling URL looks a bit like http://www.example.com/quotes/add/1 It occurred to me the URLs would make more sense if they looked a bit more like http://www.example.com/orders/1/quotes/add As the quote is being added to order 1. Is this something it's possible to achive in CakePHP? Cheers, Tom

    Read the article

  • CakePHP: find neighbors, order on 'name' or 'order'

    - by Brelsnok
    Hi, I have a list of ordered items, ordered according to the int field order. I'm creating a gallery in CakePHP 1.2 that has a prev and next button and those should link to the previous and next item according to their ordering, not according to their id. In order to get this result I've included the 'order' parameter to the find function, and populated it with 'Item.order'=>'DESC'. Still the result is an id ordered list. My question is: what do I do wrong? My controller: $this->Item->id = 16; $neighbours = $this->Item->find('neighbors', array('order'=>array('Item.order'=>'DESC'), 'fields'=>array('id','name')));

    Read the article

  • cakephp site domain change, having 301 issues

    - by veryMickey
    I moved my cakephp site from a subdomain over to a different domain. I handled the permanent redirect in my htaccess file but in the redirect i am losing my neat/clean url handling. old site iphone.gameachievements.org new site gameachievements.org example of current redirect iphone.gameachievements.org/games/jungle-swing - gameachievements.org/index.php?url=games/jungle-swing what i want.. is iphone.gameachievements.org/games/jungle-swing - gameachievements.org/games/jungle-swing here is what my htaccess file looks like... RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] RewriteCond %{HTTP_HOST} iphone.gameachievements.org RewriteRule (.*) http://gameachievements.org/$1 [R=301,L] any help is appricated thanks m!

    Read the article

  • cakephp and SQL_CALC_FOUND_ROWS

    - by Lizard
    I am trying to add the SQL_CALC_FOUND_ROWS into a query (Please note this isn't for pagination) please note I am trying to add this to a cakePHP query the code I currently have is below: return $this->find('all', array( 'conditions' => $conditions, 'fields'=>array('SQL_CALC_FOUND_ROWS','Category.*','COUNT(`Entity`.`id`) as `entity_count`'), 'joins' => array('LEFT JOIN `entities` AS Entity ON `Entity`.`category_id` = `Category`.`id`'), 'group' => '`Category`.`id`', 'order' => $sort, 'limit'=>$params['limit'], 'offset'=>$params['start'], 'contain' => array('Domain' => array('fields' => array('title'))) )); Note the 'fields'=>array('SQL_CALC_FOUND_ROWS',' this obviously doesn't work as It tries to apply the SQL_CALC_FOUND_ROWS to the table e.g. SELECTCategory.SQL_CALC_FOUND_ROWS, Is there anyway of doing this? Any help would be greatly appreciated, thanks.

    Read the article

  • Cakephp doesn't write a cookie

    - by radious
    Hello! I have a problem with writing cookies in cakephp and even don't know how to debug it or where too look for a clue. I've inherited a project where cookie were only created using the Session component, of course i added 'Cookie' to $components array in app_controller and put this in beforeFilter: $this->Cookie->name = 'foo'; $this->Cookie->path = '/home/~nick'; $this->Cookie->domain = 'hostname'; $this->Cookie->secure = false; //i.e. only sent if using secure HTTPS $this->Cookie->key = 'some key'; and in some action i use: $this->Cookie->write('key', 'value'); I access page by http://hostname/home/~nick/foo and actually try to put even something so silly. I doesn't work. I would be really gratefully for any clue where to search problem. Thanks!

    Read the article

  • cakePHP - ACL tutorial & SQL Error: 1104

    - by vector
    Greetings! I run into a problem/bug in production environment with SQL Error: 1104 when deploying a project secured with the ACL tutorial. The full error: SQL Error: 1104: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay [CORE/cake/libs/model/datasources/dbo_source.php, line 666] I've build a small site, worked through the ACL tutorial from the official cake book and locally everything is spiffy. dev. setup consists of: XAMPP: myslq 5.1.33, php 5.3 cakePHP 1.2.7 prod. setup: mysql 5.0.33 php 5.2.2 One of the differences I noticed with mysql setup between local and production servers, is that SQL_BIG_SELECTS is disabled on the production server ( and I don't have privileges to change that, posted a support ticked, didn't hear anything yet) Is there anything I can do about this from my end? Thanks in advance.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >