"I just got rid of one Norseman, and so you bring me two? Is Tryggvason planning a conquest by slow, blond invasion?"
Date hacking
Submitted by Verity on Sun, 06/22/2008 - 12:41.
Hi Lothere! I am trying to make a new nicer version of the Mhalwae website and I was wondering if you could let me in on the secret of hacking dates. I think it makes it a lot better when you can see how much time has actually passed and it is a really great idea to put up the date in the story instead of the real date. Can you help? Can you let me on in your tricksy hacking technique? Is it very difficult to do? We were going to try just hacking the calendar to do it but maybe there is a better way...
Who's online
There are currently 0 users and 2 guests online.
Recent comments
- I love that you're out there
2 years 3 weeks ago - If anyone is interessed, I
2 years 12 weeks ago - Tainted as it's been by the
3 years 15 weeks ago - So, so sorry to hear that.
3 years 15 weeks ago - To readers of this story I
3 years 18 weeks ago - It had something to do with
3 years 39 weeks ago - That sounds so fun,
3 years 39 weeks ago - Well, I did made the top
3 years 40 weeks ago - Hello Lothere,
Maybe you
3 years 40 weeks ago - Oh, man, I forgot about the
4 years 25 weeks ago
Who's new
- Stephanie
- Lady Dora
- Finn
I just realised I didn't
Submitted by Verity on Sun, 06/22/2008 - 13:05.I just realised I didn't even ask you if I could steal your awesome idea can I? pleeeease?
Is your BF a PHP hacker? I
Submitted by Lothere on Sun, 06/22/2008 - 13:24.Is your BF a PHP hacker? I had to modify a few files in Wordpress to make it do what I wanted it to do. WordPress internally uses PHP's mktime() function to handle dates, which limits you to dates back to 1970 -- even though the MySQL database stores the dates in a format that would support dates back to ancient times. So I think I just hacked wp-includes/functions.php and changed the mysql2date() function to format dates without going through mktime(). I think I may also have had to modify the code that generates the calendar.
But this was with the older version of WordPress. I haven't upgraded to the new one yet, and in fact I was kind of holding off because I am working on writing my own software to display the story. But if you're interested in using old dates too (which you should, because sometimes I get confused in your story ) and you're using the new version of WordPress (which looks like 2.5.1) let me know and I'll go ahead and upgrade Lothere for the time being. And I can send you the modified files afterwards.
It's not a big deal for me, in the grand scheme of everything else I do. And for security reasons I probably should have upgraded long ago. So don't fret about asking me to do the work.
Edit to add unless the latest version has changed a lot, you have to do more than modify the calendar code. The blog-editing interface will overwrite your dates with Jan. 1, 1970 every time you save a post unless you modify the date-fetching function deep down.
Thanks Lothere! We will have
Submitted by Verity on Wed, 06/25/2008 - 10:43.Thanks Lothere! We will have a go and see if we can change it ourselves first (when my poor boyf next gets a night off). If we totally can't do it I might take you up on your offer if you really don't mind. But I think it is better if we try first so you don''t have to needlessly upgrade. He seemed to understand how to change it when I read out your comment to him this morning (though he was half-asleep so it might be wishful thinking on my part). And I sort of understood at least which function to look for though I wouldn't know how to change it. But I think he understands better so we'll see how it goes.
I really do want to get some actual (well, I guess not actual but make believe rather) dates going because it is confusing to know how much time is passing in Mhalwae.
And wow! you write your own everything! That is so cool that you are making your own display program. I wish I could do that. There are so many things that frustrate me, or things I would like added to wordpress. Although I have to say, it is a pretty good blogging tool as blogging tools go.
Good luck. I like WordPress
Submitted by Lothere on Wed, 06/25/2008 - 11:46.Good luck.
I like WordPress an awful lot as blog software. Really, I have no complaints in that regard. But as a story-writing program, it is lacking a few things. That's why I am writing my own. The two features I want the most are (1) a system to store the list of characters who appear in each chapter so I can easily put a list of all chapters a character featured in on their bio page. Or so that you can search for all chapters including both Egelric and Alred, or whatever. And (2) some user-level features so that you could log into the story site and have some extra features. Like a way to bookmark your favorite chapters, or maybe rate chapters.
Or perhaps it would be useful for someone who is still reading through to be able to bookmark their most recently read chapter, so that when they come back they will go directly to the next one, rather than coming to the front page (with all the yummy spoilers) and having to find their leaving-off place again. Honestly I have no idea how people do that... make browser-level bookmarks and just replace them every time they do a chunk of reading? Write down the chapter number?
And better search! God damn! Try a search for Aia and you get zip! Poor Devin!
Once I have my own version up I am free to do pretty much whatever I want, though. Maybe I will think of other things, or they will be suggested to me by my doughty readers. I am using the site as a way to learn a bunch of new technologies, so I win on both sides.
When I search for Aia I have
Submitted by Devin on Wed, 06/25/2008 - 12:11.When I search for Aia I have to check the exact phrase box or else nothing will show up. But also when i search for Aia Kraaia shows up.
When I first started
Submitted by Lisa on Thu, 06/26/2008 - 07:51.When I first started reading, I wrote down the month & year. When I started re-reading, I just used my browser history, but that only stores for 30 days, so when I had to take a break here at work, that info was lost. So I have no idea where I left off the second time.
When I first started, I
Submitted by Tiffany on Thu, 06/26/2008 - 07:59.When I first started, I bookmarked the page I left off on. I'd reread it to refresh myself then click to the next one.
Is there anyway for a person
Submitted by Karen on Thu, 06/26/2008 - 08:01.Is there anyway for a person to do this who is completely inexperienced with hacking anything?
I'm trying to start up my own Kingdom story...it's gonna take forever to get started since the actual simming takes so long.
Thanks, guys, this is useful
Submitted by Lothere on Thu, 06/26/2008 - 08:08.Thanks, guys, this is useful information. Maybe I should open another forum thread just to ask what features you think the site is lacking... I have a hard time imagining how you interact with the site, really.
Karen, if you use one of the blogging sites like wordpress.com, you don't have to be experienced with much of anything to get a basic story going. The only thing you really lose in that case is the ability to have medieval-looking dates like I have. And if you use one of the free sites you're somewhat limited in the blog themes you can use, but I am not really familiar enough to say how much. There are surely others here who blog on blogger or wordpress who might know more. But I know enough technically un-savvy people who have blogs to know it's possible for just about anyone.
Ooo I think I may have had
Submitted by PenelopetheFox on Thu, 06/26/2008 - 09:25.Ooo I think I may have had the most complicated method of all for reading the back chapters. My issue at the time was that I couldn't be online at the same time as my boyfriend (our network was under a strict proxy and we were not allowed to set up a WAN). So until we ultimately figured out away around that, I had to open dozens of chapter windows, disconnect myself from the internet and hand it over to the bf. I would remember where I left off because I would read entire years at a time. I do not recommend.
Yeah, I meant the date
Submitted by Karen on Thu, 06/26/2008 - 10:04.Yeah, I meant the date hacking. I have a wordpress blog, but I really wanted those dates! Maybe when I start posting chapters I'll put fake dates at the top.
Karen, do you have a blog at
Submitted by Lothere on Thu, 06/26/2008 - 10:10.Karen, do you have a blog at wordpress.com, or do you have the WordPress software installed on your own server? In the latter case I can just give you a copy of the files I changed and you can put them on your server. If you're on Wordpress.com, then you're stuck, you can't modify their source code.
Edit: Now that I think about it, in the very beginning, when I still had my blog hosted at another site, I was just putting the dates at the top of each chapter. It meant that you couldn't search using the calendar, but at least you could read when the events took place. In my place (unlike Verity's), that had some meaning outside of giving a sense of the passage of time, since my story takes place in real history.
Also, Penelope, I think everyone who has read the entire story deserves some sort of award, but you deserve a special medal for reading in spite of those constraints.
Sigh. It's AT
Submitted by Karen on Thu, 06/26/2008 - 11:52.Sigh. It's AT wordpress.com. Maybe if I get it started and consistently update it I'll do the whole server thing. I'll probably have to ask you at that time how to do THAT.
Until then I'll just do what I can and maybe actually start posting chapters. When that happens I'll let you all know about it.