wrote:
> Why don't you just place the specialMethod() code into initialize()?
> Since thats basically what you are trying to achieve.
>
> On Feb 16, 2:51 am, Pixelastic wrote:
>
> > Hello,
>
> > I'm writing a MainComponent that will need a SecondaryComponent
Hello,
I'm writing a MainComponent that will need a SecondaryComponent in
order to correctly work.
I want to call some of SecondaryComponent::specialMethod() in
MainComponent::initialize(), but this method can only correctly work
if SecondaryComponent::initialize() is itself called first.
Diving
Hello,
I was wondering what was the best (correct?) way to work with i18n in
plugins ?
I would like to have a locale/ folder with .po/.mo files in each one
of my plugins as well as a generic app/locale/ folder with app-
specific translations.
Right now I'm using __d('plugin_name', 'My string') in
If your sure that :
- Your db encoding is correctly set
- Your files are correctly saved as utf
- You've added the correct $html->charset() in your view
You can try adding a AddDefaultCharset utf-8 to your .htaccess and/or
Configure::write('App.encoding', utf-8') in your bootstrap.php file
On Au
Maybe you could create a general controller, that will be triggered by
any request to the cake app. And in a method inside it catch the
hostname and make the appropriate db find operation to get the
relevant content and then pass it to the view.
On Aug 24, 11:21 pm, jonoa wrote:
> I think you ar
Maybe a chmod problem, making the cache uneffective ?
On Aug 24, 7:36 pm, brian wrote:
> Do you have access to Apache's error log? The blank page may be due to
> a fatal PHP error
>
> On Sun, Aug 23, 2009 at 11:40 AM, Arvind wrote:
>
> > Yes of course. But as i mentioned above no cache files wer
ng
Configure::listObjects('plugin');
On Aug 24, 7:32 pm, brian wrote:
> AppController::constructClasses()?
>
> On Mon, Aug 24, 2009 at 8:42 AM, Pixelastic wrote:
>
> > Hello,
>
> > I have some code I would like to put in my bootstrap.php that needs
> >
It seems that you are trying to access a class variable from a static
call. Make sure that you are using an instance of your
InformationsController and not the class itself.
On Aug 24, 8:16 pm, Paulos23 wrote:
> Hi people,
> I am facing a really wierd problem.I am building my app with cake
> sin
Hello,
I have some code I would like to put in my bootstrap.php that needs
the Configure::listObjects() function. Unfortunately, this function
does not return anything when called from inside the bootstrap.php,
likely because bootstrap is called very very early.
I finally had to put my code in t
If you have to call a controller method from a view, you're (very)
probably doing it wrong.
Can't you just pass the result of your function to the view using
$this->set() in your controller's action ?
On Jul 20, 7:02 am, liyakat Ali wrote:
> i need to call function from .ctp file.
>
> And funct
Then maybe the action does not belong to the controller but to the
model ? You would then be able to access it much more easily
On Jul 18, 11:04 am, amit balode wrote:
> no, its a controller specific method.
>
> On Fri, Jul 17, 2009 at 5:21 PM, Fran Iglesias wrote:
>
>
>
>
>
> > Is an action or
You can try App::import() (http://api.cakephp.org/class/app#method-
Appimport) to check for a model availablity.
You can also have a look at ClassRegistry::keys() and
ClassRegistry::init()
On Jul 10, 9:27 am, "Dr. Loboto" wrote:
> What do you mean under "model exists", where do you check it and
Hello,
What I'd do is something like :
Router::connect(
'/:cheeseSlug:cheeseSuffix',
array('controller' => 'cheeses', 'action' => 'view'),
array(
'cheeseSlug' => '[^/]+',
'cheeseSuffix' => '-cheese.html',
'pass' => array('ch
As I couldn't find a solution, I resorted to add an inner $pluginName
var to my *Plugin*AppModel.
On Jul 4, 8:03 pm, Pixelastic wrote:
> Hello,
>
> I would have wanted to know if there is a way to find the name of the
> actual plugin being executed from inside a model method (t
Hello,
I would have wanted to know if there is a way to find the name of the
actual plugin being executed from inside a model method (this model
being part of the plugin).
Here is my setup : I have a plugin containing a model, a view and a
controller. When inside the view or the controller I can
- No callbacks in associative queries
- Lack of (or not up to date) documentation
- Integrating jQuery instead of Prototype may be better, but I think
I'll still write my own js code by hand to have more control over it
anyway
On 8 mai, 15:08, Smelly Eddie wrote:
> I hate that it is a powerful f
from the database only when
> changed from the app, as you can see here:
>
> http://github.com/lecterror/neutrinocms/blob/da9a1f7633564f86330c098f...
>
> Just remember to clear the cache afterSave() and afterDelete() and you
> should be grand.
>
> On May 14, 6:43 pm, Pixela
Hello,
My app needs a couple of "settings" to work, settings I have to fetch
on every page request (like the default metadescription, and some
other strings and booleans I will need in every views). These settings
are global (they are the same for every page and for every user), and
I have to cha
r, I finally change some other logic and combine my parameters
into one (with a fixed name) and passed this to connectNamed.
My problem was then kind of solved, but I posted it anyway in hope
that someone had an other and more elegant solution.
Thanks for your time anyway :)
On 11 mai, 12:50, Marco
>
> On May 8, 4:03 pm, Pixelastic wrote:> Yes, that is
> the purpose of this parameter.
>
> > On May 8, 2:16 pm, John Andersen wrote:
>
> > > Is the purpose of the named parameter (lang) for you to be able to
> > > pre
Yes, that is the purpose of this parameter.
On May 8, 2:16 pm, John Andersen wrote:
> Is the purpose of the named parameter (lang) for you to be able to
> present content in the specified language?
> John
>
> On May 8, 2:28 pm, Pixelastic wrote:
>
> > Hello,
>
&g
Hello,
I'm doing some i18n in my app and so I have defined routes with
a :lang parameters like this :
Router::connect('/:lang/:controller/:action/*', array('lang' => null),
array('lang'=>'[a-z]{2}'));
Everything is working fine.
But I also have a index action that allow named parameters to be
p
:30, brian wrote:
> Is this just a one-time thing? Wouldn't it be simpler just to list the
> models you need to access?
>
> You have a typo, also: "SpecialModal". What's SpecialModel for, anyway?
>
> On Tue, Apr 28, 2009 at 8:23 AM, Pixelastic wrote:
>
> >
lModel and AppModel because they do
not have a table, and all I'm getting is a 'Missing table' page.
My question was: Is there a way to stop my loop if $this->loadModel()
failed instead of manually exclude them ?
On 28 avr, 14:19, Pixelastic wrote:
> Well, AppModel and Spec
Well, AppModel and SpecialModel are the only two models that do not
use a table .I think I may not have been clear enough and you
misunderstood what I was trying to do.
Here is the context :
I had to apply a regexp to every text field of every item saved in my
database. So I list every model of
hierarchy I'm using, I have an
intermediate model between AppModel and Model :
Post extends AppModel
AppModel extends SpecialModel
SpecialModel extends Model
I'll stick to manually excluding AppModel and SpecialModel from my
loops until I found a more elegant solution
On 28 avr, 03:29,
Thanks, it does the trick.
I didn't thought of that, or to be clearer I thought that setting a
$useTable = false to my AppModel, it would inherit to all my models.
Guess I should have tested a little more.
Thanks, anyway
On 28 avr, 00:16, Miles J wrote:
> Add this in your model.
>
> var $useTa
Hello,
I had today to iterate through the full list of models of my app and
instantiate them on the fly, and I were hit by a little problem. When
trying to load a model (using Controller::loadModel or
ClassRegistry::init) that is not linked to a table in the database
(like AppModel for example) I
Hello,
I am trying to protect some of my pages with the basic Http
Authentification provided by the SecurityComponent (those pages are
indeed RSS feeds), but even if everything worked great on my local
machine, it kind of fails while online on my Dreamhost server.
I have set up a really simple p
Ok, the answer of my question was in the question.
Prior to MySQL 5.0.2, MySQL was putting default values itself, as I've
just learned from there :
http://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html
On 23 sep, 17:13, Pixelastic <[EMAIL PROTECTED]> wrote:
> Hello,
>
Hello,
I have an issue with the Model::create method.
I tried to do an update of an existing row in my DB by doing in my
controller $this->myModel->create($this->data); and then $this-
>myModel->save().
$this->data contains the id of my entry, so it gets updated but every
fields that were not in
;Building->bindModel(array('hasOne' => array('Flat')));
>
> $data = $this->Building->find('all', array(
> 'fields' => array('Building.id', 'MIN(Flat.price) AS
> flat_min_price'),
> 'group' => &
Hello,
I'm trying to use on a find query the 'group' and 'order' parameters,
but the two seems not to work well together (or at least not the way I
would).
I have a simple structure like this :
Model 'Building' (id, name)
Model 'Flat' (id, building_id, price)
(and Flat belongsTo Building, obviou
33 matches
Mail list logo