Hi all, I've released on GitHub a Blog solution called NVBlog. Why another one? Because I've based all my site to it and I wanted to share my work. It has some useful features and help people to understand how to implement functionality.
Features I've implemented: - Packages: there is my package, called NVUtility - Modules: I've created 2 modules, NVAdmin for a complete administration panel and NVBlog, for the blog functionality - Internationalization: modules can be translated creating a new language file - Theme: BE and FE are themed, so you can create your own theme and modify very quickly!
I think it could be useful for learning purpose too.
Looks nice, I'll look into it, when I have the time.
A few things:
At Github: Installation there's a typo: It probably should say "install/database.sql".
Your blog has a problem with the middle-width. div#menu.menu displays not correctly.
How are you storing the images? From your NVUtility/classes/nvuimages.php file and your install/database.sql file I assume that you store only the filename in your database. When, how or where, and most importantly (for me) why do you do it that way?
Thanks for looking at it, I'll have a look for the problems you wrote.
For the images it is a complicated answer: in this first release of the blog images are not present because I didn't have much time; the functionality already exists (and I've used it in my personal blog) so I'll release it in the weekend.
First of all I decided to insert every image name in the database so it could be possible to perform a search through images base on some other information, not only the filename.
The second point is that based on this functionality (I've created the complete upload / resizing process) user will be able to create some "albums", a set of images. Every image will be a part of different set, so I decided to use a database entry to manage it because it was the easiest solution.
Let me know if you find other problems, I used it as a "learning" application with complete functionality so I could be done some errors (either with Twitter Bootstrap, I don't like the theming part very much :-) )
Hi Rob, I didn't find the second error, can you help me to find it? The problem is in the back-end or in the front-end? Which page and which resolution do you use?
Hi Rob_Anybody, If you are interested in the usage of images I've updates the application: a user can add images and admin them in the administration panel.
I've added a little menu in the contents and now every uploaded image can be inserted in the CKEditor very quickly!
sorry I was away from my keyboard for a few days: You'll note the second error (if it is one) when you adjust the width of the browser. The header ("Blog Projects etc." will jump more than once. Somewhere around 950px.
Thank you for this code - it seems to be a great introduction to FuelPHP, and I've already learned a lot from it.
I have a few questions.
Why is title_already_exists handled with a Database_Exception instead of using a 'unique' validation?
I have a habit of keeping validation rules in the model for easy reuse. Is there a reason to keep them in the controller's methods instead?
Also, can you tell me a little more about the structuring of your directories? It seems odd to me to have /nvblog/classes/controllers/nvadmin/, and, feels like /nvblog/classes/controllers/admin would make more sense. Looking now, though - is it because those controllers extend Controller_NVAdmin?
I'm still trying to grasp the code, but have only had these minor questions so far. It's been a great learning experience, and I think it will make a great base for my projects, also.
1) title_already_exists was an old exception that I used to check if a content with the same title was already saved to disk. It is called when the "save()" raise an exception, but your idea of a unique validation is better - if you want to suggest it, fork the project and I'll will add it
2) Yes, absolutely yes: my idea was to create a base admin section (that you can find in the module "NVAdmin") to manage the backend of an application, and then add some more modules to the it for the private section. When a module, like the blog, wants a private section it is possibile by extending the "Controller_NVAdmin". I've inserted the code under the folder "nvadmin" to have a structure that will remind me which module it extends. (you can find more information here, in a tutorial I wrote about it: http://www.marcopace.it/blog/2012/11/fuelphp-separation-between-back-end-and-front-end )
I'm happy that you find it useful, my purpose was to create a learning application with all fuel main feature: - administration - theming - internationalization - images upload - packages - modules - routing