CakePHP 1.3 - Plugin asset loading - override Core.php compression rewrite

2013-10-30 Thread Jas3n


I'm working with an existing CakePHP (ver. 1.3) application.  The main 
application utilizes CSS and JS compression via the /config/core.php file. 
 My project is to develop proprietary functionality into this application 
which I'm integrating as a CakePHP plugin.  Now there have been very few 
hitches while developing as a Plugin, but the issue below is one that I 
haven't been able to locate a solution for.

Since the compression config option is enabled in the main CakePHP core.php 
file, anytime I try to load CSS or JS within the plugin files to it's 
internal plugin assets location (/app/plugins/plugin_name/webroot/) it's 
automatically rewriting the folder to the cached folder 
/plugin_name/webroot/ccss or /plugin_name/webroot/cjs as it's supposed 
to for the main application.  This is the case regardless if I load via the 
cake helpers or using standard tagging.

Now I do not have any issues loading plugin image assets using the helper 
and the plugin path /plugin_name/img/.  So, I can only assume that this 
is all related to the rewriting of the CSS and JS paths for the compression 
option.

So, is there a way to override the path rewriting for the plugin assets?  
Can my plugin define it's own config to compress its CSS and JS files 
separately (this would be nice to implement later on, but not necessary)? 
Am I just completely off-base with my approach to this situation 
altogether, lol? 

I would like to keep all the plugin files (including the assets) inside the 
plugin folder for numerous reasons.  Therefore, I'd like to avoid the 
alternative solution that would require files to be placed in the main 
application (not inside the plugin folder) if at all possible.

Thanks in advance for your responses!

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2013-10-30 Thread Silver Troy
I have to agree with the above comments about trying to find real examples 
with cakephp 2.x.

The cakephp youtube channel doesn't give you any video examples on simple 
concepts.

The documentation has a lot of useful information, but little examples to 
put them into action.

Doing the blog tutorial example was pretty quick and easy.  Adding 
authentication the Andrew perkins
youtube videos were good.  

But seriously Cakephp you need to develop some real world simple examples.  
Cause its frustrating
as a php developer to be attempting to figure out how to properly code 
inside of cakephp's framework.

I read the documentation, the bakery, youtube videos, google for 
tutorials.  

But can I find a simple menu building example ? 
How to build an admin section with proper routing ? 
How to connection with hasOne, hasMany ? 
Building a category tree that lists products in each level with paging ? 

Oh I have read over Mark Story's Tree Behavior article and attempted to 
install his Tools plugin .. 
but trying to get a working example  sigh.   Should I really have to 
install someone else's plugin
to build a category system in a website ?

Quite the frustration is trying to learn this framework ... spinning my 
wheels.

Yes I tried the irc channel and basically the first person to respond made 
me feel like an idiot ... not impressed 
and then basically linked a bunch of the book.cakephp.org sections .. which 
I have already read that don't give a proper working example or stop just 
short of the basic functionality.

 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


cakephp

2013-10-30 Thread karthik2951990
what are the drawbacks in cakephp?
list out the supported databases?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: cakephp

2013-10-30 Thread jeet bajaj
No drawbacks... use Mysql for database..


On Wed, Oct 30, 2013 at 12:29 PM, karthik2951...@gmail.com wrote:

 what are the drawbacks in cakephp?
 list out the supported databases?

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: cakephp

2013-10-30 Thread CrotchFrog

   
   - MySQL 
   - PostgreSQL
   - Microsoft SQL Server
   - SQLite


On Wednesday, October 30, 2013 2:59:06 AM UTC-4, karthik...@gmail.com wrote:

 what are the drawbacks in cakephp?
 list out the supported databases?


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2013-10-30 Thread euromark
Silver Troy: Mark Story != dereuromark ;)

Most beginners find the book sufficient - and properly explaining the 
basics.


Am Mittwoch, 30. Oktober 2013 05:30:20 UTC+1 schrieb Silver Troy:

 I have to agree with the above comments about trying to find real examples 
 with cakephp 2.x.

 The cakephp youtube channel doesn't give you any video examples on simple 
 concepts.

 The documentation has a lot of useful information, but little examples to 
 put them into action.

 Doing the blog tutorial example was pretty quick and easy.  Adding 
 authentication the Andrew perkins
 youtube videos were good.  

 But seriously Cakephp you need to develop some real world simple 
 examples.  Cause its frustrating
 as a php developer to be attempting to figure out how to properly code 
 inside of cakephp's framework.

 I read the documentation, the bakery, youtube videos, google for 
 tutorials.  

 But can I find a simple menu building example ? 
 How to build an admin section with proper routing ? 
 How to connection with hasOne, hasMany ? 
 Building a category tree that lists products in each level with paging ? 

 Oh I have read over Mark Story's Tree Behavior article and attempted to 
 install his Tools plugin .. 
 but trying to get a working example  sigh.   Should I really have to 
 install someone else's plugin
 to build a category system in a website ?

 Quite the frustration is trying to learn this framework ... spinning my 
 wheels.

 Yes I tried the irc channel and basically the first person to respond made 
 me feel like an idiot ... not impressed 
 and then basically linked a bunch of the book.cakephp.org sections .. 
 which I have already read that don't give a proper working example or stop 
 just short of the basic functionality.

  



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2013-10-30 Thread Silver Troy
I have been reading the cakephp book, looking on youtube, googling any 
examples I can for the past 3 weeks.  
Feel like I am banging my head against the wall and could easily do this 
stuff outside the framework.

The documentation is lacking real examples that beginners could actually 
build on.

I have hacked together a front end to my test website, a front end user 
section and an admin section (still can't route  to
it properly).  

Should I have a separate login code for my administration section ? 

Should I be creating an AdminController or do I still admin functions in 
all my controllers  (aka admin_index,admin_edit,admin_delete).

How to build a category manager in the administration section ?   Should I 
be using someone's plugin/helper from github ?  

They should really attempt to put together a tutorial site that shows more 
than the blog example.  
A website that has a user registration, login, profile section.  Listing of 
products or articles and an administration
section would be something very valuable to all beginners.

 I do see the potential benefits of cakephp but finding decent best 
practices (examples)  on the internet is pretty bad.  Considering
cakephp 2.x was released 2 years ago or so?  

Not to mention I am already reading about cakephp 3.0   .   Maybe a 
concentrated effort to develop 20,50, 100 best practice examples for 
cakephp 3.0  would be very beneficial.



On Wednesday, October 30, 2013 6:45:02 AM UTC-4, euromark wrote:

 Silver Troy: Mark Story != dereuromark ;)

 Most beginners find the book sufficient - and properly explaining the 
 basics.


 Am Mittwoch, 30. Oktober 2013 05:30:20 UTC+1 schrieb Silver Troy:

 I have to agree with the above comments about trying to find real 
 examples with cakephp 2.x.

 The cakephp youtube channel doesn't give you any video examples on simple 
 concepts.

 The documentation has a lot of useful information, but little examples to 
 put them into action.

 Doing the blog tutorial example was pretty quick and easy.  Adding 
 authentication the Andrew perkins
 youtube videos were good.  

 But seriously Cakephp you need to develop some real world simple 
 examples.  Cause its frustrating
 as a php developer to be attempting to figure out how to properly code 
 inside of cakephp's framework.

 I read the documentation, the bakery, youtube videos, google for 
 tutorials.  

 But can I find a simple menu building example ? 
 How to build an admin section with proper routing ? 
 How to connection with hasOne, hasMany ? 
 Building a category tree that lists products in each level with paging ? 

 Oh I have read over Mark Story's Tree Behavior article and attempted to 
 install his Tools plugin .. 
 but trying to get a working example  sigh.   Should I really have to 
 install someone else's plugin
 to build a category system in a website ?

 Quite the frustration is trying to learn this framework ... spinning my 
 wheels.

 Yes I tried the irc channel and basically the first person to respond 
 made me feel like an idiot ... not impressed 
 and then basically linked a bunch of the book.cakephp.org sections .. 
 which I have already read that don't give a proper working example or stop 
 just short of the basic functionality.

  



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2013-10-30 Thread Reuben Helms
With regards to admin routing, it looks like you're interested in doing
prefix routing.

As listed here [
http://book.cakephp.org/2.0/en/development/routing.html#prefix-routing],
you'll need to do the following:

Set up admin as a routing prefix in app/Config/core.php

Add the admin_ prefix to any controller functions that should only be
accessible via the admin URL (i.e. /admin/users/index would have a
admin_index() in UsersController, and corresponding
app/Views/Users/admin_index.ctp)

That is all you should need to do, though if you want to set up /admin to
default to a specific page, then use the second code example in the link
(the one setting up Router::connect('/admin', ... ).

 Should I have a separate login code for my administration section ?

That's an application specific question, rather than a framework question.
 A framework question would be How can I implement distinct authentication
for my admin routes? (assuming you've decided that is what you want to
do).  That one I can't answer, because I've never had to do it.  I usually
have roles associated with the user, and if they have an Administration
role, or something similar, I will redirect to the /admin URL when the user
logs in.  Development is easier if there's just one list of users, however,
if you have a business requirement for seperate logins, you may even want
to consider having a separate administration app and use plugins for
functionality that is common between the public and the admin apps.  By
having individual apps, you won't need to be concerned with admin routing,
either.

 Should I be creating an AdminController or do I still admin functions in
all my controllers  (aka admin_index,admin_edit,admin_delete).

For the sake of argument, lets say you are sticking with a single app for
public and admin, and you have prefix routing working, then you shouldn't
need an AdminController.  It should be enough to just prefix controllers.
Plus, if you has an AdminController that handled all admin actions, it
would end up being a bit of a god object, and when it comes to maintenance,
you will have a bad time. You'd have to have an index for each model you
want an index for, and that would start to break convention, and get you in
a bad mood when nothing works they way you expect it to work.

 How to build a category manager in the administration section ?   Should
I be using someone's plugin/helper from github ?

If you can find a category manager that does the job for you, does what you
want/need and has the appropriate license, then use it! If you find a
helper that does what you need or help, use that too!  As with any
software, it's your judgement call as to other things like support, and
trustworthyness.  At the very least, have a look at the source code to see
how it works, and if it is doing anything nefarious or has security holes.

I've found the examples in the book very handy.  I've also found the tests
in CakePHP handy, if you're wondering how to use a particular function.

CakePHP is a tool. It's a mallet, it's a brick, it's a trowel, it's mortar,
it's wood, it's nails. It's up to you to put those things together make the
application.  I'd welcome you to take a look at other MVC frameworks such
as Symphony2, Code Igniter, ASP.NET MVC and Django (to name a few), and see
if they give you the same answers you're after with CakePHP.  MVC
development is all much of a sameness, with quirks between the different
frameworks.  I reckon CakePHP does a lot of things right, and gets better
with each release.



On Wed, Oct 30, 2013 at 11:41 PM, Silver Troy educatedr...@gmail.comwrote:

 I have been reading the cakephp book, looking on youtube, googling any
 examples I can for the past 3 weeks.
 Feel like I am banging my head against the wall and could easily do this
 stuff outside the framework.

 The documentation is lacking real examples that beginners could actually
 build on.

 I have hacked together a front end to my test website, a front end user
 section and an admin section (still can't route  to
 it properly).

 Should I have a separate login code for my administration section ?

 Should I be creating an AdminController or do I still admin functions in
 all my controllers  (aka admin_index,admin_edit,admin_delete).

 How to build a category manager in the administration section ?   Should I
 be using someone's plugin/helper from github ?

 They should really attempt to put together a tutorial site that shows more
 than the blog example.
 A website that has a user registration, login, profile section.  Listing
 of products or articles and an administration
 section would be something very valuable to all beginners.

  I do see the potential benefits of cakephp but finding decent best
 practices (examples)  on the internet is pretty bad.  Considering
 cakephp 2.x was released 2 years ago or so?

 Not to mention I am already reading about cakephp 3.0   .   Maybe a
 concentrated effort to develop 20,50, 100 best practice examples