proloser / bakingplate Goto Github PK
View Code? Open in Web Editor NEWBoost your CakePHP baking with a collection of community best-practices built with HTML5BoilerPlate
Boost your CakePHP baking with a collection of community best-practices built with HTML5BoilerPlate
Not sure if this is still a resource concern as I haven't looked at the new 2.1 implementation yet.
I m very new to GIT, tried forking BakingPlate, i m getting below error:
Administrator@HOME-NPR3MLGX9N /c/wamp/www/Plugin
$ cake plate
sh.exe": cake: command not found
I did a fresh install and followed the setup guide and have this problem:
Fatal error: Class 'UrlCacheAppHelper' not found in /Applications/MAMP/htdocs/cakephp/app/app_helper.php on line 24
This may or may not involve generating a new behavior. I need to confirm if behavior methods are called BEFORE core model methods.
I found a solution here and commented an elegant enhancement I plan to use in one of my other plugins.
public function updateAll($fields, $conditions = true, $callbacks = true) { if (!$callbacks) { return parent::updateAll($fields, $conditions); } $db =& ConnectionManager::getDataSource($this->useDbConfig); $created = FALSE; $options = array(); if ($db->update($this, $fields, null, $conditions)) { $created = TRUE; $this->Behaviors->trigger($this, 'afterSave', array($created, $options)); $this->afterSave($created); $this->_clearCache(); $this->id = false; return true; } return FALSE; }Add callback support for updateAll()
Since $scripts_for_layout
contains both css and js, this would defeat our purpose of putting css at the top of a page and js at the bottom. What I propose we do is create a new standardized variabled called $styles_for_layout
, then in our HtmlHelper we should override the css method to use this variable instead. We should examine the code within the method to see if theres any possible way to avoid completely redefining the method and instead only supplement it (before or after the parent method call).
These are now native to 2.1
Instead of bothering to write a github parser that scans for and sorts out cakephp-specific plugins, jose has already done this on cakepackages.com. What we may want to do is look for some sort of integration that queries (and caches) his server for a list of submodules.
The only thing is cakepackages.com has over 600 submodules, a lot of which are potentially useless, making browsing through the selections somewhat... complex. And since effort in 'browsing' should probably be concentrated on the website's development itself I'm not sure what to do.
cakepackages has moved to plugins.cakephp.org - yay!
so the search command needs updating to work again.
Depending on where the scripts are output when using asset compression or not, the js-library should always come before in either scenario.
This ticket will be affected by splitting up css from js
I narrowed the issue down to this line:
Options FollowSymLinks -MultiViews -Indexes
I did a quick google search (and checked with html5bp) and found that a: it's not in the boilerplate, and b: the command is actually this?:
Options +FollowSymLinks -MultiViews -Indexes
Having the +FollowSymLinks
causes err500 on mt.
Proposed update Appears to 404 on my local environment
Hi
When i try to clone the plugin in my app from git I get this error
"The remote end hung up unexpectedly"
With other repository all works fine so I think that there isn't an error in my git client
Many thanks
I had done problems with the url caching plugin because links were actually from the previous page request.
plate bake MyProject
just does not add any submodules (plate is looking for a group named MyProject) nor does it when baking and typing in the path of project when promptedgit submodule update --init
Still looking at whats up - it looks like the group is set to the name of project before the submodules are added
Just pushed some commits that resolve the above - I have also enabled
plate add all -g proloser
Specifically for the pages controller.at least provide the variable in the controller to reminds devs to use it.
Hi,
When I try to create a new project with the console command cake plate bake
, everything is working except the creation of the config/database.php
file.
The error occurs when:
cake plate bake
in the consolelocalhost/app/myapp
so I correct it to localhost/app
database.php
file: it tries to put it in localhost/app/app/config
Discovering the BakingPlate right now, it seems great ;)
Leimi
Talked to Savant, he's got more useful skeleton code located in cakepackges. Will need to get around to merging in some of the app_files code and related views.
Review this document and scroll down to the tag documentation. The tag has 2 unique attributes, and it would be very helpful to facilitate the developer in creating this. We will probably want to make the first argument a custom-passable string to use as the text-content and make the second (or an option) the date-time attribute. Of course, pubdate should be a boolean option too.
One of the features of the method would be to (optionally) attempt to convert the text (first argument) to a timestamp using strtotime()
and then adding it as the attribute. If the attribute is passed, a possible benefit would be different conversion options that can be used to help generate the timestamp.
html5 time method always fails in my projects (tests and app itself)
and I cannot figure out why
<time datetime="Y-M-dTH:i+00:00">1978-12-29 20:20:22</time>
or
<time datetime="Y-M-dTH:i+00:00" format="Y-m-d">Y-m-d</time>
instead of what it should be.
maybe sth changed in the core time helper? seems like its the formatting. i am running unter 1.3.10 head
Hi
First, this is how I extending the Cake-default HTML, Form, and Paginator
public $helpers = array(
'BakingPlate.Plate',
'Html' => array(
'className' => 'BakingPlate.HtmlPlus'
),
'Form' => array(
'className' => 'BakingPlate.FormPlus'
),
'Paginator' => array(
'className' => 'BakingPlate.PaginatorPlus'
)
);
I just try to make a button with Form Helper in my View file, and I wanna disable escaping on button text, here's the code
echo $this->Form->button('<i class="icon-plus"></i> Add', array(
'type' => 'submit',
'class' => 'btn btn-large btn-primary',
'escape' => false
));
When I refreshed the page, I've got this error:
Warning (2): vsprintf(): Too few arguments [CORE\Cake\View\Helper\HtmlHelper.php, line 912]
Stack Trace
vsprintf - [internal], line ??
HtmlHelper::useTag() - CORE\Cake\View\Helper\HtmlHelper.php, line 912
FormHelper::button() - CORE\Cake\View\Helper\FormHelper.php, line 1559
include - APP\View\User\add.ctp, line 69
View::_evaluate() - CORE\Cake\View\View.php, line 923
View::_render() - CORE\Cake\View\View.php, line 886
View::render() - CORE\Cake\View\View.php, line 476
Controller::render() - CORE\Cake\Controller\Controller.php, line 956
Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 193
Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 161
[main] - APP\webroot\index.php, line 92
Well, the bug is in the button
's index on $_tags
property in HtmlPlusHelper
...
'button' => '<button type="%s"%s>%s</button>',
...
When I change the button's array in
$_tags` property to this, it works fine
'button' => '<button%s>%s</button>'
I use Cake 2.2.4
Regards,
Novrian :)
Hi, i encountered a problem during install.
fresh install cake 2.1.3 => /var/www/cakephp2.1.3
per instructions @ https://github.com/ProLoser/BakingPlate/wiki/Setup
in /var/www/cakephp2.1.3 > git clone git://github.com/ProLoser/BakingPlate.git plugins/BakingPlate
in /var/www/cakephp2.1.3/app > ./Console/cake baking_plate.plate
Error: Plugin BakingPlate could not be found.
#0 /var/www/cakephp/lib/Cake/Core/App.php(364): CakePlugin::path('BakingPlate')
#1 /var/www/cakephp/lib/Cake/Core/App.php(225): App::pluginPath('BakingPlate')
#2 /var/www/cakephp/lib/Cake/Core/App.php(542): App::path('Console/Command', 'BakingPlate')
#3 [internal function]: App::load('PlateShell')
#4 [internal function]: spl_autoload_call('PlateShell')
#5 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(216): class_exists('PlateShell')
#6 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(167): ShellDispatcher->_getShell('baking_plate.pl...')
#7 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#8 /var/www/cakephp/app/Console/cake.php(33): ShellDispatcher::run(Array)
#9 {main}
in /var/www/cakephp2.1.3/app > ./Console/cake BakingPlate.plate
Error: Plugin BakingPlate could not be found.
#0 /var/www/cakephp/lib/Cake/Core/App.php(364): CakePlugin::path('BakingPlate')
#1 /var/www/cakephp/lib/Cake/Core/App.php(225): App::pluginPath('BakingPlate')
#2 /var/www/cakephp/lib/Cake/Core/App.php(542): App::path('Console/Command', 'BakingPlate')
#3 [internal function]: App::load('PlateShell')
#4 [internal function]: spl_autoload_call('PlateShell')
#5 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(216): class_exists('PlateShell')
#6 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(167): ShellDispatcher->_getShell('baking_plate.pl...')
#7 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#8 /var/www/cakephp/app/Console/cake.php(33): ShellDispatcher::run(Array)
#9 {main}
i didn't even tried the third step : "./Console/cake cake baking_plate.plate bake [PROJECT_PATH]" as it doesn't seems valid ("cake" is called twice)
Is there something wrong with my install?
Hi ProLoser,
I'm using cakePHP 2.2.1
I followed installation instructions on wiki (Instructions on 2.x), and when I try to run cake BakingPlate.plate I've got the following error :
#0 D:\xampp\php\pear\Cake\Core\App.php(364): CakePlugin::path('BakingPlate')
#1 D:\xampp\php\pear\Cake\Core\App.php(225): App::pluginPath('BakingPlate')
#2 D:\xampp\php\pear\Cake\Core\App.php(542): App::path('Console/Command', 'Bakin
gPlate')
#3 [internal function]: App::load('PlateShell')
#4 [internal function]: spl_autoload_call('PlateShell')
#5 D:\xampp\php\pear\Cake\Console\ShellDispatcher.php(240): class_exists('PlateS
hell')
#6 D:\xampp\php\pear\Cake\Console\ShellDispatcher.php(191): ShellDispatcher->_ge
tShell('BakingPlate.pla...')
#7 D:\xampp\php\pear\Cake\Console\ShellDispatcher.php(69): ShellDispatcher->disp
atch()
#8 D:\xampp\php\cake.php(41): ShellDispatcher::run(Array)
#9 {main}```
Additional info on my cake shell :
-app: cakephp_tes
-working: D:__SERVER\cakephp_tes
-root: D:__SERVER
-core: D:\xampp\php\pear
Is there something wrong with the installations?
Thanks in advance, and sorry for my bad English :)
The docs don't show how to load additional submodules
I found that -c personalmodules does not load anything with browse
I may be doing it wrong - I made some tweaks adding the option to the browserParams (then the -c is shown in help)
but I also needed add other stuff too and this seems to be working
would be great if you could clarify this :)
Hi Guys, I'm having a bit of an issue integrating BakingPlate with my new workflow. I want to have CakePHP itself as a submodule within my project for ease of updates. I'm using CakePHP 2.0. So, I created a blank directory, ran git init
from inside it, then added cakephp as a submodule in a folder called cakephp in the root of my project. I then copied app/, index.php, plugins/, .htaccess, and vendors/ from cakephp to the project root so that I can leave the cakephp folder alone. I edited /index.php and app/webroot/index.php so that CAKE_CORE_INCLUDE_PATH points to ROOT . DS . 'cakephp' . DS . 'lib'
.
So far, so good - with apache's DocumentRoot pointed at the project root, cake's default home displays ok.
Now my problem comes when I try to integrate BakingPlate with this. I want to add BP as a git submodule as well - again for ease of upgrade, deployment, etc. I tried adding BP as a submodule using git submodule add git://github.com/sams/BakingPlate.git plugins/baking_plate
. By cd'ing into /app and executing ../cakephp/lib/Cake/Console/cake
, the cake shell worked, but plate did not show as an available shell. I tried adding symbolic links in /app/Console/Command to /plugins/baking_plate/Console/Command/PlateShell.php and in /app/Console/Templates to the folders in /plugins/baking_plate/Console/Templates. This resulted in plate showing up in the list of available shells from the cake console, and cake plate now shows the cake plate subcommands correctly. But if I try cake plate bake or cake plate browse, I get the following errors:
Error: Plugin BakingPlate could not be found.
#0 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Core/App.php(332): CakePlugin::path('BakingPlate')
#1 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Configure/PhpReader.php(71): App::pluginPath('BakingPlate')
#2 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Core/Configure.php(309): PhpReader->read('BakingPlate.sub...')
#3 /Users/Liquid/workspace/cashback_us/app/Plugin/BakingPlate/Console/Command/PlateShell.php(101): Configure::load('BakingPlate.sub...')
#4 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Console/Shell.php(199): PlateShell->_welcome()
#5 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Console/Shell.php(370): Shell->startup()
#6 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Console/ShellDispatcher.php(177): Shell->runCommand('browse', Array)
#7 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#8 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Console/cake.php(24): ShellDispatcher::run(Array)
#9 {main}
I have tried having baking plate as a submodule in /plugins/BakingPlate, /app/Plugin/BakingPlate, and /app/Plugin/baking_plate, but all result in the same error.
Thanks, Scotty
No idea why we haven't done this by now.
Hi ProLoser/Sams,
I ran into an issue when trying to use PlateComponent - I was getting an error telling me that $this->request was not defined in _checkSSL(). I have forked and uploaded my change - but I'm guessing that this problem may be down to my unfamiliarity with 2.0.
Drupal has a CLI app builder that devs can create 'build configuration' files for how they like their app to get generated.
I think this would be an excellent addition to the plugin.
Developer could create a configuration script with all of their preferred environment options set and pass the name of their build file like cake plate bake -c my_custom_setup
.
The only 'variable' build options we provide currently are submodules, so the dev could supply which ones he wants to be loaded automatically. However as our plugin becomes more variable, he can then specify options in this script (turn auth on/off).
This is of course very future, but I may generate a simple basic support for submodules as a convention we can expand later.
Hello,
I've done a new install of 2.1.1, set up the database, cipher, seed ,etc.
I've pulled from git into the 'plugin' folder on the top level of the install (not app/Plugin). So it's plugin/BakingPlate.
From app I tried to run './Console cake plate' and I get the following:
Error: Shell class PlateShell could not be found.
#0 /var/www/platetest2/lib/Cake/Console/ShellDispatcher.php(167): ShellDispatcher->_getShell('plate')
#1 /var/www/platetest2/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#2 /var/www/platetest2/app/Console/cake.php(33): ShellDispatcher::run(Array)
#3 {main}
Can you help me out? What did I miss?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.