



I did a minor site hack on inanis.net tonight. Since noone visits the site, noone will notice, but basically it is a minor css/html hack to use float:left/float:right/clear:both type layout control instead of css relative positioning. It makes for a smaller style sheet file and somewhat cleaner code.
I also managed to get the BlogEngine.net software properly integrated into the site’s styling. That was a fargin pain in the arse and quite a bit harder to do than the old Presstopia software, but the new software has so many more features it was a no-brainer decision.
All the old google indexes to the old blog now point to nowhere since I completely deleted the old blog, but since noone comes here, I’m sure it will be fine until google does it’s re-index.




I am about to change my blog software from Presstopia to BlogEngine.net. Lets see how well this goes…
UPDATE:
Apparently, the conversion process went well, because it’s converted and the system is up and running. Now, I just have to hack the crap out of the template to make sure the blog integrates into the entire website properly…
UPDATE 2:
BlogEngine.net has some weirdness issues with my hosting provider. All should be ironed out, for now, but I am sure little issues will pop up from time to time.




So, the search function in the Presstopia blog software used for my blog is kinda broken. If you do a search for a term, and that term happens to be part of any non-display part of an <a> tag (i.e. an attribute) embedded in one of your posts, it will break the <a> tag.
Until now.
I made a custom hack to the highlighter algorithm that seems to work. Now I feel really smart, because I don’t know the first thing about advanced code. I sent an email to the blog software developer letting him know of this bug. Hopefully he can come up with a much more elegant solution. Below is what I said:
Salutations. I use the Presstopia Blog, and it works very well for my
needs. It’s simple, no frills, and efficient, just how I like things. I
also like your focus on styling everything, making it extremely
customizable. This allowed me to integrate it into my pre-existing
website without requiring me to redesign the site around your blog
software. Even though the “blog” link and everything under it are
entirely controlled by the Presstopia Blog software, the efficient
coding allowed me to change the blog’s layout to make it completely
transparent. You can check it out here: http://www.inanis.netI noticed a bug in the Search feature, however, that was really
annoying. If you did a search for any word or single character, and
said item happened to be inside or be a part of an <a> tag
embedded in a post, then the code would surround said item with the
<span> highlight code, and break the <a> tag.For example, if I had a post with an embedded link to another page on my site, like this:
Some post text and other crap.
<a href=”/home/music.html>Music!</a>
More post text about music.
The code would not only match the “Music” in the text and between the
<a> opening and closing tag, but also the “music” inside the href
of the opening <a> tag. This would, obviously, break the
<a> tag, resulting in this:Some post text and other crap.
<a href=”/home/<span
class=”highlight”>music</span>.html><span
class=”highlight”>Music</span>!</a>More post text about <span class=”highlight”>music</span>.
This obviously breaks the tag.
Since I love to take code into my own hands and destroy the hell out of
it just to see what happens, I created a quick and dirty hack that
seems to fix the problem. I am by no means a programmer by any stretch
of the imagination and my understanding of VB is basic at best, so my
code is quite crufty. Replacement code is below. If it finds a match
outside an <a> tag, the behavior is the same. If it finds one
inside an <a> tag, it prepends a little notice to the front of
the post body (Text) saying that it found a match inside the tag. I’m
sure you can come up with something much more elegant and faster…In my opinion, the search system overall needs checking added to it to
catch embedded HTML (for example: the < and > brackets of tags)
so it doesn’t break other formatting. Right now, if you search for
those things, it WILL break any formatting embedded in the post. I
believe this is an issue with both the search algorithm and the
“highlighting” algorithm, but I don’t have the knowledge to do any more
complex hacking on the idea.Oh, and by the way, do you plan on adding more features to the
Presstopia blog in the future? Personally, I would love to see a way to
administer the BlogRoll via the user interface. I also like the idea of
tagging. I wouldn’t be surprised if you said “no”, as they are not
trivial additions. I am sure they require changing the database layout
along with a chunk of new code, and if people upgrade to a new version,
there will have to be some sort of database upgrade script… :oPOh well, here is my dirty hack, from {ommitted for security}. Enjoy, and keep up the excellent coding.
‘FUNCTION : Highlight words in a text string
{ function code ommitted for security }


More Options ...
Categories
Tag Cloud
Blog RSS
Comments RSS

Void
Life
Earth
Wind
Water « Default
Fire
Light 