Using Dwoo 2.0 in CakePHP - cakephp

Heading
Hey,
I would like to use the new Dwoo 2.0 Template Engine in my CakePHP app. But I can't find any manual with a step by step instruction. I know it's just in a beta status but it would be great if someone could help me out.

You might want to follow up on
https://github.com/ganglia/ganglia-web/tree/master/dwoo/Dwoo/Adapters/CakePHP
and make this some clean "Dwoo" Plugin with a DwooView class you can then switch out via
$this->viewClass = 'Dwoo.Dwoo';
See https://github.com/predominant/TwigView as an example how its done properly (in this case for Twig, though).
Don't forget some test cases and a good documentation and I bet in no time lots of other people will join in and also use and enhance your view class.

if you want to use Dwoo 2 with CakePHP framework, it's possible to ork with you to update the Dwoo 1 Adapter to the version 2 of Dwoo.
Let me know!
best regards

Related

Datatable Plugin for CakePHP 4

I have been upgrading my application from cakephp 3 to cakephp 4. I was using fheider/cakephp-datatables and I have come across ypnos-web/cakephp-datatables where both support cakephp 3.
I am currently looking for a cakephp-datatable plugin which supports cakephp 4.
If anybody has an idea, I would be happy.
Thanks in Advance.
Isn't the built-in pagination is what you are looking for ? you can do advanced dynamic database links with your HTML tables.
I successfully use ypnos-web/cakephp-datatables on CakePHP 4.2.7. It works very well for me.
You might have to play around a bit to get it working correctly. Read some of the issues (open and closed) on the ypnos-web/cakephp-datatables github repository and you can likely get it working.
Good Luck!

Migrating angular 1.6 and angular 5

Is it possible to migrate angular1.6 and angular5.
My question:
Without changing angular1.6 code and new angular 5 code run simultaneously?
How to define the code structure for this?
How to grunt these angular1.6 and angular5 code?
Requirement :
Because i need to run application angular1.6 and angular5 independently.
Please give some example to solve this
I do not understand what you mean by running it simultaneously ... please clarify on that. It sure is possible to migrate and you can search for and read many post of people trying to do so. There is even some official advice available #angular.io ... but from my personal experience, I would not do that. Use AngularJS version as a mockup and refactor it freshly into Angular5+ ... it is a tedious job to upgrade from AngularJS 1.6 to Angular5. Can be done, but per my opinion it is not good approach. Learn from what was bad about your AngularJS and try make it better in Angular5, step by step.

CakePHP 3 and ACL plug in

I am trying to make a simple ACL using CakePHP 3, and there are no tutorials for it in the cook book (only for cakephp 2 and now acl doesn't exist in cakephp3)
Question 1
I am trying to install the acl plugin from https://github.com/cakephp/acl, how may I do that?
Question 2
Is there any comprehensive and beginner friendly tutorial on how to make an ACL on CakePHP3? I've trying searching everywhere, but found nothing. If anyone could guide me on how to do a simple one it would be much appreciated.
Many thanks
USE cakephp-3acl-example project to creating permission and granding permission for users
https://github.com/mattmemmesheimer/cakephp-3-acl-example
Question 1 I am trying to install the acl plugin from https://github.com/cakephp/acl, how may I do that?
Like any other plugin? See the documentation.
The readme.md itself contains instructions as well but also a warning:
Note: This is a non-stable plugin for CakePHP 3.0 at this time. It is
currently under development and should be considered experimental.
Maybe try it and provide feedback to the developers?
Question 2 Is there any comprehensive and beginner friendly tutorial on how to make an ACL on CakePHP3? I've trying searching everywhere, but found nothing.
If anyone could guide me on how to do a simple one it would be much appreciated.
ACL is always the same, if you know how ACL works you can implement it in any language and framework. If you don't know how, read about how ACL in general works.
But a better idea might to simply use the plugin you already found and help testing and completing it if you encounter issues.
burzum is correct that the installation instructions and documentation are available at https://github.com/cakephp/acl .
I am cutting over from a 1.3 implementation so have not gone through setting up a new acl database.
I have not seen a comprehensive doc on how to setup ACL, the 'short' version I have in my notes is:
1) setup 'Auth' as per the blog example (yes Auth is not ACL but this is what I am using it for)
2) install ACL using composer
3) override 'isAuthorized' in AppController with a check like:
...
use Acl\Controller\Component\AclComponent;
use Cake\Controller\ComponentRegistry;
...
public function isAuthorized($user){
$Collection = new ComponentRegistry();
$acl= new AclComponent($Collection);
$username=$user['username'];
$controller=$this->request->controller;
$action=$this->request->action;
$check=$acl->check($user['username'],"$controller/$action");
return $check;
}
You can follow this plugin.
CakePhp3-AclManager
And the tutorial (step by step) here
If you don't know Japan language, use google translate.
Good luck.

Hide all references to framework cakePHP

For security purposes id like to hide all references to the CakePHP framework that I have used to build my site. Can anyone offer any help on the best way to go about this pls? so far Google hasn't yielded any useful results.
The real, non-sarcastic answer is:
There's absolutely no reason to hide the fact that your app was built in CakePHP - for security purposes, or any other purposes. Just don't worry about it.
For debug mode 2 (which you must have for a production site) as far as i have seen only cookie has a mention of cakephp which you can remove simply using
Configure::write('Session.cookie', YourCustomCookieName);

Is there a tutorial for using cakephp and uploadify?

Does anyone have a good tutorial implementing cakephp and uploadify?
Have you seen this one: http://phpdev.ro/how-to-use-uploadify-with-cakephp.html
I've also created a CakePHP plugin for Uploadify. I guess it's still kinda beta, but it seems to work for my needs. It's also open-source, so it can be a good starting point for you if it doesn't 100% suit your needs.
http://www.am05.com/2011/01/06/using-uploadify-in-cakephp
The url for that tutorial has changed.
The correct url is http://phpdev.ro/how-to-use-uploadify-with-cakephp.html

Resources