Everest Computers Blog About Computers and Web Design

Wordpress is a very useful tool as I found out when started writing this blog. When it’s installed, the default theme is used, which is fine but not what a blogger usually wants. A blogger in my view would like to have his or her own theme, which illustrates the point of the blog, the blog’s direction and shows the author’s taste.

There are two alternatives here. The first is to download and install a theme that has already been created by someone else and then customize it. There are so many themes available and so many designs that when I looked at them, I was amazed. But I couldn’t find exactly what I wanted, so I have had to download one, install it, customize it and even went to Styles.css file in order to tweak it to use the fonts that I wanted, the colours that I wanted and so on. That was hard ’cause I personally didn’t create the CSS style and finding what corresponded to what was - correctly saying - “difficult”. I tried the second theme, the third theme but it appeared that it wasn’t what I wanted at the end of the day - the design just didn’t click if you know what I mean.

What I wanted was a completely custom design. At the moment (December 2008) there are two ways to create your own Wordpress design from scratch:

The first is to go to Wordpress Theme Generator www.yvoschaap.com/wpthemegen/. Everything is done online here: a user chooses colours, fonts, panel positions and so on and after the design is complete, he or she gets the files that represent the new theme - to be added to the Wordpress installation - plus the permanent link to the new theme online - for possible future amendments. Excellent!

The second way is to use a program, which can be downloaded here: http://www.wordpressthemegen.com/. It works in the same way as above but offers much less options than the online editor. I have installed it but then removed it ’cause I didn’t really need. One can always try it anyway because all people have different tastes and what someone likes the others dislike and the other way round.

After the initial design, it is possible to add pictures, customize backgrounds, tweak the widget positions and do the other things a designer with CSS and PHP knowledge would do. If you don’t know all this stuff or don’t want to be bothered - I’m sure the new design would look nice without them if colours are matched and the fonts are readable and not intrusive.

Happy blogging!

Imagine the situation: you’re developing a website using classic ASP technology including “Include” directives. Obviously, all changes and amendments are done by you on your personal computer or a local server in your local computer network. After the changes, you upload the code to the web server, where the website is permanently hosted, and what do you find? The website is not working.

Amongst other reason it may also be because of the different root paths on your local computer and the remote web server. Different root directories don’t allow setting up the permanent path for Include if the website is to work on two different servers. I’ll show a trick to make it working.

Include directive can be of two variations: with “virtual” keyword and with direct “file” keyword. Usage of the virtual keyword indicates a path beginning with a virtual directory. Usage of the file keyword to indicate a relative path:

<!– #include virtual =”/html/header.inc” –>

<!– #include file =”headers\header.inc” –>

That’s ok if we know the directory and the asp file where Include is used is one of a kind. But what if they are scattered around the website, in different directories and it is necessary to point to a file in a specific location from all these different files around the website?

In this case we need to use “file” keyword because “virtual” simply doesn’t work. At leaset for me it definitely didn’t. So what I did is I specified the full path in the Include directive like

<!– #include file =”www.everestcomputers.co.uk\headerFiles\header.asp” –>

Did you know that you can use “.asp” instead of “.inc”? Me too, but it works and works fine - allows me to edit the incusion files and check the syntax in the same time.

But anyway, the above inclusion would work fine on the web server where the website is hosted. But what about the localhost or 127.0.0.1? There I’d need to add the following incusion:

<!– #include file =”localhost\headerFiles\header.asp” –>

That’s right. And here’s the trick. What we need to do is to create two files with different names of course - one for the web server and the other for localhost. Both will have the different paths like above. And we’re going to set up the default index files on the web server and the localhost differently - the name of the index file on the web server will be the name of the first file above, and the name of the index file on localhost will be the name of the second file above.

Here’s the example:

default path: root/directory1/directory2/

Index files setup: myFileWS.asp on the server; myFileLocal.asp on localhost, so www.everestcomputers.co.uk/directory1/directory2/ will bring up myFileWS.asp and localhost/directory1/directory2/ will bring up myFileLocal.asp.

Inside those two files we include the Incude directive with different paths that both point to the same file somewhere in the website structure, for example to \headerFiles\header.asp and the development is done!

It will be necessary to hardcode the server web address, but it can be changed if necessary. The small price to pay for the solution that works.

I’ve been working on this problem for two days after starting this blog and browsed the Internet a lot in search of solution. I must say there are a lot of posts, a lot of links, a lot of opinions and a lot of provided “working” solutions but for me (IIS6 + blog in in subdirectory) nothing worked. Some posts were quite old and were for example for IIS5, some were only for blogs located in the root directory and in order to implement the others, it was necessary to buy the additional program that would mimic asapi Apache filter.

The solution I found worked for me, so I have stopped the search. Maybe the new Wordpress updates will come or new IISs will come and they will break the fragile structure of the redirect construction (as always) but at the moment I’m happy even though today I’ve heard that the pound is at all time low against Euro at 1.07, which means all British earners lost 1/3 in real terms in Europe and technically across the globe too.

Anyway, here’s the subdirectory located wordpress installation permalinksolution for IIS6 I used:

===> Created the 404 redirect file with the content like this (for example wp-404-redirect.php):

<?php
$qs = $_SERVER['QUERY_STRING'];
$pos = strrpos($qs, ‘://’);
$pos = strpos($qs, ‘/’, $pos + 4);
$_SERVER['REQUEST_URI'] = substr($qs, $pos);
$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
include(’index.php’);
?>

===> Added this file to my blog directory i.e. http://www.everestcomputers.co.uk/blog/.
===> Went to my hosting settings and added three 404 redirects to the above file (404, 404-1 and 404-2) as follows (selected URL rather than FILE):

/blog/wp-404-redirect.php

===> In Wordpress setting added the special permalink structure (it can be different but this one I like the most - it’s concise and informative):

/%year%/%month%/%postnum%

That’s it! It works as required and I’m

looking forward to quality permalink blogging. Still need to change the design, the fonts etc but the good start to the blog is given.

It is very important to keep the software up to date on the computer. This is because the malicious programs, viruses and other unwanted stuff is evolving every day, and with them the anti-viruses and the internet security programs are evolving too. There is a parity and this parity is broken if the software that protects the computer is not up-to-date.

All programs that protect pcs have update functionality built within them and it should be used. But the balance should also be found between the unwanted excessive computer activity plus internet access (that’s when these programs access the internet to find out if a new version is available) and the computer performance. I recommend going for the updates once a week or manually if forgetfullness is not a user’s feature of the character. Too much update activity can be bad for a computer because there are a lot of programs that may require an update. If all of them go for it, the computer performance would just grind to a halt.

Also, the internet browsers, ftp programs and any other soft that is used for the internet access should also be updated in time. It is never acceptable to work with version 2 of the program if version 3 is out there. This might work for the programs that don’t require the internet access like text editors, DVD players, games etc but should be a rule for the programs that access the internet.

And at the end - you’ve probably guessed - Windows updates! Always keep the operating system up to date too no matter what. I would again suggest checking for updates once a week.

When dealing with single and double quotes on the html or asp page, it is sometimes necessary to change them to so called character entity. Here’re the most common replacements I use:

& — &amp;
‘ — &apos; or &#39;
> — &gt;
< — &lt;
” — &quot;

The character entities like &#39; obviously exist for other characters, they just need to be found on the net.

For some reason, &apos; doesn’t work but whe replacements with # (hash) do, so they should be used.

In order to replace the necessary character, in Java the following line can be added:

taskNotes = taskNotes.replaceAll(”‘”,”&#39;”);

 
Powered by WordPress |  Admin
Copyright © 2007 - 2009 Everest Computers: Computer Support & Web Design. All rights reserved.