SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Feedback on my CMS?

    Hello,

    For the past few weeks, I've been working on a PHP/MySQL CMS of my own.
    It's very lightweight and nothing too fancy. I have used it a couple of times with clients in the past to allow them to update their own site.

    However, I know it has it's flaws, and I wonder if any kind gents could take a look at it and perhaps show me where I'm going wrong(code efficiency/modularity, security etc.). I'm looking to use OOP for a new CMS I'm working on.

    ****************** EDIT **********************

    >> http://www.yousendit.com/download/dV...TmEzS3BMWEE9PQ

    I would love any feedback on this. Like I say, I know it's got flaws, but I just want to be better at what I do.


    Thanks for any help.
    Last edited by invision2; Apr 18, 2009 at 23:54.

  2. #2
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your best bet would be to post a link to your CMS download here.
    I doubt anyone would be sending you messages so that they can review your code.

    Of cause if your code is not open source, then you may not want to shared it with others

  3. #3
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hi Michael,

    Just a few quick points...

    Do NOT use short tags, always use the full <?php & ?>. This promotes much better cross server compatibility and means your doesn't go pop when it encounters XML tags.

    Try to separate the code from the HTML, you don't need to use OOP to do this, although it becomes much easier when you do. Try a few MVC tutorials, there are plenty about, although only a few which don't use OOP.

    Implement a few functions to save yourself repeating code, for example, in a few of the pages you have many database calls for data. This leads to variables like $sql, $sql2, $res, $res2 etc.., create a function like queryDatabase($sSQL) which would return an array.

    Oooo, Pizza's here!
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *bump*

    I have now added a link for the CMS.

    I've included a README.txt file in there too.

    Any questions, just ask.

    I would really appreciate any feedback with this whatsoever.

  5. #5
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    I didn't look at much of it tbh, but heres a few things I noticed.

    Line ends viewed in vim on win32 all end with ^M which is a nuisance for me.
    Some require paths seem to be inside the document root, you should have all includes in an includes folder which should be enabled with some global setting.
    I know it isn't OOP-based, but you don't use PDO

    I didnt look at much else after that, sorry.

    It all depends what this cms is for, you aren't distributing it are you?

    This is all wrong:

    include ('../includes/loggedin.php');

    includes should be agnostic about the location of the include file, except its relationship to the main include_path ini directive.

    include ('mycms/loggedin.php');

  6. #6
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies with this one guys, really appreciate the time taken to look at it.

    Just wondering, where do you think I should go from here?

    Can anyone give me advice on perhaps a book I should buy or tutorials I should read up on to improve my coding?
    Seems I have a lot of work to do/catch up on.

  7. #7
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  8. #8
    SitePoint Wizard
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    1,285
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great stuff Anthony, PHP in Action looks particularly worthwhile.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •