PHPDocumentator is creating .cs files instead of .css - css

I've got PHPDocumentator installed and it's almost working as excepted. However, for some reason, it's creating the CSS files as "style.cs", "print.cs", etc. (only one "s"), while these files are referenced as "style.css" etc. in the HTML files.
So is there any way to make PHPDocumentator create all these files with a ".css" extension?
Here is an extract from the creation log:
creating s:\xampp\htdocs\idol\doc\/\media
copying s:\xampp\htdocs\idol\doc\/\media/layout.cs
copying s:\xampp\htdocs\idol\doc\/\media/print.cs
copying s:\xampp\htdocs\idol\doc\/\media/style.cs

#Laurent: it seems your copy of PHPDocumentator mal-functioned. Please check this post.

Related

How to use bootstrap configurator along with GWTbootstrap3 (i.e. what is bootstrap.min.cache, and how is it generated?)

you can use the bootstrap configurator (http://getbootstrap.com/customize/) to configure your own bootstrap version (e.g. set the variables like #grid-float-breakpoint to configure the navbar collapse point). I want to use this feature within my project which is based on gwt using https://github.com/gwtbootstrap3/gwtbootstrap3based.
I managed to create my download my configured bootstrap.zip using the method above.
The zip contains (as expected):
\bootstrap\js
\bootstrap\css
\bootstrap\fonts
just as GWTBootstrap3 project
gwtbootstrap3-0.9.3\org\gwtbootstrap3\client\resource\js
gwtbootstrap3-0.9.3\org\gwtbootstrap3\client\resource\css
gwtbootstrap3-0.9.3\org\gwtbootstrap3\client\resource\fonts
So I tried to replace the bootstrap files out of css with the genereated bootstrap files.
But then I recognized that in the GWTBootstrap3 project there are files named *.cache.min.
How / when are these files generated? This is explained already here: GWT Caching Concept
So obviously we want to replace the bootstrap files to remain "cache"d.
Can you please forward me a step-by-step description of how to use bootstrap configurator along with the current GWTBootstrap3 project , i.e. what files need to be replaced?
What I already tried (with no success):
0.) Create a bootstrap.zip with the online configurator and download it
1.) Rename gwtbootstrap3-0.9.3.jar to gwtbootstrap3-0.9.3.zip
2.) Extract
3.) Replace bootstrap-3.3.6.min.cache.css with bootstrap.min.css (from the configurator) and replacing meaning the bootstrap.min.css is renamed to bootstrap-3.3.6.min.cache.css
4.) Put all files from bootstrap.zip into the respective directory and renaming it accordingly as explained in 3.) to effectively replacing the original file
5.) zip and rename it again to gwtbootstrap3-0.9.3.jar
6.) replace the lib in my project
But after doing so I continuously get the compiler errors:
Package org.gwtbootstrap3.client.ui cannot be found.
Any help greatly appreciated
Best regards
Hannes
I can provide an answer which should work for most of the configuration changes. First of all I had to learn that renaming gwtbootstrap3-0.9.3.jar to gwtbootstrap3-0.9.3.zip then unzip, rezip and rename to jar does NOT WORK!!!
So here is a step by step tutorial of how to configure your bootstrap and use it with gwtbootstrap3.0.9.3 . I am not sure this will work for future editions but it should work for bootstrap3.
Configure and download your new bootstrap
https://github.com/gwtbootstrap3/gwtbootstrap3based.
Unzip your new bootstrap, this will provide the subdirectories css,
fonts and js. So you will have something like bootstrap/css etc.
Now copy your "old" gwtboostrap3.0.9.3 jar to the base directory, so
that the bootstrap.zip and the jar lie in the same directory.
From the commandline issue jar xf gwtbootstrap3.0.9.3.jar which will
create the 2 directories META-INF and org in your directory
Move into org\gwtbootstrap3\client\resource\css
Copy the FILENAME (not the file!!!). In my gwtbootstrap version the
file is called "bootstrap-3.3.6.min.cache.css".
Rename the file bootstrap/css/bootstrap.min.css to
bootstrap/css/bootstrap-3.3.6.min.cache.css and REPLACE
org\gwtbootstrap3\client\resource\css\bootstrap-3.3.6.min.cache.css
with bootstrap/css/bootstrap-3.3.6.min.cache.css
Rename the file bootstrap\css\boostrap-theme.min.css to
boostrap\css\bootstrap-theme-3.3.6.min.cache.css and REPLACE
org\gwtbootstrap3\client\resource\css\bootstrap-theme-3.3.6.min.cache.css
with bootstrap\css\bootstrap-theme-3.3.6.min.cache.css
I left out the fonts directory because my changes did not change
anything with the fonts
Rename bootstrap\js\bootstrap.min.js to
bootstrap\js\bootstrap-3.3.6.min.cache.js and REPLACE
org\gwtbootstrap3\client\resource\js\bootstrap-3.3.6.min.cache.js
with bootstrap\js\bootstrap-3.3.6.min.cache.js
In the basedirectory (where the bootstrap directory lies) issue from
the commandline: "jar xf gwtbootstrap3.0.9.3.jar META-INF org". This
should produce your new gwtbootstrap3.0.9.3.jar lib
In your project replace the old gwtbootstrap3.0.9.3.jar with the new
lib.
In case you get lots of java errors telling you it cannot find the classes you mixed up the paths. Please let me know if this worked out for your. Perhaps someone can provide a shellscript to automate the whole process.
One tip: Customizing your bootstrap gives you more control, e.g. for handling the point at which the navbar becomes uncollapsed (at the configuration page look for the key called "#grid-float-breakpoint"). Don't forget to enter a value suitable for you (mine was 800px). Don't forget to add px at the end!!

changing file names, how to?

I've created some forms following this approach:
iron g:template cars/create_car
and the following files were created:
create_car.css
create_car.html
create_car.js
Easy question - if I want to change the name of the files where else do I have to update to keep my changes in sync with the rest of the application?
Thank you!
Mark
You won't be out of sync by changing file's name.
The only things which would change is the file load order, according to the documentation:
HTML template files are always loaded before everything else.
Files beginning with main. are loaded last
Files inside any lib/ directory are loaded next
Files with deeper paths are loaded next
Files are then loaded in alphabetical order of the entire path
On your case It's wouldn't probably cause any issue, feel free to test.

WARNING: All changes made in this file will be lost

So I have a general question. When you convert your .ui file into a .py file with pyuic, on the top part of the .py file it says:
WARNING! All changes made in this file will be lost!
Is is serious ? How will changes made in the file lost ?
I'm sorry I realise this is not a smart question but I just want to make sure what this is about and that it will not comprise anything afterwards!
Since this is a generated file, it is a result, not a source. Thus:
When you distribute your project, you shouldn't be distributing that file. So, whatever you do to the file, won't reach your customers anyway.
Whenever your project is built and the source .ui file is changed, the output will be regenerated - and whatever changes you made to the output file, thus lost.
What this means is: You’ve used a .uic file to generate a .py file, therefore if you modify the later manually ( i.e : create a class , or adding a comment etc...) and subsequently re-generate a file via puic those will be lost.
That’s why you should create a main.py file and import the generated .py file into it leaving the original untouched.
If at a later stage you need to add a button and a label for example, you do so via qdesigner which gets you your new .uic file you create a .py
with the puic and voila your gui is modified your old .py erased by the new one but everything in your main.py stays the same.
Hope this makes sense..
Provided you have generated .py file from the .ui file and will not be making any changes in the .ui file, changes will persist.

Using Assemble, generate HTML files from multiple data files using one template file?

I am trying to use Assemble to generate multiple static files from multiple data files using one template.
In more detail, I have 12 JSON files representing the data for cooking recipes, and one Handlebars file, recipe.hbs, with a layout file of default.hbs.
I want to output an HTML file based on each of those JSON files.
File Structure:
/templates
/data
recipe1.json
recipe2.json, etc.
/layouts
default.hbs
/pages
recipe.hbs
Output:
/output
recipe1.html (based on recipe1.json)
recipe2.html (based on recipe2.json), etc.
It sounds like this should be possible using collections, but I can't seem to wrap my head around how to set up the Grunt file.
Thanks.
I created this gist: https://gist.github.com/doowb/ca6f3321a05f6ac727e5
that has the code in the Gruntfile.js file for dynamically creating a pages list with the combined recipe template and the recipe data.
These lines are the key to creating the pages array. They could be moved into another file and required in to make the grunt file cleaner.
This line adds the pages array to the pages options on assemble so they'll be built.
If you don't have any other pages to be built, use this line to set the dest without pulling in any other pages.
Hope this helps.

What is the purpose of files[] in .info?

I've just started learning discovering the changes to Drupal 7, and I just found the files[] array now required in the mymodule.info. From what I've found, it is required to add the mymodule.module file to the list, but what other uses does it have?
From what I've read I figured I should be able to separate my code into several files, for example I wanted to make a mymodule.blocks.inc to contain all the code for my blocks, but it seems like the mymodule_block_info() function never runs.
Am I doing something wrong, or is this not how it is supposed to be used?
As the documentation says:
files (Optional) Drupal now supports a dynamic-loading code registry.
To support it, all modules must now declare any code files containing class or interface declarations in the .info file.
This is only used if the file you specify in files[] contains a class or an interface. If so, the file will be auto-loaded only when needed.
No other files should be declared using files[].
At the beginning it was to make a files registry for each module, but it's not longer used as Drupal do it by himself.
If you want separate your module in multiple files, you should include them in the top of your .module file.
The way I see it, files specified as files[] are meant to be supporting files and called upon when needed. Implemented default Drupal hooks should be specified in the .module file or in the $module.$group.inc file in order for Drupal to recognize them. See hook_hook_info().
Also, see the note in the documentation under files at http://drupal.org/node/542202.

Resources