I’m a WoW geek

So it’s happened – I downloaded the free ten day World of Warcraft trial from Battle.net. It was Natima and Hina who convinced me, and it’s actually pretty fun. I’ve only played for a few hours, but I already consider the possibility of buying it when my trial runs out.

I’m an orch called Quispiam, and I play in the Auchindoun realm. See you there.

Creating new pages in Vanilla

As with most CMSs, it’s pretty tough getting into how Vanilla works, but it’s still my favorite by far, because of its simplicity to use and administrate.

It took me some time understanding how to create a brand new PHP page in Vanilla, as it’s not based on my favorite standard – having a header.php and a footer.php, the header also including all general functions and styles.

Say for example that you have a Vanilla forum but wants to include a new page about contact information, with the webmaster’s name and e-mail. With the system Vanilla uses, the first step is to create a new page (lets take for example contact.php).

[code=”php”””””]

include(”appg/settings.php”);
$Configuration[‘SELF_URL’] = ‘contact.php’;
include(”appg/init_vanilla.php”);

$Context->Session->Check($Context);

$Contact = $Context->ObjectFactory->CreateControl($Context, ”Contact”);

$Page->AddRenderControl($Head, $Configuration[‘CONTROL_POSITION_HEAD’]);
$Page->AddRenderControl($Menu, $Configuration[‘CONTROL_POSITION_MENU’]);
$Page->AddRenderControl($Panel, $Configuration[‘CONTROL_POSITION_PANEL’]);
$Page->AddRenderControl($Contact, $Configuration[”CONTROL_POSITION_BODY_ITEM”]);
$Page->AddRenderControl($Foot, $Configuration[‘CONTROL_POSITION_FOOT’]);
$Page->AddRenderControl($PageEnd, $Configuration[‘CONTROL_POSITION_PAGE_END’]);

$Page->FireEvents();

[/code]

The lines important here are number 2, 7 and 12, the rest can more or less be the same for any page. The two includes in the beginning call information needed to run the page (appg/settings.php and appg/init_vanilla.php). $Context->Session->Check($Context); checks who has the rights to view the page (as an admin of a Vanilla forum you can control if the forums are blocked to non-users, et cetera). The coming line gathers information on which control page to gather further information from. The easiest way is to have this page have the same name as the page itself, in this case Contact. Choosing this name will have the page collect classes from /library/Vanilla.Control.Contact.php, which we have yet to create:

[code=”php”””””]
class Contact extends Control {
function Render() {
include(ThemeFilePath($this->Context->Configuration, ‘contact.php’));
}
}
[/code]

This is really all that needs to be there for a simple page. This class calls the page /themes/contact.php, i.e. the page actually showing the HTML. Vanilla.Control.Contact.php, however, is the page where any PHP for more complex pages should go. If you’re uncertain on how it works, check some of the premade pages in Vanilla, for example Vanilla.Control.Categories.php.

On to the actual page, themes/contact.php, having the simplest code of all:

[code=”php”””””]
echo ”Howdihoo… the webmaster of this site is Blablabla, with the e-mail spam_me@spam.com.”;
[/code]

Easy enough. Let’s go through it once more:
/contact.php calls the actual site, saying it is controlled further by the page Vanilla.Control.Contact.php. It also says that it will use the traditional style with head, menu, panel, foot, and PageEnd, but with the central (between Panel and Foot) being the special ”Contact”, as presented in Vanilla.Control.Contact.php.
[code=”php”””””]

include(”appg/settings.php”);
$Configuration[‘SELF_URL’] = ‘contact.php’;
include(”appg/init_vanilla.php”);

$Context->Session->Check($Context);

$Contact = $Context->ObjectFactory->CreateControl($Context, ”Contact”);

$Page->AddRenderControl($Head, $Configuration[‘CONTROL_POSITION_HEAD’]);
$Page->AddRenderControl($Menu, $Configuration[‘CONTROL_POSITION_MENU’]);
$Page->AddRenderControl($Panel, $Configuration[‘CONTROL_POSITION_PANEL’]);
$Page->AddRenderControl($Contact, $Configuration[”CONTROL_POSITION_BODY_ITEM”]);
$Page->AddRenderControl($Foot, $Configuration[‘CONTROL_POSITION_FOOT’]);
$Page->AddRenderControl($PageEnd, $Configuration[‘CONTROL_POSITION_PAGE_END’]);

$Page->FireEvents();
[/code]

/library/Vanilla.Control.Contact.php, as already mentioned, presents the class Contact. What it does is in fact to include the page /themes/contact.php.

[code=”php”””””]
class Contact extends Control {
function Render() {
include(ThemeFilePath($this->Context->Configuration, ‘contact.php’));
}
}
[/code]

/themes/contact.php goes on to showcase the information to be shown visiting /contact.php, here very simply and without any complications, without advanced PHP or MySQL – that is to be run entirely from the Control page.
[code=”php”””””]
echo ”Howdihoo… the webmaster of this site is Blablabla, with the e-mail spam_me@spam.com.”;
[/code]

And you are done. Fix these pages, and if you are to visit /contact.php you will view the text Howdihoo… the webmaster of this site is Blablabla, with the e-mail spam_me@spam.com.. All of this is simple PHP, yet it took me quite some time to understand, being all new to these types of programming, and I’m sure others have the same problem. I am very new to writing guides, so if I’m being unclear please comment or e-mail me.

Faulty Gmail HTML

I recently joined Google’s mail client Gmail, and I have to say it works phenomenal.

However, I just saw some faulting HTML in the footer when logged in, where my pointer is in the screenshot to the right. I guess this link is supposed to point to http://www.google.com, but instead it’s http://mail.google.com/mail- <a href=. And ofcourse I couldn’t possibly contact Google about this bug without going through a series of annoying questions and searches.

Serieparaden

Vilken tidningen trillade ned i posten igår om inte Serieparaden? Serieparaden! Serieparaden!

Med serierna:

Ett tips, gå genast och köp nummer 1 2010! 68 underbara sidor med bra serier.

Quote of the Day #18: Romeo and Juliet

You lay before me
Unwounded yet fallen
Sorrowful yet blissed
Art thou still mine?

Is this fantasy
Or real? It’s all the same
Why was I your Romeo?
Why were we the ones?

Why did you fall?
Why did you leave me
When I wasn’t there?
Why didn’t I help?

There’s a sorrow that can’t be reached
There are the stars that fall when you come to close
And you are one of them, I know
I always knew you’d fall

I have got to record that album one day.

Selected Googlings of late

”det blir svårt att köpa mjölk”
”sleep is an illusion”
dungeons n dragons vampire
”how old do diatoms get”
is a line of deathless kings about vampires
nosferatu
prince of persia sands of time tutorial
sad animation
simpsons strangulation
the vampyre
vampire
starcraft cd key

Why all the vampires?

Quote of the Day #17

Heaven opened before me
Swallowed me into its shell and spat me out
I barely saw the world turn away
I barely felt the burning bite

They told me I am not alone no longer.
They told me that finally, I am at rest,
Not dead nor alive,
With my heart pounding in the pace of my family.
They told me to walk with them.
I was given raven wings,
Crimson, sharpened teeth,
and a new heart in this life after death.

Feeling scared, lonesome and hated
I couldn’t bare not seeing my reflection
Cracking my mirror with my very pawn
Watching the blood run through the drain

They told me the secret of paradise is sin
They told me that whatever I do, at least I’m better than them.
They told me the only key to the gate of golden ember
Is the one in my very throat.
They told me to carry on my life work or everything is lost,
That while sins not last forever so does life.

They told me hope will always be the only way to heaven.

Stab me
In this darkness
Cure me
Before I avenge myself
Kill me
Only illumination can
Cure me
To become myself again

Oh, this is the end
I will never be myself again
Oh, this is the end
Of human kind, and it’s all my fault

– Sometimes paradise is closer than heaven –

Is it true what someone once said
That reality sometimes is stranger than fiction?
Who actually believes the fairy tales?
But then again
How many people does not check under their bed
Before they go to sleep?
How many people can walk the woods
Without having to resist calling for the Fair Maiden?
How many does not really believe in us?
How many are really scared of us?

A quote from a poem of my own, Them Crimson Bites, written in 2007 or 2008 I believe.

Quote of the Day #16

From my grave to wander I am forced
Still to seek the God’s long server’d link,
Still to love the bridegroom I have lost,
And the lifeblood of his heart to drink.

Quote from one of the earliest vampire tales, The Bride of Corinth (1797) by Goethe. I’ve always loved vampire literature, and my current school project concerns the history of the fictional vampire.