Pete Finnigan's Web Development Blog

Cookie Policy:We only use essential cookies on small sections of this website. For details see here.


Home
Archives
Oracle Security
Oracle Security Blog

Greymatter Forums

July 2005
SMTWTFS
     12
3456789
10111213141516
17181920212223
24252627282930
31      

RSS 1.0 FEED
RSS 2.0 FEED
Atom 0.3 FEED
Powered by gm-rss 2.0.0


Valid XHTML 1.0!

Powered By Greymatter

Saturday, July 16th

Another Greymatter Bug in the 1.3.1 upgrade


When i upgraded Greymatter to 1.3.1 on my main Oracle Security blog I also found a second bug. This is when you are writing an entry in the "Add A New Entry" screen there are usually some useful keystroke shortcuts. For instance CRTL-SHIFT-A to add a link. I investigated and found the problem - I reported this on the Greymatter forums as well. Here is what i had to say on the subject:

Hi everyone,

I upgraded to 1.3.1 from 1.3 and started to use it to add a new entry. I am used to adding links with CTRL-SHIFT-A and bold with CTRL-SHIFT-B etc but when i tried to add a link in 1.3.1 it did not work. I delved into the code (old version - 1.3) in gm-library.cgi and found that these short cuts are implemented with the Javascript function gmshortcutkeys. In the 1.3.1 version of gm-library.cgi this function has been removed.

I am not totaly certain but I do not think that this is intentional. The change log for 1.3.1 mentions removing autolinking being removed due to a number of complaints. I found the change made for this. Also I saw in the change log that "easy formatting" for the entry subject has been removed - this is not the same. Therefore I think that the removal of the function is a bug. The accompanying text to tell users which key combinations to press is still in the form.

I have modified my gm-library.cgi to put the function back in. I have tested this and it works fine. The changes I made to the 1.3.1 version of gm-library.cgi are as follows:


# Pete Finnigan - 27/06/05 the above lines in fixDate were

# }
# //-->
#
# #;

# end Pete Finnigan - 27/06/05

$gmheadtagtwo = $gmheadtag;

$gmheadtag .= qq#
//-->




#;

# start Pete Finnigan - 27/06/05 - the above was:-

# $gmheadtag .= qq#
#
#
#
# #;

# end Pete Finnigan - 27/06/05


# start Pete Finnigan 27/06/05 - add back gmshortcutkeys - deleted in 1.3.1 - also added onKeyPress to body tag
$gmheadtagtwo .= qq#
function gmshortcutkeys() {
if ((parseInt(navigator.appVersion) >= 4) && (navigator.appName == "Microsoft Internet Explorer")) {
if (event.ctrlKey != true) return;
gmselection = document.selection.createRange().text;
if (window.event.keyCode == 1) {
gminsertlink = prompt("What do you want to link to?", "http://")
if (gminsertlink == null) return;
document.selection.createRange().text = '' + gmselection + '';
return;
}
if (window.event.keyCode == 2) {
document.selection.createRange().text = '' + gmselection + '';
return;
}
if (window.event.keyCode == 9) {
document.selection.createRange().text = '' + gmselection + '';
return;
}
if (window.event.keyCode == 21) {
document.selection.createRange().text = '' + gmselection + '';
return;
}
}
}

//-->




#;
# end Pete Finnigan - 27/06/05


kind regards

Pete

Hmmmm. No matter how hard I try I cannot get GM to display the HTML code in the above excerts. I have tried to use ampresand representations of the HTML but GM just gets rid of them and returns even the original text back to its correct format. To see the exact HTML please have a look at the Greymatter Forums post I made.
Pete on 07.16.05 @ 08:48 PM GMT [link]


Wednesday, July 13th

A bug in Greymatter 1.3.1 causing nested borders


When I upgraded my main Oracle Security Blog from version 1.3 of Greymatter to 1.3.1 I came across a bug. When I viewed all my pages to check that they looked OK i found that the main index page and the monthly archive indexes had a problem. The border around each entry was nesting. I.e each entry seemed to be inside each other. I investigated the Greymatter source code and found the problems. Below is the description I posted in a bug report to the greymatter forums:-

Hi Everyone,

I have just updated my blog (http://www.petefinnigan.com/weblog/entries/index.html) from 1.3 to the latest 1.3.1. The upgrade went smoothly but when I have rebuilt all my indexes and entries I had two problems. The first was that on the main index page the borders around the entries were nested inside each other so that by the end of the page I had every border nested inside each other. I tracked down the problem to the fact that my gm-templates.cgi file had the date grouping footer entry missing for the main index page. I did not upload the template file as I did an upgrade. I can only surmise that the update function when writing the template did not write the </div>
back into the template (line 14). I did not look further for the bug as I simply uploaded my old template which fixed the issue.

My second problem was that the same issue occurred with the archive index pages for each month. The date grouped entries which have borders were nesting inside each other. The issue again was that the </div>
in the date archive footer variable was not getting written to the HTML files. This time the entry was present in the gm-template file (line 77) correctly. I tracked the problem down to a bug in the code in gm-library.cgi at line 2491. The line is shown below:-


# added $dategrouping flag checking : 1.3.1
# flipped cracker 6/29/2004
if (($nextdatemark ne $indexcurrentdatemarker) && ($dategouping eq " open") && ($thisentryopenstatus eq "open") && ($indexentrycounter ne $newstayattopnumber)) {
if ($gmdategroupingfooterarchivetemplate ne "") {


There are two bugs in the use of the new $dategrouping variable - the first is that it is spelled $dategouping (i.e. the "r" is missing) and the second is that the check for "open" includes a space in front of the word "open". I fixed the line as :


# added $dategrouping flag checking : 1.3.1
# flipped cracker 6/29/2004
# Pete Finnigan 26-06-05 - fixed variable name dategrouping and removed space before "open"
if (($nextdatemark ne $indexcurrentdatemarker) && ($dategrouping eq "open") && ($thisentryopenstatus eq "open") && ($indexentrycounter ne $newstayattopnumber)) {


and uploaded the gm-library.cgi file. I rebuilt the archive templates and they are now built correctly.

Please add this latter fix to the next update. Or if anyone else has had this issue I hope these solutions will help

Thanks

kind regards

Pete
Pete on 07.13.05 @ 11:14 AM GMT [link]


Sunday, July 10th

Future Google page rank


I just came across two interesting websites that allow you to predict the future page ran in Google of URL's in your site. The first thing I should say is that neither site says how they do it. Google does not publish the complete algorithms used and neither do they publish their internal databases - other than what you can get through Googles API pages and tools - and that would not be much in this endeavour, I bet. Both sites should be taken as entertainment although the RustyBrick site seems to have more credibility in the community. The two pages are:

http://www.iwebtool.com/pagerank_prediction

and

http://www.rustybrick.com/pagerank-prediction.php

Have a look, they both seem interesting.
Pete on 07.10.05 @ 11:04 PM GMT [link]


Copying Greymatter for multiple blogs


I talked about multiple blogs in Greymatter the other day and the fact that unless you are prepared to hack the code then native multiple blogs administered from the same interface is not currently possible in Greymatter. As I don't have time to investigate how to do this now - I will do in the future though - I had to resort to installing multiple copies of the Greymatter software on my site, one for each blog.

Before I started on this process I searched quite extensively on the GreyMatter Forums but did not find a definitive article on copying an existing Greymatter installation and reusing it. I know you can simply install again from scratch but I wanted to re-use an existing install as I knew that it worked, in this case my install from my Oracle Security blog. Anyway as I said I couldn't find a definitive guide to do this so I worked it out myself.



  • First I created a new directory structure on my new site - the same as the structure on the old site. This doesn't need to be the case though. I added "archives", "entries", "cgi-bin" and "emoticons" directories to a base directory called "weblog"

  • I then zipped up all of the files from the existing blog in each directory and copied them across to the new directories

  • I then deleted all of the files in the archive directory

  • I also deleted all files in the entries directory

  • I then locally edited (copied it off the webserver to my PC) the gm-config.cgi file to change just the paths. I used the same directory structure on the new site so only the prefixes needed to be changed.
  • I then copied a new gm-counter.cgi file from a new install to the cgi-bin directory. I could have just replaced every line in the existing file with "0" instead

  • I also copied an empty gm-cplog.cgi file to the cgi-bin directory

  • I also copied an empty gm-entrylist.cgi file to the cgi-bin directory

  • Finally I copied a new gm-templates.cgi file from a new installation zip of 1.3.1. If I have wanted to retain the same style, menus etc from the old site I could have started with my existing template file. For now I went with a new one

  • I next checked all the file permissions on the cgi-bin directory. gm-library.cgi to 644, gm.cgi, gm-upload.cgi, gm-karma.cgi and gm-comments.cgi to 755 and the rest to 666.

  • The next step was to go to the site and run the gm.cgi script and follow the instructions to visit the configuration and review it. I did this and then ran diagnostics

  • I then made some small changes to the templates

  • It was then ready to make an entry to test it




I hope that this short list is useful to anyone else wanting to simply copy a Greymatter installation. If for any reason you want to simple "zero" an existing blog - i.e. delete all entries and start again the you can use the above list without the copying and chmodding.
Pete on 07.10.05 @ 10:19 PM GMT [link]


Thursday, July 7th

How many words should the extract in the RSS 1.0 feed contain?


On my main Oracle Security blog i have been generating an RSS 1.0 feed for quite some time, almost from me first writing the feed in fact. I use the gm-rss.cgi script written by Bananbob, which does an excellent job.

Just to digress a for a minute, I did look into whether there was an RSS 2.0 script available for Greymatter a long time ago as well but with no luck. I even asked on Greymatter forums, again no luck. Anyway I have recently been reading up on RSS, 0.9, 0.91, 0.92, 1.0, 2.0 and Atom and now understand the differences between all of them and also I understand how to create my own RSS 2.0 script for greymatter. When I get the chance I will get around to creating it and I will release it here.

Anyway back to the plot. A few weeks ago I noticed a post by Tom Kyte in his blog about just putting a teaser (a few words) in his RSS feed, so i decided to do the same. The discussion and reasoning is shown in my post titled "Changed my RSS feed to spit out the first 20 words and a link to the entry".

This has worked fine for a few weeks and I am getting a better indication of who reads my feed rather than just taking the RSS/RDF file. I got an email yesterday from David Best about the number of words i include in the feed (currently 20) where he said the number of words is too small to make a proper judgement on whether to go ahead and access my page and read the entry. I have had a look into this and have decided to double the number of words to 40. This post is the first to test out the new output in the feed. Let’s hope it meets with better approval.
Pete on 07.07.05 @ 08:31 PM GMT [link]


How many words should the extract in the RSS 1.0 feed contain?


On my main Oracle Security blog i have been generating an RSS 1.0 feed for quite some time, almost from me first writing the feed in fact. I use the gm-rss.cgi script written by Bananbob, which does an excellent job.

Just to digress a for a minute, I did look into whether there was an RSS 2.0 script available for Greymatter a long time ago as well but with no luck. I even asked on Greymatter forums, again no luck. Anyway I have recently been reading up on RSS, 0.9, 0.91, 0.92, 1.0, 2.0 and Atom and now understand the differences between all of them and also I understand how to create my own RSS 2.0 script for greymatter. When I get the chance I will get around to creating it and I will release it here.

Anyway back to the plot. A few weeks ago I noticed a post by Tom Kyte in his blog about just putting a teaser (a few words) in his RSS feed, so i decided to do the same. The discussion and reasoning is shown in my post titled "Changed my RSS feed to spit out the first 20 words and a link to the entry".

This has worked fine for a few weeks and I am getting a better indication of who reads my feed rather than just taking the RSS/RDF file. I got an email yesterday from David Best about the number of words i include in the feed (currently 20) where he said the number of words is too small to make a proper judgement on whether to go ahead and access my page and read the entry. I have had a look into this and have decided to double the number of words to 40. This post is the first to test out the new output in the feed. Let’s hope it meets with better approval.
Pete on 07.07.05 @ 08:31 PM GMT [link]


Wednesday, July 6th

Multiple blogs in Greymatter


One of the *missing* features of the excellent blogging tool Greymatter is the functionality that would allow you to run multiple blogs from one blogging tool. Tools such as MovableType do allow this. This is something I would dearly like to see added to Greymatter. I have done some searching on the Greymatter Forums and found a few posts where people ask about adding this feature to Greymatter. A few of these posts say that it would be hard to do and as far as I am aware no one has done it yet. The solution seems always to be use multiple installations of Greymatter to allow multiple blogs. This is what I have done with this blog and my Oracle Security blog.

All of that said why cannot Greymatter simply have one interface for multiple blogs? - At this stage I am not sure as I have only read the forums entries and not had a look in detail at the code myself. At the end of the day anything is possible, it just depends on how much time you are willing to invest in the endeavour. As I said I have not looked at the code yet but I know that the code uses no internal data structures to hold the state of the current blog you are working on. Actually administering a greymatter install for multiple blogs and users accessing existing entries from multiple blogs is two different issues. For multiple blogs we would need one code base in the cgi-bin. This would mean that the configuration, entries and archives would need to be separated for each blog and this would then mean that as the cgi is used it would need to know which blog it is working on. For administration, I would guess an initial screen is needed to select the blog, and one to change blogs (select a new blog) if necessary. Then the Greymatter code would need to change so that it acted on the correct blogs files. This is all thinking out loud but wouldn’t that just mean ensuring the correct path prefix is used for each admin / CGI access? and also for files generated (entries and indexes) and also individual files accessed? Provided you did not want to actually work on multiple blogs at the same time in the same admin session then there should not be an issue in manipulating paths to ensure one admin set-up can modify and create multiple blogs (as with now and multiple installs they would need to be in separate directories) but with core CGI files.

What would happen for users accessing these multiple blogs with centralised CGI? - Nothing for the static pages - obviously, they should work as now. It is when the user interacts with the CGI that issues could arise. The correct set of blog files would need to be accessed from one set of CGI. Again it is a case of adding the right prefix to the paths but in this case how? - this prefix needs to be sent to the CGI from the caller - Anyway I am thinking out loud here and I have also not studied the perl in detail yet. I am sure it’s possible to administer multiple blogs in Greymatter without installing multiple copies but it will need some analysis of the code - I will let you know when I have had a good look.
Pete on 07.06.05 @ 10:05 PM GMT [link]


Tuesday, July 5th

A new Web Development based web log


Hi everyone,

This is a new weblog that I have started today. It is not my first weblog, that honour goes to my Oracle Security weblog, that blog is aimed totally at the specific subject of the security of Oracle databases as its name suggests. In the last few years I have spent an inordinate amount of time working on my website PeteFinnigan.com and in that time investigated and learned quite a bit about websites and how to create, maintain and promote them in search engines. I have also found out quite a bit about web logging and have posted some 430 or so posts on my Oracle Security blog.

I started this blog to be able to share some of my thoughts and knowledge gained in the area of web development. I am not sure about exactly what i will talk about here but it will certainly include some interesting papers, links, articles, tools etc. I plan to talk about blogging tools in detail. I am using greymatter at the moment for this blog. I have some firm ideas about what i want from a blogging tool and I will talk about these in a later post and why i want them and also which tools support my needs and whether I can use them. I also would like a complete Content Management System (CMS) for my website (s). I have talked about this in the past on my Oracle blog in a post called "Oracle security and content management". I still have not got very far with implementing a CMS for my site but I do have clearer ideas of what i want and maybe how I can do it. Because of my ideas of what I want in blogging tools have not gelled totally yet, I am still using greymatter. This may turn out to be a longer term solution if it seems better to modify Greymatter to do what I need. Another option is to create my own blogging and CMS tools - I will discuss this later.

I am also interested in CSS and moving my site away from a table layout, this, I know is a subject that gets discussed a lot. I am also interested in the style of my sites, although I do prefer the back-end coding parts. I am not a designer as you can tell from the layout and look of my site. Well this one has no style at all so far. I do have some string ideas about what i want to do with the style and layout of my sites. I will discuss these ideas as well.

I am also interested in site ranking, search engines and so on. I have found some good monitoring tools in the past and I will share links to these.

Finally (for now) I am interested in some of the techniques used for syndication, RSS and Atom feeds, XML-RPC, pinging, trackbacks and all. I want to talk about these subjects as well.

There will be many more things to talk about I am sure. I am not sure about my posting frequency on this blog, as I still plan to maintain my Oracle blog at least once per day. We will see! OK, that is it for now, its started!
Pete on 07.05.05 @ 09:44 PM GMT [link]