# |
Feb 5th 2018, 22:54 |
quecosa |
People in this channel, you are beautiful helping people, i apreciate slackebot for his help with this ajax thing i needed to do. :) |
# |
Feb 5th 2018, 22:18 |
night_wulfe |
Nevermind, I got it. This did the trick. App::build(['View' => APP.'Plugin'.DS.'PluginName'.DS.'View'.DS.'Themed'.DS.'ThemeName'.DS]); I didn't think it was working because somewhere else in my code I was overriding the default layout with $this->layout = 'something else'; |
# |
Feb 5th 2018, 21:58 |
night_wulfe |
I cannot move to CakePHP 2.0 as the code base is too large. The issue I'm having is that CakePHP 2.x, so far as I can tell from that documentation, requires that I put my plugin themed files in App\View\Themed\ThemeName\PluginName\etc, which breaks encapsulation of the plugin. I'm trying to add App\Plugin\PluginName\View\ThemeName to the view search paths so I can template within my plugin and override the core application views |
# |
Feb 5th 2018, 21:55 |
saeideng |
https://book.cakephp.org/2.0/en/views/themes.html |
# |
Feb 5th 2018, 21:54 |
saeideng |
and move to cake 3 if you able :,) |
# |
Feb 5th 2018, 21:53 |
saeideng |
there are different folder name `Themed/themeName/....` |
# |
Feb 5th 2018, 21:52 |
saeideng |
in cake 2 |
# |
Feb 5th 2018, 21:52 |
saeideng |
just |
# |
Feb 5th 2018, 21:52 |
saeideng |
cake 2 and 3 is same about |
# |
Feb 5th 2018, 21:51 |
night_wulfe |
I've read the 2.x theme information, and unless I'm missing something, I'm not seeing how to do what I want to do. |
# |
Feb 5th 2018, 21:50 |
night_wulfe |
I am using CakePHP 2.x, sorry. |
# |
Feb 5th 2018, 21:50 |
saeideng |
https://book.cakephp.org/3.0/en/views/themes.html |
# |
Feb 5th 2018, 21:50 |
saeideng |
night |
# |
Feb 5th 2018, 21:48 |
saeideng |
see more here https://github.com/FriendsOfCake/awesome-cakephp#authentication-and-authorization |
# |
Feb 5th 2018, 21:48 |
night_wulfe |
Let me ask a different way; How can a Plugin replace an application's view file? I have control of both the application code and the plugin code. |
# |
Feb 5th 2018, 21:47 |
saeideng |
Dovev , maybe https://github.com/ADmad/cakephp-social-auth |
# |
Feb 5th 2018, 21:45 |
saeideng |
if you use Csrf component .... |
# |
Feb 5th 2018, 21:45 |
saeideng |
because that inserted by ajax |
# |
Feb 5th 2018, 21:44 |
saeideng |
in this case you can not use Csrf for city input(s) |
# |
Feb 5th 2018, 21:44 |
Dovev |
hey there, i am kind of new to cakephp. I would like to use OAuth2 to let users login with Discord Accounts. Would somebody help me to find out how to do this? |
# |
Feb 5th 2018, 21:43 |
saeideng |
just |
# |
Feb 5th 2018, 21:40 |
inoas |
HTTP POST, not sure why |
# |
Feb 5th 2018, 21:40 |
inoas |
well not sure if that is still state of the art content type handling ... and you want to rewrite the finders in cakephp3 style - it will be easier that way anyway |
# |
Feb 5th 2018, 21:40 |
quecosa |
:D |
# |
Feb 5th 2018, 21:40 |
quecosa |
ill try it |
# |
Feb 5th 2018, 21:39 |
saeideng |
:) |
# |
Feb 5th 2018, 21:39 |
saeideng |
mentioned like is not full example |
# |
Feb 5th 2018, 21:38 |
quecosa |
if it works ill love you forever! |
# |
Feb 5th 2018, 21:38 |
saeideng |
that is very easy |
# |
Feb 5th 2018, 21:38 |
quecosa |
? |
# |
Feb 5th 2018, 21:38 |
quecosa |
oh saedeng that cannot be that easy, really |
# |
Feb 5th 2018, 21:38 |
saeideng |
cake 3 and 2 is same in this case |
# |
Feb 5th 2018, 21:37 |
saeideng |
https://stackoverflow.com/a/28185392/8016450 |
# |
Feb 5th 2018, 21:37 |
quecosa |
i tough i could skip the php mysqli select part of the normal jquery ajax way to do it |
# |
Feb 5th 2018, 21:37 |
inoas |
you just need two very dead simple cakephp actions - one that fetches all states and one that fetches all cities filtered by a given state |
# |
Feb 5th 2018, 21:37 |
quecosa |
thanks ill look for it then |
# |
Feb 5th 2018, 21:36 |
inoas |
chain select jquery ajax xhr |
# |
Feb 5th 2018, 21:36 |
inoas |
look for chain select jquery or something |
# |
Feb 5th 2018, 21:36 |
inoas |
the tricky part is not cakephp but javascript |
# |
Feb 5th 2018, 21:36 |
quecosa |
ive seen tutorials, but those tutorials are for old cakephp versions |
# |
Feb 5th 2018, 21:35 |
quecosa |
or a tutorial for cakephp 3 plz |