Puceronie

Archive for the ‘Writings’ Category

Please Tell Me This is All a Dream…

Tuesday, April 21st, 2009

When I formatted my computer, I said I made a back up of everything. Apparently, that was not true. I forgot the single most important folder: the one containing my texts. All lost. This left me no less than devastated.

At first I could do nothing but cry, then I thought about how I had read on programs that can recover deleted files, including after a complete formatting. I tried two of these. The first one, Handy Recovery, is unfortunately a paying program. This means that, unless I pay $49, I can only use it for 30 days and recover 1 file per day. Well, I had more than 30 files to recover, and I would have died of excessive anxiety if I had had to wait 30 days before completing the recovery.

So I looked for another program, and found Recuva. I am going to hump it! It was able to recover many of my files, although some remain lost forever. I'm a bit of an emotional rollercoaster right now. On one hand, not all my files are lost. On the other hand, I did lose some I would have loved to still have.

I have an old backup on a CD here, but, well, it is old. It doesn't have any of the things I have written since moving to Montreal, actually. I always was too lazy to make backups. :(

So, I have lost some poems, but those should be elsewhere too, as I published many online. If they aren't online anymore, they could be in database backups (I still have those).

I have lost some fiction. Nothing completed, but still starts I would have loved to keep! I lost one I was particularly attached to, but none of my Big Important Novels. My poor babies :(

I have lost some Titanic fan fiction! I think I haven't lost any I have written, but I had a nice collection of fan fiction from other people, and it's partially lost.

I have lost some of the work I have made on a video game. I haven't done designs, coding or anything, just concepts and ideas. Well, some of the things are intact, but some of the files were lost.

Finally, a bit of advice if this ever happens to you. First of all, keep in mind that when you delete a file, you aren't really "deleting" it. You are merely telling your OS that the space occupied by this file is free for use, and that there is no longer a file on whatever address it was assigned.

Second, try not to use your computer for anything but the recovery. Shut down IM programs, browsers, text editors, etc. Any program that is running can be creating files (temporary or permanent), and these files could just happen to overwrite your beloved lost ones.

Third, the recovery program will ask you where you want to put the recovered files. It is really important to avoid putting them on the disc where the files were originally. Why? For the same reason as number two: some of the recovered files could overwrite the lost files! You can use a USB storage drive or an external drive.

When a file has been overwritten, the program will still recover it, and save it under its original name. When you open it, however, it will not be the file you thought. My files were all text files (mostly in the .odt and .doc formats), and some of them read as code for software, or characters like #.

That said, I have to catch up on my work. I spent the last 24 hours or so doing just recovery and crying, so I got a bit of catchup to do.

BellaBuffs: Dynamic Page Titles

Wednesday, February 20th, 2008

I love talking about BellaBuffs, don't I? Jem loves me because of that.

This tutorial requires that you have a basic understanding of PHP includes (more specifically of using the function to include a header and footer file). It is also best if you are at least a little familiar with BellaBuffs and you should know a bit what the "if...else" function does.

What exactly will you achieve with this tutorial? I am one who likes "clean" page titles. Every page should contains the title of the site preceded (or followed, but I prefer to put it first) by the individual title of the page (for example, "Resources", "About Us" or "How to create a butterfly in Photoshop"). Well, I will here explain you how to get such titles in BellaBuffs. I'm talking about the <title> tag here.

First, you must prepare the header.php file. If you renamed it, well, then, go ahead with whatever the file is called. The file contains a title tag. Its default content is <?php echo $title; ?> - Powered by BellaBuffs. Now, if you have taken a look into the prefs.php file, you know that $title is not a variable for individual page titles, but the variable inside which is stored your fanlisting's title. We'll need to change the content of this title tag.

<?php if (isset($thetitle) && !empty($thetitle)) {
echo $thetitle . " · ";
} else { $thetitle = ""; } ?>

Okay, you might be going "huh?" at this, but I'll explain. The first line (isset and !empty) verifies that our variable, $thetitle, actually exists in the first place, and that its value is not empty. This way, when we actually display it (the echo function on the next line), we're not displaying nothing or getting a PHP error.

As I already said, the second line displays the actual title. "middot" is probably my favorite entity to use for that purpose. It is simply a dot standing at mid-line height. Of course, you can change this part to anything you like. You might wonder also why I separated the variable and the entity with a dot. It's simply to "separate" the two "parts" of the echo statement: the variable and the static part. The period will not be displayed. It acts to say "oh, and echo that too, immediately after". Don't forget to place a space before and after whatever separator you use.

You can use any other name beside $thetitle, but avoid using just $title as, like we've seen above, the $title variable already exists within the script.

Now we can prepare our files. You will need to edit each file of the script, but it's only a minor edit. There would be a way to do it only with the header.php file, but it would require a lot of if and elseif, and a lot of checks. I much prefer doing it the other way.

The key is simply to add $thetitle = "Title of the individual page"; inside each file before the header file is included.

In the contact.php file, I personally put it just before the first "if" statement—that is, before any other PHP. The page will be called "Contact" regardless of whether the form was sent or not, and of whether there was an error.

Do not define the variable inside the header.php, footer.php, functions.php or prefs.php files!

In the join.php file, I put it just after the two other variables that are declared at the start:


$show_form = true;
$error_msg = NULL;
$thetitle = "Join";

The "fun" file, though is members.php. This file will do more than just displaying the members, it can also sort them by country. I thought it would be interesting, then, to have the title change for each country page, to reflect the fact that the content is a bit different. This will need a bit more playing around than the other pages.

Before header.php is included (before or after prefs.php is included shouldn't matter), put the following:

if (isset($_GET['c'])) {
$thetitle = "Members: " . $_GET['c'];
}
else {$thetitle="Members";}

What is $_GET['c']? If you do not know anything of the $_GET superglobal, I recommend reading information on the W3Schools website or just searching for information on it.

$_GET['c'] is used in the script to find the country. If, for example, you go to members.php?s=sortCountry&c=Canada, you will see members from Canada. This means that, in the above lines, we are doing the following steps:

  1. Check if we are viewing a single country.
  2. If yes to 1, then display Members: name of country.
  3. If no to 1, then just display Members.

You can then also change the title within the page, that is when it is shown within the <h1> element. Find these lines:

foreach ($newArray as $country) {
foreach ($countryCount as $key => $cc) {
if ($key == $country) {
echo "

  • $country ($cc members)
  • ";
    }
    }
    }

    Just before the foreach statement is the line echo "<ul>";. Before this line, enter echo "<h1>Members</h1>";. This will show the title on the country list page.

    Beneath the foreach statement is the exit function followed by an else. Just before the foreach function that is inside this else statement, enter echo "<h1>Members: " . $_GET['c'] . "</h1>";. This will show the word "Members" followed by the country on individual country pages. Naturally, you can change it to anything you like, such as Members from $_GET['c'].

    And voila, you got yourself nifty titles. I'm starting to feel a bit weird, so maybe the last few paragraphs are utter gibberish. If you have questions or comments, just post a comment and I'll get back to you if I deem it appropriate.

    My Rules When I Write

    Friday, February 1st, 2008

    As an entirely self-taught author, living secluded in my room most of the time, I've still managed to make up a few rules of my own when it comes to writing. I'll share them with you.

    1. Sentence Length

    Keeping your sentences' length to a good "level" is one of the first tips you should earn when you write, no matter the purpose (school, law, job applications, blogging, etc.). It is not so much excessive length or extreme briefness that can go wrong, as it is inappropriate length.

    A series of short sentences do not necessarily make action seem faster. It rather makes it appear broken into pieces, "chopped up", which, while it can be your wish, is not always a desirable effect.

    Longer sentences with carefully chosen words can create beautiful descriptions of landscapes. "Chopped up" sentences, as I mentioned above, can create the ambiance of a confused, near-death person whose thoughts wander around a room. Let's try describing a landscape with such sentences.

    (more...)

    Neglecting Writer

    Saturday, January 26th, 2008

    I've been a neglecting writer since the holidays, but my dreams keep reminding me of my creative side. I make dreams that inspire new stories. However, I know it is no use to start twenty novels at a time. I can write down the idea, but I must delay the actual writing until I have something completed, else I won't finish anything before some forty years.

    I'm suffering from pain in the upper back (on the right side only) since last Thursday. I felt it starting during my group therapy and developing during the evening. I'm not sure what has caused it, but I've tried having better control of which position I stand and lie in, and it feels a bit less worse than yesterday...for the back only. My neck is rather tense this morning. I guess it would help if I had a "normal" sleeping schedule.