melannen (
melannen) wrote in
getting_started2009-04-20 07:04 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Entry tags:
Dreamwidth, OpenID delegation, and Journalfen
The ease of cross-site OpenID and importing journals from other sites is one of the coolest things about Dreamwidth, but not all the other sites are as seamless as DW, alas.
For example, Journalfen is one of the LJ clone site from which you can import to DW, but it does not have a functioning OpenID server. So it is difficult to actually use the openID JF accounts that the Dreamwidth importer creates. However you can still use a JF OpenID by using OpenID delegation. That is, link your JF page to an account that does have an OpenID server, and Dreamwidth will use that server to give you a JF OpenID. I've written a tutorial, intended for people who know nothing about what they're doing, that will walk you through setting up openID delegation for a Journalfen account. If you're interested in setting up an OpenID account for another personal blog or website, the notes at the beginning should also help you out.
In terms of DW, you will be able to use a delegated openID like any other openID account, and to claim and put an icon on imported comments originally made on that account, and eventually associate that account with your personal account. It will not affect your ability to use the OpenID account you delegated to (so, I delegated my JF openID to my LJ, but my LJ openID account still functions completely separatelyand it counts as another openID account for invite code lottery purposes)
OpenID Delegation, the basics
OpenID delegation basically means that you are taking an OpenID account you already have (like, for example, your Livejournal one) and linking a completely separate identity (like your Journalfen account) to that OpenID, so that you can use the second identity as your OpenID without having to set up another OpenID server.
You can create a delegated OpenID for any URL where you control the contents of the < head> < /head> tags in the HTML file. Most of this tutorial is simply explaining how to do that using LJ styles. If you're already comfortable with LJ styles, or you want to try a delegated OpenID on a non-LJ-code-based blog or webpage, here's the short version:
All you need to do is add two lines of code in between the < head> < /head> tags in your webpage:
Picking a server to delegate to
Before you can set up your Journalfen OpenID, you need to pick an existing OpenID account to delegate to. You have a lot of choices here. There are two important things to consider, both related to the fact that in order to use the JF OpenID, you will have to be logged in to whatever account you have delegated to. (You will *not* need to be logged in to the JF account, just the account the JF account links to.)
So first, pick an OpenID account that you are often logged in to. Second, pick an account that you don't plan to use your Journalfen openID with: you can't be logged in to both at once, so if you log out of your personal account there in order to use your JF openID, it will give you not-logged-in-errors (Short version: if you want to use the JF OpenID at DW or LJ, do not use them as the account you're delegating to.)
Pretty much every LJ clone except JF has an openID account you can use for this. If you're using an LJ clone, the OpenID server URL you need will be in the form (using Deadjournal as an example; swap out the Deadjournal URL for whichever site you're using): "http://www.deadjournal.com/openid/server.bml" and the account URL will be "http://yourusername.deadjournal.com"
If you don't want to use an LJ clone, there are lots of other options. OpenID.net has a list of ways to get an OpenID, including sites where you may already have one, like Wordpress and Yahoo, and a list of places that let anybody sign up for a free OpenID account. Once you have the account, you can go to http://delegatid.com/ and type it in the box, and it will generate the HTML you need to delegate. (The part we will use for the JF delegation is the URLs in the two < link> tags, so save those for later.)
How To Delegate an OpenID on Journalfen
The Easy Way: S1:
The Hard Way: S2
And you should now be set! Thanks to
zvi and
stellar_dust for helping out with this. (And
afuna, an ancient S2 tutorial of whose let me finally figure out how I had to do this in S2.) If you have any questions about delegating, or you have problems working through this tutorial, leave a comment & someone will try to answer.
For example, Journalfen is one of the LJ clone site from which you can import to DW, but it does not have a functioning OpenID server. So it is difficult to actually use the openID JF accounts that the Dreamwidth importer creates. However you can still use a JF OpenID by using OpenID delegation. That is, link your JF page to an account that does have an OpenID server, and Dreamwidth will use that server to give you a JF OpenID. I've written a tutorial, intended for people who know nothing about what they're doing, that will walk you through setting up openID delegation for a Journalfen account. If you're interested in setting up an OpenID account for another personal blog or website, the notes at the beginning should also help you out.
In terms of DW, you will be able to use a delegated openID like any other openID account, and to claim and put an icon on imported comments originally made on that account, and eventually associate that account with your personal account. It will not affect your ability to use the OpenID account you delegated to (so, I delegated my JF openID to my LJ, but my LJ openID account still functions completely separately
OpenID Delegation, the basics
OpenID delegation basically means that you are taking an OpenID account you already have (like, for example, your Livejournal one) and linking a completely separate identity (like your Journalfen account) to that OpenID, so that you can use the second identity as your OpenID without having to set up another OpenID server.
You can create a delegated OpenID for any URL where you control the contents of the < head> < /head> tags in the HTML file. Most of this tutorial is simply explaining how to do that using LJ styles. If you're already comfortable with LJ styles, or you want to try a delegated OpenID on a non-LJ-code-based blog or webpage, here's the short version:
All you need to do is add two lines of code in between the < head> < /head> tags in your webpage:
<link rel="openid.server" href="http://www.example.com/openid/server.bml" /> <link rel="openid.delegate" href="http://exampleusername.example.com" />Replace "http://www.example.com/openid/server.html" with the URL of the OpenID server you're using to delegate, and "http://exampleusername.example.com" with the URL of the account you're delegating to. You'll then be able to sign in anywhere that takes OpenID using the URL of the page you put the code into.
Picking a server to delegate to
Before you can set up your Journalfen OpenID, you need to pick an existing OpenID account to delegate to. You have a lot of choices here. There are two important things to consider, both related to the fact that in order to use the JF OpenID, you will have to be logged in to whatever account you have delegated to. (You will *not* need to be logged in to the JF account, just the account the JF account links to.)
So first, pick an OpenID account that you are often logged in to. Second, pick an account that you don't plan to use your Journalfen openID with: you can't be logged in to both at once, so if you log out of your personal account there in order to use your JF openID, it will give you not-logged-in-errors (Short version: if you want to use the JF OpenID at DW or LJ, do not use them as the account you're delegating to.)
Pretty much every LJ clone except JF has an openID account you can use for this. If you're using an LJ clone, the OpenID server URL you need will be in the form (using Deadjournal as an example; swap out the Deadjournal URL for whichever site you're using): "http://www.deadjournal.com/openid/server.bml" and the account URL will be "http://yourusername.deadjournal.com"
If you don't want to use an LJ clone, there are lots of other options. OpenID.net has a list of ways to get an OpenID, including sites where you may already have one, like Wordpress and Yahoo, and a list of places that let anybody sign up for a free OpenID account. Once you have the account, you can go to http://delegatid.com/ and type it in the box, and it will generate the HTML you need to delegate. (The part we will use for the JF delegation is the URLs in the two < link> tags, so save those for later.)
How To Delegate an OpenID on Journalfen
The Easy Way: S1:
- If you're currently using S2, switch back to S1 by going to: http://www.journalfen.net/customize/switch_system.bml and choosing "switch to S1" (you can pick new styles and colors later, without messing up your new OpenID.) If you're already in S1 (new accounts at JF still default to S1, I believe), skip to step two.
- Go to http://www.journalfen.net/customize/ , and scroll all the way to the bottom, to where it says "Overrides". Copy/paste this text in the box:
GLOBAL_HEAD<= <link rel="openid.server" href="http://www.example.com/openid/server.bml" /> <link rel="openid.delegate" href="http://exampleusername.example.com" /> <=GLOBAL HEAD
(JF seems to be sometimes adding an extra <=GLOBAL HEAD at the end when you save; if this happens, go back, take out both the <=GLOBAL HEAD s at the end, and save again, and you should be fine.) And if your overrides box already has <=GLOBAL HEAD tags, just add the two < link> lines after the first GLOBAL HEAD. - If you're going to delegate to an LJ clone, replace "example.com" with the address of the site you're using, and "exampleusername" with your username there. If you're delegating to somewhere not based on LJ, replace "http://www.example.com/openid/server.bml" with the openID server you're using, and "http://exampleusername.example.com" with the URL of your account there. (You may have gotten these addresses from http://delegatid.com .)
- Click "Save Changes" at the bottom of the page.
- You should now be able to use your JF account anywhere you can login with OpenID. However, make sure the URL you use is www.journalfen.net/users/yourusername , rather than yourusername.journalfen.net, since JF doesn't do subdomains.
The Hard Way: S2
- Think very hard about how badly you want to keep using S2. Most of the JF styles are there in S1 too! And S1 is so easy to customize if you know even a little HTML! If you decide to switch to S1, go to The Easy Way.
- Are you sure you want to stay in S2? It's really much nicer over in S1 land! ... fine. Go to http://www.journalfen.net/customize/advanced/layers.bml. This is technically only allowed for paid users, so if you're a free user, you really ought to try The Easy Way. Or you could dishonestly take advantage of the fact that JF doesn't bother to block free users and do it anyway. I guess. If you have done any customizing at all of your S2 style (even just changing colors), you should see a chart with a layer labelled "Auto-generated customizations". If you've done any more complicated customizing, there will be several layers in the chart; you want whichever one your current customizations are in.
If you haven't done any customizing at all, you should really consider trying the easy way with S1 instead. Or you can create a new layer just for this - This tutorial for creating new theme layers is pretty good for beginners, and has pictures. When you get the part about placing code, skip to the step 4 of this tutorial, insert the code from there,make the changes in Step 5, and then go back and finish creating the new style using those instructions. - Click the "Edit" button under the layer you are using. This should take you to the S2 customizing page, which is divided into three boxes. The large one on the upper left has the code for your layer; that's what we're editing.
- The first two lines in your style should say something like:
layerinfo "type" = "user"; layerinfo "name" = "Auto-generated Customizations";
Underneath those first two lines, copy and paste this text:function Page::print_custom_head() { """ <link rel="openid.server" href="http://www.exampleserver.com/openid/server.bml" /> <link rel="openid.delegate" href="http://yourusername.exampleserver.com" /> """; }
If there is already afunction Page::print_custom_head()
in your layer, then just copy/paste everything inside the {} inside the { after your existing print_custom_head function. - If you're going to delegate to an LJ clone, replace "example.com" with the address of the site you're using, and "exampleusername" with your username there. If you're delegating to somewhere not based on LJ, replace "http://www.example.com/openid/server.bml" with the openID server you're using, and "http://exampleusername.example.com" with the URL of your account there. (You may have gotten these addresses from http://delegatid.com .)
- Click the "Save and Compile" button at the top of the screen. If you're lucky, the page will reload, and the box at the bottom of the page will tell you "compiled with no errors". If the box at the bottom of the page spits gibberish at you instead, there's an error somewhere in the code. I suggest you try the easy way. :D Your existing custom style will still be fine, though; the compiler does not save unless the compile is sucessful, so you can just close the window, and either start over or give up.
- You should now be able to use your JF account anywhere you can login with OpenID. If you test and it doesn't work, make sure you are currently using the layer you edited. Also, anytime you change layouts or styles or make a new one, you may have re-add the code from Step 4 to the new layer. (Just using the wizard to change colors or whatever shouldn't mess it up, though.) Also, make sure the URL you use to sign in is www.journalfen.net/users/yourusername, rather than yourusername.journalfen.net, since JF doesn't do subdomains.
And you should now be set! Thanks to
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)