SimpleCMS has been something I've wanted to actually release for a very long time, though I have also reasons why it has taken this long to actually develop a "releasable copy".

Its been my goal for a VERY long time to try and develop and extremely simple and easily usable content management system.

Right now I'm working on possibly my first version that could actually lead to SimpleCMS's first actual release!

I'll be working on hosting a demo up on my website as well as a link to the source of the stable releases.

Heres how it works right now.

The templating system works a lot like a Wiki page's source. Basically you type in a series of short-hand codes to create your output along with things like line-breaks as <br /> tags as well as HTML support. As an example I'm going to use the page in the database Home.

Home's Source:
Code:
{{Header chunk}}
   <div class="news">
      {{News element LIMIT:5 ORDER:ASC}}
   </div><br /><br /><a href="Post_News">Add a new post</a>
{{Footer chunk}}
Home is a "page" type template. This means that the page can be viewed through the browser by using "Home" as the file name (wikis use the same method for viewing documents by making the location of the document the document's title). "chunk" templates are used for things like the header and the footer which cannot be viewed by directly linking yourself to it. The syntax of the tag is as follows:

Code:
{{reference type [param1:value [param2:value [...]]]}}


In the first source you'll see a tag with the type "element".

Elements are much different then pages or chunks.

Each element has its own corresponding table in the database. Depending on the columns and column types in the table will depend on how and what will display. Each element has a template that goes with it that will manipulate how the element will present itself on the page. Basically you are able to add and remove elements from the database. As an example, the News element has a table set up like this:

Code:
+---------+--------------+----------------+-----------+
|   id    |     title    |      body      |    date   |
| int(11) | varchar(255) |      text      | timestamp |
+---------+--------------+----------------+-----------+
|    1    | Test         | Testing?       | CRNT_TIME |
|    4    | Test Post    | hey all, th... | CRNT_TIME |
+---------+--------------+----------------+-----------+
When the program sees `cms_page_elements` it identifies that `cms_news` is attached to the News element. It checks out the table and sees that there is `id` as the primary key. This is automatically placed by the CMS when you add a new element so that there is always a unique property to each row. It goes through the rest and retrieves the properties of each column for later reference. When it is told to output it grabs the template column from the `cms_page_elements` table in the "News" row. It then stiches together each item from the `cms_news` table into the template. If there is more then one item and the `disp_type` column in the page_elements table is set it multiple then it runs through and concatenates each finished template into one big output string and sends it on through to be replaced with [#News#] in the template.

Now for the Post_News page. As you may have noticed in, there was a link in the previous template for the page "Home".

Below is "Post_News"s template:

Code:
{{Header chunk}}
   <div class="news">
      {{News form}}
   </div><br /><br /><a href="Home">View news posts</a>
{{Footer chunk}}


The next type as you can see is "form". Basically what that does is it generates a form depending on the columns and the needed properties for each row in the table. When you submit, it of course posts it in the DB with necessary NULLs and what not ^^,

So far thats about it!

I know thats a bit of a messy explanation but I'm just kind of throwing that up there to kind of try and explain how it all works.

Right now I have a simple little example up on my home server, which is public now that I have moved and have a better service Razz

I'd rather not post up my IP up on a public forum but I'd love to show anyone who wants to see it. If you want to see it just send me a PM. Right now theres really nothing but an example for how you would make something like a news or a blog site.

EDIT:
I've just recently updated the template system to use only one tag with different parameters, allowing easy implementation of other developer's own "types" for use with their add-ons and such.

I'm going to be adding some different things to the template system, mostly to help out those who don't know much layout or CSS, and also to make it easy for those who DO know to code it much easier within the CMS Smile
Pick me! Pick me! Very Happy I've got an account with a nice free webhost, with php 5. No ads or anything intrusive.
magicdanw wrote:
Pick me! Pick me! Very Happy I've got an account with a nice free webhost, with php 5. No ads or anything intrusive.
He ended up getting Surpass hosting. This seems pretty nicely thought out, actually.
I actually haven't gotten my hosting just yet, but I'll be getting it with in a few weeks.

Also magicdanw, do I have phpMyAdmin access to the DB? It would be a lot easier to run the dump through there ^^,

@Kerm: If you're putting up a version as well then I sent you the link with everything you need to run it. Basically the only thing thats up right now is just a simple example for outputting and work with page elements as well as templates (or, chunks).

Suggestions, comments and constructive criticism is greatly appreciated!
Okay, I've updated the core a ton. I've completely changed around the template system (which has actually cut down the size like crazy, surprisingly) which will also open up the ability for custom types by add-on developers Smile

I think I'm finished with the template system for now, any tweaks from here will be minor and probably won't change how it works.

I'm going to try and write up some documentation for this, but I'm not the greatest at it. I'll probably just throw up some function descriptions and examples Razz
After a LONG break away from working on this, I've finally gained the motivation to work on it agian.

SimpleCore has been finished for quite some time, so now I'm working on SimpleCMS.

So far I've pretty working on the authorization process. My idea is to skip the username / password system and make a new method of authorization.

I have a couple ideas and I've fiddled with the one I'm about to explain for quite some time. I can't quite get the idea right, and I'd be glad to hear everyone else's ideas.

Heres my idea:
    You have three stages of authorization.

    First stage consists of entering an assigned six to eight digit number to verify which account you're logging in to (this is like a password so its not something you want to give out).

    After entering a valid authorization id number (AIN), you're taken to and stage two. If you have allowed the computer you're sitting at quick access by adding the ip address to a list allowed ips, then this stage is optional. If you choose not to use this then you can go through and look at basic things (looking at statistics, messages, et cetera). If you continue through Stage 2 it will ask you for name verification and a changeable pin number the user has set. After this then you have full access... unless of coures your IP address is not on the allowed list.

    Stage 3 is only for those who are not on the allowed ip list. If your ip is not allowed then Stage 2 gives you access to basic things just as stage one does if you are on a verified ip. Stage 3 will ask you for your email address as well as a custom stage 3 password the user sets.
Now, all of this seems like a lot (even to me), but the verification stages are optional depending where it is you're accessing the admin cp from. Remember: Stage 2 Verified, and Stage 3 Unverified are for access to everything. This means managing pages, editing codes, templates, users, and module structures.

Does anyone have ideas on how to change this up a bit with out completely butchering it? 0x5

I think its a pretty good idea, and I'm not a HUGE fan of the username / password thing. Its too common and I like change Razz

I just really haven't thought up anything better 0x5
you could be an OpenID consumer (and provider if you so choose) and just have your database remember which OpenID's are allowed ACP access, which are used for commenting only, and which are banned.
I didn't really think about that, but thats a bit like what it is.

I'm planning on making it so that all login attempts are logged and those that fail are logged with information regarding what accounts they tried to access and the information they supplied that voided the authentication process. Only the user who's account was trying to be accessed can see the detailed information. The log can then be reported from there if the user see's it fit. The reading of reported logs are ristricted to auth level 6 and up. Level 6 and up grants access to look at log overviews. Members with auth level 8 and up are allowed to view detailed information.

I personally like the idea of multiple stages of indentification authentication. Stage one on a trusted ip allows simple access (which is easy for just jumping on and checking something simple), Stage two on a trusted ip allows full access. And then Stages one and two on an unknown ip gives simple access, and stage three gives full access Razz
Okay, the authentication process has been finished! I ended up just using user/password type thing but I made it so you have to know the AID of the user you're logging in to first before you can type in their email address and password. A bit of added security Razz

I'm going to have to, again, recode a lot of stuff. Delete stuff, rearrange stuff, and recode stuff. But its all part of the process! Smile

I'll keep you guys updated if you all are interested.
swivelgames wrote:
Okay, the authentication process has been finished! I ended up just using user/password type thing but I made it so you have to know the AID of the user you're logging in to first before you can type in their email address and password. A bit of added security Razz

I'm going to have to, again, recode a lot of stuff. Delete stuff, rearrange stuff, and recode stuff. But its all part of the process! Smile

I'll keep you guys updated if you all are interested.


Just remember, more checks does NOT MEAN MORE SECURITY. The entire security system can always be crippled by the weakest link, and having a two stage login process is just a PIA and will annoy the crap out of your users while making them no more secure than just a username/password. It would be far more secure to drop the AID check and change the login from their email address (which, after all, is very public) to a username that is *not displayed* (have a separate display name). Then do things like check that their username is different from their email and displayname.
Yeah, I really didn't mean exactly what I said when I said added security.

I'll probably change it up real soon but for now I'm just going to leave it. I'm busy on restructuring the core class so I can't really hop back on to that right now.

I was thinking about just moving back to username and password anyway, but eh. I thought it would be kind of interesting to try and come up with a new way of authenticating someone but I failed Razz haha.

I'm now working on restructuring the template system. It should help make templates useable by more then just pages and automated elements. I'm probably going to end up making it a completely new class to make it really easy.

Btw, thanks for tip Kllrnohj.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement