TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
Another CMS Idea
  • I'm late to the game, but lately I've had a need for a CMS. I mean, I made this static HTML/CSS website for a customer, but now the customer wants to have an admin backend to adjust it. I thought it would be neat where all I had to do was create an admin folder, drop in some kind of Kohana-based CMS app, create snippets, files, and images, and then edit my HTML/CSS pages for the site such that they pull from the snippets, files, and images out of the CMS.

    Also, I went looking to download and try out Hanami, but no download link is available yet.

  • That's not what the core kohana framework is about (it's not a goal, as the subject implies). There are lots of CMS applications written in kohana, but none (that I know of) are "drag and drop" like that.

  • maybe try using wordpress as the cms

  • You could try my Kohana open source CMS at https://github.com/fabricasapiens/Wi3 but the very thing that it is not, is drag-and-drop :-) I'm working on a much more fluid setup process though, so you might check it out in the future.

    In the meantime, I would suggest using any of the proven CMSs, like Wordpress, Drupal or Joomla....!

  • If you want drag 'n drop CMS try http://impresspages.org/

  • Kohana is made for programming. Draging and droping is not really programing, so yeah, you should use another software like a CMS.

  • I don't know where this drag and drop thing got started. That's not what I mentioned. Someone started that tangent. Obviously I have learned by now that the goals of Hanami are completely different than my interest. I wish I could delete this thread, but I can't.

    But anyway, I will explain something that I intend to build with Kohana. Imagine a static website of several pages of content, images, and files (like PDFs or zips). Now the customer wants an admin system for this so that the static website can be edited in some parts. Dropping in WordPress and using WordPress API might work, but it has too many things to offer, many of which wouldn't apply to this concept, and the learning curve for the admin system might be too much for some of my clients. Therefore, something even easier might be suitable. So, I was thinking of something that lets me categorize content snippets, images, and files with a major and minor category, and then have a unique heading. For the content snippets, I would use something like a jQuery-based rich editor like CLEditor. I would attach an admin login screen and some extra menus for anything else I want to do, admin-wise, like approve billing on members or something. Of course these extra admin menus would be outside of the scope of the base project, but I would make it easily extensible. Then, I would provide an API so that within a few minutes I could replace the snippets of content in the static XHTML pages with content coming out of this admin system.

    Cushycms.com comes close, but I like the interface of FrogCMS a little better, CushyCMS.com charges for their product and keeps it on their server, and I like the idea of a free, open source script that everyone can download and improve via GitHub. The other thing is that Cushycms.com uses FTP to do what it needs to do, while my script here, instead, would use straight PHP because it's already on the server.

  • Is this a little bit in the direction you're searching? : http://fabricasapiens.nl/testsite/adminarea/content/ (login with admin/admin)

  • @willemmulder. Yep. Close. Thank you for sharing. Was thinking it would look sort of like FrogCMS admin theme with tabs at the top saying "Content", "Files", "Images", and "Categories" -- and then one could add extra menus for doing custom things like confirming orders, or whatever you want an admin system to do.

    Categories - click that and you can define the major and minor categories for your content, files, or images. These are just container groups and only go 2 levels deep.

    Content - click that and see a list of major categories. Click a major category and see minor categories. Click a minor category and then see a list of content items for edit or removal, or an item to add a new content item. When you add or edit a content item, you can change the title of it, which is just an internal label. Then, it uses a jQuery-based richeditor like CLEditor for editing text. I would revise that editor so that one could link to images or files used in the CMS. (BTW, when perusing the categories, you can see a star for recently added or updated categories in the last 7 days, and can see a count of content items inside.)

    Files - click that and see major cats, then click one to see minor cats, and then click one to see files. A file has an internal label. You can add or remove files.

    Images - click that and see major cats, then click one to see minor cats, and then click one to see images. An image has an internal label. You can add, crop, resize, replace, or remove images.

    I'd like to have a couple admin levels in the system. One can set up something for handing over to a customer. The other is like a customer who can only change things, not remove them.

    Anyway, once everything is in the mini-CMS, a simple API can be used to pull this content back out to the static HTML pages. For instance:

    html goes here
    `<div class="someclass">`
      `<?= $CMS::getContent('about/president/welcome-message');`
    `</div><!-- .someclass -->`

    (Please remove backticks in code above. I don't quite understand this markdown stuff yet.)

    Note above that the major category was "about", the minor category was "president", and the content piece was called "welcome-message".

    The other thing it would do is cache these entries so that they are in a database, yes, but when they are viewed the first time, each snippet is stored in a file cache until the time they are edited again. And that could be an optional switch one could turn on or off in a config file.

    The end goal would be that you could take a static XHTML website, create a subdir called admincms, copy the admincms files into there, run the install, login as admin, set up major and minor cats, create content, images, and files. Next, edit the static XHTML website such that you require_once() the cms library, and then use the super easy API to publish content into the site.

  • Ah, I understand now. My CMS is a little 'overcomplicated' in that sense that it want to have all the CMS and template stuff internally, and then you can make the CMS work an .htaccess from a directory. It's not ready for production anyways ;-) You really want it to work just from a directory and that's it, right?

    I have created something like that (albeit very simple with only text snippets) some time ago for a client, but I like to have one central place that is always up to date instead of a bunch of 'redundant' (and/or outdated) folders lying around for every project. Still, the simplicity and portability is of course a pro...!

  • Hi, willemmulder.

    Tried to test your CMS and ran into a trouble. I got sticked at step 4. Db is created, but tables not. What additional info should I provide so that you can give me some help? Thanks.

    P.S. For tests I took a working domain name and provided a user with all needed writes to work with Db.

  • What is the error you get? Simply that the tables could not be created? Or is there also some black error text on the background?

    Probably it has to do with your grants. The CMS needs at least "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER" in that order. What GRANTS do you have? You can output the grants after this line


    with echo Kohana::debug($grants); exit; . Could you try that? Thanks!

  • And if you have a github account, could you create an issue there? I think Github is the better place for discussing problems with Wi3...!

  • Just above the toolbar with 'steps' I get:

    Warning: file_get_contents(http://wi3.*****.ru///app/setup) [function.file-get-contents]: failed to open stream: HTTP request failed! in /usr/home/luka/_projects/php/wi3_kohana/Wi3/setup/index.php on line 387

    apache log:

    [Mon Jun 06 11:43:18 2011] [error] [client] PHP Warning: file_get_contents(http://wi3.*****.ru///app/setup) [function.file-get-contents]: failed to open stream: HTTP request failed! in /usr/home/luka/_projects/php/wi3_kohana/Wi3/setup/index.php on line 387, referer: http://wi3.*****.ru/setup/

    root access has enough writes. The Db is created, but not more...

    btw, adding debug output you told me about ends with:

    Fatal error: Class 'Kohana' not found in /usr/home/luka/_projects/php/wi3_kohana/Wi3/setup/index.php on line 282

    P.S. All messages I provided are 'black error text on the background'.

  • posted at GitHub

  • Thanks, I will investigate this further on GitHub!

  • Problem has been solved. It was issues with the PHP version...! if anybody else has this problem and gets here with Google or something: PHP needs to be 5.3 or higher... I included a check now in the installer.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion