Newsflash

 
Home arrow Buzzword-noncompliant
Buzzword-noncompliant
This is where I write about various scripts and hacks I wrote.

Adding a hit counter or a site statistics tracker to Gallery
Written by Administrator   
Friday, 13 July 2007

I added a statistics tracker (my choice is StatCounter) to my Gallery2 installation. Adding a third-party statistics tracker to a web site involves adding a piece of HTML and Javascript code to every page of the site. For this I needed to know where Gallery2 HTML code is generated. As far as I could tell, each Gallery2 theme contains separate templates for HTML code generation. The templates are .tpl files located in themes/<theme name>/templates directory. The <BODY>...</BODY> tag rests in theme.tpl file. I put the tracking code right before the </BODY> tag. As far as I can see, it didn't break anything. However, since every theme has its own theme.tpl file, this would mean you have to add the tracking code to the theme.tpl file of each theme you use, otherwise the tracker will stop tracking if you change the theme.

I'm sure there are code segments somewhere in the Gallery2 code that are included in each and every Gallery2 page regardless of the theme (like the code that generates those "Validation", "Donate", etc. buttons at the bottom of the page), but I thought it was too much bother to find out where they were produced, especially since I mostly use just one theme anyway.

Last Updated ( Friday, 13 July 2007 )
 
Fixing the missing theme error in Gallery2
Written by Administrator   
Friday, 08 June 2007

I had Gallery2 installed on my website. I don't remember what was the original version I installed, but after an upgrade to 2.2.1 version of Gallery2 I got an error saying that the default theme, matrix, was inactive or not installed. My Gallery2 instance at that point was unusable, because any page I attempted to go to was throwing this error. This article describes how I fixed it.

When I originally posted this article, I said my fix was partial: Gallery2 still didn't work correctly. When I tried to add new images to it, I got a database error. But I figured out what I did wrong, and restored Gallery2 to its full functionality. I am now able to add images and perform all the other actions one might want to do with Gallery2.

Here is just the updated part that describes the solution to that last problem.

Last Updated ( Friday, 13 July 2007 )
Read more...
 
Unhelpful error messages in ASP.NET
Written by Administrator   
Monday, 12 February 2007

I'm just starting to work with ASP.NET, and I immediately ran into a problem that had me stumped until a more experienced coworker discovered a fix.

I wrote a very simple ASP.NET web application, and tried to deploy it -- i.e. to put it into its intended location on my machine. The folder where the application is deployed is not the same as the folder where the project is located. More importantly, I tried to get it to run under Internet Information Services, as opposed to under the temporary "ASP .NET development server" that Visual Studio 2005 creates for debugging purposes. (It ran just fine under the ASP .NET development server.) Here is what I did and the errors I ran into.

Last Updated ( Saturday, 07 July 2007 )
Read more...
 
Javascript in Joomla pages
Written by Administrator   
Sunday, 24 December 2006

If we want to put Javascript code in a page generated by Joomla, we can embed Javascript code segments in a content item between <script> tags. This has several disadvantages, which are addressed in this article. More efficient ways of embedding Javascript in Joomla pages are explored.

Last Updated ( Saturday, 07 July 2007 )
Read more...
 
Tooltip boxes test 1
Written by Administrator   
Tuesday, 09 May 2006

In this article I explain step-by-step the script I wrote for popping up tooltip boxes over parts of the text. I use this script in some of my articles on Gimp. My tool tip boxes contain reminders on how to perform certain actions in Gimp. Of course, it is already possible to create tip boxes by putting the tip box text in the title attribute of an element over which the tip box should pop up. But if you want to customize tip boxes with specific font type, size and color, or even add images to them, you need to write a script for that.
In this article I try to explain the script from the perspective of "why" rather than "what".
Last Updated ( Saturday, 07 July 2007 )
Read more...
 

(C) 2008 Elze's CMS experiment
Joomla! is Free Software released under the GNU/GPL License.