CodeIgniter Forums
Announcing Bonfire - A jumpstart for your web apps - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Announcing Bonfire - A jumpstart for your web apps (/showthread.php?tid=40089)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


Announcing Bonfire - A jumpstart for your web apps - El Forum - 04-28-2011

[eluser]tieungao[/eluser]
Thank kilishan for your clearly answer.

Maybe because im not familar with CI and HMVC,, so it is so difficult with me to use your bonfire.

Can u make a tutorial how to make one article module, manager this in admin panel and display it at public pages (using the complete new templates set with js css and image). This will be the best way for some of newbie like me.

Thank for helping me out.


Announcing Bonfire - A jumpstart for your web apps - El Forum - 04-28-2011

[eluser]kilishan[/eluser]
Well, Bonfire is designed for people who are familiar with CodeIgniter, so that's probably the first hurdle to get over. Smile Not that you can't learn both at the same time. You definitely can.

I am actually working on a ToDo Module tutorial currently. Will hopefully be finished in the next day or two.


Announcing Bonfire - A jumpstart for your web apps - El Forum - 04-28-2011

[eluser]tieungao[/eluser]
hehe i said that "Not familar" means i not understand too much about some professional way like extended and modified standard CI. I've make many projects using CI and i understand about HMVC also.

I come to your Bonfire because i need one admin panel with nice-looking interface with Auth, and i can using it in every projects later. And i belivered u build the bonfire to help ppl do that.

I've searched this at this forum and at google for long time, i've tried pycroCMS, ionze cms, fuel CMS, but only your bonfire match what i need. You can see it easily because i active almost here.

That's great to hear that u will make a tutorial soon. Im waiting for that.

I have some problems more, can u help me to solve :

- Like you said at docs :

With the exception of the Public context, creating a controller for your module for a specific controller is a simple as naming your controller to match the context. A controller for the content context, would be named content.php, while one that shows up in the settings context would be named setting.php. For the public context, the controller should be named the same as the module. For example, a Pages module would have a public controller called pages.php.

I've tried to understand that and I guess u suggest user to name the controller like content.php and setting.php maybe because u add some like at routes.php for auto recognize them, but im not sure.

Note : I see in the core_modules have some controller name settings.php

Thank you for your time and sorry for my English.


Announcing Bonfire - A jumpstart for your web apps - El Forum - 04-28-2011

[eluser]kilishan[/eluser]
You are correct. That is exactly why I am building Bonfire. It's something that I will be using on all of my future projects, also.

There are routes built in which automatically recognize controllers within modules named after the contexts (content, stats, developer, etc.).

So, to create a page in the Content area of the admin pages, you would create a controller file named content.php. A barebones controller would look something like:

Code:
class Content extends Admin_Controller {

    public function __construct()
    {
        parent::__construct();

        Template::set('toolbar_title', 'Manage Articles');
    }


    public function index()
    {
        Template::render();
    }
}

This would automatically create a new submenu item in the Content context called Articles (assuming your module was named articles). It would look for the view file under:

Code:
modules/articles/views/content/index.php

To create the public-facing file, you would do something very similar, but the controller would be called articles.php and would simply be:

You are correct. That is exactly why I am building Bonfire. It's something that I will be using on all of my future projects, also.

There are routes built in which automatically recognize controllers within modules named after the contexts (content, stats, developer, etc.).

So, to create a page in the Content area of the admin pages, you would create a controller file named content.php. A barebones controller would look something like:

Code:
class Articles extends Front_Controller {

    public function index()
    {
        Template::render();
    }
}

The view would be found at modules/articles/views/index.php. The page could be found at http://mysite.com/articles.

Hope that helps you get started!


Announcing Bonfire - A jumpstart for your web apps - El Forum - 04-28-2011

[eluser]tieungao[/eluser]
Thank you so much.

Yes , your instruction is enough for me to get started coding with Bonfire!

Best Regards


Announcing Bonfire - A jumpstart for your web apps - El Forum - 04-28-2011

[eluser]Basketcasesoftware[/eluser]
This might be a bug. I tried moving the css files from the generic assets directory to a themes/default/css folder. I did the same thing with js files. No problem. moving the common view files from the application/view to the themes/default. Fine. All worked. CSS files? No go. Very odd. I've seen the code this and it's the same for js and css (mostly). They call the same file finding function. It's not making any sense (yes, I'm still using .1... I don't know what upgrading will do to my file mods yet :-S )

Edit: I just realized what it is. My backgrounds, site logos and other icons are in the assets/images folder. My css is still pointing to the wrong place. There has GOT to be a better way for that. WITHOUT hard coding image locations in the css files.

Edit: Doh! Moved the contents of the assets/images folder to the themes/default/images folder. It all works now. :red:


Announcing Bonfire - A jumpstart for your web apps - El Forum - 05-04-2011

[eluser]Basketcasesoftware[/eluser]
Just did a HTML-Tidy validation on one of my pages generated with Bonfire. Five validation errors. Apparently the Template::js() function doesn't add the type="text/javascript" attribute. Required in XHTML Strict (which I'm using). Maybe it's the version I'm using. I'll be checking past posts in this thread.


Announcing Bonfire - A jumpstart for your web apps - El Forum - 05-04-2011

[eluser]Basketcasesoftware[/eluser]
No. I'm the first person to discover this issue. You add it to internal js, but not to external js (the default naturally %-P )
Here is your original code block:
Code:
$attr = array(
          'src'=> strpos($script, 'http:') !== false ?
                    
           // It has a full url built in, so leave it alone
           $script :
                    
           // Otherwise, build the full url
          self::$asset_url.self::$asset_base.self::$asset_folders['js'].'/'.$script
);

And here's my addition:
Code:
$attr = array(
          'src'=> strpos($script, 'http:') !== false ?
                    
           // It has a full url built in, so leave it alone
           $script :
                    
           // Otherwise, build the full url
          self::$asset_url.self::$asset_base.self::$asset_folders['js'].'/'.$script,
              'type'=>'text/javascript'
);

Worked like a charm!


Announcing Bonfire - A jumpstart for your web apps - El Forum - 05-04-2011

[eluser]kilishan[/eluser]
You know, I could argue that it wasn't a bug, but that it was an HTML5 feature. Smile But, nah. You caught me. Good catch, too!

Thanks for letting me know. I've added it to the bug list.


Announcing Bonfire - A jumpstart for your web apps - El Forum - 05-04-2011

[eluser]Basketcasesoftware[/eluser]
@kilishan - Ah! But HTML 5 isn't an official W3C standard - yet. ;-P