Hari's Corner

Humour, comics, tech, law, software, reviews, essays, articles and HOWTOs intermingled with random philosophy now and then

LiteDoodle - Simple PHP comics/image blogging system

Filed under: My software by Hari
Posted on Thu, Mar 20, 2008 at 14:59 IST (last updated: Thu, Oct 30, 2008 @ 22:59 IST)

I've written a new blog tool in PHP called LiteDoodle. It's a simple, configuration driven image blogging system, ideal for small webcomics. Doesn't use MySQL or any databases.

Before you test it out, make sure you read the install-readme.html file. It has some useful information. It's a very rough-and-ready tool, so you won't find much polish in the code, but it does the job and is not very complicated.

Download: LiteDoodle.zip (25 kB)

48 comment(s)

  1. Where's the demo? :D

    Comment by (visitor) on Fri, Mar 21, 2008 @ 21:32 IST #
  2. Ah, nevermind. I installed it myself and you can see the demo here: http://creativeupload.com

    Yeah, I was bored and registered this domain last summer or so. Maybe we could turn it into a community driven comic blog for people to upload their comics to. Hmmm...

    Comment by (visitor) on Fri, Mar 21, 2008 @ 21:56 IST #
  3. Oh awesome! Good work, Hari. Please make sure you get some publicity for this!

    Comment by Sudipta Chatterjee (visitor) on Sat, Mar 22, 2008 @ 07:51 IST #
  4. Thanks Drew, for testing out the script. About a community driven comic blog, I'm all for it. Let me know how I can help! :D

    Sudipta. I know. I've already shared it with a couple of comics communities on the internet.

    Comment by hari (blog owner) on Sat, Mar 22, 2008 @ 09:20 IST #
  5. Well, a community site would be cool. Either allow anyone to upload their comic or modify LiteDoodle to allow user accounts, which would mean make it a database driven backend.

    Comment by (visitor) on Sat, Mar 22, 2008 @ 18:27 IST #
  6. LiteDoodle is too simple to be modified so much.

    If indeed we need to work on a community comic blogging system, we have to work on a new solution or use one of the pre-existing CMSes and modify them to suit our needs.

    Comment by hari (blog owner) on Sat, Mar 22, 2008 @ 18:49 IST #
  7. Yeah, agreed. Not sure what existing CMS would do but it would require some heavy modifications.

    Comment by (visitor) on Sun, Mar 23, 2008 @ 02:37 IST #
  8. There's already ComicPress (based on WordPress) but that's for a single blog.

    However, that would be a nice starting point.

    Comment by hari (blog owner) on Sun, Mar 23, 2008 @ 08:06 IST #
  9. Not sure if it's easier to use existing CMS or create one from scratch. The one thing though creating from scratch would be to know that it's probably more secure and starting from scratch, you build it how you want it to work.

    Using existing code, especially of one that is widely and heavily used is subject to attacks from the evil people. ;)

    I guess I better find the time and speed my python learning up a notch, I would love to create one using Python if I do. But then again, I'm always a frontend type of guy when it comes to websites. Also spare and copious amounts of time are always against me as well. :(

    Comment by (visitor) on Mon, Mar 24, 2008 @ 20:10 IST #
  10. Drew, I can definitely assure you that for a complex CMS script such as the one we require, building one from scratch would take ages. Especially one which supports multiple users and user-levels (along with all the permissions system, session handling, content organization etc.)

    I think we must think of several options here and not just using a unified multi-user community CMS script.

    Comment by hari (blog owner) on Mon, Mar 24, 2008 @ 21:00 IST #
  11. Well, if I were to do it with Python, there is Plone that is based off of Python. Very powerful and most Python programmers I know say they'd recommend it.

    http://plone.org/

    Comment by (visitor) on Mon, Mar 24, 2008 @ 21:31 IST #
  12. Plone seems a tad overkill (?) but nevertheless is an extremely interesting option. We need to play around with it a bit to get an idea of what it is all about!

    Comment by hari (blog owner) on Mon, Mar 24, 2008 @ 21:42 IST #
  13. Heh, I'm downloading it now and installing to my home server. :)

    Comment by (visitor) on Mon, Mar 24, 2008 @ 21:56 IST #
  14. I've always been wary of the tag "CMS" - they always confuse me as to how they're structured and why I should use them.

    But Plone seems to be different from the common-or-garden PHP-MySQL CMS solution, so I'll keep an open mind about it ;)

    Comment by hari (blog owner) on Mon, Mar 24, 2008 @ 22:07 IST #
  15. Well the one thing I would like is that content by users is moderated in a sense. Reading up on plone now seems to be very structured with permissions on users and has a lot of ways for authentication as well. Might be overkill but then again, strip out what's not needed and only build on what is desired out of it.

    But yeah, that's why I said for something like this, might want to build from scratch. Would take a lot of time and dedication but really that's the only way to get what you need out of it without all the extra crud that comes with CMS's or Blogware.

    Comment by (visitor) on Mon, Mar 24, 2008 @ 22:17 IST #
  16. Have you looked at deviantart and other such sites? Is that the kind of thing we're looking at? Or something smaller?

    Comment by hari (blog owner) on Mon, Mar 24, 2008 @ 22:20 IST #
  17. Something smaller. Basic, just a place where users can upload their comics and or artwork. Their creative side. That way it matches the domain name I suppose. ;)

    Doesn't b2evolution have the option for users to have their own blog or handle multiple blogs? Something like that would work.

    Where there's a main page that might have the most recent posts from users and then they have their own space.

    Comment by (visitor) on Mon, Mar 24, 2008 @ 22:37 IST #
  18. Drew, you've hit it. :D B2evolution indeed does allow multiple blogs and they can be configured for single/multiple users as well.

    Comment by hari (blog owner) on Mon, Mar 24, 2008 @ 22:54 IST #
  19. Plone does seem like overkill after installing it. Maybe that'll be a side project to help learn Python.

    Comment by (visitor) on Mon, Mar 24, 2008 @ 23:10 IST #
  20. b2evolution installed. :)

    Comment by (visitor) on Tue, Mar 25, 2008 @ 00:44 IST #
  21. Drew, that's great. Let me know how I can help you with the design and administration of the site (if you want my help at all) :>>

    Comment by hari (blog owner) on Tue, Mar 25, 2008 @ 09:33 IST #
  22. Cool. I've enabled registration, feel free to register and I'll make you an Admin. I tested and found that they have a plugin available to create blogs upon registration for that user, which I'll need to install.

    Comment by (visitor) on Tue, Mar 25, 2008 @ 19:08 IST #
  23. Drew, thanks.

    If you do enable registration, then be sure to install the latest anti-spam updates or you'll be deluged by a flood of spam registrations.

    We need to do a bit of work, including customizing the look and feel of the website to make it unique and appealing. Also we need a bit of content as well in the home page to draw in some response. :)

    I think you need to rethink enabling blog creation on new user registration, because that can lead to a lot of spam.

    Even I had to disable user registration here because of spam user problem :-/

    Comment by hari (blog owner) on Tue, Mar 25, 2008 @ 19:57 IST #
  24. Yeah, good points. I've disabled user registrations now temporarily while we get the site in order.

    Comment by (visitor) on Tue, Mar 25, 2008 @ 20:16 IST #
  25. Cool script.

    Comment by EdgeVerse (visitor) on Wed, Mar 26, 2008 @ 00:34 IST #
  26. Thanks Edgeverse.

    Comment by hari (blog owner) on Wed, Mar 26, 2008 @ 08:21 IST #
  27. This was far easier for me to implement than someryC. I appreciate all the work put into this!

    Comment by TGecko (visitor) on Thu, Jun 26, 2008 @ 13:05 IST #
  28. Thanks TGecko. Are you using my script on the URL above? If so, a link back to this page would be appreciated. Others can also find the script that way.

    Comment by hari (blog owner) on Thu, Jun 26, 2008 @ 16:01 IST #
  29. Done and done. :D But could you add tips on how to use the rss script on the included readme file? That's something I'm still struggling with...

    Comment by TGecko (visitor) on Fri, Jun 27, 2008 @ 12:00 IST #
  30. In what way do you want help with the RSS file?

    RSS is just a subscription. Users click on the RSS link on your blog and subscribe with a newsreader/Firefox Live Bookmarks. If you want to change the number of latest items on the RSS feed, change line in the config.php file:
    // Number of RSS entries to publish as feed
    define (NUM_FEED, 10);

    to whatever value you want (other than 10).

    TO include the RSS link in your blog theme (I see you're using a custom design), just add a link to the RSS file anywhere on your blog.

    Also add this line inbetween the <head> </head> of the index.php file.

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss.php" />

    Comment by hari (blog owner) on Fri, Jun 27, 2008 @ 12:12 IST #
  31. Thanks very much for the help, I think I've got it now. :D I was just thinking that a bit about RSS in the readme file would help RSS-newbies like me :P

    Comment by TGecko (visitor) on Fri, Jun 27, 2008 @ 13:25 IST #
  32. No problem. The only reason I didn't mention anything about RSS feed was that I took it for granted that it works out of the box (so to speak).

    In this case, you had changed the theme, so I think you missed out the RSS link in the header.

    Generally no changes are necessary to get the RSS feed to work. Only thing you might want to change is that number of recent items.

    Comment by hari (blog owner) on Fri, Jun 27, 2008 @ 13:35 IST #
  33. I love this system. It's so easy to use. I have learned alot about php from the modifications I've made. Thanks for all your hard work on it.

    Comment by Jim (visitor) on Fri, Feb 20, 2009 @ 08:44 IST #
  34. Thanks a lot Jim. Glad you found it useful and happy to see the changes you've made to it to adapt it to your needs! :D

    Comment by Hari (blog owner) on Fri, Feb 20, 2009 @ 08:52 IST #
  35. What would I need to do to add the comic image to the rss feed?

    Comment by Jim (visitor) on Sat, Mar 28, 2009 @ 10:59 IST #
  36. Jim, open the file rss.php

    You should search for a string like this:
    <?php echo get_comic_description ($comic['name']) ?>

    Just below it and *before* the ]]> add this text:

    <img src=<?php echo SITE_URL . COMICS_DIR . $comic['name']; ?> alt="comic" />

    If you want to put it above the description, put the code above the description, just after the <![CDATA[ start tag.

    Comment by Hari (blog owner) on Sat, Mar 28, 2009 @ 14:58 IST #
  37. Thanks!

    Comment by Jim (visitor) on Mon, Mar 30, 2009 @ 09:15 IST #
  38. No problem. Glad to see you've fixed your RSS feed.

    Comment by Hari (blog owner) on Mon, Mar 30, 2009 @ 13:03 IST #
  39. Hi Hari,
    If you've ever been to Webcomic planet, they check updates by RSS. Mine doesn't show up and this reason was given to me.
    "Jim your RSS feed is invalid, it’s missing the field which shows when your RSS entries were published"
    Any ideas, and as always,Thanks.

    Jim

    Comment by Jim (visitor) on Wed, Apr 29, 2009 @ 10:08 IST #
  40. Hi, Jim, the RSS feed is not invalid just because it's missing an optional element. Maybe the people at webcomic planet require that field to be available to process the RSS feeds.

    Ask them what field is required (the name of the element) and I'll tell you how to add it to the RSS code.

    Comment by Hari (blog owner) on Thu, Apr 30, 2009 @ 08:48 IST #
  41. Thanks i will do that. What I noticed is that the RSS has the same date displayed for each comic. And it happens to be what ever day you happen to look at it. Thanks.

    JIm

    Comment by Jim (visitor) on Fri, May 1, 2009 @ 03:32 IST #
  42. Jim, I will look into it when I get the time.

    The RSS has 2 kinds of publish date: one for individual entries, which is displayed correct in the feed, but I think I didn't specified the publish date for the entire feed as a whole. I think that part has to be added to the feed for it to work correctly.

    Comment by Hari (blog owner) on Fri, May 1, 2009 @ 08:46 IST #
  43. Sorry to be a pain, but is there a way to get it to pull a .desc type file to fill in the publish date in the rss? Thanks again. I've done a bit more tweeking to add my behind the scenes so it displays a picture and comment like the comic does without a 2nd site.

    Comment by Jim (visitor) on Tue, Jun 16, 2009 @ 09:53 IST #
  44. Hi, Jim. It should be possible. Actually I'm thinking that the limitations of this system is such that a complete re-write will be needed if you want more advanced date-handling, because the current system purely works on the filesystem's record of date and time of modification and nothing else.

    I assume only a SQL database-based solution will give you total flexibility to handle date and time in such a manner as to re-arrange archives according to your own specified date rather than taking the file modification date.

    The simplicity and automated aspect of the current system is entirely due to restricting it to filesystem-derived information. If you want to add more complexity, you will lose most of the automation and ease of use of the current script and it will become just like any other blogging platform. I will also have to program an additional web-based admin panel.

    I could write another version of LiteDoodle with SQLite, but it won't be at this point of time because I'm a bit busy at the moment and cannot dedicate myself to programming.

    Comment by Hari (blog owner) on Tue, Jun 16, 2009 @ 10:00 IST #
  45. The way everything works is fine. I like the way I can upload the latest comic and the description, comments, links are ready to go. I update everyday so the archive automation isn't very useful to me, one really long list of comics, so I don't use it. No big deal.

    The rss issue is a minor inconvience that is specific to one site really. If I could get it to work, it would increase my readership quite a bit. That's where my thinking is. The date is displayed when the rss is loaded into the browser not when it was updated on the server. So all comics have the same day and time.

    If I wanted something more complicated I'd use wordpress with a comic plug in. This works great for me because I don't have to set up a database or worry about it failing. I'm using it for all of my comics current and past for this reason.

    I'm sorry for the trouble.

    Comment by Jim (visitor) on Tue, Jun 16, 2009 @ 10:48 IST #
  46. No trouble Jim. Actually I wanted to explain why I didn't do complex date handling. It would really bloat up the script without substantial gains in the bargain.

    As for RSS feed readers, that's a different issue. I've noticed that most of them usually handle the date on the client side, so I don't think that problem can be fixed by the feed itself. It depends on the way the RSS reader is programmed. Even the RSS reader I use, Akregator, displays only the date when the feed was fetched, not the actual date of publication.

    Hope that clarifies the other issue.

    Comment by Hari (blog owner) on Tue, Jun 16, 2009 @ 11:02 IST #
  47. Well, I got it to work by manually entering the date for a single strip. Which is fine by me. Thanks again Hari.

    Comment by Jim (visitor) on Fri, Jun 19, 2009 @ 11:47 IST #
  48. Hmm... I think I didn't understand your problem initially. I'll take a look at your RSS feed and see what you've done exactly.

    Glad to know you got it to work, though :-)

    Comment by Hari (blog owner) on Fri, Jun 19, 2009 @ 16:16 IST #

Comments closed

The blog owner has closed further commenting on this entry.