Why not pass the Session object to the model?
$this->doSomething($with_this_data, $store_it_here);
On Fri, Sep 3, 2010 at 6:05 AM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:
> I should mention that I both read from and write to the session...
>
> Jeremy Burns
> Class Out
I should mention that I both read from and write to the session...
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
(t) +44 (0) 208 123 3822
(m) +44 (0) 7973 481949
Skype: jeremy_burns
http://www.classoutfit.com
On 3 Sep 2010, at 06:00, Dave Maharaj wrote:
> Place the code in the model and
Place the code in the model and pass the Session data as vars from the
controller?
-Original Message-
From: Jeremy Burns [mailto:jeremybu...@classoutfit.com]
Sent: September-03-10 2:24 AM
To: CakePHP
Subject: Component code
I have a chunk of code that appears in two controllers
(orders_
I have a chunk of code that appears in two controllers
(orders_controller and order_items_controller) that is virtually
identical in each case. I'd like to move it to a single location, so
this sounds like an ideal candidate for a component.
Part of the code calls a function in the Order model, so
I think you should refresh your view and then the pagiation should be
set as it is supposed to be. I do not have much experience in Ajax so
I can't really advise you better on how to make your own paginaton ..
On Sep 2, 4:36 pm, "Mariano C." wrote:
> Suppose to have 3 page, I delete an object fro
It might be that your variable is a value of null. Try to put php code
in your view which checks if that variable is null or not, and then
try to echo it...
On Sep 2, 4:05 pm, Richard wrote:
> Hello all,
>
> somehow I can't get the pagescontroller to pass a variable to the
> view.
>
> I have in m
I believe it is because you put the condition ino paginate but you
haven't rewrited the count method. There is an example of this in the
cook book , I think the link is this one :
http://book.cakephp.org/view/1237/Custom-Query-Pagination .
There is one important notice for you here. I had an issue
If it doesn't work you could just define an admin_beforeFilter()
function in your app controller, then call it with an if statement in
your regular beforeFilter. Then if you define admin_beforeFilter in
any of your controllers it will run at the appropriate time.
On Sep 2, 10:37 pm, Jeremy Burns |
That's Ajax, right? See this very recent post that could easily be adapted:
http://groups.google.com/group/cake-php/browse_thread/thread/2f9a42326d605a5a#
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 3 Sep 2010, at 01:31, Michael Gaiser wrote:
>
> I have
Have you just gone ahead and tried it?
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 2 Sep 2010, at 23:21, Dave Maharaj wrote:
> Is is possible to prefix before functions?
>
> So admin_beforeRender or admin_beforeFilter rather than jamming everything
> i
Agreed. I did an Access to MySQL conversion in a similar way. Import as is into
a MS SQL db, then export as an sql file, import into a staging MySQL db and
then do whatever manipulation is needed there. Then you can move it into your
main db or do whatever fits best. Sounds a bit manual and long
On Thu, Sep 2, 2010 at 8:53 PM, Michael Gaiser wrote:
> With a little poking around I think I have found the true issue here. When
> you click on a paginate link, it appends 'page:2' or whatever page it is
> going to to your url and then internally uses the previously saved query to
> get the next
With a little poking around I think I have found the true issue here. When
you click on a paginate link, it appends 'page:2' or whatever page it is
going to to your url and then internally uses the previously saved query to
get the next set of records. But 'page:2' is not passed in as an argument o
I was meaning $results didnt have any info in it. When I debug($results), it
is just an empty array. I think this has something to do with the fact that
the paginate link doesnt supply the views form again, so some of the info I
am looking for before doing the query doesnt exist the 2nd time around
I have a link in the confirmation column in my view that reads "No". When I
click on it, ajax sends a update to the DB and adds my user Id to that
record. It then should change the "No" text of the link to "Yes" without
needing to refresh the page and in turn needing to pull the entire record
from
Is is possible to prefix before functions?
So admin_beforeRender or admin_beforeFilter rather than jamming everything
into 1. I have certain operations I need to run before the page is rendered
and currently using "if" with prefix statements to determine what to run
based on user.
Thanks
On Thu, Sep 2, 2010 at 4:10 PM, keymaster wrote:
> I need to do an extract and conversion of some data from an older
> windows-based MS-SQL legacy system managed by another company, into
> our existing cake-based LAMP system.
>
> I don't think the data volume is very high. A few thousand rows, to
On Thu, Sep 2, 2010 at 3:36 PM, Mariano C. wrote:
> Where can I find a turorial/article?
Dunno. I don't use the JS Helpers. But, if you're using JQuery, it's
pretty simple.
$('#some_identifier li a').click(function(e)
{
var the_link = $(this);
$.ajax({
url: the_l
Hi, i am developing a web app, wich needs to have lots of pdf output
reports, so i was wondering if i can use iReport + jasper with cake with the
php-jru library.
For the ones who doesnt know ireport is a utility wich creates xml report
layouts, so if you need to chance margins, font type, etc ...
I need to do an extract and conversion of some data from an older
windows-based MS-SQL legacy system managed by another company, into
our existing cake-based LAMP system.
I don't think the data volume is very high. A few thousand rows, tops.
All English. Simple product data.
Has anyone gone thro
Where can I find a turorial/article?
On 2 Set, 19:40, cricket wrote:
> On Thu, Sep 2, 2010 at 9:22 AM, Mariano C. wrote:
> > I have a view like this, called collection.ctp
>
> > echo ""
> > foreach ($elements as $element):
> > echo ""
> > echo $ajax->link('delete 1', array(
Ahhh i see :) thanks a lot!
On 2 Sep., 15:04, cricket wrote:
> On Thu, Sep 2, 2010 at 1:55 PM, DerBjörn wrote:
> > Hi,
>
> > I have a table 'users' and a table 'profiles' in hasOne relation
> > (table 'profiles_users').
> > At the same time i save a user i want also save his profile. I
> > searc
Is not a bad idea. But, there isn't a way to get the database connection
from cake and handle db pointers? Anyway, that is just curiosity, your
solution seems to be right for me :), thanks!
2010/9/2 Jon Bennett
> > Hi! I want to handle database pointers because I have a big database and
> > memo
On Thu, Sep 2, 2010 at 1:55 PM, DerBjörn wrote:
> Hi,
>
> I have a table 'users' and a table 'profiles' in hasOne relation
> (table 'profiles_users').
> At the same time i save a user i want also save his profile. I
> searched and found the other here:
> http://book.cakephp.org/view/84/Saving-Rela
Hi,
I have a table 'users' and a table 'profiles' in hasOne relation
(table 'profiles_users').
At the same time i save a user i want also save his profile. I
searched and found the other here:
http://book.cakephp.org/view/84/Saving-Related-Model-Data-hasOne-hasMany-belongsTo
Now a profile gets cr
On Thu, Sep 2, 2010 at 11:13 AM, Dave Maharaj wrote:
> I made a private function in the controller but I may give your component a
> shot. Its all for the 1 controller so maybe its best to keep it in the
> controller?
Yes, might as well. I'd make it a protected function.
Check out the new CakePH
On Thu, Sep 2, 2010 at 9:22 AM, Mariano C. wrote:
> I have a view like this, called collection.ctp
>
> echo ""
> foreach ($elements as $element):
> echo ""
> echo $ajax->link('delete 1', array( 'controller' =>
> 'users', 'action' => 'remove', $element['item']['id'] ));
>
Is your callthis() method actually named "threadedpages"? Or, does the
method call another method by that name? This error usually occurs
because a model method cannot be found (regardless of it being
principal model or not). eg.
Are you certain that you have the correct spelling and case (eg. not
When you say that the query is empty, do you mean $results? Or are you
referring to the DB query itself (as printed at the bottom of the
page, for example)?
Have you tried debugging $searchOptions immediately after the switch
block? Perhaps also debug $this->data at the beginning of the action.
O
Nope, just regular id's
On Sep 2, 12:18 pm, Anthony wrote:
> Are you useing UUID keys for the users or groups id? If so you need
> to modify one of the three tables but I don't know which off the top
> of my head.
>
> On Sep 1, 2:27 pm, Rob wrote:
>
> > Yes, that's it.
>
> > Just a quick update
> Hi! I want to handle database pointers because I have a big database and
> memory is not enough (I already added memory in php.ini and put recursive in
> -1), I have like 9000 registers and I want to write all that registers in a
> file.
>
> There's a way to do something like mysql_fetch_array wi
Hi! I want to handle database pointers because I have a big database and
memory is not enough (I already added memory in php.ini and put recursive in
-1), I have like 9000 registers and I want to write all that registers in a
file.
There's a way to do something like mysql_fetch_array with datasour
Hello all,
somehow I can't get the pagescontroller to pass a variable to the
view.
I have in my pages_controller.php:
class PagesController extends AppController {
//some code cut out for better reading here
var $uses = array('Category');
function display() {
je suis entrain de créer un site de réservation de véhicules et
d'avions.
Puis je avoir une proposition des constituants de la base de données?
En plus quand j'installe cakephp dans le serveur wamp et que je passe
en ligne de commande pour générer l'application,cela ne marche pas. J
e ne comprends
Does anyone think it might be possible to selectively downgrade, most
specifically the routing updates made to 1.3? For our use it seems
the fixes Cake put into the router are worse than the problems the
changes were trying to fix, and we're considering dropping back to 1.2
if we can't get it to
I have a copy on my dropbox I've made public for you. I won't be
offended if you don't want to use it without some kind of security
check.
http://dl.dropbox.com/u/9009146/cakephp-cakephp-1.3.3-0-gf01b4ae.zip
On Sep 1, 11:14 am, nlb wrote:
> hello,
>
> When i click on the link and arrive
> at
In your controller:
$this->set($count);
In your view:
if ($count > 5) echo $this->element();
On Sep 1, 1:23 pm, wrote:
> hi,
>
> usually you trigger elements like this and it works:
>
> in views/elements you create a ctp file
> ---
> echo $message
> ---
Are you useing UUID keys for the users or groups id? If so you need
to modify one of the three tables but I don't know which off the top
of my head.
On Sep 1, 2:27 pm, Rob wrote:
> Yes, that's it.
>
> Just a quick update, I rebuilt my ACO table and aco_aro table seeing
> if I might have fouled s
Thank you, my grace! ;)
- The nuts and bolts one actually helped a lot!
cheers!
nils
On 1 Sep., 19:22, cricket wrote:
> On Wed, Sep 1, 2010 at 8:38 AM, nils wrote:
> > I tested my system today and got a "MISSING METHOD"-error. -
> > Interesting. So I created a view for that.
>
> > - But is the
This is my controller.
Session->check('Administrator') ) {
// redireciona para a area restrita
$this-
>redirect(array('controller'=>'administrators','action'=>'admin_index','admin'=>true));
}
// redireciona para a pagi
Hi Cricket,
Thanks for the help. I'm actually using cake 1.3.3 and this is what I
get when I enable the routinng prefix and have the methods withou the
adimn_ prefix.
Error: The action admin_index is not defined in controller
AdministratorsController
Error: Create AdministratorsController::admin
So, I have been trying to get this paginate feature working and I can get
the first page properly, but when it returns the 2nd page, the query is
empty. Anyone see anything wrong? I suspect it has something to do with the
$searchStr arg but am unsure how to get around not having an arg in that
func
That worked. Thanks
On Sep 1, 2010 6:06 PM, "cricket" wrote:
> On Wed, Sep 1, 2010 at 5:51 PM, Michael Gaiser wrote:
>> The structure is currently a int(11) which can also be NULL.
>>
>> The command I am using is this.
>>
>> $results = $this->paginate('Location', array('Location.confirmed_id' =>
Okay,
Now I get it!
Let´s hope someone reply my message.
Thank's
On 1 set, 15:10, cricket wrote:
> On Wed, Sep 1, 2010 at 10:01 AM, Synue Cunioci wrote:
> > I've trying to post a doubt with no sucess. How long does it take to
> > the moderators to aprove a discussion?
>
> Your post shows up f
I made a private function in the controller but I may give your component a
shot. Its all for the 1 controller so maybe its best to keep it in the
controller?
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this messag
hi dave
On Thu, September 2, 2010 3:48 pm, Dave Maharaj wrote:
> When I have if statements for views I make a helper to simplify the code
> rather than if this if that all over the places, simply pass the variables
> to the helper and get the values I need returned.
>
>
>
> But what about for the
When I have if statements for views I make a helper to simplify the code
rather than if this if that all over the places, simply pass the variables
to the helper and get the values I need returned.
But what about for the controller? I have a rather ugly block of code used
in a few places and it
On Thu, September 2, 2010 12:59 pm, Ambika Kulkarni wrote:
> Hi all,
>
>
> Hey I want a loading image as soon as i click some button. The
> process loading image. So that when something is running in the
> background of cakephp like fetching data and all, that time it should
> show the loading im
Suppose to have 3 page, I delete an object from page 2, so I would
take the first element from page 3 and use it as last element of page
2, and so on...
There's an article or tutorial to explain that?
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP r
Hi,
> Looks great, But this is closed for testing now =]
We're happy to announce that public beta is finally open. Come visit
us at http://racelords.pl!
Regards,
racelords.pl
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You
Hi all
>From Ruby on Rails I know web testing, and there it is really great.
But sadly I see that CakePHP offers only some basic web testing by
integrating SimpleTest and not enhancing it.
So is there any way to reset my database tables when starting my test
suite? Or even to insert some startup
I have a view like this, called collection.ctp
echo ""
foreach ($elements as $element):
echo ""
echo $ajax->link('delete 1', array( 'controller' =>
'users', 'action' => 'remove', $element['item']['id'] ));
echo ""
endforeach;
echo ""
this view is rendered by c
does anyone know if it is possible to test a website (simpletest web
test cases) which is behind htaccess protection?
i always get
"(string)
401 Authorization Required
Authorization Required This server could not verify that you
are authorized to access the document requested. Either you supplied
Hi all,
Hey I want a loading image as soon as i click some button. The
process loading image. So that when something is running in the
background of cakephp like fetching data and all, that time it should
show the loading image. So that peolpe will come to nw what is
happening. and they can wait
I have two tables, Pages and Posts that are in HABTM and are joined
using pages_posts join table.
My Page model along with the HABTM definition contains a function..
class Page extends AppModel
{
var $name = "Page";
..
..
function callthis()
{
return $this->find('all')
Convert xml to arrays and use array datasource?
http://wiki.github.com/jrbasso/array_datasource/
On Sep 1, 12:07 pm, live-maron wrote:
> I want to read xml by cakePHP.
> Afrer read xml,I want paging with xml,because,xml has many items.
> Does cakePHP have function which is paging for xml.
Chec
Thanks Zuha, I hope I can start my project with your Idea,
Thanks a lot
Harun
On Wed, Sep 1, 2010 at 6:19 PM, zuha wrote:
> I knew I was going to forget something...
>
>
> In /app/views/layouts/default.ctp I use code like this to instruct my
> apps to look for the default css, js, img etc like
Hi!
First of all, check out if duplicating this data (twice the same
values in 2 tables) really makes sense,
or if you can figure out another logic. ;-)
Ok, this one way i solved it. Using another table means for me, using
another model. Create
the second model for the second table. Use the forei
I am having three fields in my login array
username, password and one global variable called "owner" there can be
multiple occurrence of same username in my user table but their owner
field will be different ...so suppose i have the following users in my
table
username password owner
samuser
59 matches
Mail list logo