Subscribe to my space and sci-fi newsletter

When you sign up for my newsletter, you'll get a free sci-fi short story: Starfarer, monthly updates on space science and sci-fi, and updates on my writing projects!

    I won't send you spam or share your email with anyone. Unsubscribe at any time.


    Popular blog posts

  • Total Share: Personal Computer Market Share 1975-2010
  • Celebration
  • Monarch Thing-A-Day Challenge!
  • I love Korean Starcraft
  • Why HTML 5 sucks!
  • Recent forum posts

  • Online Assignment Help in Ireland
  • Micro History Episode 2 is up!
  • My article on the history of public messaging is up on Ars Technica!
  • Micro History Episode 0 is up!
  • How to find the best fiction ghostwriter?
  • Discussion Forum

    Discussion forum

    Monarch Thing-A-Day Challenge!


    Post #: 75
    Post type: Blog post
    Date: 2010-12-13 11:34:59.000
    Author: Jeremy Reimer
    Tags: Monarch

    Now that Monarch has been released to the public at version 0.24, I’ve decided to crank things up a little bit.

    Starting today I will add one feature per day to the system. They may not always be big features, but they will address missing functionality that the old system (both Drupal and PHPBB) offered.

    I have no particular order that I plan to do these in, but I’m trying to hit the most obvious ones first-- the ones that you would use all the time.

    Monday’s feature is a Last Post link, to let you instantly jump to the last post in a thread by clicking on the name/date in the "Last post" column.

    EDIT: Testing smilies in blog posts. :D :D


    Jeremy Reimer on 2010-12-14 10:23:13.000

    Tuesday is the addition of the old PHPBB "smileys" database, so when you type a smiley code it changes it into the appropriate smiley image.

    Jeremy Reimer on 2010-12-14 15:03:36.000

    Testing smilies: :D :sagrin: :unf:

    Jeremy Reimer on 2010-12-14 15:17:21.000

    More smilies! :smam: :thumbsup:

    Jeremy Reimer on 2010-12-14 15:33:56.000

    Testing more smilies and posting from blog rather than reply to thread. :D

    Jeremy Reimer on 2010-12-14 15:34:33.000

    Another test :) ;) :sagrin:

    Jeremy Reimer on 2010-12-14 15:35:55.000

    Still another test :lol:

    Jeremy Reimer on 2010-12-14 16:26:55.000

    I think this calls for a banana party!

    :bananaparty:

    Ajar on 2010-12-14 17:54:11.000

    Bananaparty!

    Jeremy Reimer on 2010-12-15 11:15:55.000

    Wednesday's feature is a User Profile editor, so users can change their password, user name (maybe? not sure if I want user name changes) and select an avatar.

    AllYorBaseRBelong2Us on 2010-12-15 12:32:07.000

    :sailormoon:

    :)

    Jeremy Reimer on 2010-12-15 17:22:09.000

    Okay, I added in the user profile editor, but right now it only lets you select your email address and avatar. I would let you edit your password but the trouble with that is that you have to do a confirm thing to make sure you entered it correctly, and that should really be a separate module.

    You also can't edit rank or total posts or user name unless you have Monarch powers (aka rank 100 or above). Editing user names is tricky because it messes up the whole posting system, but it is possible if you have Monarch powers. I may have to rewrite that part later to use UserID rather than user name, and in fact rewrite posting stuff as well. Right now a lot of things are tied to your user name rather than user ID which makes changing names difficult.

    Test User4 on 2010-12-16 16:05:13.000

    Thursday’s feature is rather small, but kind of important: the ability to edit one’s posts.

    Users can only edit their own posts. There are no time limits for editing (yet). Admins can edit anything. It doesn’t clutter up the post with "this post was edited on blah blah blah", which I always thought was a bit silly.

    Right now it only works for replies, not for the original post, but that will be fixed soon. :)

    :dance:

    Jeremy Reimer on 2010-12-16 16:06:00.000

    Heh, I was logged in as Test User4 when I wrote that. Oh well, what he said was correct! :lol:

    Jeremy Reimer on 2010-12-17 16:05:03.000

    Today's feature is for users to be able to delete their own comments. I have added a confirmation page so that you can't do that accidentally.

    I will probably be pruning the comments a lot now of the old test posts!

    HitScan on 2010-12-21 07:19:25.000

    While I do think that having "Edited by BLAHBLAH on BIGTIMESTRING" is a waste of space, it might be nice to stick a little "Edited: 2010/12/21" up in the same line as the post date. Perhaps if it's edited by another user (Especially?) it could be something like "Edited: 2010/12/21 by USERNAME"

    Jeremy Reimer on 2010-12-21 10:22:20.000

    Ah, interesting idea. I'll think about it...

    Jeremy Reimer on 2010-12-21 13:49:39.000

    The Thing-A-Day Challenge(tm) is taking a brief break for Christmas, but I'm working on a method to identify unread posts so that it's easy to see if any new posts have arrived, and see what you've read and what you haven't.


    Jeremy Reimer on 2010-12-21 15:07:55.000

    I think I might have cracked it! Kind of a combination of an elegant and jury-rigged solution, but I think it works!

    Jeremy Reimer on 2010-12-21 15:26:32.000

    Ooh, uncovered an obscure bug. If you delete the last post, it doesn't update the "Last post" entry in the table. So you get a kind of 'ghost post' where it says it is there and then you click on it and.. it's not there! oooh!! :eek2:

    I'll write it up and put it in the bug list, but it's low priority right now. Kind of a cool bug actually.

    Test User4 on 2010-12-21 15:29:16.000

    Hi! I'm Test User4! I'm testing to see if this new post comes up as new while I'm simultaneously reading the thread on my main account on another computer.

    Jeremy Reimer on 2010-12-21 15:33:49.000

    Okay, it doesn't, because the thread is already in the "read list" of the other user. What I need to do is whenever anyone posts, go through each user in turn and check to see if the thread number is in the read list and if so delete it.

    That's a bit more effort but I think it's worth it as it's the entire point of a new message indicator in the first place!

    Test User4 on 2010-12-21 15:53:12.000

    Trying again as Test User4! Will this work?

    Test User4 on 2010-12-21 15:54:45.000

    Trying again with redirect...

    Jeremy Reimer on 2010-12-21 15:55:04.000

    It totally worked!!!! :dance:

    Jeremy Reimer on 2010-12-21 15:56:38.000

    Now I'm trying while commenting on the blog part...

    Jeremy Reimer on 2010-12-21 15:57:05.000

    IT WORKED THERE TOO!

    Jeremy Reimer on 2010-12-21 15:59:59.000

    For those of you who weren't reading along with the thread, the new feature is this:

    All unread threads show up as a light blue background, until you read the last page. Then, since you've read it, the background turns grey.

    But if a new user replies to the thread, or makes a new thread, they will appear light blue again.

    This makes it really easy to see if there are any new posts that you haven't read!

    Jeremy Reimer on 2010-12-22 14:11:55.000

    Today's feature is a simple one: the addition of the rank badge (from OSY 2.0) indicating that poster's rank.

    Don't worry--all your old postcounts and ranks will be brought over! In fact I might do that for everyone who has already registered.. hint hint...

    Jeremy Reimer on 2010-12-22 14:17:22.000

    I also bumped up the posts per page from 10 to 15. Hopefully this doesn't break my insanely baroque paging code. :D

    Jeremy Reimer on 2010-12-23 15:45:41.000

    Today's feature is a cleaned-up front page that shows the top five blog posts (by number of views) and the top five most recent forum posts (by date of posting). It's pretty neat!

    I also futzed around with the podcast views a bit and am currently updating the post dates to be reflective of their original post dates (Knotty Geeks started in September 2008, can you believe that??)

    Harby on 2010-12-30 16:36:30.000

    If it ain't baroque, don't fix it!!!

    :lol:

    Jeremy Reimer on 2010-12-31 01:07:49.000

    OOOh, nice... I like that. :D

    OscarWilde on 2011-01-05 12:26:42.000

    Testing!

    OscarWilde on 2011-01-05 12:27:32.000

    Oh yes I work. I can’t click and get the smilies to show in the post box. Mac OS X Safari 5.0.3 :)

    To clarify, when I click on the emoticons above, it doesn't do anything.

    Jeremy Reimer on 2011-01-05 14:47:55.000

    Yes, I haven’t implemented that feature of smilies yet. For now you just have to hover, see the ALT text, and type that in. It’s a lower priority feature but I will get to it. :)

    Oh, and I've added your avatar. :D

    OscarWilde on 2011-01-05 22:05:31.000

    Sweet. Thanks. :blue:

    Okay, I see the complete list for the emoticons. I don't remember the emoticon codes to type, but the list does help. I understand it being a low priority for now. :popcorn: Looking through the list and I never realized just how many emoticons there are available. Dang.

    HitScan on 2011-01-07 15:26:55.000

    I had a couple thoughts about some things:

    You said changing names messes with the posting system somehow. Are you using the username as the primary or foreign key in your db? You'd be better off using a unique id that's never displayed publicly if so. That way if you ever do need to change a name it's still a quick UPDATE and not potentially agonizing manual UPDATES (I don't know if you can use CASCADE with UPDATE, but it doesn't sound like an awesome plan to me..)

    You also mentioned "read thread" records. That sounds like it could get enormous fast, and for a seemingly minor feature. Is that how other BBS's do it? I also think some of them do some read/unread jiggery-pokey on the client side. Then you just need to know the date/time that the thread was last opened and it will take care of itself, but that's still another table and records, so, eh...

    Jeremy Reimer on 2011-01-09 13:36:20.000

    I actually made a unique UserID as the primary key for the user table in the DB, but for some unknown reason (temporary insanity?) I saved the username in each post instead of the user ID, so when it's looking up the user info for the left panel of each post it looks up the username instead of the ID. I can go back and fix this (and I intend to) but I haven't gotten around to it yet.

    As to the unread post feature, that was something that stuck in my brain forever, trying to figure out the most efficient way to implement it. It's actually a non-trivial problem to solve. You could do something client-side but that would require storing all the user's read post data in a cookie, and there are hard limits on the length of cookies, so it's not necessarily the best thing to do (plus then if you go to another computer it won't save your read post information!)

    The method I came up with seems to work and doesn't seem to slow things down too much. It was a fun problem to solve!

    View this post in the forums

    Views: 26328