filed under:studies @ 12:58:02 comments(0)
I have updated the Protected copyright photo using
Simon Willison's addLoadEvent() function.
The problem for me is to be able to write a tutorial that can be understood easily by a beginner, copied and used without too much re-writing. I have a Javascript file that I import which controls the email address display and the events. To avoid conflicts, I had removed the imported file from the Protected photos page (I could have written another Javascript file with all the window.onload calls, imported it and solved all the problems, but it would have been even more difficult to explain, making the tutorial understandable only by advanced Javascript programmers). Now I wrote it back in and added some comments in the Javascript code to explain what is going on. For a beginner is confusing: how to import files, what happens, why, in which order..Simon Willison solution is pretty straightforward and should be easily understood, especially since there is a clear explanation of how it works.
tags: programming
filed under:studies @ 17:46:30 comments(0)
I have published the PHP code of my menu. The idea behind it was to have a menu that can be updated from a single file otherwise every change would mean re-pulish the whole site. The file can be used only on PHP pages, I still have some static XHTML ones and those I have to manually update and re-publish but it's a small percentage. The code could be streamlined since I repeat the same process four times but that's due to the fact that I want the menu to look the way it does and I don't know another way to float the links like that except coding each category in its own unordered list.
I also published a page that enables a user to paste a piece of code and get all the “<” and “>” symbols replaced by entities (< and >) so that it then becomes readable and can be published since the browser does not try to interpret it as active code. I find it useful and it definitely saves a lot of time.
tags: programming tools
filed under:studies @ 14:52:07 comments(0)
I added a contact link, using the same technique I explained in Anti spam email, and an anchor at the beginning of the page that lets the user skip the navigation if CSS is disabled. I also found out that the missing date is due to the fact that:
“If you are using the default index.php, the date only appears on the top most entry for each day (latest post of that day) when viewing your blog. It is used to list all blog entries under that particular date.”
as stated in the support forum.
tags: website changes