Archive for the ‘Linux’ Category
Today I migrated Wibble to a new copy of WordPress, although acording to wordpress.com
On December 18th, 2009, WordPress Version 2.9, named for Carmen McRae, was released to the public.
All looks nice and shiny and new in the editor view. I will have to play some more to see what other features I can find.
if like me you have grabbed a non standard theme you may not have the code to make this work in the theme, after a brief trial with nested tables i realized this was just not going to work, time to get with the new format and do it using a style sheet.
After a bit of Google-ing around I discovered that I needed to add an images section this to my style.css
/* Begin Images */
p img {
padding: 0;
max-width: 100%;
}/* Using ‘class=”alignright”‘ on an image will (who would’ve
thought?!) align the image to the right. And using ‘class=”centered’,
will of course center the image. This is much better than using
align=”center”, being much more futureproof (and valid) */img.centered {
display: block;
margin-left: auto;
margin-right: auto;
}img.alignright {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}img.alignleft {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}.alignright {
float: right;
}.alignleft {
float: left
}/* End Images */
I got this code from the classic style sheet, now i can insert an image and use the syntax
<img class=”alignleft” title=”text here” src=”http://www.wibble.net.nz/wp-content/uploads/2009/05/imagename.png” alt=”text here”/>
And my image will wrap around ether left, right or centered, one trick also to remember is if you want to get the test to start after the image you can insert an empty tag like this
<div style=”clear:both;”></div>
however the editor will keep on deleting this ..
I have been playing with the header and have thought an image map may be cool to add to this, i havent used one of these for years and last time i did it in HTML.
So the key was to get the code for the image map, which i got from this site
You just put in a link to the image you want to image map, then draw the maps then copy the code to the header [in this case].
<div id=”imgmap”>
<img height=”290″ width=”900″ src=”header.jpg” alt=”" />
<ol>
<li id=”area1″><a href=”http://”> area1 </a> </li>
<li id=”area2″><a href=”http://”> area2 </a> </li>
<li id=”area3″><a href=”http://”> area4 </a> </li>
</ol>
</div>
I remove the img line, and just entered the rest of the code in the header.php, the image line was redundant, I also found you have to put the closing </div> tag at the end to get the code inside the header. and of course add the url’s for the shortcuts
Then you have to go to the style.php and add the second part of the code
#imgmap {
position: relative;
_zoom: 1;
}#imgmap li {
position: absolute;
display: block;
list-style: none;
outline: 0px dashed;
overflow: hidden;
}#imgmap li a {
display: block;
width: 100%;
height: 100%;
_background: url(space.gif);
text-indent: -1000em;
}#area1 {
left: 740px;
top: 60px;
width: 153px;
height: 227px;
}#area2 {
left: 55px;
top: 154px;
width: 53px;
height: 48px;
}
#area3 {
left: 299px;
top: 105px;
width: 53px;
height: 47px;
}
in this code the only changes were the line outline: 0px dashed; whic the generatotr wrote as 1px which of course meant the boxes showed.
That was all there was to it
okay so as it apparent I have just got a wordpress server running, this was easier said than done!
To do this I am using the LAMP stack, I have built a Fedora10 ESXi Virtual Machine,.
The install instructions on the wordpress site are really very good and Fedroa 10 even has the wordpress software in the install list.. so I thought this would all be pretty simple.. but there were a couple of fish hooks, funny how they seem very minor once you know what they are but I suppose that is the essence of this.
The first one was that you have to get the mysql database at least alive before you can even get phpMyAdmin to work, the missing bit is :
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
I know seems so simple, but perhaps I am stupid but this is a must do … then you can go into phpMyAdmin and create the empty database and the user.
The only other one was that I started with an Apache server, then installed wordpress, of course I did all this on a local name name, then pointed the dns of my external domain at it, adjusted the firewall and tried to make the website the main website or the root website, of course this didn’t work.. after a lot of head scratching I discoverd I had to do two things .. create a symlink to the /usr/share/wordpress location fedora had installed wordpress in and then change the httpd.conf file to have the website referred like this..
<Directory “/var/www/wibble”>
DocumentRoot “/var/www/wibble”
However it still didn’t work.. until I cleared out the database and ran the install.php again from the correct domain name.
So its up and going, I will play with it over the next few weeks and who knows may even get addicted, I am totally addicted to mediawiki at work for documenting everything in my job.
