I am thinking about using Croogo for a new project.
I need to create multiple sites (multiple domains) and need each site to
look independent, so they have their own pages, content, and editors
(users). Each editor should only see their site and content from the
admin side.
Anyone have some sug
I don't think you provided enough info for anyone to help you.
Please provide the function and point out the line that is getting the error.
Thanks,
Bill Stoltz
On Nov 13, 2012, at 10:31 PM, "Andrew Johnston [via CakePHP]"
wrote:
> I know this post gets written every couple of months, and I
You did not specify which line is getting the error. I am guessing one
of the File lines
Have you tried...
$file = new File(WWW_ROOT
."/img/group-banners/banner/".$group['Group']['id']."-".$group['Group']['photo_secret'].".jpg");
On 11/12/2012 9:51 AM, chris...@yahoo.com [via CakePHP] wr
What I would guess is happening is that the new route you put in
place is matching everything including all the actions for your
products controller.
You might be able to add routes for each action in products to
override this.
But, could you just make a sim
Since you may not want to do this for every find call for your
model, you might want to setup a custom find type.
Then you could either add additional conditions and nested
conditions & sub-queries to the original request, or possibly
use the Model::query() call
ode3
> |--Node4
>|--Node5
>
> On 10/22/2012 12:27 AM, Jeremy Burns | Class Outfit [via CakePHP] wrote:
>> Surely you can just change the parent_id of the top of the branch you
>> want to move? Then let the Tree behaviour take care
Thanks Chetan & Marcus.
On 10/23/2012 12:23 AM, chetan varshney [via CakePHP] wrote:
>
> Use this for example $imgTag = $this->Html->image($image['Image']
> ['thumb_path'], array( 'alt' => $title )); $options = array('class' =>
> 'thumb', 'name' => trim(Inflector::slug($title)), 'title' =>
> tr
I would like to use Html->image and Html->link together, but
Html->link will convert characters like <, ", etc to htmlize
them.
for example
$imgTag =
$this->Html->image($image['Image']['thumb_path'], array( 'alt'
=> $title ));
w.classoutfit.com
>
> On 21 Oct 2012, at 23:24:53, bs28723 <[hidden email]
> > wrote:
>
>> Hi,
>> I am using the tree behavior for one of my models, and I want to
>> copy a branch of a tree, with all the sub-branches, leafs etc to another
>> parent.
>>
Hi,
I am using the tree behavior for one of my models, and I want to
copy a branch of a tree, with all the sub-branches, leafs etc to another
parent.
It looks like I am going to have to get a list of the children of the
copy from node, and then do a save for each new node.
would it work to d
You may need to quote the email address or escape the "@" so that
mysql does not think the email address is a mysql variable...
On 10/2/2012 5:00 PM, chris...@yahoo.com [via CakePHP] wrote:
> hi guys,... I have a password recovery function can't make it work,...
> on 1.3CAKE
> I'm getting erro
I am working on some code (2 controllers + 2 models) that track calendar
events or shows and locations.
I have 2 projects this might work in, but only about 50-60% would be common.
Should I just not worry about a plugin to share common code?
If I do a plugin for the 50% that is common, how should
I read my post, and it seemed confusing, so let me try to clarify.
I have a plugin, that has some basic functionality, but I need to add things
to it.
I see 2 options.
1) install and modify code to meet my needs. But this creates 2 plugins.
Original & modified.
or
2) install but use some callbacks
I have a plugin that has some basic set of functions.
I want to be able to Extend this plugin, without having to go in an edit
the code.
I would like to do things like add extra fields to the Table and have
the Views, Model and Controller be able to handle this.
I would also like to add some para
arams['plugin']=='usermgmt') {
echo
$this->Html->css('/usermgmt/css/umstyle');
}
Chetan Varshney
Cakephp User Mgmt Plugin
On Sunday, August 12, 2012 3:34:05 AM UTC+5:30, bs28723 wrote:
I have a plugin that has custom CSS and JS files.
The plugin does not need its own layout - it will use the apps default
layout.
I guess I could just brute force it and put the $this->Html->css() and
$this->Html->script() calls into the layouts/default.ctp file.
but I was wondering, is there a
Before I build it myself, I am looking for a plugin or something I can
start from that will upload images, create galleries or albums to manage
a collection of images.
I have done a number of search and there are plugins to do multiple
uploads, or attach images to a model. There are jquery plugins
It was recently discussed in another thread in this group, I am
paraphrasing, You need to spend time making sure your data Models
are well thought out before you worry about where the code goes.
A typical way to solve the website order problem is that you have
Looks like you are saying that
Owner & Chronicle models hasMany domains.
a Domain leaf can only have 1 owner & 1 chronicle. This creates a
unique key that identifies a specific domain branch.
I think a lot depends on what other information you might want to have
related to the domain, owner,
urpose is to read and write Objects from/to the database instead of
> arrays. Other systems are tied in to a form of the ActiveRecord
> pattern which is a decent enough Domain model and this is a direction
> I would like to see Cake head in ... but not at the expense of what it
> alread
Just a thought - do you have the saveAssociated set to Atomic? and does
the DB support this?
I have not done a lot of testing on this, but i had to change the table
defaults to innoDB to support transactions, mySQL defaults to MyISAM.
On 6/7/2012 1:10 AM, Michael Gaiser [via CakePHP] wrote:
> So
On 6/6/2012 11:22 PM, John Hardy [via CakePHP] wrote:
> i dont usually reply to messages but this one slapped me in the face.
>
Not sure what you mean by this - but I hope is was not bad - LOL
Thanks for the help and suggestions.
--
View this message in context:
http://cakephp.1045679.n5.nabble
On 6/6/2012 10:19 PM, Justin Edwards [via CakePHP] wrote:
>
> For development as you go along, you'd naturally take your controller
> methods and turn them into components where you'd see they'd need to
> be reused, the same with helpers.
exactly. I have already started doing this on my project.
iours, components and helpers to achieve
>> what you want.
>>
>> Good examples of this can be found in the CakeDC github repository
>> and I think this is a good a repository as any to see good Cake
>> coding practises.
>>
>> https://github.com/CakeDC
&g
My apology if I offended anyone. I have written and rewritten my share
of bad code. I have probably even posted a few examples of my bad code
in this group. I was just trying to see if this was the right forum for
an architecture discussion.
Mike - I saw your apology and it was not needed. It w
you can always rewrite bad code,
> but it's much more difficult to transform shitty data.
>
> Read the bottom of this post by Torvalds, Words to engineer by….
>
>
> http://lwn.net/Articles/193245/
>
>
> On Jun 5, 2012, at 7:28 PM, bs28723 wrote:
>
>> anyone
Ok, This does not seem popular - so what do people use for payments with
cakephp?
On Sunday, June 3, 2012 1:54:00 AM UTC-4, bs28723 wrote:
>
> Anyone tried to get the CakePHP-Paypal-IPN-Plugin by webtechnick to
> work with CakePHP 2.X? or is there a bett
te maintainable app.
> However nothing is ever 100 perfect for all situations, learn from writing
> your own shitty code and do not get caught in the spiral of over
> engineering. Keep it simple and clever.
> On Jun 2, 2012 11:18 AM, "bs28723" wrote:
>
>> I a
Anyone tried to get the CakePHP-Paypal-IPN-Plugin by webtechnick to
work with CakePHP 2.X? or is there a better option?
--
View this message in context:
http://cakephp.1045679.n5.nabble.com/paypal-on-cakephp-2-x-tp5708491.html
Sent from the CakePHP mailing list archive at Nabble.com.
--
Ou
I have the need to create an action called "changeOwner" that will
change a bunch of fields in several associated tables, then return to
the calling page. It does not have its own view, so it does not get
data to fill out a form and post it back, like the edit action would.
I would like to us
Right now, I am building out menus and they are all static, but,
certain ones should only be displayed on certain pages.
I have created some nested elements and variables passed in from the
controller to each element to decide what to display. It seems to
work w
I am probably looking for something that does not exist online, but only
in a few folks heads. :-) But maybe some parts of this exists. You
never know unless you ask..
I am quickly learning a lot about MVC architecture and CakePHP over the
last couple months. The cookbook, lots of trial an
){
> // If isDeletable has done it's job, this should never happen.
> $this->log( $e->message(), 'error' );
>
> }
> }
>
> Not only is this cleaner, but the model is FAR easier to write test
> cases for.
>
> Steve (
Thanks @stork & @steve-2 for the examples - great stuff!
Can either of you, give me some best practices for exceptions
processing? Maybe it is my self-taught PHP & CakePHP experiences but I
have not a done a lot with exceptions. Is this efficient? Any good
references to do some reading on t
I need to do more reading on Exceptions, but my case seems more like
a flash message than throwing an exception.
Maybe I need to do more checking in the controller, rather than
using beforeDelete.
This way, upon entry into delete method, I could check
This has got to be a newbie question. I have searched, but can't
seem to find an answer.
Is there a way to get an error code for why the delete or
beforeDelete failed and have this passed back to the Controller
instead of just false?
using the exa
he $components array.
If you're
extending that component you need to load 'OrgAuthorize'.
On Sun, May 13, 2012 at 5:51 PM, bs28723
< [hidden email] >
wrote:
> I wrote an Auth Component. It gets a b
I am not sure if adding exists() to beforeSave is another DB query or not.
But, why not add a field in your add and edit functions?
function admin_add($id = null) {
// other checks
if ($this->request->isPost() || $this->request->isPut()) {
$this->request->data['new'] = true;
? Not sure if cake touches the session for you on each page
> load, to prevent it from expiring?
>
> On Monday, 14 May 2012 03:04:10 UTC+1, bs28723 wrote:
>
> Is a user's login controlled by session timeout?
> What is the default session timeout if not set in confi
Is a user's login controlled by session timeout?
What is the default session timeout if not set in configuration?
In my testing, a user logins, and things work for several hours, but
even if active, the account seems to timeout and I have to login.
Is this normal? So this is not an 'idle timeout
I wrote an Auth Component. It gets a bunch of permission information
about the current user.
How can I pass this information back to the controller?
In AppContoller.php
public $components = array(
'Auth' => array(
'login
I created a Auth component to do some special authorization checking.
The Auth component gets called first before any controller isAuthorized
routines.
I was thinking about saving some permissions in a session variable
inside the Auth component.
Then the controller could get this detail and pe
Empty log array
Book 2
log array, userid = 2
Book 3
log array, userid = 2
log array, userid = 3
That third book, where the extra log is returned is what I don't
'll have
exponential more code. Types of admins can be different
prefixes. Organization Admin, User Admin, etc. Just some
things to consider.
I'm in a similar boat.
On Mon, May 7, 2012 at 12:03 PM, bs28723
sure security component is always included in
> every controller from now to the end of time, you may well find that
> the duplication required by prefix routing may well be a justifiable
> option. Additionally, I would probably say this approach would
> cultivate a more secure and
Thanks. looks like 2.1 has a new way to do this...
$this->Auth->allow();
finds every public method and adds this to the allow array.
Thanks, I read that page several times, but missed that subtle
difference.
On 5/6/2012 11:10 AM, stork [via Cak
There should be a better way than what I am doing right now..
I have a set of 3 default Roles (Owner, Admin, Member). users can add,
delete, modify the Roles, except the 3 Default Roles.
If I create views like "edit", then all the fields in the Role table, go
into a Form and are editable.
In my AppController beforeFilter() - I have an
$this->Auth->allow('display');
Then in another controller I do
class AddressesController extends AppController {
public function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('*');
debug($this->Auth,1,
Thanks. works great.
On 5/6/2012 3:33 AM, stork [via CakePHP] wrote:
> array_unshift($this->Auth->authorize, 'Org');
--
View this message in context:
http://cakephp.1045679.n5.nabble.com/Authorize-component-ordering-tp5688772p5689248.html
Sent from the CakePHP mailing list archive at Nabble.com
Are you looking for a find where "Log.user_id=2 OR Book.log_id =
null"?
On 5/3/2012 11:00 PM, Rob-3 [via CakePHP] wrote:
I have a setup where there are Books Users and Logs.
Each Log has a
Book and a User and I am trying to retrieve a list o
I am trying to set the order for my Authorize components.
I have a App/Controller/Component/Auth/OrgAuthorize.php
I have tried starting with
in AppController
public $components = array(
'Auth' => array(
'authorize' => array('Controller')
)
);
Then in m
filenames:
if ($css = $this->Auth->user('css'))
{
$this->Html->css("users/${css}");
}
On Sat, Apr 28, 2012 at 7:09 PM, bs28723
< [hidden email] >
wrote:
[via CakePHP] wrote:
Did you try with session variables?
Enviado desde mi iPad
El 28/04/2012, a las 21:23, bs28723 < [hidden email] >
escribió:
I looked at routing, but I di
I looked at routing, but I did not see a way to solve my problem.
I am looking for a way to create links to controller/actions and pass "large"
or 'hidden' parameters.
I could use a from and post, but seems like a lot of work for 1 or 2 links in a
view.
I understand the simple link call with 1
Thanks Michael. I think I could solve the problem of
having the
code in every controller by doing...
class AppController extends Controller {
public function beforeRender() {
$newCss =
$this->Config->getCss($username);
I see in the documentation how to change the layout in the controller.
I also see how to include CSS files.
So, is it possible to include either inline CSS or create a temp File
with CSS info that is specific to a user?
For example, lets say I somehow allow user to change background and font
c
Just to make sure I understand what you said about putting code into the
models
For the most part, anything that verifies, modifies, reads data from the
DB should be in the model.
The controller, just collects data, directs the models to
read/change/update the data, then send to the view f
I tried to find the code that implements the magic functions findBy* and
findAllBy*
but I got lost.
Can someone point me to the code or an example of how to replicate this?
I may have a need to create my own set of functions like this, and would
like to see how to parse the method name and then
Great ideas. I will see about pushing more into the models. I have not
really done much with the router, but that gives me some ideas on how I
can do some things.
The data is fairly normalized, I am sure there is room for improvement.
But it needs to scale.
Basic premise is Users manage their
ntroller. However, I'll generally create
> a controller for the other model(s), if only for admin functions. In
> your case, you may have a need for an admin to create a new
> OrganizationRole, for example.
>
> On Sun, Apr 22, 2012 at 12:45 PM, bs28723
> <[hidden email] &
My question is - Is it a better MVC architecture to have a 1 to 1
relationship for a controller to access the model and the view, or since
in a case where all relationships stem from a single model - just make
the one controller have all the actions, but pull data from the related
models needed
I don't know a lot about AJAX - Need to learn :-)
What I am doing with the helper, is that I was finding that I was
repeating code in multiple views or several times in a single view to
get ready to call an element. So, I just moved this common code from
the view to a helper, then made a single
I will try to help with the view issue.
First look at the 2.x View Template section
http://book.cakephp.org/2.0/en/views.html
And look into Extending Views. This will allow you to break up the
view. You create a frame work for a controller, then the view can have
different content in the main
Anyone know of a good progress bar for file uploads?
Don't need anything fancy, just something that gives users visual
feedback that the large image file they are uploading is taking some
time to transfer.
Thanks,
bill
--
View this message in context:
http://cakephp.1045679.n5.nabble.com/Pr
Was I over thinking this
Maybe this simple approach would work.
What if I had a table with User_id, Role_id, org_id
It is setup as User hasMany Role.
the Role_id is unique with the org_id.
When get the user, I get an array of roles.
Then when I call the Org controller, I create an isAuth
Can any easily explain how to do row level ACL in CakePHP 2.x?
I have seen some old posts on this topic, but I don't know how much has
changed and would have to be redone.
Any examples / tutorials would be good to.
Thanks,
bill
--
View this message in context:
http://cakephp.1045679.n5.nabb
This would be ok, if the actions were the same for each controller.
But, I would like each user to have one set of actions for 1 controller
and a different set for another controller.
I am afraid this problem just get exponential the more users and
organizations and roles there are.
Just t
I want know if this is too complicated for CakePHP / ACL / Roles or
other options..
I started with a simple Organization. This Org has Roles and Users.
The Organization also has things to be managed by these users, like
Events, Membership Information, the Org Profile, Newsletter, etc.
Fai
68 matches
Mail list logo