May 11, 2010 in Feedback
I started making my first app and was told by the dev article that I needed IN_DEV mode on.
I followed the tutorial and besides the fact that it took me a lot of extra steps not mentioned in the tutorial I got it enabled.
A couple things not mentioned
1) As you make master_skin you must also make master_skin_xml and master_skin_lofi if you want to have any chance of re-importing from php files into database.
2) Same as #1 except with master_css
3) For some reason if you don't delete/rename the print.css file the website displays half way and looks horrible.
Now to my main concerns. I use IN_DEV beacuse of all these debug functions such as mapping template output, and showing errors in that cool orange window instead of pure text, and various other features. I don't use it to make any skins, just to make the skin templates for my application.
This is where I encounter some problems. Since templates are managed in php files I edit those in the same format as you would expect in the ACP, then import when done. There must be some problem somewhere because I expierence tons of issues versus someone who doesn't use IN_DEV. It's come to the point where I develop my application half in IN_DEV and the other half with it off. I am a relatively new developer and these couple of things are upsetting me. I spent 300 revisions and 4 hours with Anthony and myself over one simple thing caused by IN_DEV and a foreach loop.
Also why are foreach loops put into another function during build? Doesn't this throw the scope of the variables off, not allowing it to work?
I guess the point of this topic was that not everyone reading those dev docs are licensed php developers. Maybe just a couple warning boxes like on php's online manual that say "warning: make sure to do x..."
I too came across these issues when starting development. Has anything been done to improve the IN_DEV tools in 3.1? Particularly cleaning up the application build process/tools.
We don't put a ton of work into developers tools because frankly, they're for developers, and the majority of our customers don't use them. That said, cleaning up the process is something on our radar, but no big changes have been made for 3.1.
1) Technically, you don't need to, but you will get an Exception during import, yes. The master skin templates will still have been imported however, so you can just hit back in your browser.
2) Same as #1 for CSS
3) Yes, this is true, and something I've noted several times and never documented.
Regarding the templates, I'm not clear on what problems you're facing. The syntax in the PHP files is identical to the ACP as you've noted. There's nothing really special here - we all (here) develop using the .php files with IN_DEV enabled, and import into the ACP.
As for how foreach loops work, it's a function of the template engine, and not something you need to be concerned with. The same limitations apply if you add templates from the ACP by the way. Yes, scope can potentially get lost if you set a local variable, but there's nothing stopping you from setting a class property instead (i.e. instead of <php>$something = 1;</php> do <php>$this->something = 1;</php>). The variables passed into template x will be passed into the function that executes the foreach loop as well, so any local variables that IPB itself sets should be available to the function handling the foreach loop.
Why do you need to load the skin from PHP files? How about an IN_DEV mode while leaving the templates out of IN_DEV mode? I use IN_DEV strictly for the tools in AdminCP and debug info. Other than that, the skin thing is just a hassle. Half the time I end up turning IN_DEV on just for the AdminCP and leaving it off on the public side.
Yeah it's kind of a pain getting IN_DEV mode set up in 3.0 and I assume 3.1. You can automatically generate some directories in the ACP while others must be done manually. And then you have to delete the print file in master_css and some other tedious things that I would have never figured out if others hadn't told me. I wish they would consider having all of that done with one tool in the future or something. Sometimes I forget a step or two and have old files being used also.
This will help. Available in beta 3 in the tools directory:
Thanks a ton :P
This topic is now archived and is closed to further replies.
403 - Forbiddeen
Started 22 minutes ago
Started 1 hour ago
Started 3 hours ago