A CMS for simple blog with Ajax

Hi,
After lot of days of working I made a CMS with PHP, MySQL and jQuery for a simple blog.
It is part from process of learning.
The script it’s free, you can find more details, and test it to this page: Blog CMS with Ajax - jQuery .
What is your opinion about ity?

Not a bad start, however there are a few things that I would have done differently.

Some of your template files use php to echo out the html content. This is slower than closing the php and just using normal html.

It looks like you are connecting to the database as soon as the script is loaded and not when it is needed. You should be checking to see if there is a database connection when you run your queries, and if not then connecting then.

It also doesnt look like you are using any sort of caching system for database results. Blogs can get big so its good practice to use disk caching or memcache to store the results without having to load them from the database all the time.

Also from a speed perspective you use the function isset() alot. Something like if($_POST[‘’]) works the same as if(isset($_POST[‘’])) and is fatser since you arent calling a function all the time.

I like the use of HTML5 though, and your use of PDO.

That depends on what your error_reporting is set to. If you have any and all errors, notices and what-not being reported (as you should during development), if($_POST[‘key’]) will trigger an ‘undefined index’ notice if there is no key called ‘key’.

The OP’s isset() usage is correct :slight_smile:

@OP: I pressed the ‘Modify page’ button on the Usage page while logged in. Nothing happened though. I was using Chrome :slight_smile:

nice look. But how to use it? thanks

Hi
Thank you all for your reply.

  • @doddsey you are right about cache system, but i’m not so experienced. For example, it’s need to access database to actualize number of visits, and last visited, I don’t know how to do that if I cache the page, so, it’s need to actualise these data to each page. I added cache for menu, and on client side if it accesses again the same page.
    [quoe]OP: I pressed the ‘Modify page’ button on the Usage page while logged in. Nothing happened though. I was using Chrome[/quote]
    I tested the page with Chrome, and the Modify Page button it works.

nice look. But how to use it? thanks

In the archive with the CMS there is a Read.html file with explanations, also to the page: http://www.coursesweb.net/scripts/blog/usage-and-structure/usage_7

Hi,

Using Chrome in OpenSuse 11.4 in linux and your see article worked but provide no ‘clear’ way to get back to the main list of articles.

General nice use of AJAX

Regards,
Steve