Adding a Rate on NewsTrust Link to Livejournal
Over the past several weeks, I’ve been writing snippets of how to add a ‘Rate on NewsTrust’ link to various blogs and content management systems. You can see them
here,
here and
here.
My latest effort was to see if I could add them to
TypePad. Unfortunately, the hosted solution for TypePad, like the hosted solution for Wordpress, does not appear to give users the ability to modify a template enough to add rate on NewsTrust links.
TypePad is part of the Six Apart family of content management systems, and I did check to see what can be done with Livejournal, also part of the same family. It turns out that LiveJournal can be modified to add a Rate on NewsTrust link relatively easily.
You need to have a paid account to add a Rate on NewsTrust template. If you go to the “My Livejournal” page when you are logged in, and then click on Customize the look of your journal, you will see an advanced tab that includes
Create a new style.
First, I changed my Most Recent Events style. In the LASTN_EVENT section, I added
< a href="
http://www.newstrust.net/webx?storySubmitBookmarklet@@!url=%%permalink%%&title=%%xe:subject%%&story_type=Blog%20Post&publication_type=Blog&publication_name=Other&unlisted_publication_name=Aldon%20LiveJournal" target=_blank>Rate on NewsTrust</a>
Like with my other examples, values for story_type, publication_type, publication_name, and unlisted_publication_name are hardcoded. The URL is gotten with the %%permalink%% value and the subject is using %%xe:subject%% It is worth noting in doing this, I took the formatting out of the LASTN_SUBJECT section and put it in the places where %%subject%% is used. I did not work with the date, since the formatting would be messed up for other places where the data is used.
I inserted this code before the %%talklinks%% part of the LASTN_EVENT.
I followed the same procedure for modifying my Friends View template. The only difference is that I added &journalist_names=%%user%% to the string to get the name of the friend who had written the journal entry.
While I don’t expect a lot of people to be writing stories on Livejournal for submission to NewsTrust, it is useful to see how to do it here, and if there are some good citizen journalists on Livejournal, I hope they will add a ‘Rate on NewsTrust’ link to their templates.
I have not made the Most Recent Events style public since has information specific to me. However, I have made the Friends View template available since it doesn’t have anything specific to me in the style. It is available as styleid 674122. Give it a try.
Update 11/12/2007: NewsTrust has updated their site, and I've updated this message to reflect the changes. Most importantly, you should now use
http://www.newstrust.net instead of
http://beta.newstrust.netIn addition, they have added server side javascript to make it easier to add the Newstrust button.
<script type='text/javascript'>
newstrust_icon = '
http://www.newstrust.net/Images/newstrust.gif';
</script>
<script id="newstrust_button_script" src="
http://www.newstrust.net/js/submit_story.js" type="text/javascript"></script>
However, I could not get it to work in Livejournal. In addition, on other platforms, this is good for when the visitor has the specific story open, but isn't good for pages that list multiple stories on it.
Current Mood: accomplished