Welcome to WikiSoftPeople.com the one stop for all of your Web needs. We specialize in Web Design, Search Engine Optimization, PHP programming, Email Pipe Scripting, Google Maps Integrations, VoIP Integrations, Domain Space, Server Space, Domain Names, Web Hosting and much more. Our Motto is if you can dream it we can do it!

June 2009 Archives

So you want to add a blog to your existing website?

Moveable type is a freeware blog that you can accomplish this with. Upon installing movable type you get a site that looks like the one below.




When you first bring it up it is somewhat dissapointing. Most of all it isn't branded in any way for your current web site. Sure you might be able to put your company name in the title, but what about the layout that you have already put blood sweat and tears into?





You might think of trying some of the other styles. This one above is called Cityscape. Cityscape is a template that comes with Moveable type along with several others that can be changed from the administration page. I was tempted to use this one because it matches the city theme of my web site and it does look pretty sleek.

In Movable type if you want to change themes you just go to the Design tab in the mt.cgi  page and you select the styles option. This will bring you to a page that shows your current style selected. If you would like to see more options click default styles.




So how do you make these styles fit with your current theme!? Below I am going to share some basic tricks to get it going.

 

Step 1: Install Moveable Type .

For a basic tutorial on how to get Movable type installed on your domain go here.

How to Implement Movable Type


 

Step 2: How the Blog Works and Where Critical Style Sheets are Located


Now that you have Movable Type installled and running on your web site lets talk about how to customize it or better yet let's talk about where that install set up key components like your style sheet, where your files are saved and how pages are generated.

If you look up your style sheet through your source you will notice that it points to a style sheet that has nothing in it but an import that imports two separate style sheets. These two different style sheets are called.


screen.css and base.css


Base.css sets up the base of each page. Moveable Type uses Perl in the style sheets. It uses Perl to read IF statements in your style sheets to determine whether the style being used is 3 collums 2 collums or something else. It reads this information in a commented out section at the top of the style sheet. It also gathers information such as the author name of the style and so on which becomes visible when you select a style from the select a style page in the administration console.


Screen.css is the other imported style sheet and screen controls the elements like the logo, the header etc... We are mostly going to be working with Screen.css

 

Step 3: Add your own folder for your own style sheet

 

We will start the process by looking at where the screen.css is located for the cityscape theme.

screen.css is located at mt-static/themes/cityscape-sf/screen.css

In this folder are all the images that go along with that style for screen as well.

And at mt-static/themes/ there are different folders for all the different styles available to you.

This is where you add your own folder and your own screen.css file inside that folder.




If you look at the image above you will notice that I added a folder called Wikisoftpeople. Inside here are my images for the wikisoftpeople layout such as the header the banner, my navbar etc...

In the screen.css are all the important pieces of information I used to include all of these properties.

 

Step 4: Editing the style sheet.

 

There are two ways to customize your web site from this point on.

At frist I thought maybe I should simply use my current CSS from my homepage and try to just implement specific features of the blog onto each page.

It seems particularly easy because moveable type works with doc tags that are built into it. Here is an example of one below.  

<$mt:BlogName encode_html="1"$>

If you put this doc tag in your html it will show your blogs name.

With this in mind I figured all I had to do was include these tags where I wanted to include blog features..

What I found while trying to achieve this effect though was that it was the doc tags are rather complex and that they work in conjunction with each other. 


I decided to try a different approach first. I decided to look for a default Movabletype layout that looked similar to my own page allready and modify it so it fit within my web site. I.E. editing the screen.css file on my own.

This works and did not take more than a few hours. This part you will have to work out much on your own, because each persons own stylesheet is defferent. Play with the different styles and try to add your own images and backgrounds and change the widths etc...  


For example I had to move the Perl doc tag for footer out of its div tags and all the way to the bottom for the footer to stay at the bottom.

 
Post your own integrations in the comment boxes below. If you need any help with this on your  web site I would be glad to help.




One thing I noticed on a few movable type blogs was they had customized comment bubbles at the bottom of their pages like this one. I thought that this was much easier on the eyes and was wondering if perhaps there was a plug-in that people were using to get this effect. I looked around and found nothing. I realized it must not be that hard to edit the CSS to do this and it wasn't.

So here is what you will need.

download these images:

this one




and this one



You are going to want to copy these images to where your screen.css file resides. You can find out where this is by looking in the source of your entry page and following the trail to find out where the css file is. It may link to a different .css file that imports the screen.css file. Find out where that is and then copy these images into that directory.

After you have done this you are going to want to add a couple lines of code to your .css file.


.comment .comment-header { background: #fff url(entry-comment-bg-bot.gif) no-repeat 0 0; padding: 8px 0 0 25px; }

.comment-content { background: #eeeeea url(entry-comment-bg-top.gif) no-repeat 0 0; padding-top: 5px;}



Depending on which style template you are using you may need to make sure that the comment boxes are not being changed in the base .css file. Typically this should work on its own as is.

Now if you refresh your page with your comments you should see the comment box, but does it look like this?




That is because the default comment template displays the person who wrote the comment above the bubble. We want the person who wrote the comment below instead so we need to move some of the document tags around. Here is what the tags should look like.


Text File with Comments Template Code up to where Footer Begins

 If you replace everything in your comments template up to where the footer begins with the code inside the referenced text file, you should get nice looking comment bubbles like the test one at the bottom of this page. Lastly you may need to edit the comment images themselves to fit on your screen. I custom made mine to fit to the width of my blog. If you have any questions let me know. Thanks, Matt
I have been working with web sites and doing design for years now and of course without a doubt I noticed the importance of blogs on the web. Specifically I noticed how they could be used to raise search engine rankings.

I would like to post a tutorial of how to implement a blog on your own web site.

So after looking over wordpress and several other free blogs out there I decided to settle with using movable type.

The reason why I chose movable type was their program was quick and easy to download and the documentation was fairly easy to read on how to install it.

If you would like download movable type do so now by going to.

Download Movable Type

I downloaded the developer version.

Once you download movable type you are going to want to extract the files. It is a pretty hefty zip file with over 2,000 files and components so it may take you a while depending on your pc to even extract the files to a folder.

This is where things get a little bit complicated. Movable Type is written in Perl. If you were like me you probably have never installed a script written in Perl before. Movable type sort of assumes that you know how to work with Perl and their directions are not too clear. I had to search the web to find out more about Perl and to find out if I had Perl capabilities on my server.

It turns out that I did and this is how I figured that out. I downloaded a Perl hello world script and placed it in my cgi-bin. Before I did this though I did all sorts of non-sensical things like tried to place a .htaccess file in different directories to let me run Perl scripts from places other than my cgi-bin.

Don't do this. Perl scripts for the most part - if you want to make your life easy run from the cgi-bin. This is how I see it becasue it worked pretty well.

Below is the hello world script so you can get Perl working on your server. Save this text with notepad and save it as helloworld.pl pl is the suffix for perl programs. Place this in your cgi-bin directory on your web server, which should be www.something.com/cgi-bin/hellworld.pl

#!/usr/bin/perl -w

     # Tell perl to send a html header.
     # So your browser gets the output
     # rather then <stdout>(command line
     # on the server.)
print "Content-type: text/html\n\n";

     # print your basic html tags.
     # and the content of them.
print "<html><head><title>Hello World!! </title></head>\n";
print "<body><h1>Hello world</h1></body></html>\n";
Here is the example on my server:

<Hello Wold Example

If you get Perl working correctly it should look just like this in your browser with your own domain.

It should be noted that this did not work for me at first. The reason why!? Because I needed to "Set Permissions" or CHMOD the file to 755. It will not work unless it has permissions set to 755. I use dreamweaver to set my permissions and it should be noted that for some reason files within the cgi-bin on my server do not set permissions the same way. If I set the permissions then refresh it appears that the permissions go back to what they were previously. I found though that if I set the permissions and then disconnect from the remote server and then reconnect the changes I made upon reconnect are saved. This may work the same way with your ftp client and your server as well so try that out if it gives you some trouble.

I also wanted to know what version of Perl I had because I think it specified that I needed version 5 or greater.

So I have another script to find that out as well. Once again put this in your cgi-bin and set permissions to 755.

#!/usr/bin/perl -w
$command= $];
$title = "Perl Version";
 
print "Content-type: text/html\n\n";
print "<html><head><title>$title</title></head><body>";
 
print "
<h1>$title</h1>
 
\n";
print "Perl version : ".$command;

It will look like this if everything is working correctly.

Perl Version

If it is not good I am sorry because I am not a Perl expert, but I think these are some pretty good trial and error steps to get you started. Contact your site admin or host for more info and how you can get Perl set up if needed.

If everything is good from here you want to take movable type that you extracted and move the contents of the first subfolder and ftp them to your cgi-bin folder on your server. You have about 2,000 plus files to upload so most likely that will take a little while.

You are going to want to CHMOD/set permissions on everything to 755 and then run the file mt.cgi from your address bar.

http://www.something.com/cgi-bin/mt.cgi

This will get your movable type installation started. From here most of it is pretty self explanatory. I did run into a couple of hick ups when I was setting up my send mail server, but that was only because gmail kept putting my movable type messages into the spam folder and I thought I wasn't receiving any mail at all. Also I was having errors on the first part of the installation because I hadn't CHMOD all the files in the cgi-bin and folders to 755.

The only other issue I ran into was that movable type could not run many of the files in the mt-static folder because they are in the cgi-bin folder. Remember cgi-bin is mainly for cgi! Don't worry though in the installation procedures it has a check for this and recognizes this problem and offers a solution for it. What it does is it copies the folder mt-static to your www/  or public_html/ domain directory. It also updates all necessary links all across the board.

You will also be asked what you want to name your blog. This is how you willl access your files. I named mine blog not knowing that it would be where the blog resides. Thus if you look up at the address bar you will see the main folder for this blog is under www.wikisoftpeople.com/blog

You may want to put more thought into this for search engine optimization purposes.

However if you have gotten this far it means you should be able to start posting entries. Any time you want to post an entry you just log into movable type from your mt.cgi address or www.something.com/cgi-bin/mt.cgi

Any time you want to veiw your blog you go to www.something.com/blog or whatever you named your main directory.

There are some cool styles that come with movable type and you may want to play around with those. In my next blog I am going to begin writing about implementing movable type into a web site that allready has a design and the best way to go about doing this.

Thanks for reading and if you have any questions feel free to post.

About this Archive

This page is an archive of entries from June 2009 listed from newest to oldest.

July 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.